From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HvYn5-0002Sk-3o for qemu-devel@nongnu.org; Tue, 05 Jun 2007 09:09:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HvYn1-0002SE-98 for qemu-devel@nongnu.org; Tue, 05 Jun 2007 09:09:36 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HvYn1-0002SA-3W for qemu-devel@nongnu.org; Tue, 05 Jun 2007 09:09:35 -0400 Received: from wa-out-1112.google.com ([209.85.146.181]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HvYn0-0005Lg-K1 for qemu-devel@nongnu.org; Tue, 05 Jun 2007 09:09:34 -0400 Received: by wa-out-1112.google.com with SMTP id k22so2166971waf for ; Tue, 05 Jun 2007 06:09:33 -0700 (PDT) Message-ID: <68676e00706050609o10d0aa4fw8fbd7c850d0391f2@mail.gmail.com> Date: Tue, 5 Jun 2007 15:09:33 +0200 From: Luca In-Reply-To: <46654E86.8010103@qumranet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070604205159.GB18668@dreamland.darkstar.lan> <46654E86.8010103@qumranet.com> Subject: [Qemu-devel] Re: [kvm-devel] PIIX/IDE: ports disabled in PCI config space? Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: kvm-devel@lists.sf.net, qemu-devel@nongnu.org On 6/5/07, Avi Kivity wrote: > Luca Tettamanti wrote: > > Hello, > > I'm testing the new Fedora7 under KVM. As you may know Fedora has > > migrated to the new libata drivers. > > > > ata_piix is unhappy with the PIIX IDE controller provided by QEmu/KVM: > > > > > > > > [...] > > > The following patch fixes the problem (i.e. ata_piix finds both the HD > > and the cdrom): > > > > --- a/hw/ide.c 2007-06-04 19:34:25.000000000 +0200 > > +++ b/hw/ide.c 2007-06-04 21:45:28.000000000 +0200 > > @@ -2586,6 +2586,8 @@ static void piix3_reset(PCIIDEState *d) > > pci_conf[0x06] = 0x80; /* FBC */ > > pci_conf[0x07] = 0x02; // PCI_status_devsel_medium > > pci_conf[0x20] = 0x01; /* BMIBA: 20-23h */ > > + pci_conf[0x41] = 0x80; // enable port 0 > > + pci_conf[0x43] = 0x80; // enable port 1 > > } > > > > void pci_piix_ide_init(PCIBus *bus, BlockDriverState **hd_table, int devfn) > > > > I imagine the reset state in the spec is disabled? Yes, you are right. Btw, this is the doc: http://www.intel.com/design/intarch/datashts/290550.htm > If so, then the > long-term fix is to enable these bits in the bios. Good point. I'm looking at bochs right now: the BIOS doesn't touch that bits. The 2 ports are enabled/disabled - using values from the config file - by the reset function of the emulated controller (iodev/pci_ide.cc), so they're doing the same thing I've done for QEMU. I'd rather not touch the BIOS, it's a bit obscure ;-) Luca