summaryrefslogtreecommitdiff
path: root/hw/intc
diff options
context:
space:
mode:
authorEric Auger <eric.auger@redhat.com>2017-12-13 17:59:23 +0000
committerPeter Maydell <peter.maydell@linaro.org>2017-12-13 17:59:23 +0000
commitba2aecabefc5c06a91c12dd421564afd63f083ff (patch)
tree3d28594e1dbbe41bbd5d43be8ac86e03dab2ff46 /hw/intc
parentdd8739669f95b30653a3a05cb2e21da3f52894fa (diff)
hw/intc/arm_gicv3_its: Implement full reset
Voiding the ITS caches is not supposed to happen via individual register writes. So we introduced a dedicated ITS KVM device ioctl to perform a cold reset of the ITS: KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_ITS_CTRL_RESET. Let's use this latter if the kernel supports it. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1511883692-11511-5-git-send-email-eric.auger@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/intc')
-rw-r--r--hw/intc/arm_gicv3_its_kvm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c
index 1c663ac28e..bf290b8bff 100644
--- a/hw/intc/arm_gicv3_its_kvm.c
+++ b/hw/intc/arm_gicv3_its_kvm.c
@@ -204,7 +204,14 @@ static void kvm_arm_its_reset(DeviceState *dev)
c->parent_reset(dev);
- error_report("ITS KVM: full reset is not supported by QEMU");
+ if (kvm_device_check_attr(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,
+ KVM_DEV_ARM_ITS_CTRL_RESET)) {
+ kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,
+ KVM_DEV_ARM_ITS_CTRL_RESET, NULL, true, &error_abort);
+ return;
+ }
+
+ error_report("ITS KVM: full reset is not supported by the host kernel");
if (!kvm_device_check_attr(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_ITS_REGS,
GITS_CTLR)) {