* [PATCH] qemu-kvm: Fix assigned device config space
@ 2009-11-27 2:41 Sheng Yang
2009-11-30 16:39 ` Marcelo Tosatti
0 siblings, 1 reply; 2+ messages in thread
From: Sheng Yang @ 2009-11-27 2:41 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: kvm, Sheng Yang
The new pci_dev->dev.config is a uint_8 pointer, but get_real_device()
still using sizeof(pci_dev->dev.config) to fill the configuration space,
which lost most of information.
Spot the issue when INTx cannot work again after previous fix...
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
hw/device-assignment.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index 549ae67..13a86bb 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -481,7 +481,7 @@ static int get_real_device(AssignedDevice *pci_dev, uint8_t r_bus,
}
dev->config_fd = fd;
again:
- r = read(fd, pci_dev->dev.config, sizeof(pci_dev->dev.config));
+ r = read(fd, pci_dev->dev.config, pci_config_size(&pci_dev->dev));
if (r < 0) {
if (errno == EINTR || errno == EAGAIN)
goto again;
--
1.5.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-30 22:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-27 2:41 [PATCH] qemu-kvm: Fix assigned device config space Sheng Yang
2009-11-30 16:39 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox