lkml.org 
[lkml]   [2015]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/13] KVM: x86: pass host_initiated to functions that read MSRs


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


\
 
 \ /
  Last update: 2015-05-04 18:21    [W:0.086 / U:1.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site