]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
x86: Extend bit range returned by x86_64_get_flags
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 1 Mar 2016 06:15:38 +0000 (07:15 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Mon, 7 Mar 2016 12:49:05 +0000 (13:49 +0100)
In order to support also the AMD IOMMU with x86_64_paging, we extend
the set of bits returned by get_flags handler. We now include all bits
ignored by the MMU, which includes the bits relevant for the AMD IOMMU.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/x86/paging.c

index 952c0584f59ac8fa72d96962ee23e9776e5ca8a7..5519598d96cc2c867f57d7b5f5cf05303b3e0aee 100644 (file)
@@ -25,7 +25,7 @@ static bool x86_64_entry_valid(pt_entry_t pte, unsigned long flags)
 
 static unsigned long x86_64_get_flags(pt_entry_t pte)
 {
-       return *pte & BIT_MASK(6, 0);
+       return *pte & (BIT_MASK(63, 52) | BIT_MASK(11, 8) | BIT_MASK(6, 0));
 }
 
 static void x86_64_set_next_pt(pt_entry_t pte, unsigned long next_pt)