* [PATCH 0/2] Minor tweaks to arm64 CoCO guest support
@ 2024-12-02 14:57 Will Deacon
2024-12-02 14:57 ` [PATCH 1/2] drivers/virt: pkvm: Don't fail ioremap() call if MMIO_GUARD fails Will Deacon
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Will Deacon @ 2024-12-02 14:57 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Will Deacon, Catalin Marinas, Keir Fraser, Marc Zyngier,
Oliver Upton, Steven Price, Suzuki K Poulose, Quentin Perret
Hi folks,
Here are a couple of minor tweaks to the CoCO guest support on arm64.
The first enables protected guests under pKVM when pvmfw is not being
used (and therefore MMIO guard is not enabled). This is useful for pvmfw
development and for testing a VMM outside of the Android Virtualisation
Framework APIs.
The second extends the ARM64 MAINTAINERS entry to cover the CCA and pKVM
guest support, as neither of them are currently caught by an existing
rule.
Patches against v6.13-rc1.
Cheers,
Will
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Keir Fraser <keirf@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Cc: Steven Price <steven.price@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Quentin Perret <qperret@google.com>
---->8
Will Deacon (2):
drivers/virt: pkvm: Don't fail ioremap() call if MMIO_GUARD fails
MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry
MAINTAINERS | 2 ++
drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c | 6 +-----
2 files changed, 3 insertions(+), 5 deletions(-)
--
2.47.0.338.g60cca15819-goog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] drivers/virt: pkvm: Don't fail ioremap() call if MMIO_GUARD fails
2024-12-02 14:57 [PATCH 0/2] Minor tweaks to arm64 CoCO guest support Will Deacon
@ 2024-12-02 14:57 ` Will Deacon
2024-12-02 14:57 ` [PATCH 2/2] MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry Will Deacon
2024-12-03 21:19 ` [PATCH 0/2] Minor tweaks to arm64 CoCO guest support Catalin Marinas
2 siblings, 0 replies; 6+ messages in thread
From: Will Deacon @ 2024-12-02 14:57 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Will Deacon, Catalin Marinas, Keir Fraser, Marc Zyngier,
Oliver Upton, Steven Price, Suzuki K Poulose, Quentin Perret
Calling the MMIO_GUARD hypercall from guests which have not been
enrolled (e.g. because they are running without pvmfw) results in
-EINVAL being returned. In this case, MMIO_GUARD is not active
and so we can simply proceed with the normal ioremap() routine.
Don't fail ioremap() if MMIO_GUARD fails; instead WARN_ON_ONCE()
to highlight that the pvm environment is slightly wonky.
Fixes: 0f1269495800 ("drivers/virt: pkvm: Intercept ioremap using pKVM MMIO_GUARD hypercal")
Signed-off-by: Will Deacon <will@kernel.org>
---
drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c b/drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c
index 56a3859dda8a..4230b817a80b 100644
--- a/drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c
+++ b/drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c
@@ -87,12 +87,8 @@ static int mmio_guard_ioremap_hook(phys_addr_t phys, size_t size,
while (phys < end) {
const int func_id = ARM_SMCCC_VENDOR_HYP_KVM_MMIO_GUARD_FUNC_ID;
- int err;
-
- err = arm_smccc_do_one_page(func_id, phys);
- if (err)
- return err;
+ WARN_ON_ONCE(arm_smccc_do_one_page(func_id, phys));
phys += PAGE_SIZE;
}
--
2.47.0.338.g60cca15819-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry
2024-12-02 14:57 [PATCH 0/2] Minor tweaks to arm64 CoCO guest support Will Deacon
2024-12-02 14:57 ` [PATCH 1/2] drivers/virt: pkvm: Don't fail ioremap() call if MMIO_GUARD fails Will Deacon
@ 2024-12-02 14:57 ` Will Deacon
2024-12-02 15:54 ` Suzuki K Poulose
2024-12-02 16:05 ` Catalin Marinas
2024-12-03 21:19 ` [PATCH 0/2] Minor tweaks to arm64 CoCO guest support Catalin Marinas
2 siblings, 2 replies; 6+ messages in thread
From: Will Deacon @ 2024-12-02 14:57 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Will Deacon, Catalin Marinas, Keir Fraser, Marc Zyngier,
Oliver Upton, Steven Price, Suzuki K Poulose, Quentin Perret
Commits 7999edc484ca ("virt: arm-cca-guest: TSM_REPORT support for
realm") and a06c3fad49a5 ("drivers/virt: pkvm: Add initial support for
running as a protected guest") added arm64 guest-side support for
running in CCA and pKVM confidential computing environments
respectively.
Unfortunately, these changes were not accompanied by a MAINTAINERS
entry and so aren't automatically picked up by the get_maintainer.pl
script. Since the initial support was merged via the arm64 tree, extend
the ARM64 entry to cover the two new directories.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Oliver Upton <oliver.upton@linux.dev>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
---
MAINTAINERS | 2 ++
1 file changed, 2 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 1e930c7a58b1..9378c0c4bbc9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3376,6 +3376,8 @@ S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
F: Documentation/arch/arm64/
F: arch/arm64/
+F: drivers/virt/coco/arm-cca-guest/
+F: drivers/virt/coco/pkvm-guest/
F: tools/testing/selftests/arm64/
X: arch/arm64/boot/dts/
--
2.47.0.338.g60cca15819-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry
2024-12-02 14:57 ` [PATCH 2/2] MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry Will Deacon
@ 2024-12-02 15:54 ` Suzuki K Poulose
2024-12-02 16:05 ` Catalin Marinas
1 sibling, 0 replies; 6+ messages in thread
From: Suzuki K Poulose @ 2024-12-02 15:54 UTC (permalink / raw)
To: Will Deacon, linux-arm-kernel
Cc: Catalin Marinas, Keir Fraser, Marc Zyngier, Oliver Upton,
Steven Price, Quentin Perret
On 02/12/2024 14:57, Will Deacon wrote:
> Commits 7999edc484ca ("virt: arm-cca-guest: TSM_REPORT support for
> realm") and a06c3fad49a5 ("drivers/virt: pkvm: Add initial support for
> running as a protected guest") added arm64 guest-side support for
> running in CCA and pKVM confidential computing environments
> respectively.
>
> Unfortunately, these changes were not accompanied by a MAINTAINERS
> entry and so aren't automatically picked up by the get_maintainer.pl
> script. Since the initial support was merged via the arm64 tree, extend
> the ARM64 entry to cover the two new directories.
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Oliver Upton <oliver.upton@linux.dev>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Signed-off-by: Will Deacon <will@kernel.org>
> ---
> MAINTAINERS | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 1e930c7a58b1..9378c0c4bbc9 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -3376,6 +3376,8 @@ S: Maintained
> T: git git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
> F: Documentation/arch/arm64/
> F: arch/arm64/
> +F: drivers/virt/coco/arm-cca-guest/
> +F: drivers/virt/coco/pkvm-guest/
> F: tools/testing/selftests/arm64/
> X: arch/arm64/boot/dts/
>
FWIW,
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry
2024-12-02 14:57 ` [PATCH 2/2] MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry Will Deacon
2024-12-02 15:54 ` Suzuki K Poulose
@ 2024-12-02 16:05 ` Catalin Marinas
1 sibling, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2024-12-02 16:05 UTC (permalink / raw)
To: Will Deacon
Cc: linux-arm-kernel, Keir Fraser, Marc Zyngier, Oliver Upton,
Steven Price, Suzuki K Poulose, Quentin Perret
On Mon, Dec 02, 2024 at 02:57:30PM +0000, Will Deacon wrote:
> Commits 7999edc484ca ("virt: arm-cca-guest: TSM_REPORT support for
> realm") and a06c3fad49a5 ("drivers/virt: pkvm: Add initial support for
> running as a protected guest") added arm64 guest-side support for
> running in CCA and pKVM confidential computing environments
> respectively.
>
> Unfortunately, these changes were not accompanied by a MAINTAINERS
> entry and so aren't automatically picked up by the get_maintainer.pl
> script. Since the initial support was merged via the arm64 tree, extend
> the ARM64 entry to cover the two new directories.
>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Oliver Upton <oliver.upton@linux.dev>
> Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> Signed-off-by: Will Deacon <will@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] Minor tweaks to arm64 CoCO guest support
2024-12-02 14:57 [PATCH 0/2] Minor tweaks to arm64 CoCO guest support Will Deacon
2024-12-02 14:57 ` [PATCH 1/2] drivers/virt: pkvm: Don't fail ioremap() call if MMIO_GUARD fails Will Deacon
2024-12-02 14:57 ` [PATCH 2/2] MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry Will Deacon
@ 2024-12-03 21:19 ` Catalin Marinas
2 siblings, 0 replies; 6+ messages in thread
From: Catalin Marinas @ 2024-12-03 21:19 UTC (permalink / raw)
To: linux-arm-kernel, Will Deacon
Cc: Keir Fraser, Marc Zyngier, Oliver Upton, Steven Price,
Suzuki K Poulose, Quentin Perret
On Mon, 02 Dec 2024 14:57:28 +0000, Will Deacon wrote:
> Here are a couple of minor tweaks to the CoCO guest support on arm64.
>
> The first enables protected guests under pKVM when pvmfw is not being
> used (and therefore MMIO guard is not enabled). This is useful for pvmfw
> development and for testing a VMM outside of the Android Virtualisation
> Framework APIs.
>
> [...]
Applied to arm64 (for-next/fixes), thanks!
[1/2] drivers/virt: pkvm: Don't fail ioremap() call if MMIO_GUARD fails
https://git.kernel.org/arm64/c/d44679fb954f
[2/2] MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry
https://git.kernel.org/arm64/c/92230596252a
--
Catalin
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-12-03 21:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-02 14:57 [PATCH 0/2] Minor tweaks to arm64 CoCO guest support Will Deacon
2024-12-02 14:57 ` [PATCH 1/2] drivers/virt: pkvm: Don't fail ioremap() call if MMIO_GUARD fails Will Deacon
2024-12-02 14:57 ` [PATCH 2/2] MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry Will Deacon
2024-12-02 15:54 ` Suzuki K Poulose
2024-12-02 16:05 ` Catalin Marinas
2024-12-03 21:19 ` [PATCH 0/2] Minor tweaks to arm64 CoCO guest support Catalin Marinas
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).