b73c7c6e | 13-Jun-2017 |
Andrew Jones <drjones@redhat.com> |
lib/x86/smp: introduce on_cpus and cpus_active
Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> |
10594e42 | 07-Jun-2017 |
Paolo Bonzini <pbonzini@redhat.com> |
x86: clean up GDTs
- Add a 16-bit code and data segment to cstart.S. - Move ring 3 segment descriptors at the end of the GDT, and lay them out as required by syscall/sysret in cstart64.S. - Only d
x86: clean up GDTs
- Add a 16-bit code and data segment to cstart.S. - Move ring 3 segment descriptors at the end of the GDT, and lay them out as required by syscall/sysret in cstart64.S. - Only define TSS_INTR for 32-bit, and place it where cstart64.S puts the 32-bit ring 0 segment. - Document that the same data segment can be used for 32 and 64-bit code. - Mark all descriptors as accessed.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
fd6aada0 | 17-May-2017 |
Radim Krčmář <rkrcmar@redhat.com> |
use %# instead of 0x% in all format strings
It's one character shorter, properly prefixed, and also provides error detection: %#d triggers a warning.
Done with `sed -i 's/0x%/%#/g' **/*.[ch]` to mo
use %# instead of 0x% in all format strings
It's one character shorter, properly prefixed, and also provides error detection: %#d triggers a warning.
Done with `sed -i 's/0x%/%#/g' **/*.[ch]` to motivate the use of %#, existing padding was raised by 2 to account for the counted "0x" (output should be the same).
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
d31f6adb | 15-May-2017 |
David Hildenbrand <david@redhat.com> |
x86: use asm-generic spinlock
Signed-off-by: David Hildenbrand <david@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> |
359575f6 | 21-Apr-2017 |
Peter Feiner <pfeiner@google.com> |
x86: ept access tests
Signed-off-by: Peter Feiner <pfeiner@google.com> Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20170421005004.137260-31-dmatlack@google.com> Signed-off-by: Pa
x86: ept access tests
Signed-off-by: Peter Feiner <pfeiner@google.com> Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20170421005004.137260-31-dmatlack@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
1df80b57 | 21-Apr-2017 |
Peter Feiner <pfeiner@google.com> |
lib: x86: page table utilities
Convenience functions for manipulating and querying page tables.
Signed-off-by: Peter Feiner <pfeiner@google.com> Signed-off-by: David Matlack <dmatlack@google.com> M
lib: x86: page table utilities
Convenience functions for manipulating and querying page tables.
Signed-off-by: Peter Feiner <pfeiner@google.com> Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20170421005004.137260-30-dmatlack@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
8e32da1b | 21-Apr-2017 |
Peter Feiner <pfeiner@google.com> |
lib: x86: multi-page allocator
Need this for testing huge pages.
Change-Id: Iecf4f916a3d3d24844957dcd4e81c8aa10b1cdda Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20170421005004.
lib: x86: multi-page allocator
Need this for testing huge pages.
Change-Id: Iecf4f916a3d3d24844957dcd4e81c8aa10b1cdda Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20170421005004.137260-25-dmatlack@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
7516869f | 21-Apr-2017 |
Peter Feiner <pfeiner@google.com> |
lib: x86: store free pages in ascending order
Makes allocation of contiguous physical pages simpler.
Signed-off-by: Peter Feiner <pfeiner@google.com> Signed-off-by: David Matlack <dmatlack@google.c
lib: x86: store free pages in ascending order
Makes allocation of contiguous physical pages simpler.
Signed-off-by: Peter Feiner <pfeiner@google.com> Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20170421005004.137260-24-dmatlack@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
3c7d322e | 13-Jan-2017 |
Andrew Jones <drjones@redhat.com> |
x86: enable environ
Give x86 unit tests access to environment variables. The environment variables are passed to the unit test with '-initrd env-file'.
Signed-off-by: Andrew Jones <drjones@redhat.c
x86: enable environ
Give x86 unit tests access to environment variables. The environment variables are passed to the unit test with '-initrd env-file'.
Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
93dd2aa3 | 13-Jan-2017 |
Andrew Jones <drjones@redhat.com> |
x86: import initrd
If an initrd is provided on the qemu command line, then set a pointer to it during setup.
Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@re
x86: import initrd
If an initrd is provided on the qemu command line, then set a pointer to it during setup.
Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
82f2f21a | 16-Jan-2017 |
Andrew Jones <drjones@redhat.com> |
lib/pci: reduce library noise
Avoid printfs in library code unless in a printing function, e.g. pci_dev_print. Particularly we can avoid printing anything the caller can easily print themselves, if
lib/pci: reduce library noise
Avoid printfs in library code unless in a printing function, e.g. pci_dev_print. Particularly we can avoid printing anything the caller can easily print themselves, if so desired.
Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
show more ...
|
533a738f | 11-Jan-2017 |
Andrew Jones <drjones@redhat.com> |
lib/x86/apic: fix 32-bit compilation
Use the proper name, as the improper one isn't defined... Also cleanup some trailing spaces.
Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andrew Jones
lib/x86/apic: fix 32-bit compilation
Use the proper name, as the improper one isn't defined... Also cleanup some trailing spaces.
Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
386d4498 | 03-Jan-2017 |
Alexander Gordeev <agordeev@redhat.com> |
intel_iommu: fix an incorrect address translation
Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
3223ade2 | 30-Dec-2016 |
Peter Xu <peterx@redhat.com> |
intel-iommu: add ioapic irq test
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-of
intel-iommu: add ioapic irq test
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>
show more ...
|
560586d9 | 30-Dec-2016 |
Peter Xu <peterx@redhat.com> |
intel-iommu: allow setup trigger mode for irte
IOAPIC interrupts need this. Let's be prepared.
Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
b4377753 | 30-Dec-2016 |
Peter Xu <peterx@redhat.com> |
intel-iommu: use atomic ops for irte index alloc
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 on
intel-iommu: use atomic ops for irte index alloc
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>
show more ...
|
0172b95c | 30-Dec-2016 |
Peter Xu <peterx@redhat.com> |
x86: ioapic: generalize trigger mode
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 Bon
x86: ioapic: generalize trigger mode
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>
show more ...
|
ae21b795 | 30-Dec-2016 |
Peter Xu <peterx@redhat.com> |
lib/asm-generic: add atomic.h
Provide some gcc-builtin atomic ops.
Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
7f2477c2 | 12-Dec-2016 |
Peter Xu <peterx@redhat.com> |
x86: intel-iommu: add IR MSI test
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 add
x86: intel-iommu: add IR MSI test
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>
show more ...
|
92d2c192 | 12-Dec-2016 |
Peter Xu <peterx@redhat.com> |
x86: intel-iommu: add dmar test
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: Paol
x86: intel-iommu: add dmar test
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>
show more ...
|
9d7e08c0 | 12-Dec-2016 |
Peter Xu <peterx@redhat.com> |
vm/page: provide PGDIR_OFFSET() macro
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 <p
vm/page: provide PGDIR_OFFSET() macro
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>
show more ...
|
16c0b05f | 12-Dec-2016 |
Peter Xu <peterx@redhat.com> |
x86: intel-iommu: add vt-d init test
Adding fundamental init test for Intel IOMMU. This includes basic initialization of Intel IOMMU device, like DMAR (DMA Remapping), IR (Interrupt Remapping), QI (
x86: intel-iommu: add vt-d init test
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>
show more ...
|
d77d128f | 12-Dec-2016 |
Peter Xu <peterx@redhat.com> |
x86/asm: add cpu_relax()
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@r
x86/asm: add cpu_relax()
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>
show more ...
|
e0a5cfca | 17-Dec-2016 |
Paolo Bonzini <pbonzini@redhat.com> |
vmexit: add self-ipi speed tests
These are designed to test APICv and optimizations of KVM_REQ_EVENT.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
1bde9127 | 14-Dec-2016 |
Jim Mattson <jmattson@google.com> |
x86/nVMX: Test L1 interception of #BP and #OF in the L2 guest
Int3 (#BP) and INTO (#OF) are unusual, in that they are reported as "software exception" rather than "hardware exception" in the VM-exit
x86/nVMX: Test L1 interception of #BP and #OF in the L2 guest
Int3 (#BP) and INTO (#OF) are unusual, in that they are reported as "software exception" rather than "hardware exception" in the VM-exit interruption information field of the VMCS.
Signed-off-by: Jim Mattson <jmattson@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|