mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Gonda <pgonda@google.com>, kvm@vger.kernel.org
Cc: Borislav Petkov <bp@alien8.de>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Brijesh Singh <brijesh.singh@amd.com>,
	Joerg Roedel <jroedel@suse.de>, Marc Orr <marcorr@google.com>,
	Sean Christopherson <seanjc@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add KVM_EXIT_SHUTDOWN metadata for SEV-ES
Date: Mon, 21 Mar 2022 16:27:43 +0100	[thread overview]
Message-ID: <f8500809-610e-ce44-9906-785b7ddc0911@redhat.com> (raw)
In-Reply-To: <20220321150214.1895231-1-pgonda@google.com>

On 3/21/22 16:02, Peter Gonda wrote:
> SEV-ES guests can request termination using the GHCB's MSR protocol. See
> AMD's GHCB spec section '4.1.13 Termination Request'. Currently when a
> guest does this the userspace VMM sees an KVM_EXIT_UNKNOWN (-EVINAL)
> return code from KVM_RUN. By adding a KVM_EXIT_SHUTDOWN_ENTRY to kvm_run
> struct the userspace VMM can clearly see the guest has requested a SEV-ES
> termination including the termination reason code set and reason code.
> 
> Signed-off-by: Peter Gonda <pgonda@google.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>
> Cc: Brijesh Singh <brijesh.singh@amd.com>
> Cc: Joerg Roedel <jroedel@suse.de>
> Cc: Marc Orr <marcorr@google.com>
> Cc: Sean Christopherson <seanjc@google.com>
> Cc: kvm@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org

Looks good, but it has to also add a capability.

> +		/* KVM_EXIT_SHUTDOWN_ENTRY */

Just KVM_EXIT_SHUTDOWN.

Paolo

> +		struct {
> +			__u64 reason;
> +			__u32 ndata;
> +			__u64 data[16];
> +		} shutdown;
>   		/* KVM_EXIT_FAIL_ENTRY */
>   		struct {
>   			__u64 hardware_entry_failure_reason;


  reply	other threads:[~2022-03-21 15:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 15:02 Peter Gonda
2022-03-21 15:27 ` Paolo Bonzini [this message]
2022-03-21 15:42   ` Peter Gonda
2022-03-21 17:08     ` Paolo Bonzini
2022-03-21 17:22       ` Peter Gonda
2022-03-21 17:25 ` Marc Orr
2022-03-21 18:08   ` Peter Gonda
2022-03-21 19:45     ` Marc Orr
2022-03-25 15:28       ` Peter Gonda

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=f8500809-610e-ce44-9906-785b7ddc0911@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=bp@alien8.de \
    --cc=brijesh.singh@amd.com \
    --cc=jroedel@suse.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcorr@google.com \
    --cc=pgonda@google.com \
    --cc=seanjc@google.com \
    --cc=thomas.lendacky@amd.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®