Dong, Eddie wrote:
+static bool is_rsvd_bits_set(struct kvm_vcpu *vcpu, u64 gpte, int level)
+{
+ int ps = 0;
+
+ if (level == PT_DIRECTORY_LEVEL)
+ ps = !!(gpte & PT_PAGE_SIZE_MASK);
No need for this. If you set rsvd_bits_mask[1][0] ==
rsvd_bits_mask[0][0], then you get the same behaviour. The first index
is not the page size, it's just bit 7.
You'll need to fill all the indexes for bit 7 == 1, but it's worth it,
with the 1GB pages patch.
+ return (gpte & vcpu->arch.mmu.rsvd_bits_mask[ps][level-1]) != 0;
+}
+
#define PTTYPE 64
#include "paging_tmpl.h"
#undef PTTYPE
+int cpuid_maxphyaddr(struct kvm_vcpu *vcpu)
+{
+ struct kvm_cpuid_entry2 *best;
+
+ best = kvm_find_cpuid_entry(vcpu, 0x80000008, 0);
+ if (best)
+ return best->eax & 0xff;
+ return 32;
+}
+
Best to return 36 if the cpu doesn't support cpuid 80000008 but does
support pae.
--
error compiling committee.c: too many arguments to function
--
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