Skip to contentSkip to conversation

Initialize PIIX3 IDE channels as "enabled"

PATCH In review Gregory Haskins 4 participants 6 messages Mar 12, 2007 – Mar 13, 2007 4 messages not in the archive KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Initialize PIIX3 IDE channels as "enabled"

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 <[email protected]>

qemu/hw/ide.c +2 -0
Index: 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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 5 lines · Gregory Haskins

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.

Signature · 8 lines
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

A message that is not in the archive (sent off-list or not yet received): 45F65A4C.1030009-atKUWr5tajBWk0Htik3J/[email protected]

#4 lore raw
Quoted 6 lines
Quoted 1 line · Gregory Haskins

This patch initializes the PIIX3 IDE controllers IDE channels as

enabled. They were previously unconfigured by QEMU.

Quoted 2 lines

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

Quoted 1 line

initialization revealed that the "enabled" bits (bit 7 in the

PCI-CONFIG

Quoted 1 line

space at address 0x41 and 0x43, port 0 and 1 respectively) were not

set.

Quoted 2 lines

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

Quoted 3 lines

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

Quoted 1 line

the IDE channels, initializing them in QEMU vs Bochs is probably 6 of

one,

Quoted 7 lines

half dozen of the other.

Quoted 2 lines

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.

Quoted 3 lines

--
Do not meddle in the internals of kernels, for they are subtle and

quick to

Quoted 4 lines

panic.

-----------------------------------------------------------------------

--

Quoted 5 lines

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

Quoted 4 lines

_______________________________________________
kvm-devel mailing list [email protected]
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

#5 lore raw
In reply to Avi Kivity
Quoted 6 lines
Quoted 6 lines
Quoted 1 line · Gregory Haskins

This patch initializes the PIIX3 IDE controllers IDE channels as

enabled. They were previously unconfigured by QEMU.

Quoted 2 lines

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

Quoted 1 line
Quoted 1 line

initialization revealed that the "enabled" bits (bit 7 in the

PCI-CONFIG

Quoted 1 line
Quoted 1 line

space at address 0x41 and 0x43, port 0 and 1 respectively) were not

set.

Quoted 2 lines
Quoted 2 lines

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

Quoted 1 line
Quoted 1 line

that the real bug may be something introduced into Bochs about the

same

Quoted 2 lines
Quoted 2 lines

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

Quoted 1 line
Quoted 1 line

the IDE channels, initializing them in QEMU vs Bochs is probably 6 of

one,

Quoted 10 lines
Quoted 7 lines

half dozen of the other.

Quoted 2 lines

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

Quoted 1 line

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.

Quoted 6 lines

Good job.

Quoted 3 lines

--
Do not meddle in the internals of kernels, for they are subtle and

quick

Quoted 5 lines

to

Quoted 4 lines

panic.

----------------------------------------------------------------------

---

Quoted 2 lines
Quoted 2 lines

Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to

share

Quoted 3 lines
Quoted 3 lines

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

Quoted 4 lines
Quoted 4 lines

_______________________________________________
kvm-devel mailing list [email protected]
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

A message that is not in the archive (sent off-list or not yet received): 64F9B87B6B770947A9F8391472E032160AD71F05-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/[email protected]

#7 lore raw

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

Quoted 64 lines · Dor Laor
Quoted 5 lines
Quoted 5 lines
Quoted 1 line · Gregory Haskins

This patch initializes the PIIX3 IDE controllers IDE channels as

enabled. They were previously unconfigured by QEMU.

Quoted 1 line

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

Quoted 1 line
Quoted 1 line

initialization revealed that the "enabled" bits (bit 7 in the

PCI-CONFIG

Quoted 1 line
Quoted 1 line

space at address 0x41 and 0x43, port 0 and 1 respectively) were not

set.

Quoted 2 lines
Quoted 2 lines

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

Quoted 1 line
Quoted 1 line

that the real bug may be something introduced into Bochs about the

same

Quoted 2 lines
Quoted 2 lines

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

Quoted 1 line
Quoted 1 line

the IDE channels, initializing them in QEMU vs Bochs is probably 6 of

one,

Quoted 7 lines
Quoted 5 lines

half dozen of the other.

Quoted 1 line

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

Quoted 1 line

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.

Quoted 4 lines

Good job.

Quoted 2 lines

--
Do not meddle in the internals of kernels, for they are subtle and

quick

Quoted 5 lines

to

Quoted 4 lines

panic.

----------------------------------------------------------------------

---

Quoted 2 lines
Quoted 2 lines

Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to

share

Quoted 3 lines
Quoted 3 lines

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

Quoted 4 lines
Quoted 4 lines

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Quoted 5 lines

-------------------------------------------------------------------------
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

A message that is not in the archive (sent off-list or not yet received): 45F6910E.2000003-LcvzS2Pvy/[email protected]

#9 lore raw
Quoted 8 lines

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.

Quoted 6 lines
Quoted 3 lines · Dor Laor
Quoted 3 lines
Quoted 3 lines
Quoted 1 line · Gregory Haskins

This patch initializes the PIIX3 IDE controllers IDE channels as

enabled. They were previously unconfigured by QEMU.

Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Quoted 1 line

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

Quoted 1 line
Quoted 1 line

initialization revealed that the "enabled" bits (bit 7 in the

PCI-CONFIG

Quoted 1 line
Quoted 1 line

space at address 0x41 and 0x43, port 0 and 1 respectively) were not

set.

Quoted 1 line
Quoted 1 line

In a bare-metal system, it would typically be the role of the BIOS

to

Quoted 8 lines
Quoted 8 lines
Quoted 1 line
Quoted 1 line

enable something like this, so this solution may be a hack. I

speculate

Quoted 1 line
Quoted 1 line

that the real bug may be something introduced into Bochs about the

same

Quoted 2 lines
Quoted 2 lines

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

Quoted 1 line
Quoted 1 line

the IDE channels, initializing them in QEMU vs Bochs is probably 6

of

Quoted 5 lines
Quoted 5 lines

one,

Quoted 4 lines
Quoted 4 lines

half dozen of the other.

Quoted 1 line

Is the bug present in stock qemu-0.9.0?

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Quoted 1 line

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

Quoted 1 line

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.

Quoted 6 lines
Quoted 6 lines

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

Quoted 5 lines
Quoted 5 lines

is not required during installation.
Well it was a long shot.

Quoted 2 lines

Good job.

Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines

--
Do not meddle in the internals of kernels, for they are subtle and

quick

Quoted 5 lines

to

Quoted 4 lines

panic.

----------------------------------------------------------------------

Quoted 6 lines
Quoted 6 lines

---

Quoted 2 lines
Quoted 2 lines

Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to

share

Quoted 2 lines
Quoted 2 lines

your
opinions on IT & business topics through brief surveys-and earn

cash

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEV

Quoted 7 lines
Quoted 7 lines

DEV

Quoted 4 lines
Quoted 4 lines

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

------------------------------------------------------------------------
-

Quoted 2 lines
Quoted 2 lines

Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to

share

Quoted 3 lines

your

Quoted 2 lines

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

Quoted 3 lines

-----------------------------------------------------------------------

--

Quoted 5 lines

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

Quoted 4 lines

_______________________________________________
kvm-devel mailing list [email protected]
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