Minor tweaks to arm64 CoCO guest support
Will Deacon
maintainercover Minor tweaks to arm64 CoCO guest support
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
---->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(-)
Signature · 1 line
2.47.0.338.g60cca15819-goog
Will Deacon
maintainerPATCH 1/2 drivers/virt: pkvm: Don't fail ioremap() call if MMIO_GUARD fails
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.
--- drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/virt/coco/pkvm-guest/arm-pkvm-guest.c +1 -5
@@ -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 ; }
Signature · 1 line
2.47.0.338.g60cca15819-goog
Will Deacon
maintainerPATCH 2/2 MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry
In reply to Will DeaconCommits 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.
--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)
MAINTAINERS +2 -0
@@ -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/
Signature · 1 line
2.47.0.338.g60cca15819-goog
Re: [PATCH 2/2] MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry
Quoted 25 lines · Will Deacon
Commits
7999edc484ca("virt: arm-cca-guest:TSM_REPORTsupport for realm") anda06c3fad49a5("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
MAINTAINERSentry 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 <[email protected]>Cc Marc Zyngier <[email protected]>Cc Oliver Upton <[email protected]>Cc Suzuki K Poulose <[email protected]>Signed-off-by Will Deacon <[email protected]>--- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+)MAINTAINERS +0
-0
MAINTAINERS S: Maintained · line 3383
Quoted 8 lines
MAINTAINERS +2
-0@@ -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,
Re: [PATCH 2/2] MAINTAINERS: Add CCA and pKVM CoCO guest support to the ARM64 entry
In reply to Will DeaconQuoted 11 lines · Will Deacon
Commits
7999edc484ca("virt: arm-cca-guest:TSM_REPORTsupport for realm") anda06c3fad49a5("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
MAINTAINERSentry 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.
Quoted 5 lines
Cc Catalin Marinas <[email protected]>Cc Marc Zyngier <[email protected]>Cc Oliver Upton <[email protected]>Cc Suzuki K Poulose <[email protected]>Signed-off-by Will Deacon <[email protected]>
Quoted 8 lines · Will Deacon
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
Signature · 1 line
Catalin