From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mvvd1-0005Qb-51 for qemu-devel@nongnu.org; Thu, 08 Oct 2009 12:14:07 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mvvcw-0005Jv-FJ for qemu-devel@nongnu.org; Thu, 08 Oct 2009 12:14:06 -0400 Received: from [199.232.76.173] (port=59346 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mvvcw-0005JG-39 for qemu-devel@nongnu.org; Thu, 08 Oct 2009 12:14:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27891) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mvvcv-0005h4-4T for qemu-devel@nongnu.org; Thu, 08 Oct 2009 12:14:01 -0400 Message-ID: <4ACE0FC6.3050908@redhat.com> Date: Thu, 08 Oct 2009 18:13:58 +0200 From: Avi Kivity MIME-Version: 1.0 References: <20091008145241.GC12275@redhat.com> <4ACE0559.5040206@redhat.com> <20091008160623.GA13710@redhat.com> In-Reply-To: <20091008160623.GA13710@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 2/3] qemu: make cirrus init value pci spec compliant List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Anthony Liguori , "qemu-devel@nongnu.org" , kvm-devel On 10/08/2009 06:06 PM, Michael S. Tsirkin wrote: > On Thu, Oct 08, 2009 at 05:29:29PM +0200, Avi Kivity wrote: > >> On 10/08/2009 04:52 PM, Michael S. Tsirkin wrote: >> >>> PCI memory should be disabled at reset, otherwise >>> we might claim transactions at address 0. >>> I/O should also be disabled, although for cirrus >>> it is harmless to enable it as we do not >>> have I/O bar. >>> >>> Note: need bios fix for this patch to work: >>> currently pc-bios incorrently assumes that it does not >>> need to enable i/o unless device has i/o bar. >>> >>> Signed-off-by: Michael S. Tsirkin >>> --- >>> hw/cirrus_vga.c | 1 - >>> 1 files changed, 0 insertions(+), 1 deletions(-) >>> >>> diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c >>> index 1feb827..c54ac65 100644 >>> --- a/hw/cirrus_vga.c >>> +++ b/hw/cirrus_vga.c >>> @@ -3248,7 +3248,6 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev) >>> /* setup PCI */ >>> pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_CIRRUS); >>> pci_config_set_device_id(pci_conf, device_id); >>> - pci_conf[0x04] = PCI_COMMAND_IOACCESS | PCI_COMMAND_MEMACCESS; >>> pci_config_set_class(pci_conf, PCI_CLASS_DISPLAY_VGA); >>> pci_conf[PCI_HEADER_TYPE] = PCI_HEADER_TYPE_NORMAL; >>> >>> >> This needs to be conditional on the machine type. Old machines must >> retain this code for live migration to work (we need to live migrate the >> bios, so we can't assume the bios fix is in during live migration from >> older qemus). >> > No, if you migrate from older qemu you will be fine as command > is enabled there on init. > Right. > Only migration *to* older qemu might create a problem and then only if > you manage to migrate after pci was reset but before bios set the > register, which is a small window. > > Do we really want to update machine type for this? > No, migration to older qemu is not supported. -- error compiling committee.c: too many arguments to function