From 2ea4df52dfcfc6b4dc77108c51194b5aa7f48fef Mon Sep 17 00:00:00 2001 From: Alexander Kudryavtsev Date: Wed, 7 Dec 2011 15:20:21 +0400 Subject: [PATCH 31/32] Fixed bug with using of not fixed src value in MSI-X memory write handler --- palacios/src/devices/pci_passthrough.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/palacios/src/devices/pci_passthrough.c b/palacios/src/devices/pci_passthrough.c index 3946b3f..94a2f90 100644 --- a/palacios/src/devices/pci_passthrough.c +++ b/palacios/src/devices/pci_passthrough.c @@ -1192,7 +1192,7 @@ static int msix_memory_write(struct guest_info * core, addr_t guest_addr, void * case 0: // message address otable->address_lo = table->address_lo = *(union msi_msg_address*)src; if(msi_passthrough_fix_guest_message(dev, &table->address_lo, &table->data) != 0) return -1; - if(v3_msix_memory_write(state->pci_dev, start1 + table_num * 16 + table_offset, src, 4, state->msi.router_private) != 0) return -1; + if(v3_msix_memory_write(state->pci_dev, start1 + table_num * 16 + table_offset, &table->address_lo, 4, state->msi.router_private) != 0) return -1; union msi_msg_address wr_address; if(msi_passthrough_compose_host_message(dev, &table->address_lo, &wr_address) != 0) return -1; @@ -1206,7 +1206,7 @@ static int msix_memory_write(struct guest_info * core, addr_t guest_addr, void * case 8: // message data otable->data = table->data = *(union msi_msg_data*)src; if(msi_passthrough_fix_guest_message(dev, &table->address_lo, &table->data) != 0) return -1; - if(v3_msix_memory_write(state->pci_dev, start1 + table_num * 16 + table_offset, src, 4, state->msi.router_private) != 0) return -1; + if(v3_msix_memory_write(state->pci_dev, start1 + table_num * 16 + table_offset, &table->data, 4, state->msi.router_private) != 0) return -1; MSIX_HWTABLE_WRITE_DATA(base, table_num, table->data.val); break; case 12: { // vector control -- 1.7.5.4