From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/2] kvm: bios: Use a different mask to size the option ROM BAR Date: Thu, 07 May 2009 15:10:31 +0300 Message-ID: <4A02CFB7.1060803@redhat.com> References: <20090506154850.17937.95258.stgit@dl380g6-3.ned.telco.ned.telco> <20090506154856.17937.41849.stgit@dl380g6-3.ned.telco.ned.telco> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, sheng@linux.intel.com To: Alex Williamson Return-path: Received: from mx2.redhat.com ([66.187.237.31]:34495 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761820AbZEGMKe (ORCPT ); Thu, 7 May 2009 08:10:34 -0400 In-Reply-To: <20090506154856.17937.41849.stgit@dl380g6-3.ned.telco.ned.telco> Sender: kvm-owner@vger.kernel.org List-ID: Alex Williamson wrote: > Bit 0 is the enable bit, which we not only don't want to set, but > it will stick and make us think it's an I/O port resource. > > Signed-off-by: Alex Williamson > --- > > kvm/bios/rombios32.c | 8 +++++--- > 1 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/kvm/bios/rombios32.c b/kvm/bios/rombios32.c > index 8684987..6502e63 100755 > --- a/kvm/bios/rombios32.c > +++ b/kvm/bios/rombios32.c > @@ -958,11 +958,13 @@ static void pci_bios_init_device(PCIDevice *d) > int ofs; > uint32_t val, size ; > > - if (i == PCI_ROM_SLOT) > + if (i == PCI_ROM_SLOT) { > ofs = 0x30; > - else > + pci_config_writel(d, ofs, 0xfffffffe); > + } else { > ofs = 0x10 + i * 4; > - pci_config_writel(d, ofs, 0xffffffff); > + pci_config_writel(d, ofs, 0xffffffff); > + } > val = pci_config_readl(d, ofs); > if (val != 0) { > size = (~(val & ~0xf)) + 1; > Looks good. I think it applies upstream (or even upstream's upstream) though, in which case please send it qemu-devel. -- error compiling committee.c: too many arguments to function