From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VL7wb-0007mW-Ag for qemu-devel@nongnu.org; Sun, 15 Sep 2013 04:44:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VL7wT-0002vK-Ap for qemu-devel@nongnu.org; Sun, 15 Sep 2013 04:44:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VL7wT-0002v8-30 for qemu-devel@nongnu.org; Sun, 15 Sep 2013 04:44:29 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8F8iROx026121 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 15 Sep 2013 04:44:27 -0400 Date: Sun, 15 Sep 2013 11:46:36 +0300 From: "Michael S. Tsirkin" Message-ID: <1379234759-31527-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH v2 0/6] pci: keep window properties up to date List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: imammedo@redhat.com w32/w64 properties that we report in QOM are currently static, but this is wrong: guest firmware can select its own windows: optimal placement for w64 is guest-dependent, further, for Q35, w32 is affected by the MCFG base and size. This detects the actual window configuration used by guest and reports it in QOM. Changes from v1: Fix up issues noted by Igor: - ignore addresses below 1<<32 when getting W64 - don't change W64 - instead calculate it in a local variable. This way users are forced to use the property API so they won't get an out of date range by accessing w64 directly. Note: maybe we should get rid of the pci_info struct completely, it doesn't seem to be all that useful anymore. However, this is better addressed by a separate patch. Michael S. Tsirkin (6): q35: make pci window address/size match guest cfg range: add Range to typedefs range: add min/max operations on ranges pci: add helper to retrieve the 64-bit range q35: use 64 bit window programmed by guest piix: use 64 bit window programmed by guest include/hw/pci/pci.h | 1 + include/qemu/range.h | 19 ++++++++++++++++++- include/qemu/typedefs.h | 1 + hw/pci-host/piix.c | 14 ++++++++++---- hw/pci-host/q35.c | 24 ++++++++++++++++++++---- hw/pci/pci.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 100 insertions(+), 9 deletions(-) -- MST