[PATCH kvm-unit-tests] x86: svm: fix typo in setting up nested page tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This will cause problems when accessing memory above the first GB, as
in the l1mmio test.

Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
 x86/svm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/x86/svm.c b/x86/svm.c
index 1e6908a..00b3191 100644
--- a/x86/svm.c
+++ b/x86/svm.c
@@ -87,7 +87,7 @@ static void setup_svm(void)
         page = alloc_page();
 
         for (j = 0; j < 512; ++j)
-            page[j] = (u64)pte[(i * 514) + j] | 0x027ULL;
+            page[j] = (u64)pte[(i * 512) + j] | 0x027ULL;
 
         pde[i] = page;
     }
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux