lkml.org 
[lkml]   [2023]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH RFC 08/11] KVM: nVMX: hyper-v: Introduce nested_vmx_evmptr() accessor
From
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.

\
 
 \ /
  Last update: 2023-10-16 18:59    [W:0.050 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site