* [PATCH] Initialize PIIX3 IDE channels as "enabled"
@ 2007-03-12 19:49 Gregory Haskins
[not found] ` <45F57685.BA47.005A.0-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Gregory Haskins @ 2007-03-12 19:49 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
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 <ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
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
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <45F57685.BA47.005A.0-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] Initialize PIIX3 IDE channels as "enabled" [not found] ` <45F57685.BA47.005A.0-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org> @ 2007-03-13 8:01 ` Avi Kivity [not found] ` <45F65A4C.1030009-atKUWr5tajBWk0Htik3J/w@public.gmane.org> 2007-03-13 10:07 ` Dor Laor 0 siblings, 2 replies; 6+ messages in thread From: Avi Kivity @ 2007-03-13 8:01 UTC (permalink / raw) To: Gregory Haskins; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Gregory Haskins wrote: > 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. > > Is the bug present in stock qemu-0.9.0? I'm no acpi expert, but this may be related to our acpi breakage. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <45F65A4C.1030009-atKUWr5tajBWk0Htik3J/w@public.gmane.org>]
* Re: [PATCH] Initialize PIIX3 IDE channels as "enabled" [not found] ` <45F65A4C.1030009-atKUWr5tajBWk0Htik3J/w@public.gmane.org> @ 2007-03-13 8:07 ` Dor Laor 0 siblings, 0 replies; 6+ messages in thread From: Dor Laor @ 2007-03-13 8:07 UTC (permalink / raw) To: Avi Kivity, Gregory Haskins; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f >Gregory Haskins wrote: >> 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. >> >> > >Is the bug present in stock qemu-0.9.0? > >I'm no acpi expert, but this may be related to our acpi breakage. I thought so too and guess what? We can install Windows with acpi! (The installation is running now, didn't complete yet but it passed the stage it had stucked before! Good job. > >-- >Do not meddle in the internals of kernels, for they are subtle and quick to >panic. > > >----------------------------------------------------------------------- -- >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=DEVD EV >_______________________________________________ >kvm-devel mailing list >kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org >https://lists.sourceforge.net/lists/listinfo/kvm-devel ------------------------------------------------------------------------- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Initialize PIIX3 IDE channels as "enabled" 2007-03-13 8:01 ` Avi Kivity [not found] ` <45F65A4C.1030009-atKUWr5tajBWk0Htik3J/w@public.gmane.org> @ 2007-03-13 10:07 ` Dor Laor [not found] ` <64F9B87B6B770947A9F8391472E032160AD71F05-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: Dor Laor @ 2007-03-13 10:07 UTC (permalink / raw) To: Dor Laor, Avi Kivity, Gregory Haskins Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f >>Gregory Haskins wrote: >>> 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. >>> >>> >> >>Is the bug present in stock qemu-0.9.0? >> >>I'm no acpi expert, but this may be related to our acpi breakage. > >I thought so too and guess what? >We can install Windows with acpi! (The installation is running now, didn't >complete yet but it passed the stage it had stucked before! Opsss, I was too fast on the trigger; it didn't solve anything regarding acpi. No long ago we had a problem on the trunk with windows installation. It failed if the flag -no-acpi was not used. When I checked your patch the problem disappeared but when windows installation completed I discovered that it didn't use the acpi HAL. So I checked without the patch and got the same result too. Probably recent commits fixed the crash and from now the -no-acpi flag is not required during installation. Well it was a long shot. > >Good job. > >> >>-- >>Do not meddle in the internals of kernels, for they are subtle and quick >to >>panic. >> >> >>---------------------------------------------------------------------- --- >>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=DEV DEV >>_______________________________________________ >>kvm-devel mailing list >>kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org >>https://lists.sourceforge.net/lists/listinfo/kvm-devel ------------------------------------------------------------------------- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <64F9B87B6B770947A9F8391472E032160AD71F05-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>]
* Re: [PATCH] Initialize PIIX3 IDE channels as "enabled" [not found] ` <64F9B87B6B770947A9F8391472E032160AD71F05-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org> @ 2007-03-13 11:54 ` Daniel Hecken [not found] ` <45F6910E.2000003-LcvzS2Pvy/8X0D0ZMPkEVw@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Daniel Hecken @ 2007-03-13 11:54 UTC (permalink / raw) To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f Hello, if I apply this patch and revert the bios to the one before 4423 I can install Windows 2000 to with acpi. But after the installation it shows the hal without acpi. The good thing whilst installing I don't have to evoke my kvm script again because restart works. Daniel Hecken Dor Laor schrieb: >>> Gregory Haskins wrote: >>>> 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. >>>> >>> Is the bug present in stock qemu-0.9.0? >>> >>> I'm no acpi expert, but this may be related to our acpi breakage. >> I thought so too and guess what? >> We can install Windows with acpi! (The installation is running now, > didn't >> complete yet but it passed the stage it had stucked before! > > Opsss, > I was too fast on the trigger; it didn't solve anything regarding acpi. > No long ago we had a problem on the trunk with windows installation. > It failed if the flag -no-acpi was not used. > When I checked your patch the problem disappeared but when windows > installation completed I discovered that it didn't use the acpi HAL. > So I checked without the patch and got the same result too. > Probably recent commits fixed the crash and from now the -no-acpi flag > is not required during installation. > Well it was a long shot. > >> Good job. >> >>> -- >>> Do not meddle in the internals of kernels, for they are subtle and > quick >> to >>> panic. >>> >>> >>> ---------------------------------------------------------------------- > --- >>> 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=DEV > DEV >>> _______________________________________________ >>> kvm-devel mailing list >>> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org >>> https://lists.sourceforge.net/lists/listinfo/kvm-devel > > ------------------------------------------------------------------------- > 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 ------------------------------------------------------------------------- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <45F6910E.2000003-LcvzS2Pvy/8X0D0ZMPkEVw@public.gmane.org>]
* Re: [PATCH] Initialize PIIX3 IDE channels as "enabled" [not found] ` <45F6910E.2000003-LcvzS2Pvy/8X0D0ZMPkEVw@public.gmane.org> @ 2007-03-13 12:41 ` Dor Laor 0 siblings, 0 replies; 6+ messages in thread From: Dor Laor @ 2007-03-13 12:41 UTC (permalink / raw) To: Daniel Hecken, kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f >Hello, > >if I apply this patch and revert the bios to the one before 4423 I can >install Windows 2000 to with acpi. But after the installation it shows >the hal without acpi. The good thing whilst installing I don't have to >evoke my kvm script again because restart works. > >Daniel Hecken It worked for me with the svn head bios and without the patch. The guest OS cannot use the ACPI but the no-acpi flag is not required anymore. Dor. > > >Dor Laor schrieb: >>>> Gregory Haskins wrote: >>>>> 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. >>>>> >>>> Is the bug present in stock qemu-0.9.0? >>>> >>>> I'm no acpi expert, but this may be related to our acpi breakage. >>> I thought so too and guess what? >>> We can install Windows with acpi! (The installation is running now, >> didn't >>> complete yet but it passed the stage it had stucked before! >> >> Opsss, >> I was too fast on the trigger; it didn't solve anything regarding acpi. >> No long ago we had a problem on the trunk with windows installation. >> It failed if the flag -no-acpi was not used. >> When I checked your patch the problem disappeared but when windows >> installation completed I discovered that it didn't use the acpi HAL. >> So I checked without the patch and got the same result too. >> Probably recent commits fixed the crash and from now the -no-acpi flag >> is not required during installation. >> Well it was a long shot. >> >>> Good job. >>> >>>> -- >>>> Do not meddle in the internals of kernels, for they are subtle and >> quick >>> to >>>> panic. >>>> >>>> >>>> ---------------------------------------------------------------------- >> --- >>>> 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=DEV >> DEV >>>> _______________________________________________ >>>> kvm-devel mailing list >>>> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org >>>> https://lists.sourceforge.net/lists/listinfo/kvm-devel >> >> ------------------------------------------------------------------------ - >> 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=DEVDE V > > >----------------------------------------------------------------------- -- >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=DEVD EV >_______________________________________________ >kvm-devel mailing list >kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org >https://lists.sourceforge.net/lists/listinfo/kvm-devel ------------------------------------------------------------------------- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-03-13 12:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-12 19:49 [PATCH] Initialize PIIX3 IDE channels as "enabled" Gregory Haskins
[not found] ` <45F57685.BA47.005A.0-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
2007-03-13 8:01 ` Avi Kivity
[not found] ` <45F65A4C.1030009-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-03-13 8:07 ` Dor Laor
2007-03-13 10:07 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160AD71F05-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-03-13 11:54 ` Daniel Hecken
[not found] ` <45F6910E.2000003-LcvzS2Pvy/8X0D0ZMPkEVw@public.gmane.org>
2007-03-13 12:41 ` Dor Laor
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox