[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 11/12] target/arm/kvm: spe: Enable userspace irqchip support.
From: |
Haibo Xu |
Subject: |
[PATCH v3 11/12] target/arm/kvm: spe: Enable userspace irqchip support. |
Date: |
Tue, 15 Sep 2020 03:11:47 +0000 |
Since the current kernel patches haven't enabled the
userspace irqchip support, this patch is not verified yet!
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Haibo Xu <haibo.xu@linaro.org>
---
hw/arm/virt.c | 2 +-
target/arm/kvm.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index ee0831922b..bdb1ce925c 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1715,8 +1715,8 @@ static void virt_cpu_post_init(VirtMachineState *vms)
assert(ARM_CPU(cpu)->has_spe == ON_OFF_AUTO_ON);
if (kvm_irqchip_in_kernel()) {
kvm_arm_spe_set_irq(cpu, PPI(VIRTUAL_SPE_IRQ));
- kvm_arm_spe_init(cpu);
}
+ kvm_arm_spe_init(cpu);
}
}
} else {
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 58f991e890..7950ff1d83 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -820,6 +820,11 @@ MemTxAttrs kvm_arch_post_run(CPUState *cs, struct kvm_run
*run)
switched_level &= ~KVM_ARM_DEV_PMU;
}
+ if (switched_level & KVM_ARM_DEV_SPE) {
+ qemu_set_irq(cpu->spe_interrupt,
+ !!(run->s.regs.device_irq_level & KVM_ARM_DEV_SPE));
+ switched_level &= ~KVM_ARM_DEV_SPE;
+ }
if (switched_level) {
qemu_log_mask(LOG_UNIMP, "%s: unhandled in-kernel device IRQ %x\n",
__func__, switched_level);
--
2.17.1
- [PATCH v3 05/12] target/arm/kvm: spe: Unify device attr operation helper, (continued)
[PATCH v3 08/12] hw/arm/virt: Move kvm pmu setup to virt_cpu_post_init, Haibo Xu, 2020/09/14
[PATCH v3 09/12] hw/arm/virt: spe: Add vSPE device and corresponding interrupt support, Haibo Xu, 2020/09/14
[PATCH v3 10/12] target/arm/cpu: spe: Enable spe to work with host cpu, Haibo Xu, 2020/09/14
[PATCH v3 11/12] target/arm/kvm: spe: Enable userspace irqchip support.,
Haibo Xu <=
[PATCH v3 12/12] target/arm: spe: Add corresponding test., Haibo Xu, 2020/09/14