[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [qemu-xen stable-4.10] hw/intc/arm_gicv3_its: Don't abort on table save failure



commit 3a82a03a2e671ad23865fed273d5baf19790e037
Author:     Eric Auger <eric.auger@xxxxxxxxxx>
AuthorDate: Tue Nov 7 13:03:52 2017 +0000
Commit:     Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
CommitDate: Wed Dec 6 09:42:12 2017 -0600

    hw/intc/arm_gicv3_its: Don't abort on table save failure
    
    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: qemu-stable@xxxxxxxxxx
    Signed-off-by: Eric Auger <eric.auger@xxxxxxxxxx>
    Reported-by: wanghaibin <wanghaibin.wang@xxxxxxxxxx>
    Reviewed-by: Peter Maydell <peter.maydell@xxxxxxxxxx>
    Signed-off-by: Peter Maydell <peter.maydell@xxxxxxxxxx>
    (cherry picked from commit 8a7348b5d62d7ea16807e6bea54b448a0184bb0f)
    Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx>
---
 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 1f8991b..1cc58c2 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)
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#stable-4.10

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.