- 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 8 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>
-
Paolo Bonzini authored
Holes across the 3GB mark can occur on 64-bit machines. Use posix_memalign to reserve some space in the process's address space for the TSS, and carve a second hole for it. The memory itself is not used---it's only that we want the process to not use that area while in guest context, and the easiest way to do it is to allocate memory. Allocations still are not allowed to go up to 4GB, because of the APIC access page and EPT identity pagetable lie. Detect the situation and print a nice error message. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Do not pass size==0 unless the slot has been created before. This returns EINVAL. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
This will sign extend pointers that have bit 31 set. Go through uintptr_t instead, so that the next conversion to uint64_t will zero-extend. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 10 Dec, 2014 1 commit
-
-
Marcelo Tosatti authored
To test latency between TSC deadline timer interrupt injection. Signed-off-by:
Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 03 Dec, 2014 1 commit
-
-
Chris J Arges authored
In emulator.c/tests_smsw, smsw (3) fails because h_mem isn't being set correctly before smsw is called. By using the + constraint modifier for memory we can ensure the compiler no longer optimizes out the assignment before smsw. Signed-off-by:
Chris J Arges <chris.j.arges@canonical.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 31 Oct, 2014 2 commits
-
-
Andrew Jones authored
We should probably always run with the mmu on, so let's enable it from setup with an identity map. 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>
-