Re: [PATCH 05/13] KVM: SVM: Add intercept check for emulated cr accesses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 26, 2011 at 11:37:42AM +0200, Avi Kivity wrote:
> On 03/25/2011 11:29 AM, Joerg Roedel wrote:
>> This patch adds all necessary intercept checks for
>> instructions that access the crX registers.
>>
>>
>> @@ -3871,11 +3871,89 @@ static void svm_fpu_deactivate(struct kvm_vcpu *vcpu)
>>   	update_cr0_intercept(svm);
>>   }
>>
>> +#define POST_EX(exit) { .exit_code = (exit), \
>> +			.stage = x86_icpt_post_except, \
>> +			.valid = true }
>> +
>> +static struct __x86_intercept {
>> +	u32 exit_code;
>> +	enum x86_intercept_stage stage;
>> +	bool valid;
>
> Isn't .valid always true, even in later patches?

The rational here was that the arrary below may not be fully populated
in the future and the svm_check_intercept function needs a way to find
out if it retrieved a populated value. Checks for zero values don't work
because exit_code and stage could both be zero and valid. So I added an
extra field to check that.
I''ll fix the other things you pointed out in the next version.

Regards,

	Joerg

--
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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux