Re: [RFC PATCH 1/2] Hyper-H reference counter

Paolo Bonzini
2013-05-16T13:37:35Z

Il 16/05/2013 11:28, Vadim Rozenfeld ha scritto:
>>>>> > > > > + case HV_X64_MSR_REFERENCE_TSC: {
>>>>> > > > > + u64 gfn;
>>>>> > > > > + unsigned long addr;
>>>>> > > > > + u32 tsc_ref;
>>>>> > > > > + gfn = data >> HV_X64_MSR_HYPERCALL_PAGE_ADDRESS_SHIFT;
>>>> > > > Shouldn't you check HV_X64_MSR_TSC_REFERENCE_ENABLE here?
>>> > >
>>> > > Yes, I have this check added in the second patch.
>>> > >
>> > Move it here please.
> OK, will do it.
>> >
>>>> > > >
>>>>> > > > > + addr = gfn_to_hva(kvm, gfn);
>>>>> > > > > + if (kvm_is_error_hva(addr))
>>>>> > > > > + return 1;
>>>>> > > > > + tsc_ref = 0;

This should write 0xFFFFFFFF.

Paolo