Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Jack Wang <jinpu.wang@ionos.com>
Cc: gregkh@linuxfoundation.org, sashal@kernel.org,
	stable@vger.kernel.org,  Michael Roth <michael.roth@amd.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	 Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [stable-6.12] KVM: SEV: Unmap and unpin the GHCB as needed on vCPU free
Date: Tue, 30 Jun 2026 08:12:26 -0700	[thread overview]
Message-ID: <akPc2raibHy-QnPH@google.com> (raw)
In-Reply-To: <20260630114701.319917-1-jinpu.wang@ionos.com>

On Tue, Jun 30, 2026, Jack Wang wrote:
> From: Sean Christopherson <seanjc@google.com>
> 
> commit a847a44f67eaf99faad905da38c080f0ba7ee02a upstream.

Wrong hash, the upstream commit is db38bcb3311053954f62b865cd2d86e164b04351.

> Unmap and unpin the GHCB as needed when freeing a vCPU.  If the VM is
> destroyed after mapping+pinning the GHCB on #VMGEXIT, without re-running
> the vCPU, KVM will effectively leak the GHCB and any mappings created for
> the GHCB.
> 
> Fixes: 291bd20d5d88 ("KVM: SVM: Add initial support for a VMGEXIT VMEXIT")
> Cc: stable@vger.kernel.org
> Tested-by: Michael Roth <michael.roth@amd.com>
> Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
> Reviewed-by: Michael Roth <michael.roth@amd.com>
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> Message-ID: <20260501202250.2115252-18-seanjc@google.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Message-ID: <20260529183549.1104619-18-pbonzini@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Please document what you adjusted.  That matters very much, because I would much
rather backport 08385c5e1814 ("KVM: SEV: Move sev_free_vcpu() down below
sev_es_unmap_ghcb()") than shuffle things around on the fly.  That was the entire
point of tagging 08385c5e1814 for stable.
 
> Signed-off-by: Jack Wang <jinpu.wang@ionos.com>

NAK, I'll send backports of the two patches (I ended up doing them anyways to
figure out what was changing in this backport).

  reply	other threads:[~2026-06-30 15:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 11:47 [stable-6.12] KVM: SEV: Unmap and unpin the GHCB as needed on vCPU free Jack Wang
2026-06-30 15:12 ` Sean Christopherson [this message]
2026-07-01  4:08   ` Jinpu Wang

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=akPc2raibHy-QnPH@google.com \
    --to=seanjc@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jinpu.wang@ionos.com \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=sashal@kernel.org \
    --cc=stable@vger.kernel.org \
    --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