From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Gregory Haskins" Subject: [PATCH] Initialize PIIX3 IDE channels as "enabled" Date: Mon, 12 Mar 2007 15:49:15 -0400 Message-ID: <45F57685.BA47.005A.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Return-path: Content-Disposition: inline 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 This patch initializes the PIIX3 IDE controllers IDE channels as enabled. They were previously unconfigured by QEMU. IDE devices have been broken on our local lab systems since the introduction of QEMU 0.9.0 (KVM-14). Tracing the Linux driver for PIIX3 initialization revealed that the "enabled" bits (bit 7 in the PCI-CONFIG space at address 0x41 and 0x43, port 0 and 1 respectively) were not set. In a bare-metal system, it would typically be the role of the BIOS to enable something like this, so this solution may be a hack. I speculate that the real bug may be something introduced into Bochs about the same time as the 0.9.0 deployment, but I have not investigated this. Nonetheless, unless there is a specific run-time switch to enable/disable the IDE channels, initializing them in QEMU vs Bochs is probably 6 of one, half dozen of the other. Signed-off by: Gregory Haskins Index: kvm-12/qemu/hw/ide.c =================================================================== --- kvm-12.orig/qemu/hw/ide.c +++ kvm-12/qemu/hw/ide.c @@ -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) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV