qemu-kvm: device assignment: Reflect assigned device's MSI data/address modification to KVM
PATCH 1/1 qemu-kvm: device assignment: Reflect assigned device's MSI data/address modification to KVM
Device driver can modify MSI data/address when MSI is enabled. This patch reflect the moditication to KVM.
Signed-off-by Sheng Yang <[email protected]>
--- hw/device-assignment.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
hw/device-assignment.c +2 -1
@@ -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 ; }
Signature · 1 line
1.7.0.1
Marcelo Tosatti
AppliedQuoted 7 lines · 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 <[email protected]>--- hw/device-assignment.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
Applied, thanks.