mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xend: Revert c/s 17536 which breaks PV passthru of MSI-X devices.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
This commit is contained in:
1 parent
b8fae2f777
commit
a358be0b0f
2 files changed
-31
No files matched your search
@@ -1173,20 +1173,6 @@ class PciDevice:
|
||||
raise PciDeviceParseError(('Failed to locate sysfs mount: %s: %s (%d)' %
|
||||
(PROC_PCI_PATH, strerr, errno)))
|
||||
|
||||
def remove_msix_iomem(self, index, start, size):
|
||||
if (index == self.table_index):
|
||||
table_start = start+self.table_offset
|
||||
table_end = table_start + self.msix_entries * 16
|
||||
table_start = table_start & PAGE_MASK
|
||||
table_end = (table_end + PAGE_SIZE) & PAGE_MASK
|
||||
self.msix_iomem.append((table_start, table_end-table_start))
|
||||
if (index==self.pba_index):
|
||||
pba_start = start + self.pba_offset
|
||||
pba_end = pba_start + self.msix_entries/8
|
||||
pba_start = pba_start & PAGE_MASK
|
||||
pba_end = (pba_end + PAGE_SIZE) & PAGE_MASK
|
||||
self.msix_iomem.append((pba_start, pba_end-pba_start))
|
||||
|
||||
def get_info_from_sysfs(self):
|
||||
self.find_capability(0x11)
|
||||
sysfs_mnt = find_sysfs_mnt()
|
||||
@@ -1214,10 +1200,6 @@ class PciDevice:
|
||||
self.ioports.append( (start,size) )
|
||||
else:
|
||||
self.iomem.append( (start,size) )
|
||||
if (self.msix):
|
||||
self.remove_msix_iomem(i, start, size)
|
||||
|
||||
|
||||
|
||||
except IOError, (errno, strerr):
|
||||
raise PciDeviceParseError(('Failed to open & read %s: %s (%d)' %
|
||||
|
||||
@@ -332,19 +332,6 @@ class PciController(DevController):
|
||||
raise VmError(('pci: failed to configure I/O memory on device '+
|
||||
'%s - errno=%d')%(dev.name,rc))
|
||||
|
||||
if dev.msix:
|
||||
for (start, size) in dev.msix_iomem:
|
||||
start_pfn = start>>PAGE_SHIFT
|
||||
nr_pfns = (size+(PAGE_SIZE-1))>>PAGE_SHIFT
|
||||
log.debug('pci-msix: remove permission for 0x%x/0x%x 0x%x/0x%x' % \
|
||||
(start,size, start_pfn, nr_pfns))
|
||||
rc = xc.domain_iomem_permission(domid = fe_domid,
|
||||
first_pfn = start_pfn,
|
||||
nr_pfns = nr_pfns,
|
||||
allow_access = False)
|
||||
if rc<0:
|
||||
raise VmError(('pci: failed to remove msi-x iomem'))
|
||||
|
||||
if not self.vm.info.is_hvm() and dev.irq:
|
||||
rc = xc.physdev_map_pirq(domid = fe_domid,
|
||||
index = dev.irq,
|
||||
|
||||