Re: [PATCH 05/13] KVM: x86: pass host_initiated to functions that read MSRs

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

 




On 04/05/2015 16:01, Radim Krčmář wrote:
>>  static int emulator_get_msr(struct x86_emulate_ctxt *ctxt,
>>  			    u32 msr_index, u64 *pdata)
>>  {
>> -	return kvm_get_msr(emul_to_vcpu(ctxt), msr_index, pdata);
>> +	struct msr_data msr;
>> +	int r;
>> +
>> +	msr.index = msr_index;
>> +	msr.host_initiated = false;
>> +	r = kvm_get_msr(emul_to_vcpu(ctxt), &msr);
>> +	if (r)
>> +		return r;
>> +
>> +	*pdata = msr.data;
>> +	return 0;
>>  }
> 
> (Only msr.host_initiated changed from do_get_msr() ...
>  I'd add a function with an extra bool arg and call it twice.)

True, but the same situation is there already for do_set_msr vs.
emulator_set_msr

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