From: Xiaoyao Li <xiaoyao.li@intel.com>
To: Sean Christopherson <sean.j.christopherson@intel.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Vitaly Kuznetsov" <vkuznets@redhat.com>,
"Jim Mattson" <jmattson@google.com>,
"Joerg Roedel" <joro@8bytes.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] KVM: VMX: Move vmcs related resetting out of vmx_vcpu_reset()
Date: Sat, 19 Oct 2019 02:34:31 +0800 [thread overview]
Message-ID: <86f134c6-c983-0184-7d7b-9a95507e0586@intel.com> (raw)
In-Reply-To: <20191018165711.GD26319@linux.intel.com>
On 10/19/2019 12:57 AM, Sean Christopherson wrote:
> On Fri, Oct 18, 2019 at 05:37:21PM +0800, Xiaoyao Li wrote:
>> Move vmcs related codes into a new function vmx_vmcs_reset() from
>> vmx_vcpu_reset(). So that it's more clearer which data is related with
>> vmcs and can be held in vmcs.
>>
>> Suggested-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
>> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
>> ---
>> arch/x86/kvm/vmx/vmx.c | 65 ++++++++++++++++++++++++------------------
>> 1 file changed, 37 insertions(+), 28 deletions(-)
>>
>> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
>> index e660e28e9ae0..ef567df344bf 100644
>> --- a/arch/x86/kvm/vmx/vmx.c
>> +++ b/arch/x86/kvm/vmx/vmx.c
>> @@ -4271,33 +4271,11 @@ static void vmx_vcpu_setup(struct vcpu_vmx *vmx)
>> }
>> }
>>
>> -static void vmx_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
>> +static void vmx_vmcs_reset(struct kvm_vcpu *vcpu, bool init_event)
>
> I'd strongly prefer to keep the existing code. For me, "vmcs_reset" means
> zeroing out the VMCS, i.e. reset the VMCS to a virgin state. "vcpu_reset"
> means exactly that, stuff vCPU state to emulate RESET/INIT.
>
> And the split is arbitrary and funky, e.g. EFER is integrated into the
> VMCS on all recent CPUs, but here it's handled in vcpu_reset.
>
I left EFER in vcpu_reset() because it doesn't directly lead to a
vmcs_write in vmx_set_efer().
OK. I'll drop this patch.
next prev parent reply other threads:[~2019-10-18 18:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-18 9:37 [PATCH v2 0/3] KVM: VMX: Some refactor of VMX vmcs and msr bitmap Xiaoyao Li
2019-10-18 9:37 ` [PATCH v2 1/3] KVM: VMX: Move vmcs related resetting out of vmx_vcpu_reset() Xiaoyao Li
2019-10-18 16:57 ` Sean Christopherson
2019-10-18 18:34 ` Xiaoyao Li [this message]
2019-10-18 9:37 ` [PATCH v2 2/3] KVM: VMX: Rename {vmx,nested_vmx}_vcpu_setup() and minor cleanup Xiaoyao Li
2019-10-18 17:09 ` Sean Christopherson
2019-10-18 18:38 ` Xiaoyao Li
2019-10-18 9:37 ` [PATCH v2 3/3] KVM: VMX: Some minor refactor of MSR bitmap Xiaoyao Li
2019-10-18 17:27 ` Sean Christopherson
2019-10-18 18:39 ` Xiaoyao Li
2019-10-18 19:52 ` Sean Christopherson
2019-10-19 1:28 ` Xiaoyao Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86f134c6-c983-0184-7d7b-9a95507e0586@intel.com \
--to=xiaoyao.li@intel.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®