From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2d8s-0004D7-Fj for qemu-devel@nongnu.org; Tue, 17 May 2016 07:26:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2d8m-0006W4-DO for qemu-devel@nongnu.org; Tue, 17 May 2016 07:26:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55708) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2d8m-0006Vy-7N for qemu-devel@nongnu.org; Tue, 17 May 2016 07:26:20 -0400 From: Peter Xu Date: Tue, 17 May 2016 19:26:09 +0800 Message-Id: <1463484370-7484-1-git-send-email-peterx@redhat.com> Subject: [Qemu-devel] [PATCH v4] fix pci_requester_id() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com, pbonzini@redhat.com, jan.kiszka@web.de, rkrcmar@redhat.com, alex.williamson@redhat.com, peterx@redhat.com v4 changes: Introduced PCIReqIDCache struct. Since PCI bus number may be changing during time, we need to cache the device that we can fetch requester_id from. Meanwhile, we need to cache how we should extract reqid from the cache. Currently there are two kinds: - BDF: directly fetch BDF from the cached device - SECONDARY_BUS: this is only used when device are under pcie-to-pci bridges. Thanks, Peter Xu (1): pci: fix pci_requester_id() hw/i386/kvm/pci-assign.c | 2 +- hw/pci/pci.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++ include/hw/pci/pci.h | 26 +++++++++++++++-- 3 files changed, 101 insertions(+), 3 deletions(-) -- 2.4.11