libqos: pci-pc: use 32-bit write for EJ register
PATCH 1/1 libqos: pci-pc: use 32-bit write for EJ register
The memory region ops have min_access_size == 4 so obey it.
--- tests/qtest/libqos/pci-pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/qtest/libqos/pci-pc.c +1 -1
@@ -186,7 +186,7 @@ void qpci_unplug_acpi_device_test(QTestState *qts, const char *id, uint8_t slot)g_assert (!qdict_haskey (response,"error" ));qobject_unref (response); -qtest_outb (qts,ACPI_PCIHP_ADDR +PCI_EJ_BASE ,1 << slot); +qtest_outl (qts,ACPI_PCIHP_ADDR +PCI_EJ_BASE ,1 << slot);qtest_qmp_eventwait (qts,"DEVICE_DELETED" ); }
Signature · 1 line
2.26.2
Quoted 3 lines · Paolo Bonzini
The memory region ops have
min_access_size== 4 so obey it.Signed-off-by Paolo Bonzini <[email protected]>
I assume you are queueing this with the memory core change?
Quoted 19 lines
--- tests/qtest/libqos/pci-pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qtest/libqos/pci-pc.c +1
-1@@ -186,7 +186,7 @@ void qpci_unplug_acpi_device_test(QTestState *qts, const char *id, uint8_t slot)g_assert (!qdict_haskey (response,"error" ));qobject_unref (response); -qtest_outb (qts,ACPI_PCIHP_ADDR +PCI_EJ_BASE ,1 << slot); +qtest_outl (qts,ACPI_PCIHP_ADDR +PCI_EJ_BASE ,1 << slot);qtest_qmp_eventwait (qts,"DEVICE_DELETED" ); }Signature · 1 line
2.26.2
Quoted 8 lines · Michael S. Tsirkin
Quoted 3 lines · Paolo Bonzini
The memory region ops have
min_access_size== 4 so obey it.Signed-off-by Paolo Bonzini <[email protected]>Reviewed-by Michael S. Tsirkin <[email protected]>I assume you are queueing this with the memory core change?
Yes, I am.
Quoted 21 lines
Quoted 20 lines
--- tests/qtest/libqos/pci-pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qtest/libqos/pci-pc.c +1
-1@@ -186,7 +186,7 @@ void qpci_unplug_acpi_device_test(QTestState *qts, const char *id, uint8_t slot)g_assert (!qdict_haskey (response,"error" ));qobject_unref (response); -qtest_outb (qts,ACPI_PCIHP_ADDR +PCI_EJ_BASE ,1 << slot); +qtest_outl (qts,ACPI_PCIHP_ADDR +PCI_EJ_BASE ,1 << slot);qtest_qmp_eventwait (qts,"DEVICE_DELETED" ); }Signature · 1 line
2.26.2
Quoted 12 lines · Paolo Bonzini
The memory region ops have
min_access_size== 4 so obey it.Signed-off-by Paolo Bonzini <[email protected]>--- tests/qtest/libqos/pci-pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/qtest/libqos/pci-pc.c +0
-0
tests/qtest/libqos/pci-pc.c void qpci_unplug_acpi_device_test(QTestState *qts, const char *id, uint8_t slot) · line 192
Quoted 8 lines
tests/qtest/libqos/pci-pc.c +1
-1@@ -186,7 +186,7 @@ void qpci_unplug_acpi_device_test(QTestState *qts, const char *id, uint8_t slot)g_assert (!qdict_haskey (response,"error" ));qobject_unref (response); -qtest_outb (qts,ACPI_PCIHP_ADDR +PCI_EJ_BASE ,1 << slot); +qtest_outl (qts,ACPI_PCIHP_ADDR +PCI_EJ_BASE ,1 << slot);qtest_qmp_eventwait (qts,"DEVICE_DELETED" ); }
I was a little bit afraid that this could cause endianess issues on big endian hosts, but I gave it a try on a s390x machine and it seems to work fine.
Quoted 25 lines · Thomas Huth
Quoted 12 lines · Paolo Bonzini
The memory region ops have
min_access_size== 4 so obey it.Signed-off-by Paolo Bonzini <[email protected]>---
tests/qtest/libqos/pci-pc.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)tests/qtest/libqos/pci-pc.c +0
-0tests/qtest/libqos/pci-pc.c void qpci_unplug_acpi_device_test(QTestState *qts, · line 192
Quoted 7 lines
tests/qtest/libqos/pci-pc.c +1
-0@@ -186,7 +186,7 @@ void qpci_unplug_acpi_device_test(QTestState *qts, const char *id, uint8_t slot) g_assert(!qdict_haskey(response, "error")); qobject_unref(response); - qtest_outb(qts, ACPI_PCIHP_ADDR + PCI_EJ_BASE, 1 << slot); + qtest_outl(qts, ACPI_PCIHP_ADDR + PCI_EJ_BASE, 1 << slot); qtest_qmp_eventwait(qts, "DEVICE_DELETED"); }I was a little bit afraid that this could cause endianess issues on big endian hosts, but I gave it a try on a s390x machine and it seems to work fine.
Quoted 1 line
Tested-by Thomas Huth <[email protected]>
Also because this is "pci-pc.c". :)) But seriously: if anything this would fix big endian bugs, not break them.
Paolo