From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: [PATCH 0/3] device-assignment: PCI option ROM fixes Date: Fri, 30 Jul 2010 13:40:07 -0600 Message-ID: <20100730193941.10110.92913.stgit@localhost6.localdomain6> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: ddutile@redhat.com, chrisw@redhat.com, gleb@redhat.com, alex.williamson@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:27589 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754036Ab0G3TkI (ORCPT ); Fri, 30 Jul 2010 15:40:08 -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.13.8/8.13.8) with ESMTP id o6UJe8p2018513 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 30 Jul 2010 15:40:08 -0400 Sender: kvm-owner@vger.kernel.org List-ID: Changeset b4f8c249 in kvm.git makes the mprotects in device assignment produce a "Bad address" hang when a device with an option ROM is assigned. We can avoid this by just using the slow mapping path since ROM access doesn't need to be fast. Apparently nobody has ever mapped a ROM via this path, because passing NULL to cpu_register_io_memory() doesn't work. I also found we're overly restrictive in copying the ROM from the host, I must have been lucky and had a ROM that matched the BAR size when I added this. Alex --- Alex Williamson (3): device-assignment: Byte-wise ROM read device-assignment: Always use slow mapping for PCI option ROM device-assignment: Fix slow option ROM mapping hw/device-assignment.c | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-)