mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Sean Christopherson <sean.j.christopherson@intel.com>
Cc: kvm@vger.kernel.org, x86@kernel.org,
	linux-kernel@vger.kernel.org,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	Brijesh Singh <brijesh.singh@amd.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] KVM: SVM: Add a dedicated INVD intercept routine
Date: Thu, 24 Sep 2020 08:33:14 -0500	[thread overview]
Message-ID: <185c1a30-0028-03c5-6c74-6a4c7ef7f257@amd.com> (raw)
In-Reply-To: <d260b1e1-1a53-a7ee-e613-a806395582f6@redhat.com>

On 9/24/20 1:51 AM, Paolo Bonzini wrote:
> On 23/09/20 22:40, Tom Lendacky wrote:
>>>> +static int invd_interception(struct vcpu_svm *svm)
>>>> +{
>>>> +	/*
>>>> +	 * Can't do emulation on an SEV guest and INVD is emulated
>>>> +	 * as a NOP, so just skip the instruction.
>>>> +	 */
>>>> +	return (sev_guest(svm->vcpu.kvm))
>>>> +		? kvm_skip_emulated_instruction(&svm->vcpu)
>>>> +		: kvm_emulate_instruction(&svm->vcpu, 0);
>>>
>>> Is there any reason not to do kvm_skip_emulated_instruction() for both SEV
>>> and legacy?  VMX has the same odd kvm_emulate_instruction() call, but AFAICT
>>> that's completely unecessary, i.e. VMX can also convert to a straight skip.
>>
>> You could, I just figured I'd leave the legacy behavior just in case. Not
>> that I can think of a reason that behavior would ever change.
> 
> Yeah, let's do skip for both SVM and VMX.

Ok, I'll submit a two patch series to change SVM and VMX. I'll do two 
patches because of the fixes tag to get the SVM fix back to stable. But, 
if you would prefer a single patch, let me know.

Thanks,
Tom

> 
> Paolo
> 

  reply	other threads:[~2020-09-24 13:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-23 20:27 Tom Lendacky
2020-09-23 20:32 ` Sean Christopherson
2020-09-23 20:40   ` Tom Lendacky
2020-09-24  6:51     ` Paolo Bonzini
2020-09-24 13:33       ` Tom Lendacky [this message]
2020-09-24 13:58 ` Vitaly Kuznetsov
2020-09-24 14:06   ` Paolo Bonzini

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=185c1a30-0028-03c5-6c74-6a4c7ef7f257@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=bp@alien8.de \
    --cc=brijesh.singh@amd.com \
    --cc=hpa@zytor.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    --cc=x86@kernel.org \
    /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®