- 12 Jan, 2017 13 commits
-
-
Alex Bennée authored
This allows a slightly nicer formatting of the text when displayed on some repository hosts. We keep a symlink from README for the old-school purists. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alex Bennée authored
Using %lx as a format string is not portable across 32/64 bit builds. Use explicit PRIx64 format strings. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alex Bennée authored
So we can have portable formatting of uint32_t types. However there is a catch. Different compilers can use legally subtly different types though so we need to probe the compiler defined intdef.h first. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
This patch reverts the stty parts of 8727c886 "runtime: better handling of QEMU aborts", as we can more robustly fix the same issue by simply redirecting /dev/null into qemu's stdin. The obvious side effect of this is that serial input will no longer be wired up to the tty (or any other input file descriptor), but unit tests do not, and should not, be reading from the serial port anyway. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alexander Gordeev authored
Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
IOAPIC irqs are line-based irqs comparing to MSI ones (which are memory-based). To make it complete, let's also test IOAPIC interrupts in the IR testcase. Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
IOAPIC interrupts need this. Let's be prepared. Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
To allow concurrent allocation of irte index. Meanwhile, move the IRTE setup debug line into the alloc since vtd_setup_msi() might not be the only one to dump this info in the future. Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
Move it out of x86/ioapic.c since it can be further re-used. Also, renaming into TRIGGER_*. Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
Provide some gcc-builtin atomic ops. Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
Generalize this function out of pci_setup_msi(), then it can be further used to enable INTx (or, disable MSI). Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
To fetch INTx irq line number. Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 22 Dec, 2016 19 commits
-
-
Peter Xu authored
First of all, vtd_setup_msi() is provided. It setup IRTE entries, meanwhile, setup PCI device MSI vectors corresponding to VT-d spec. Meanwhile, IR MSI test is added to intel IOMMU unit test. The basic IR test is carried out by a edu INTR raise request. When write to the intr raise register, interrupt will be generated. Type of interrupt will depend on the setup (either INTx or MSI). Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
pci_cap_walk() is provided to allow walk through all the capability bits for a specific PCI device. If a cap handler is provided, it'll be triggered if the cap is detected along the cap walk. MSI cap handler is the first one supported. We can add more cap handler in the future. Meanwhile, pci_setup_msi() API is provided to support basic 32/64 bit address MSI setup. Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
DMAR test is based on QEMU edu device. A 4B DMA memory copy is carried out as the simplest DMAR test. Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
QEMU edu device is a pci device that is originally written for educational purpose, however it also suits for IOMMU unit test. Adding helpers for this specific device to implement the device logic. The device supports lots of functions, here only DMA operation is supported. The spec of the device can be found at: https://github.com/qemu/qemu/blob/master/docs/specs/edu.txt Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
One helper function to set/clear specific bit in PCI_COMMAND register is introduced. Then, provide a function to do most of the common PCI init work. Suggested-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
Let's provide a more general way to scan PCI bars, rather than read the config registers every time. Then let x86/vmexit.c leverage pci_scan_bars() Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
To extend current PCI framework, we need a per-device struct to store device specific information. Time to have a pci_dev struct. Most of the current PCI APIs are converted to use this pci_dev object as the first argument. Currently it only contains one field "bdf", which is the bdf of current device. For a few APIs like pci_config_*() ops or pci_find_dev(), I kept the old interface (use PCI BDF value rather than "struct pci_dev") since they can be used in a open context that without any specific PCI device. Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
This can be used in further patches. Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
That's something can be used outside alloc.c. Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
Adding fundamental init test for Intel IOMMU. This includes basic initialization of Intel IOMMU device, like DMAR (DMA Remapping), IR (Interrupt Remapping), QI (Queue Invalidation), etc. Further tests can use vtd_init() to initialize Intel IOMMU environment. x86/unittests is updated to add this test. Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
Suggested-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
This will be useful to be put inside loops. Suggested-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Peter Xu authored
Suggested-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Peter Xu <peterx@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Currently test.log gets output of the form test1-command-line test1-output SUMMARY: test2-command-line test2-output SUMMARY: test3-command-line ... Having a blank line before SUMMARY, and not after, it makes it tough to group lines by eye. Change it to test1-command-line test1-output SUMMARY: test2-command-line test2-output SUMMARY: test3-command-line ... The empty line is moved from report_summary to runtime in order to remove it altogether when running tests individually or as a standalone. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Radim Krčmář authored
Broadcast to address 0xff is not exercised by seabios+linux so we better test it. Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com> [Use TSC instead of countdown loop. - Paolo] Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
https://github.com/rhdrjones/kvm-unit-testsPaolo Bonzini authored
arm/arm64 patches ready for master
-
Paolo Bonzini authored
These are designed to test APICv and optimizations of KVM_REQ_EVENT. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 19 Dec, 2016 8 commits
-
-
Andrew Jones authored
Reported-by:
Andre Przywara <andre.przywara@arm.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
Reported-by:
Andre Przywara <andre.przywara@arm.com> Cc: Laurent Vivier <lvivier@redhat.com> Cc: Thomas Huth <thuth@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
cpu_init must be called before mem_init because cpu_init determines the cache-line sizes. Currently io_init has no dependency on mem_init, but io_init should be allowed to use heap allocation, and someday it may, so we proactively comment it. Cc: Laurent Vivier <lvivier@redhat.com> Cc: Thomas Huth <thuth@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
While reading code I noticed we need to call thread_info_init before mem_init to be correct. In practice it hasn't mattered because cpu0 is calling mem_init, and it's cpu index is 0, which is what a fresh first boot would have it be anyway. With reset tests (coming soon) combined with mmu tests (hopefully coming someday) it could be problematic though, so let's fix it. Additionally comment the order to make sure we maintain it. The io_init dependency on mem_init is because io_init calls init functions that make use of heap allocation. Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
Some configurations don't have pci or pci-testdev. This patch avoids saying FAIL in those cases. Instead we get SKIP. Cc: Alexander Gordeev <agordeev@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
Instead of using cpu0 and irq=0 for the IPI test, use something a bit more interesting. To make sure we can still run the test with the minimal number of cpus (2), we need to use sender=1. As the irq in the test (an SGI) can only be 0 to 15 and there's really no difference, then use irq=1. sender=1 is a bit limited for the long term, as we may want to test IPIs across host sockets with pinned vcpus. But we can improve on this later, possibly with the introduction of a command line parameter. Reviewed-by:
Eric Auger <eric.auger@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
Reviewed-by:
Andre Przywara <andre.przywara@arm.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-
Andrew Jones authored
Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Eric Auger <eric.auger@redhat.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
-