* [PATCH] qemu-kvm: device assignment: Reflect assigned device's MSI data/address modification to KVM
@ 2010-09-28 8:34 Sheng Yang
2010-09-30 2:05 ` Marcelo Tosatti
0 siblings, 1 reply; 2+ messages in thread
From: Sheng Yang @ 2010-09-28 8:34 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: kvm, Sheng Yang
Device driver can modify MSI data/address when MSI is enabled. This patch
reflect the moditication to KVM.
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
---
hw/device-assignment.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/hw/device-assignment.c b/hw/device-assignment.c
index 87f7418..1e83495 100644
--- a/hw/device-assignment.c
+++ b/hw/device-assignment.c
@@ -1283,7 +1283,8 @@ static void assigned_device_pci_cap_write_config(PCIDevice *pci_dev, uint32_t ad
#ifdef KVM_CAP_DEVICE_MSI
if (assigned_dev->cap.available & ASSIGNED_DEVICE_CAP_MSI) {
ctrl_pos = pos + PCI_MSI_FLAGS;
- if (address <= ctrl_pos && address + len > ctrl_pos)
+ /* Cover control, MSI data/addr fields */
+ if (pos <= address && address + len < pos + PCI_MSI_DATA_32 + 2)
assigned_dev_update_msi(pci_dev, ctrl_pos);
pos += PCI_CAPABILITY_CONFIG_MSI_LENGTH;
}
--
1.7.0.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] qemu-kvm: device assignment: Reflect assigned device's MSI data/address modification to KVM
2010-09-28 8:34 [PATCH] qemu-kvm: device assignment: Reflect assigned device's MSI data/address modification to KVM Sheng Yang
@ 2010-09-30 2:05 ` Marcelo Tosatti
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2010-09-30 2:05 UTC (permalink / raw)
To: Sheng Yang; +Cc: Avi Kivity, kvm
On Tue, Sep 28, 2010 at 04:34:51PM +0800, Sheng Yang wrote:
> Device driver can modify MSI data/address when MSI is enabled. This patch
> reflect the moditication to KVM.
>
> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
> ---
> hw/device-assignment.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-30 5:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-28 8:34 [PATCH] qemu-kvm: device assignment: Reflect assigned device's MSI data/address modification to KVM Sheng Yang
2010-09-30 2:05 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox