diff options
author | 2009-09-16 12:25:56 +0300 | |
---|---|---|
committer | 2009-09-16 16:00:49 -0300 | |
commit | 9ba9b2db8bbb95ebfea87e98182e1d5024a1ad2c (patch) | |
tree | adb001418ce6af432d461daad8f90f269ebbb402 /kvm | |
parent | test: Add fwcfg interface for getting the cpu count (diff) | |
download | qemu-kvm-9ba9b2db8bbb95ebfea87e98182e1d5024a1ad2c.tar.gz qemu-kvm-9ba9b2db8bbb95ebfea87e98182e1d5024a1ad2c.tar.bz2 qemu-kvm-9ba9b2db8bbb95ebfea87e98182e1d5024a1ad2c.zip |
test: vm: map mmio 1:1
With this assumption, the apic code will be able to run either before or after
the vm is set up.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'kvm')
-rw-r--r-- | kvm/user/test/x86/vm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kvm/user/test/x86/vm.c b/kvm/user/test/x86/vm.c index 03c73546b..ec9c1458a 100644 --- a/kvm/user/test/x86/vm.c +++ b/kvm/user/test/x86/vm.c @@ -189,6 +189,9 @@ static void setup_mmu(unsigned long len) unsigned long *cr3 = alloc_page(); unsigned long phys = 0; + if (len < (1ul << 32)) + len = 1ul << 32; /* map mmio 1:1 */ + memset(cr3, 0, PAGE_SIZE); while (phys + LARGE_PAGE_SIZE <= len) { install_large_page(cr3, phys, (void *)phys); |