|
@@ -228,6 +228,35 @@ bool access_vm_reg(struct kvm_vcpu *vcpu,
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+static bool access_gic_sgi(struct kvm_vcpu *vcpu,
|
|
|
+ const struct coproc_params *p,
|
|
|
+ const struct coproc_reg *r)
|
|
|
+{
|
|
|
+ u64 reg;
|
|
|
+
|
|
|
+ if (!p->is_write)
|
|
|
+ return read_from_write_only(vcpu, p);
|
|
|
+
|
|
|
+ reg = (u64)*vcpu_reg(vcpu, p->Rt2) << 32;
|
|
|
+ reg |= *vcpu_reg(vcpu, p->Rt1) ;
|
|
|
+
|
|
|
+ vgic_v3_dispatch_sgi(vcpu, reg);
|
|
|
+
|
|
|
+ return true;
|
|
|
+}
|
|
|
+
|
|
|
+static bool access_gic_sre(struct kvm_vcpu *vcpu,
|
|
|
+ const struct coproc_params *p,
|
|
|
+ const struct coproc_reg *r)
|
|
|
+{
|
|
|
+ if (p->is_write)
|
|
|
+ return ignore_write(vcpu, p);
|
|
|
+
|
|
|
+ *vcpu_reg(vcpu, p->Rt1) = vcpu->arch.vgic_cpu.vgic_v3.vgic_sre;
|
|
|
+
|
|
|
+ return true;
|
|
|
+}
|
|
|
+
|
|
|
/*
|
|
|
* We could trap ID_DFR0 and tell the guest we don't support performance
|
|
|
* monitoring. Unfortunately the patch to make the kernel check ID_DFR0 was
|
|
@@ -361,10 +390,16 @@ static const struct coproc_reg cp15_regs[] = {
|
|
|
{ CRn(10), CRm( 3), Op1( 0), Op2( 1), is32,
|
|
|
access_vm_reg, reset_unknown, c10_AMAIR1},
|
|
|
|
|
|
+ /* ICC_SGI1R */
|
|
|
+ { CRm64(12), Op1( 0), is64, access_gic_sgi},
|
|
|
+
|
|
|
/* VBAR: swapped by interrupt.S. */
|
|
|
{ CRn(12), CRm( 0), Op1( 0), Op2( 0), is32,
|
|
|
NULL, reset_val, c12_VBAR, 0x00000000 },
|
|
|
|
|
|
+ /* ICC_SRE */
|
|
|
+ { CRn(12), CRm(12), Op1( 0), Op2(5), is32, access_gic_sre },
|
|
|
+
|
|
|
/* CONTEXTIDR/TPIDRURW/TPIDRURO/TPIDRPRW: swapped by interrupt.S. */
|
|
|
{ CRn(13), CRm( 0), Op1( 0), Op2( 1), is32,
|
|
|
access_vm_reg, reset_val, c13_CID, 0x00000000 },
|