On 2014-07-01 17:23, Joerg Roedel wrote:
> On Mon, Jun 30, 2014 at 10:54:17AM +0200, Jan Kiszka wrote:
>> From: Jan Kiszka <[email protected]>
>>
>> First, kvm_read_guest returns 0 on success. And then we need to take the
>> access size into account when testing the bitmap: intercept if any of
>> bits corresponding to the access is set.
>>
>> Signed-off-by: Jan Kiszka <[email protected]>
> 
> Reviewed-by: Joerg Roedel <[email protected]>
> Acked-by: Joerg Roedel <[email protected]>
> 
> I have the slight hope that this fixes the issues with L2 Linux guests
> on L1 Windows hypervisors. Have to check that at some point :)
> 
>> -    if (kvm_read_guest(svm->vcpu.kvm, gpa, &val, 1))
>> -            val &= (1 << bit);
>> +    if (kvm_read_guest(svm->vcpu.kvm, gpa, &val, iopm_len))
>> +            return NESTED_EXIT_DONE;
> 
> Not related to that fix, but as a further improvement we should probably
> do a #vmexit(invalid-vmcb) or something if we can't read the iopm.

Yes, thought about this as well when thinking about kvm_read_guest
failing. Some for MSR bitmap.

Jan


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to