On 17/1/25 10:21, Thomas Huth wrote:
On 16/01/2025 00.22, Philippe Mathieu-Daudé wrote:
PVSCSI_COMPAT_DISABLE_PCIE_BIT was only used by the
hw_compat_2_5[] array, via the 'x-disable-pcie=on' property.
We removed all machines using that array, lets remove all the
code around PVSCSI_COMPAT_DISABLE_PCIE_BIT.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
hw/scsi/vmw_pvscsi.c | 44 ++++++++------------------------------------
1 file changed, 8 insertions(+), 36 deletions(-)
@@ -1228,21 +1219,8 @@ pvscsi_post_load(void *opaque, int version_id)
return 0;
}
-static bool pvscsi_vmstate_need_pcie_device(void *opaque)
-{
- PVSCSIState *s = PVSCSI(opaque);
-
- return !(s->compat_flags & PVSCSI_COMPAT_DISABLE_PCIE);
-}
-
-static bool pvscsi_vmstate_test_pci_device(void *opaque, int version_id)
-{
- return !pvscsi_vmstate_need_pcie_device(opaque);
-}
-
static const VMStateDescription vmstate_pvscsi_pcie_device = {
.name = "pvscsi/pcie",
- .needed = pvscsi_vmstate_need_pcie_device,
.fields = (const VMStateField[]) {
VMSTATE_PCI_DEVICE(parent_obj, PVSCSIState),
VMSTATE_END_OF_LIST()
@@ -1256,9 +1234,8 @@ static const VMStateDescription vmstate_pvscsi = {
.pre_save = pvscsi_pre_save,
.post_load = pvscsi_post_load,
.fields = (const VMStateField[]) {
- VMSTATE_STRUCT_TEST(parent_obj, PVSCSIState,
- pvscsi_vmstate_test_pci_device, 0,
- vmstate_pci_device, PCIDevice),
+ VMSTATE_STRUCT(parent_obj, PVSCSIState, 0,
+ vmstate_pci_device, PCIDevice),
I think this is wrong, too. pvscsi_vmstate_test_pci_device() should
return false for modern machines, so this should be removed instead?
You are correct, good catch!