[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aV29BchY51qFD2UO@intel.com>
Date: Wed, 7 Jan 2026 09:55:17 +0800
From: Chao Gao <chao.gao@...el.com>
To: Sean Christopherson <seanjc@...gle.com>
CC: Paolo Bonzini <pbonzini@...hat.com>, <kvm@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, Xin Li <xin@...or.com>, Yosry Ahmed
<yosry.ahmed@...ux.dev>
Subject: Re: [PATCH v2 2/2] KVM: nVMX: Remove explicit filtering of
GUEST_INTR_STATUS from shadow VMCS fields
>> diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
>> index f50d21a6a2d7..08433b3713d2 100644
>> --- a/arch/x86/kvm/vmx/nested.c
>> +++ b/arch/x86/kvm/vmx/nested.c
>> @@ -127,6 +127,8 @@ static void init_vmcs_shadow_fields(void)
>> continue;
>> break;
>> default:
>> + if (!cpu_has_vmcs12_field(field))
>
>This can be
>
> if (get_vmcs12_field_offset(field) < 0)
>
>And I think I'll put it outside the switch statement, because the requirement
>applies to all fields, even those that have additional restrictions.
Agree.
>
>I also think it makes sense to have patch 1 call nested_vmx_setup_vmcs12_fields()
>from nested_vmx_hardware_setup(), so that the ordering and dependency between
>configuring vmcs12 fields and shadow VMCS fields can be explicitly documented.
Looks good to me.
Powered by blists - more mailing lists