Date: Mon, 6 Aug 2012 07:20:25 +0000 (UTC) From: Neel Natu <neel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r239086 - projects/bhyve/usr.sbin/bhyve Message-ID: <201208060720.q767KPtB000608@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: neel Date: Mon Aug 6 07:20:25 2012 New Revision: 239086 URL: http://svn.freebsd.org/changeset/base/239086 Log: Fix a bug in how a 64-bit bar in a pci passthru device would be presented to the guest. Prior to the fix it was possible for such a bar to appear as a 32-bit bar as long as it was allocated from the region below 4GB. This had the potential to confuse some drivers that were particular about the size of the bars. Obtained from: NetApp Modified: projects/bhyve/usr.sbin/bhyve/pci_emul.c Modified: projects/bhyve/usr.sbin/bhyve/pci_emul.c ============================================================================== --- projects/bhyve/usr.sbin/bhyve/pci_emul.c Mon Aug 6 06:51:27 2012 (r239085) +++ projects/bhyve/usr.sbin/bhyve/pci_emul.c Mon Aug 6 07:20:25 2012 (r239086) @@ -455,8 +455,13 @@ pci_emul_alloc_bar(struct pci_devinst *p lobits = PCIM_BAR_MEM_SPACE | PCIM_BAR_MEM_64 | PCIM_BAR_MEM_PREFETCH; break; + } else { + baseptr = &pci_emul_membase32; + limit = PCI_EMUL_MEMLIMIT32; + mask = PCIM_BAR_MEM_BASE; + lobits = PCIM_BAR_MEM_SPACE | PCIM_BAR_MEM_64; } - /* fallthrough */ + break; case PCIBAR_MEM32: baseptr = &pci_emul_membase32; limit = PCI_EMUL_MEMLIMIT32;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208060720.q767KPtB000608>