svn commit: r241452 - projects/bhyve/sys/amd64/vmm/io

Neel Natu neel at FreeBSD.org
Thu Oct 11 19:28:08 UTC 2012


Author: neel
Date: Thu Oct 11 19:28:07 2012
New Revision: 241452
URL: http://svn.freebsd.org/changeset/base/241452

Log:
  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.

Modified:
  projects/bhyve/sys/amd64/vmm/io/ppt.c

Modified: projects/bhyve/sys/amd64/vmm/io/ppt.c
==============================================================================
--- projects/bhyve/sys/amd64/vmm/io/ppt.c	Thu Oct 11 18:41:32 2012	(r241451)
+++ projects/bhyve/sys/amd64/vmm/io/ppt.c	Thu Oct 11 19:28:07 2012	(r241452)
@@ -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, i
 		}
 	}
 	
-	ppt->msi.vector = vector;
-	ppt->msi.vcpu = destcpu;
 	ppt->msi.startrid = startrid;
 
 	/*
@@ -497,6 +493,7 @@ ppt_setup_msi(struct vm *vm, int vcpu, i
 
 		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,


More information about the svn-src-projects mailing list