From d09cf38e2541aaf20c762b633d757f620e4ae745 Mon Sep 17 00:00:00 2001 From: neel Date: Thu, 11 Oct 2012 19:28:07 +0000 Subject: Deliver the MSI to the correct guest virtual cpu. Prior to this change the MSI was being delivered unconditionally to vcpu 0 regardless of how the guest programmed the MSI delivery. --- sys/amd64/vmm/io/ppt.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c index e81fdbc..d6fef9a 100644 --- a/sys/amd64/vmm/io/ppt.c +++ b/sys/amd64/vmm/io/ppt.c @@ -71,8 +71,6 @@ static struct pptdev { struct vm_memory_segment mmio[MAX_MMIOSEGS]; struct { int num_msgs; /* guest state */ - int vector; - int vcpu; int startrid; /* host state */ struct resource *res[MAX_MSIMSGS]; @@ -478,8 +476,6 @@ ppt_setup_msi(struct vm *vm, int vcpu, int bus, int slot, int func, } } - ppt->msi.vector = vector; - ppt->msi.vcpu = destcpu; ppt->msi.startrid = startrid; /* @@ -497,6 +493,7 @@ ppt_setup_msi(struct vm *vm, int vcpu, int bus, int slot, int func, ppt->msi.arg[i].pptdev = ppt; ppt->msi.arg[i].vec = vector + i; + ppt->msi.arg[i].vcpu = destcpu; error = bus_setup_intr(ppt->dev, ppt->msi.res[i], INTR_TYPE_NET | INTR_MPSAFE, -- cgit v1.1