kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: qemu-devel@nongnu.org, kvm@vger.kernel.org
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	Richard Henderson <rth@twiddle.net>,
	Connor Kuehl <ckuehl@redhat.com>,
	Brijesh Singh <brijesh.singh@amd.com>,
	Jiri Slaby <jslaby@suse.cz>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Sean Christopherson <sean.j.christopherson@intel.com>
Subject: [PATCH v4 5/6] kvm/i386: Use a per-VM check for SMM capability
Date: Fri, 25 Sep 2020 14:03:39 -0500	[thread overview]
Message-ID: <eaec49f1ce4c8fd69277b1a7c374dcd87b9bb95d.1601060620.git.thomas.lendacky@amd.com> (raw)
In-Reply-To: <cover.1601060620.git.thomas.lendacky@amd.com>

From: Tom Lendacky <thomas.lendacky@amd.com>

SMM is not currently supported for an SEV-ES guest by KVM. Change the SMM
capability check from a KVM-wide check to a per-VM check in order to have
a finer-grained SMM capability check.

Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
 target/i386/kvm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index eefd1a11b6..917cdf8055 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -134,7 +134,7 @@ int kvm_has_pit_state2(void)
 
 bool kvm_has_smm(void)
 {
-    return kvm_check_extension(kvm_state, KVM_CAP_X86_SMM);
+    return kvm_vm_check_extension(kvm_state, KVM_CAP_X86_SMM);
 }
 
 bool kvm_has_adjust_clock_stable(void)
-- 
2.28.0


  parent reply	other threads:[~2020-09-25 20:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25 19:03 [PATCH v4 0/6] Qemu SEV-ES guest support Tom Lendacky
2020-09-25 19:03 ` [PATCH v4 1/6] sev/i386: Add initial support for SEV-ES Tom Lendacky
2020-09-25 19:03 ` [PATCH v4 2/6] sev/i386: Require in-kernel irqchip support for SEV-ES guests Tom Lendacky
2020-09-25 19:03 ` [PATCH v4 3/6] sev/i386: Allow AP booting under SEV-ES Tom Lendacky
2020-09-25 19:03 ` [PATCH v4 4/6] sev/i386: Don't allow a system reset under an SEV-ES guest Tom Lendacky
2021-01-26 16:16   ` Paolo Bonzini
2021-01-26 16:24     ` Tom Lendacky
2020-09-25 19:03 ` Tom Lendacky [this message]
2020-09-25 19:03 ` [PATCH v4 6/6] sev/i386: Enable an SEV-ES guest based on SEV policy Tom Lendacky
2020-09-25 19:08 ` [PATCH v4 0/6] Qemu SEV-ES guest support Tom Lendacky
2020-09-25 22:57 ` no-reply
2021-01-26 16:21 ` Paolo Bonzini
2021-01-26 16:49   ` Tom Lendacky
2021-01-26 17:13     ` Tom Lendacky
2021-01-26 17:18       ` 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=eaec49f1ce4c8fd69277b1a7c374dcd87b9bb95d.1601060620.git.thomas.lendacky@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=brijesh.singh@amd.com \
    --cc=ckuehl@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jslaby@suse.cz \
    --cc=kvm@vger.kernel.org \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sean.j.christopherson@intel.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;
as well as URLs for NNTP newsgroup(s).