From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMjH9-0004zp-Bp for qemu-devel@nongnu.org; Sun, 09 Mar 2014 15:20:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WMjH4-00059L-6Y for qemu-devel@nongnu.org; Sun, 09 Mar 2014 15:20:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36112) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WMjH3-00059D-LH for qemu-devel@nongnu.org; Sun, 09 Mar 2014 15:20:38 -0400 Date: Sun, 9 Mar 2014 21:20:35 +0200 From: "Michael S. Tsirkin" Message-ID: <1394392713-31471-13-git-send-email-mst@redhat.com> References: <1394392713-31471-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <1394392713-31471-1-git-send-email-mst@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL v3 12/14] pam: partly fix write-only mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , =?us-ascii?B?PT9VVEYtOD9xP0hlcnY9QzM9QTk9MjBQb3Vzc2luZWF1Pz0=?= , Anthony Liguori From: Herv=E9 Poussineau In write-only mode, writes are forwarded to RAM, while reads should not b= e handled (ie should return 0xff). Assume that in this mode, no read access is ever done, as they shouldn't give any sensible result. So, in write-only mode, alias PAM region to RAM, instead of PCI memory (which can even be mapped to some device!) This fixes Award BIOS, which use this mode to shadow system BIOS and vide= o BIOS. Signed-off-by: Herv=E9 Poussineau Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci-host/pam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/pam.c b/hw/pci-host/pam.c index ec6be46..e1e95aa 100644 --- a/hw/pci-host/pam.c +++ b/hw/pci-host/pam.c @@ -68,7 +68,7 @@ void init_pam(DeviceState *dev, MemoryRegion *ram_memor= y, /* XXX: should distinguish read/write cases */ memory_region_init_alias(&mem->alias[0], OBJECT(dev), "pam-pci", pci= _address_space, start, size); - memory_region_init_alias(&mem->alias[2], OBJECT(dev), "pam-pci", pci= _address_space, + memory_region_init_alias(&mem->alias[2], OBJECT(dev), "pam-pci", ram= _memory, start, size); =20 for (i =3D 0; i < 4; ++i) { --=20 MST