Re: [PATCH v5 1/9] KVM: MMU: fix forgot reserved bits check in speculativepath

From: Xiao Guangrong
Date: Mon Jul 12 2010 - 22:01:17 EST




Avi Kivity wrote:

>>
>> How about only update the shadow page which has the same pae set with
>> the written
>> vcpu? Just like this:
>>
>> @@ -3000,6 +3000,10 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu,
>> gpa_t gpa,
>> while (npte--) {
>> entry = *spte;
>> mmu_pte_write_zap_pte(vcpu, sp, spte);
>> +
>> + if (!!is_pae(vcpu) != sp->role.cr4_pae)
>> + continue;
>> +
>>
>
> Not enough, one vcpu can have nx set while the other has it reset, etc.
>

Yeah, so we also need check sp->role.nxe here




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/