- 10 Nov, 2015 6 commits
-
-
Alex Bennée authored
Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Andrew Jones <drjones@redhat.com> Message-Id: <1446769483-21586-7-git-send-email-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <1446769483-21586-6-git-send-email-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <1446769483-21586-5-git-send-email-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
This is a fix just due to being too much of a type-A person. I noticed the issue while reading over the function, and decided to fix it, even though it's unlikely to be a problem ever because top is read-mostly (like written once, then only read, type of mostly). Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <1446769483-21586-4-git-send-email-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
It's pretty safe to not even bother checking for NULL when using malloc and friends, but if we do check, then fail hard. Signed-off-by:
Andrew Jones <drjones@redhat.com> Message-Id: <1447102433-20322-1-git-send-email-drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Test that TMR works right even if the virtual-APIC page is modified by another processor. Either x2apic or xapic accesses are tested, depending on whether x2apic is available. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 07 Sep, 2015 1 commit
-
-
Levente Kurusa authored
It should be 'exception' instead of 'excecption'. Signed-off-by:
Levente Kurusa <lkurusa@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 21 Aug, 2015 2 commits
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 03 Aug, 2015 1 commit
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 31 Jul, 2015 1 commit
-
-
Paolo Bonzini authored
Test the undocumented ICEBP (aka INT1 or INT01) opcode, and test that dr6.BS is not modified by neither watchpoints nor breakpoints. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 30 Jul, 2015 12 commits
-
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
We recently modified how mmu_enabled works in order to speed spinlocks up (see c33efcf3 and b141dbac). Unfortunately c33efcf3 was a bit hasty in removing mmu_set_enabled. I had forgotten one of the reasons I introduced it was because secondaries don't go through mmu_enable(), they go straight to asm_mmu_enable from secondary_entry. This patch brings it back, albeit renamed to mmu_mark_enabled to match mmu_mark_disabled. The patch also moves mmu_mark_disabled from psci code to smp code, as psci code shouldn't need to care about mmu stuff, and because we now have a nice balance in the smp code - we mark the mmu disabled for the secondary before we kick it, and then mark it enabled on the init. Finally, a bit unrelated, I've added a lengthy comment to __mmu_enabled in order to warn about what can't be called from there. We need to be cautious there because mmu_enabled() gets scattered around easily, being in basic functions, and thus there's risk of recursion. Signed-off-by:
Andrew Jones <drjones@redhat.com> Reported-by:
Levente Kurusa <lkurusa@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>
-
Andrew Jones authored
make install wasn't very useful without also installing scripts for the qemu command lines. I suspect 'make install' was never used. Installing standalone tests could be useful though, so let's do that instead. 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
This is a pretty ugly bash script, wrapped around a couple ugly bash scripts, and it generates an ugly sh script. But, it gets the job done. What's the job? Take a unit test and generate a standalone script that can be run on any appropriate system with an appropriate qemu. This makes distributing single, pre-compiled, unit tests easy, even through email, which can be useful for getting test results from a variety of users, or even for deploying the unit test as utility (if it works that way) in a distribution. "Packaging" works like shar, but doesn't use shar, as it's better to avoid the dependency. Can be used to create just one unit test, or all of them ('make standalone'). The standalone test(s) are placed in ./tests. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Only execute the test if DRYRUN isn't set to yes. This is used by mkstandalone.sh Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
To avoid duplicating unittests.cfg parsing code in other scripts, let's put it in a file where it can be shared. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Alex Bennée authored
This may be overkill for a project as small as the unit tests now but perhaps it pays to be explicit? Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Test resampling of level interrupts after EOI, by leaving the IRQ line set in the ISR. One tests does reset the IRQ line after a while, the other uses masking instead in the ISR. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Keeping the selector that was loaded from the 32-bit GDT is okay, because only code segment descriptors differ between 32- and 64-bit mode. In fact the same is true for %ss as well, so let's just remove the whole segment loading from load_tss. Thanks to Bandan Das for debugging. Reported-by:
Shih-Wei Li <shihwei@cs.columbia.edu> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 23 Jul, 2015 1 commit
-
-
Paolo Bonzini authored
kvm-unit-tests was keeping DS/ES/FS/GS loaded with the segment descriptors provided by the multiboot boot loader (which are 32-bit), and instead loading SS with 0. The vmx.flat test failed because KVM did not like doing writes into such an SS. Load again the segment registers after entering 64-bit mode, for both the BSP and the APs. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 03 Jul, 2015 5 commits
-
-
Andrew Jones authored
This is port of the test in virtualopensystems tcg_baremetal_tests. Signed-off-by:
Andrew Jones <drjones@redhat.com> [Rename test to spinlock-test. Use atomics by default. - Paolo] Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
spinlock torture tests made it clear that checking mmu_enabled() every time we call spin_lock is a bad idea. As most tests will want the MMU enabled the entire time, then we can inline a light weight "nobody disabled the mmu" check, and bail out early. Adding a light weight inlined check vs. a compile-time flag suggested by Paolo. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
The mmu is enabled automatically for all cpus, they must disable it themselves if they don't want it on. Switch from managing a cpumask of enabled cpus to one of disabled cpus. This allows us to remove the mmu_set_enabled call from secondary_cinit, and the function all together. Signed-off-by:
Andrew Jones <drjones@redhat.com> [Place CPUs in MMU disabled state at startup. - Paolo] Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Allow unit test cpus to disable the MMU. Why not? We want the test framework to be as flexible as possible. Callers will have to deal with the cache coherency fallout... Cache flush support is still forthcoming to the framework though. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
It shouldn't be necessary to use a barrier on the way into spin_lock. We'll be focused on a single address until we get it (exclusively) set, and then we'll do a barrier on the way out. Also, it does make sense to do a barrier on the way in to spin_unlock, i.e. ensure what we did in the critical section is ordered wrt to what we do outside it, before we announce that we're outside. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 13 May, 2015 2 commits
-
-
Steve Rutherford authored
Add tests for fundamental behaviors of the IOAPIC: Edge & level triggered interrupts Level triggered interrupt coalescing Level triggered EOIs Interrupt masking Passes with most recent version of KVM on Intel x86. Signed-off-by:
Steve Rutherford <srutherford@google.com> Message-Id: <1431482143-28018-2-git-send-email-srutherford@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Steve Rutherford authored
Split apart the APIC tests into constituent parts (IOAPIC and APIC tests). Signed-off-by:
Steve Rutherford <srutherford@google.com> Message-Id: <1431482143-28018-1-git-send-email-srutherford@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 12 May, 2015 4 commits
-
-
Paolo Bonzini authored
This makes it simpler to add more tests in the future. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Xiao Guangrong authored
This test case is used to produce the bug that: KVM may turn a user page to a kernel page when kernel writes a readonly user page if CR0.WP = 1. This shadow page entry will be reused after SMAP is enabled so that kernel is allowed to access this user page Signed-off-by:
Xiao Guangrong <guangrong.xiao@linux.intel.com> Message-Id: <1430988242-7186-1-git-send-email-guangrong.xiao@linux.intel.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Bandan Das authored
This extends the sanity checks done on known common Qemu binary paths when the user supplies a QEMU= on the command line Fixes: b895b967 Signed-off-by:
Bandan Das <bsd@redhat.com> Message-Id: <jpg383krpli.fsf@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Jan Kiszka authored
When we get an EXTINT exit, the guest RIP already points to the instruction after the one that sent it into HLT state. Moving the RIP based on stale insn_len caused spurious L2 crashes. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Message-Id: <554729D3.5060005@siemens.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 09 Apr, 2015 1 commit
-
-
Bandan Das authored
Before: ./x86-run ./x86/msr.flat QEMU binary has no support for test device. Exiting. After: ./x86-run ./x86/msr.flat A QEMU binary was not found, You can set a custom location by using the QEMU=<path> environment variable Signed-off-by:
Bandan Das <bsd@redhat.com> Message-Id: <jpg384j1rkm.fsf@redhat.com> [Fix invocation with QEMU environment variable. - Paolo] Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 18 Mar, 2015 1 commit
-
-
Radim Krčmář authored
GCC 5.0.0 enables raw strings by default and they have higher priority than macros, thus R"[...]" is interpreted incorrectly: lib/x86/isr.c:112:30: error: invalid character ')' in raw string delimiter lib/x86/isr.c:112:8: error: stray ‘R’ in program lib/x86/isr.c:112:26: error: expected ‘:’ or ‘)’ before string constant "orl $0x200, (%%"R"sp)\n\t" Fix it by putting a space between macro R and a string literal. (We already do that somewhere.) Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
- 13 Mar, 2015 2 commits
-
-
Jan Kiszka authored
KVM tends to patch and emulated vmmcall on Intel. But that must not happen for L2. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Jan Kiszka authored
Code compiles to the same binary, but now with one warning less. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
- 27 Feb, 2015 1 commit
-
-
Andrew Jones authored
Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-