[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 36/55] hw/intc/arm_gicv3_its: Don't abort on table s
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 36/55] hw/intc/arm_gicv3_its: Don't abort on table save failure |
Date: |
Wed, 6 Dec 2017 13:16:29 -0600 |
From: Eric Auger <address@hidden>
The ITS is not fully properly reset at the moment. Caches are
not emptied.
After a reset, in case we attempt to save the state before
the bound devices have registered their MSIs and after the
1st level table has been allocated by the ITS driver
(device BASER is valid), the first level entries are still
invalid. If the device cache is not empty (devices registered
before the reset), vgic_its_save_device_tables fails with -EINVAL.
This causes a QEMU abort().
Cc: address@hidden
Signed-off-by: Eric Auger <address@hidden>
Reported-by: wanghaibin <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
(cherry picked from commit 8a7348b5d62d7ea16807e6bea54b448a0184bb0f)
Signed-off-by: Michael Roth <address@hidden>
---
hw/intc/arm_gicv3_its_kvm.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c
index 1f8991b8a6..1cc58c2da3 100644
--- a/hw/intc/arm_gicv3_its_kvm.c
+++ b/hw/intc/arm_gicv3_its_kvm.c
@@ -64,20 +64,16 @@ static void vm_change_state_handler(void *opaque, int
running,
{
GICv3ITSState *s = (GICv3ITSState *)opaque;
Error *err = NULL;
- int ret;
if (running) {
return;
}
- ret = kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,
- KVM_DEV_ARM_ITS_SAVE_TABLES, NULL, true, &err);
+ kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,
+ KVM_DEV_ARM_ITS_SAVE_TABLES, NULL, true, &err);
if (err) {
error_report_err(err);
}
- if (ret < 0 && ret != -EFAULT) {
- abort();
- }
}
static void kvm_arm_its_realize(DeviceState *dev, Error **errp)
--
2.11.0
- [Qemu-devel] [PATCH 29/55] qcow2: Fix unaligned preallocated truncation, (continued)
- [Qemu-devel] [PATCH 29/55] qcow2: Fix unaligned preallocated truncation, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 25/55] exec: add page_mask for flatview_do_translate, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 26/55] exec: simplify address_space_get_iotlb_entry, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 02/55] hw/usb/bus: Remove bad object_unparent() from usb_try_create_simple(), Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 32/55] nios2: define tcg_env, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 33/55] io: monitor encoutput buffer size from websocket GSource, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 34/55] ppc: fix setting of compat mode, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 28/55] hw/sd: fix out-of-bounds check for multi block reads, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 30/55] qcow2: Always execute preallocate() in a coroutine, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 31/55] iotests: Add cluster_size=64k to 125, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 36/55] hw/intc/arm_gicv3_its: Don't abort on table save failure,
Michael Roth <=
- [Qemu-devel] [PATCH 40/55] util/stats64: Fix min/max comparisons, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 38/55] net: fix check for number of parameters to -netdev socket, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 37/55] net/socket: fix coverity issue, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 35/55] translate.c: Fix usermode big-endian AArch32 LDREXD and STREXD, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 39/55] nbd/client: Use error_prepend() correctly, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 03/55] block/mirror: check backing in bdrv_mirror_top_flush, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 41/55] virtio: Add queue interface to restore avail index from vring used index, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 47/55] virtio-net: don't touch virtqueue if vm is stopped, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 48/55] nbd/server: CVE-2017-15119 Reject options larger than 32M, Michael Roth, 2017/12/06
- [Qemu-devel] [PATCH 42/55] vhost: restore avail index from vring used index on disconnection, Michael Roth, 2017/12/06