Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1554098 > unrolled thread
| Started by | Jintack Lim <jintack@cs.columbia.edu> |
|---|---|
| First post | 2017-01-09 07:40 +0100 |
| Last post | 2017-01-09 07:40 +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.
[RFC 20/55] KVM: arm64: Forward CPACR_EL1 traps to the guest hypervisor Jintack Lim <jintack@cs.columbia.edu> - 2017-01-09 07:40 +0100
| From | Jintack Lim <jintack@cs.columbia.edu> |
|---|---|
| Date | 2017-01-09 07:40 +0100 |
| Subject | [RFC 20/55] KVM: arm64: Forward CPACR_EL1 traps to the guest hypervisor |
| Message-ID | <sXBMC-zF-69@gated-at.bofh.it> |
Forward CPACR_EL1 traps to the guest hypervisor if it has configured the
virtual CPTR_EL2 to do so.
Signed-off-by: Jintack Lim <jintack@cs.columbia.edu>
---
arch/arm64/kvm/sys_regs.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
index 321ecbc..e66f40d 100644
--- a/arch/arm64/kvm/sys_regs.c
+++ b/arch/arm64/kvm/sys_regs.c
@@ -951,6 +951,11 @@ static bool access_cpacr(struct kvm_vcpu *vcpu,
struct sys_reg_params *p,
const struct sys_reg_desc *r)
{
+ /* Forward this trap to the guest hypervisor if it expects */
+ if (!vcpu_mode_el2(vcpu) &&
+ (vcpu_el2_reg(vcpu, CPTR_EL2) & CPTR_EL2_TCPAC))
+ return kvm_inject_nested_sync(vcpu, kvm_vcpu_get_hsr(vcpu));
+
access_rw(p, &vcpu_sys_reg(vcpu, r->reg));
return true;
}
--
1.9.1
Back to top | Article view | linux.kernel
csiph-web