From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: PIIX/IDE: ports disabled in PCI config space? Date: Tue, 05 Jun 2007 14:52:38 +0300 Message-ID: <46654E86.8010103@qumranet.com> References: <20070604205159.GB18668@dreamland.darkstar.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-TtF/mJH4Jtrk1uMJSBkQmQ@public.gmane.org, qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org To: Luca Tettamanti Return-path: In-Reply-To: <20070604205159.GB18668-sTXFmx6KbOnUXq0IF5SVAZ4oGUkBHcCu@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org 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? If so, then the long-term fix is to enable these bits in the bios. In any case, I applied this to the kvm repo. Thanks. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HvXad-0008Vr-ES for qemu-devel@nongnu.org; Tue, 05 Jun 2007 07:52:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HvXac-0008Vf-W2 for qemu-devel@nongnu.org; Tue, 05 Jun 2007 07:52:43 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HvXac-0008Vc-Tm for qemu-devel@nongnu.org; Tue, 05 Jun 2007 07:52:42 -0400 Received: from il.qumranet.com ([82.166.9.18]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HvXac-00043t-CF for qemu-devel@nongnu.org; Tue, 05 Jun 2007 07:52:42 -0400 Message-ID: <46654E86.8010103@qumranet.com> Date: Tue, 05 Jun 2007 14:52:38 +0300 From: Avi Kivity MIME-Version: 1.0 References: <20070604205159.GB18668@dreamland.darkstar.lan> In-Reply-To: <20070604205159.GB18668@dreamland.darkstar.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Luca Tettamanti Cc: kvm-devel@lists.sf.net, qemu-devel@nongnu.org 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? If so, then the long-term fix is to enable these bits in the bios. In any case, I applied this to the kvm repo. Thanks. -- error compiling committee.c: too many arguments to function