Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1554105 > unrolled thread

[RFC 04/55] KVM: arm64: Allow userspace to set PSR_MODE_EL2x

Started byJintack Lim <jintack@cs.columbia.edu>
First post2017-01-09 07:50 +0100
Last post2017-01-09 07:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [RFC 04/55] KVM: arm64: Allow userspace to set PSR_MODE_EL2x Jintack Lim <jintack@cs.columbia.edu> - 2017-01-09 07:50 +0100

#1554105 — [RFC 04/55] KVM: arm64: Allow userspace to set PSR_MODE_EL2x

FromJintack Lim <jintack@cs.columbia.edu>
Date2017-01-09 07:50 +0100
Subject[RFC 04/55] KVM: arm64: Allow userspace to set PSR_MODE_EL2x
Message-ID<sXBWh-CV-1@gated-at.bofh.it>
From: Christoffer Dall <christoffer.dall@linaro.org>

We were not allowing userspace to set a more privileged mode for the VCPU
than EL1, but now that we support nesting with a virtual EL2 mode, do
allow this!

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Jintack Lim <jintack@cs.columbia.edu>
---
 arch/arm64/kvm/guest.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c
index 3f9e157..6b9f38a 100644
--- a/arch/arm64/kvm/guest.c
+++ b/arch/arm64/kvm/guest.c
@@ -117,6 +117,8 @@ static int set_core_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg)
 		case PSR_MODE_EL0t:
 		case PSR_MODE_EL1t:
 		case PSR_MODE_EL1h:
+		case PSR_MODE_EL2h:
+		case PSR_MODE_EL2t:
 			break;
 		default:
 			err = -EINVAL;
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web