- 27 Feb, 2015 3 commits
-
-
Andrew Jones authored
Sprinkle in some more isbs after context-changing operations, as the ARM ARM states we should. I haven't seen any problems without them, but we should do it right. Also, *actually* set the MAIR in asm_mmu_enable. We were reading, not writing... Luckily this was just spotted while adding the isbs, rather than leading to a nightmare debug session some day... Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Andrew Jones authored
Use a lock to avoid exposing the counters, and any other global data, to potential races. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
Andrew Jones authored
Move the spin_lock/unlock declarations to lib/x86/asm/spinlock.h, allowing lib code, e.g. lib/report.c, to use spinlocks. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
- 26 Feb, 2015 1 commit
-
-
Marcelo Tosatti authored
v2: fix typo Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com>
-
- 13 Feb, 2015 1 commit
-
-
Paolo Bonzini authored
This is similar to emulator.c, that does not run on 32-bit systems. This bug happens (due to kvm_mmu_page_fault's call to the emulator) during Windows 7 boot. Reported-by:
Erik Rull <erik.rull@rdsoftware.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> --- v1->v2: go through kvm_mmu_page_fault like Windows 7 does. Emulation of locked operations on MMIO does not go through the cmpxchg path, gva_to_gpa fails.
-
- 27 Jan, 2015 1 commit
-
-
Chris J Arges authored
There is a failure to build on 32-bit hosts: x86/hypercall.c: In function ‘test_edge’: x86/hypercall.c:42:2: error: ‘test_rip’ undeclared (first use in this function) test_rip = 0; ^ This patch fixes this issue. Signed-off-by:
Chris J Arges <chris.j.arges@canonical.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 20 Jan, 2015 4 commits
-
-
Radim Krčmář authored
smptest was failing and we didn't notice, turn it into unit test. Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Radim Krčmář authored
We used MMIO (xAPIC) for x2APIC. This is the same as using xAPIC in globally disabled mode, and APICv enforces this by returning 0 on APIC MMIO reads under x2APIC. Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Radim Krčmář authored
There is no point in executing it through run_tests.sh. Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Radim Krčmář authored
x86/unittests.cfg uses the variant with underscore. Rename tscdeadline-latency.c instead of fixing x86/unittests.cfg because we use only underscores elsewhere. Signed-off-by:
Radim Krčmář <rkrcmar@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 16 Dec, 2014 16 commits
-
-
Paolo Bonzini authored
These are added already by the compiler. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Implement asm_mmu_enable and flush_tlb_all, and then make a final change to mmu.c in order to link it into arm64. The final change is to map the code read-only. This is necessary because armv8 forces all writable code shared between EL1 and EL0 to be PXN. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
This changes the layout for arm too, but that's fine. The only thing to keep in mind is that while arm64 will have a single 64k page for its stack, arm will have 16 4k pages. If the number of stack pages matters, then unit tests that want to work for both arm and arm64, may need to avoid using more than one page, even though the memory is there. 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
* don't assume 1G PGDIR_SIZE or L1_CACHE_BYTES pgd alignment * use page level descriptors for non-I/O memory * apply new pgd/pud/pmd/pte methods * split mmu.h to share function declarations * use more generic flag names in mmu.c Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
To use page level descriptors we need some pgd/pud/pmd/pte methods, and a few more flags defined. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
This allows it to be different for arm64, even with setup.h shared. 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 the initial drop of the arm64 test framework and a first test that just checks that setup completed (a selftest). kvm isn't needed to run this test unless testing with smp > 1. Try it out with yum install gcc-aarch64-linux-gnu ./configure --cross-prefix=aarch64-linux-gnu- --arch=arm64 make QEMU=[qemu with aarch64, mach-virt, and chr-testdev] ./run_tests.sh Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Files in lib/arm including "asm/someheader.h" will get lib/arm/asm/someheader.h, not lib/asm/someheader.h. So we need to use <> instead of "" in order to prepare for headers of the same name, but for a different arch. We change all '#include's of all arm files, as consistency looks better. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Separate the concepts of an 'svc', the syscall instruction present on both arm and arm64, and 'svc mode', which is arm's kernel mode, and doesn't exist on arm64. kernel mode on arm64 is modeled with exception level 1 (el1). Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Drop the unused arguments from setup(), passing only the fdt. This allows setup() to be more easily shared with arm64. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
When $ARCH != $TEST_DIR we should look there too. This patch cheats though and makes cscope always look there, but then gets rid of the duplicates generated when $ARCH == $TEST_DIR. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Correct a type mismatch in the cpus initialization. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
A size_t can have a different size when compiled as 64-bit vs. 32-bit. When unsigned int is what we want, then make sure unsigned int is what we use. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Marcelo Tosatti authored
Fix typo. Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 15 Dec, 2014 12 commits
-
-
Andrew Jones authored
arm/selftest was already making use of prefixes, managing them itself. Use the prefix support now built into report. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
So far only applied in a couple obvious places, where temporary prefixes were already used. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Add some methods to report in order to manage output prefixes. Also add strstr to string, as it was useful for implementing report_prefix_pop. Prefixes can be useful, as test code frequently has the following pattern main() { foreach(subtest) run(subtest) } But, if we want output lines to include 'subtest: ', then we need report("%s: ...", cond, subtest, ...) for each report line. With push/pop we can now just do subtest() { report_prefix_push(subtest); report(...); ... report(...); report_prefix_pop(); } 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>
-
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
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>
-
Eugene Korenevsky authored
This checks some usage cases of VMX MSR load/store feature: 1) VM-entry MSR-load area is correctly filled 2) VM-exit MSR-store area is correctly filled 3) VM-exit MSR-load area is correctly filled 4) Attempt to load MSR_FS_BASE on VM entry (must generate VM-entry failure due to MSR loading) Signed-off-by:
Eugene Korenevsky <ekorenevsky@gmail.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Nadav Amit authored
Previously KVM ignored the mod field of MOVBE instruction, so MOVBE from register to register succeeds, although it should fail (cause a #UD exception). This test check that a #UD is indeed delivered upon such MOVBE. The test would not work if MOVBE is unsupported. Signed-off-by:
Nadav Amit <namit@cs.technion.ac.il>
-
- 12 Dec, 2014 2 commits
-
-
Nadav Amit authored
test_conforming_switch in the taskswitch2 tests, miss es initialization. Fix it. Signed-off-by:
Nadav Amit <namit@cs.technion.ac.il> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Andrew Jones authored
Using -kernel doesn't force qemu to exit immediately, and thus we "hang" when trying to run arm/run. Using -initrd works though. Signed-off-by:
Andrew Jones <drjones@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-