From: Tycho Andersen <tycho@kernel.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: "Sean Christopherson" <seanjc@google.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
iommu@lists.linux.dev, linux-kselftest@vger.kernel.org,
linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
linaro-mm-sig@lists.linaro.org,
"Thomas Gleixner" <tglx@kernel.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
"H . Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, "Jason Gunthorpe" <jgg@ziepe.ca>,
"Kevin Tian" <kevin.tian@intel.com>,
"Joerg Roedel" <joro@8bytes.org>, "Will Deacon" <will@kernel.org>,
"Robin Murphy" <robin.murphy@arm.com>,
"Shuah Khan" <shuah@kernel.org>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
"Tom Lendacky" <thomas.lendacky@amd.com>,
"Kees Cook" <kees@kernel.org>,
"Ashish Kalra" <ashish.kalra@amd.com>,
"Connor Williamson" <connordw@amazon.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Zhou Yuhang" <zhouyuhang@kylinos.cn>, "Zi Li" <zi.li@linux.dev>,
"Dan Williams" <djbw@kernel.org>,
"Eric Biggers" <ebiggers@kernel.org>,
"Colin Ian King" <colin.i.king@gmail.com>,
connordw@amazon.co.uk, graf@amazon.de, fgriffo@amazon.co.uk,
"David Woodhouse" <dwmw@amazon.co.uk>
Subject: Re: [RFC PATCH 02/11] KVM: selftests: sev_init2_tests: Derive SEV availability from KVM
Date: Fri, 17 Jul 2026 08:49:48 -0600 [thread overview]
Message-ID: <alpBAQiqVObDf2R_@tycho.pizza> (raw)
In-Reply-To: <4710ad35dcfd1a85a24d15fb56dbf233ac05ad49.1784194290.git.dwmw@amazon.co.uk>
On Thu, Jul 16, 2026 at 10:31:22AM +0100, David Woodhouse wrote:
> From: David Woodhouse <dwmw@amazon.co.uk>
>
> The test asserted that the X86_FEATURE_SEV CPUID bit exactly matches
> whether KVM offers KVM_X86_SEV_VM. That is not an invariant: when all
> SEV ASIDs are assigned to SEV-SNP, KVM does not offer the SEV VM type
> even though CPUID reports SEV, so the test aborts on an SNP-only host.
>
> Derive SEV availability from KVM_CAP_VM_TYPES (as already done for SEV-ES
> and SNP), assert only the one-way implication that a type offered by KVM
> is also reported in CPUID, and TEST_REQUIRE() the SEV VM type so the test
> skips cleanly when it is unavailable.
>
> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Tycho Andersen (AMD) <tycho@kernel.org>
next prev parent reply other threads:[~2026-07-17 14:49 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 9:31 [RFC PATCH 00/11] KVM: Allow alternative providers of guest_memfd backed by PFNMAP memory David Woodhouse
2026-07-16 9:31 ` [RFC PATCH 01/11] KVM: selftests: sev_smoke_test: Only run VM types the host offers David Woodhouse
2026-07-16 9:31 ` [RFC PATCH 02/11] KVM: selftests: sev_init2_tests: Derive SEV availability from KVM David Woodhouse
2026-07-17 14:49 ` Tycho Andersen [this message]
2026-07-16 9:31 ` [RFC PATCH 03/11] KVM: SEV: Remove struct page dependency from SNP gmem paths David Woodhouse
2026-07-16 15:30 ` sashiko-bot
2026-07-16 9:31 ` [RFC PATCH 04/11] KVM: guest_memfd: Introduce guest memory ops and route native gmem through them David Woodhouse
2026-07-16 15:30 ` sashiko-bot
2026-07-16 9:31 ` [RFC PATCH 05/11] iommufd: Look up private-interconnect phys via exporter symbols David Woodhouse
2026-07-16 15:33 ` sashiko-bot
2026-07-16 9:31 ` [RFC PATCH 06/11] iommufd: Plumb dma-buf memory-type (RAM vs MMIO) through the phys map David Woodhouse
2026-07-16 15:41 ` sashiko-bot
2026-07-16 9:31 ` [RFC PATCH 07/11] KVM: guest_memfd: Add ops-driven page revocation David Woodhouse
2026-07-16 15:42 ` sashiko-bot
2026-07-16 9:31 ` [RFC PATCH 08/11] samples/kvm: Add guest_memfd backing sample David Woodhouse
2026-07-16 15:53 ` sashiko-bot
2026-07-16 9:31 ` [RFC PATCH 09/11] selftests/kvm: gmem_provider KVM-only tests David Woodhouse
2026-07-16 15:46 ` sashiko-bot
2026-07-16 9:31 ` [RFC PATCH 10/11] selftests/kvm: gmem_provider iommufd tests David Woodhouse
2026-07-16 15:48 ` sashiko-bot
2026-07-16 9:31 ` [RFC PATCH 11/11] samples/kvm, selftests/kvm: Allow the gmem_provider NVMe DMA test on arm64 David Woodhouse
2026-07-16 15:54 ` sashiko-bot
2026-07-16 15:31 ` [RFC PATCH 01/11] KVM: selftests: sev_smoke_test: Only run VM types the host offers sashiko-bot
2026-07-17 14:49 ` Tycho Andersen
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=alpBAQiqVObDf2R_@tycho.pizza \
--to=tycho@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=ashish.kalra@amd.com \
--cc=bp@alien8.de \
--cc=christian.koenig@amd.com \
--cc=colin.i.king@gmail.com \
--cc=connordw@amazon.co.uk \
--cc=connordw@amazon.com \
--cc=dave.hansen@linux.intel.com \
--cc=djbw@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=dwmw2@infradead.org \
--cc=dwmw@amazon.co.uk \
--cc=ebiggers@kernel.org \
--cc=fgriffo@amazon.co.uk \
--cc=graf@amazon.de \
--cc=hpa@zytor.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=kees@kernel.org \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=robin.murphy@arm.com \
--cc=seanjc@google.com \
--cc=shuah@kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=tglx@kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=zhouyuhang@kylinos.cn \
--cc=zi.li@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.