From: Oliver Upton <oupton@google.com>
To: kvmarm@lists.cs.columbia.edu
Cc: kvm@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
James Morse <james.morse@arm.com>,
Alexandru Elisei <alexandru.elisei@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
linux-arm-kernel@lists.infradead.org,
Peter Shier <pshier@google.com>,
Ricardo Koller <ricarkol@google.com>,
Reiji Watanabe <reijiw@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Will Deacon <will@kernel.org>, Oliver Upton <oupton@google.com>
Subject: [PATCH 0/2] KVM: arm64: Fixes for SMC64 SYSTEM_RESET2 calls
Date: Fri, 18 Mar 2022 19:38:29 +0000 [thread overview]
Message-ID: <20220318193831.482349-1-oupton@google.com> (raw)
This series addresses a couple of issues with how KVM exposes SMC64
calls to its guest. It is currently possible for an AArch32 guest to
discover the SMC64 SYSTEM_RESET2 function (via
PSCI_1_0_FN_PSCI_FEATURES) and even make a call to it. SMCCC does not
allow for 64 bit calls to be made from a 32 bit state.
Patch 1 cleans up the way we filter SMC64 calls in PSCI. Using a switch
with case statements for each possibly-filtered function is asking for
trouble. Instead, pivot off of the bit that indicates the desired
calling convention. This plugs the PSCI_FEATURES hole for SYSTEM_RESET2.
Patch 2 adds a check to the PSCI v1.x call handler in KVM, bailing out
early if the guest is not allowed to use a particular function. This
closes the door on calls to 64-bit SYSTEM_RESET2 from AArch32.
My first crack at this [1] was missing the fix for direct calls to
SYSTEM_RESET2. Taking the patch out of that series and sending
separately.
Applies on top of today's kvmarm pull, commit:
21ea45784275 ("KVM: arm64: fix typos in comments")
[1]: https://patchwork.kernel.org/project/kvm/patch/20220311174001.605719-3-oupton@google.com/
Oliver Upton (2):
KVM: arm64: Generally disallow SMC64 for AArch32 guests
KVM: arm64: Actually prevent SMC64 SYSTEM_RESET2 from AArch32
arch/arm64/kvm/psci.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
--
2.35.1.894.gb6a874cedc-goog
WARNING: multiple messages have this Message-ID (diff)
From: Oliver Upton <oupton@google.com>
To: kvmarm@lists.cs.columbia.edu
Cc: kvm@vger.kernel.org, Will Deacon <will@kernel.org>,
Marc Zyngier <maz@kernel.org>, Peter Shier <pshier@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/2] KVM: arm64: Fixes for SMC64 SYSTEM_RESET2 calls
Date: Fri, 18 Mar 2022 19:38:29 +0000 [thread overview]
Message-ID: <20220318193831.482349-1-oupton@google.com> (raw)
This series addresses a couple of issues with how KVM exposes SMC64
calls to its guest. It is currently possible for an AArch32 guest to
discover the SMC64 SYSTEM_RESET2 function (via
PSCI_1_0_FN_PSCI_FEATURES) and even make a call to it. SMCCC does not
allow for 64 bit calls to be made from a 32 bit state.
Patch 1 cleans up the way we filter SMC64 calls in PSCI. Using a switch
with case statements for each possibly-filtered function is asking for
trouble. Instead, pivot off of the bit that indicates the desired
calling convention. This plugs the PSCI_FEATURES hole for SYSTEM_RESET2.
Patch 2 adds a check to the PSCI v1.x call handler in KVM, bailing out
early if the guest is not allowed to use a particular function. This
closes the door on calls to 64-bit SYSTEM_RESET2 from AArch32.
My first crack at this [1] was missing the fix for direct calls to
SYSTEM_RESET2. Taking the patch out of that series and sending
separately.
Applies on top of today's kvmarm pull, commit:
21ea45784275 ("KVM: arm64: fix typos in comments")
[1]: https://patchwork.kernel.org/project/kvm/patch/20220311174001.605719-3-oupton@google.com/
Oliver Upton (2):
KVM: arm64: Generally disallow SMC64 for AArch32 guests
KVM: arm64: Actually prevent SMC64 SYSTEM_RESET2 from AArch32
arch/arm64/kvm/psci.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
--
2.35.1.894.gb6a874cedc-goog
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
WARNING: multiple messages have this Message-ID (diff)
From: Oliver Upton <oupton@google.com>
To: kvmarm@lists.cs.columbia.edu
Cc: kvm@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
James Morse <james.morse@arm.com>,
Alexandru Elisei <alexandru.elisei@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
linux-arm-kernel@lists.infradead.org,
Peter Shier <pshier@google.com>,
Ricardo Koller <ricarkol@google.com>,
Reiji Watanabe <reijiw@google.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Will Deacon <will@kernel.org>, Oliver Upton <oupton@google.com>
Subject: [PATCH 0/2] KVM: arm64: Fixes for SMC64 SYSTEM_RESET2 calls
Date: Fri, 18 Mar 2022 19:38:29 +0000 [thread overview]
Message-ID: <20220318193831.482349-1-oupton@google.com> (raw)
This series addresses a couple of issues with how KVM exposes SMC64
calls to its guest. It is currently possible for an AArch32 guest to
discover the SMC64 SYSTEM_RESET2 function (via
PSCI_1_0_FN_PSCI_FEATURES) and even make a call to it. SMCCC does not
allow for 64 bit calls to be made from a 32 bit state.
Patch 1 cleans up the way we filter SMC64 calls in PSCI. Using a switch
with case statements for each possibly-filtered function is asking for
trouble. Instead, pivot off of the bit that indicates the desired
calling convention. This plugs the PSCI_FEATURES hole for SYSTEM_RESET2.
Patch 2 adds a check to the PSCI v1.x call handler in KVM, bailing out
early if the guest is not allowed to use a particular function. This
closes the door on calls to 64-bit SYSTEM_RESET2 from AArch32.
My first crack at this [1] was missing the fix for direct calls to
SYSTEM_RESET2. Taking the patch out of that series and sending
separately.
Applies on top of today's kvmarm pull, commit:
21ea45784275 ("KVM: arm64: fix typos in comments")
[1]: https://patchwork.kernel.org/project/kvm/patch/20220311174001.605719-3-oupton@google.com/
Oliver Upton (2):
KVM: arm64: Generally disallow SMC64 for AArch32 guests
KVM: arm64: Actually prevent SMC64 SYSTEM_RESET2 from AArch32
arch/arm64/kvm/psci.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
--
2.35.1.894.gb6a874cedc-goog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2022-03-18 19:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-18 19:38 Oliver Upton [this message]
2022-03-18 19:38 ` [PATCH 0/2] KVM: arm64: Fixes for SMC64 SYSTEM_RESET2 calls Oliver Upton
2022-03-18 19:38 ` Oliver Upton
2022-03-18 19:38 ` [PATCH 1/2] KVM: arm64: Generally disallow SMC64 for AArch32 guests Oliver Upton
2022-03-18 19:38 ` Oliver Upton
2022-03-18 19:38 ` Oliver Upton
2022-03-18 19:38 ` [PATCH 2/2] KVM: arm64: Actually prevent SMC64 SYSTEM_RESET2 from AArch32 Oliver Upton
2022-03-18 19:38 ` Oliver Upton
2022-03-18 19:38 ` Oliver Upton
2022-03-22 4:41 ` Reiji Watanabe
2022-03-22 4:41 ` Reiji Watanabe
2022-03-22 4:41 ` Reiji Watanabe
2022-03-22 5:49 ` Oliver Upton
2022-03-22 5:49 ` Oliver Upton
2022-03-22 5:49 ` Oliver Upton
2022-03-22 8:48 ` Marc Zyngier
2022-03-22 8:48 ` Marc Zyngier
2022-03-22 8:48 ` Marc Zyngier
2022-03-21 14:29 ` [PATCH 0/2] KVM: arm64: Fixes for SMC64 SYSTEM_RESET2 calls Will Deacon
2022-03-21 14:29 ` Will Deacon
2022-03-21 14:29 ` Will Deacon
2022-03-22 1:33 ` [PATCH] KVM: arm64: Drop unneeded minor version check from PSCI v1.x handler Oliver Upton
2022-03-22 1:33 ` Oliver Upton
2022-03-22 1:33 ` Oliver Upton
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=20220318193831.482349-1-oupton@google.com \
--to=oupton@google.com \
--cc=alexandru.elisei@arm.com \
--cc=james.morse@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=pbonzini@redhat.com \
--cc=pshier@google.com \
--cc=reijiw@google.com \
--cc=ricarkol@google.com \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
/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.