From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQAwx-00062F-1C for qemu-devel@nongnu.org; Sun, 29 Sep 2013 02:57:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQAwp-0002U1-Ub for qemu-devel@nongnu.org; Sun, 29 Sep 2013 02:57:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQAwp-0002Tv-N7 for qemu-devel@nongnu.org; Sun, 29 Sep 2013 02:57:43 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8T6vhpa013509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 29 Sep 2013 02:57:43 -0400 Received: from redhat.com (vpn1-5-44.ams2.redhat.com [10.36.5.44]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id r8T6vfEp023151 for ; Sun, 29 Sep 2013 02:57:42 -0400 Date: Sun, 29 Sep 2013 10:00:04 +0300 From: "Michael S. Tsirkin" Message-ID: <1380437951-21788-7-git-send-email-mst@redhat.com> References: <1380437951-21788-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1380437951-21788-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 06/14] piix: use 64 bit window programmed by guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Detect the 64 bit window programmed by firmware and configure properties accordingly. Signed-off-by: Michael S. Tsirkin --- hw/pci-host/piix.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 221d82b..c041149 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix.c @@ -235,18 +235,24 @@ static void i440fx_pcihost_get_pci_hole64_start(Object *obj, Visitor *v, void *opaque, const char *name, Error **errp) { - I440FXState *s = I440FX_PCI_HOST_BRIDGE(obj); + PCIHostState *h = PCI_HOST_BRIDGE(obj); + Range w64; + + pci_bus_get_w64_range(h->bus, &w64); - visit_type_uint64(v, &s->pci_info.w64.begin, name, errp); + visit_type_uint64(v, &w64.begin, name, errp); } static void i440fx_pcihost_get_pci_hole64_end(Object *obj, Visitor *v, void *opaque, const char *name, Error **errp) { - I440FXState *s = I440FX_PCI_HOST_BRIDGE(obj); + PCIHostState *h = PCI_HOST_BRIDGE(obj); + Range w64; + + pci_bus_get_w64_range(h->bus, &w64); - visit_type_uint64(v, &s->pci_info.w64.end, name, errp); + visit_type_uint64(v, &w64.end, name, errp); } static void i440fx_pcihost_initfn(Object *obj) -- MST