[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1508166212-9599-8-git-send-email-eric.auger@redhat.com>
Date: Mon, 16 Oct 2017 17:03:28 +0200
From: Eric Auger <eric.auger@...hat.com>
To: eric.auger.pro@...il.com, eric.auger@...hat.com,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
kvmarm@...ts.cs.columbia.edu, marc.zyngier@....com,
cdall@...aro.org, peter.maydell@...aro.org, andre.przywara@....com,
wanghaibin.wang@...wei.com
Cc: wu.wubin@...wei.com, drjones@...hat.com, wei@...hat.com
Subject: [PATCH v3 07/11] KVM: arm/arm64: vgic-its: Always attempt to save/restore device and collection tables
In case the device table save fails, we currently do not
attempt to save the collection table. However it may
happen that the device table fails because the structures
in memory are inconsistent with device GITS_BASER however
this does not mean collection backup can't and shouldn't
be performed. Same must happen on restore path.
Without this patch, after a reset and early state backup,
the device table restore may fail due to L1 entry not valid.
If we don't restore the collection table the guest does
not reboot properly.
Signed-off-by: Eric Auger <eric.auger@...hat.com>
---
candidate to be CC'ed stable
---
virt/kvm/arm/vgic/vgic-its.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
index 0031d57..3c2a6e7 100644
--- a/virt/kvm/arm/vgic/vgic-its.c
+++ b/virt/kvm/arm/vgic/vgic-its.c
@@ -2379,12 +2379,9 @@ static int vgic_its_save_tables_v0(struct vgic_its *its)
}
ret = vgic_its_save_device_tables(its);
- if (ret)
- goto out;
- ret = vgic_its_save_collection_table(its);
+ ret |= vgic_its_save_collection_table(its);
-out:
unlock_all_vcpus(kvm);
mutex_unlock(&its->its_lock);
mutex_unlock(&kvm->lock);
@@ -2411,11 +2408,9 @@ static int vgic_its_restore_tables_v0(struct vgic_its *its)
}
ret = vgic_its_restore_collection_table(its);
- if (ret)
- goto out;
- ret = vgic_its_restore_device_tables(its);
-out:
+ ret |= vgic_its_restore_device_tables(its);
+
unlock_all_vcpus(kvm);
mutex_unlock(&its->its_lock);
mutex_unlock(&kvm->lock);
--
2.5.5
Powered by blists - more mailing lists