diff mbox

RFC: Add reserved bits check

Message ID 9832F13BD22FB94A829F798DA4A8280501A2107199@pdsmsx503.ccr.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dong, Eddie March 27, 2009, 1:59 p.m. UTC
>> Will never be use, PDPTEs are loaded by set_cr3(), not walk_addr().
>> 
> 
> I see, then how about to replace CR3_PAE_RESERVED_BITS check at cr3
> load with 
> rsvd_bits_mask[2]? Seems current code are lacking of enough reserved
> bits check too. 
> 

typo, I mean this:

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

Patch

--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -233,7 +233,7 @@  int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3)
                goto out;
        }
        for (i = 0; i < ARRAY_SIZE(pdpte); ++i) {
-               if ((pdpte[i] & 1) && (pdpte[i] & 0xfffffff0000001e6ull)) {
+               if ((pdpte[i] & 1) && (pdpte[i] & vcpu->arch.mmu.rsvd_bits_mask[0][2])) {
                        ret = 0;
                        goto out;
                }