From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Horman Subject: [patch 01/16] xend: pass-through: Only call setupOneDevice() once per device Date: Mon, 15 Jun 2009 11:55:16 +1000 Message-ID: <20090615015911.003586102@vergenet.net> References: <20090615015515.927085604@vergenet.net> Return-path: Content-Disposition: inline; filename=call-setupOneDevice-once.patch List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Masaki Kanno , Dexuan Cui List-Id: xen-devel@lists.xenproject.org As observed by Dexuan Cui, when PCI devices are passed through at domain-creation-time setupOneDevice() will be called twice. Once via setupDevice() and once via econfigureDevice() which is called in pci_device_configure(). This patch removes the first of these. Cc: Dexuan Cui Cc: Masaki Kanno Signed-off-by: Simon Horman Index: xen-unstable.hg/tools/python/xen/xend/server/pciif.py =================================================================== --- xen-unstable.hg.orig/tools/python/xen/xend/server/pciif.py 2009-06-15 11:24:00.000000000 +1000 +++ xen-unstable.hg/tools/python/xen/xend/server/pciif.py 2009-06-15 11:24:02.000000000 +1000 @@ -436,8 +436,6 @@ class PciController(DevController): ' same guest with %s' raise VmError(err_msg % (s, dev.name)) - for (domain, bus, slot, func) in pci_dev_list: - self.setupOneDevice(domain, bus, slot, func) wPath = '/local/domain/0/backend/pci/%u/0/aerState' % (self.getDomid()) self.aerStateWatch = xswatch(wPath, self._handleAerStateWatch) log.debug('pci: register aer watch %s', wPath) --