Messages in this thread | | | Date | Mon, 16 Oct 2023 09:55:32 -0700 | Subject | Re: [PATCH RFC 08/11] KVM: nVMX: hyper-v: Introduce nested_vmx_evmptr() accessor | From | Sean Christopherson <> |
| |
On Mon, Oct 16, 2023, Vitaly Kuznetsov wrote: > Maxim Levitsky <mlevitsk@redhat.com> writes: > > > У вт, 2023-10-10 у 18:02 +0200, Vitaly Kuznetsov пише: > >> 'vmx->nested.hv_evmcs_vmptr' accesses are all over the place so hiding > >> 'hv_evmcs_vmptr' under 'ifdef CONFIG_KVM_HYPERV' would take a lot of > >> ifdefs. Introduce 'nested_vmx_evmptr()' accessor instead. > > > > > > It might also make sense to have 'nested_evmptr_valid(vmx)'
"is_valid" please so that it's clear the helper is a check, not a declaration.
> > so that we could use it instead of 'evmptr_is_valid(nested_vmx_evmptr(vmx))'? > > > > Makes sense, thanks!
Would it be accurate to call it nested_vmx_is_evmptr12_valid()? If so, that has my vote. It's a bit verbose, but it should be fully self-explanatory for anyone that's familiar with KVM's vmcs12 and vmcb12 terminology.
| |