]>
Commit | Line | Data |
---|---|---|
49bf4938 DM |
1 | While testing q35, I found that windows 7 (specifically, windows 7 ultimate |
2 | with sp1 x64), wouldn't install because it can't find the cdrom or disk drive. | |
3 | The failure message is: 'A required cd/dvd device driver is missing. If you | |
4 | have a driver floppy disk, CD, DVD, or USB flash drive, please insert it now.' | |
5 | This can also be reproduced on piix by adding an ahci controller, and | |
6 | observing that windows 7 does not see any devices behind it. | |
7 | ||
8 | The problem is that when windows issues a HBA reset, qemu does not reset the | |
9 | individual ports' PxCMD register. Windows 7 then reads back the PxCMD register | |
10 | and presumably assumes that the ahci controller has already been initialized. | |
11 | Windows then never sets up the PxIE register to enable interrupts, and thus it | |
12 | never gets irqs back when it sends ata device inquiry commands. | |
13 | ||
14 | I believe this change brings qemu into ahci 1.3 specification compliance. | |
15 | ||
16 | Section 10.4.3 HBA Reset: | |
17 | ||
18 | " | |
19 | When GHC.HR is set to '1', GHC.AE, GHC.IE, the IS register, and all port | |
20 | register fields (except PxFB/PxFBU/PxCLB/PxCLBU) that are not HwInit in the | |
21 | HBA's register memory space are reset. | |
22 | " | |
23 | ||
24 | I've also re-tested Fedora 16 and 17 to verify that they continue to work with | |
25 | this change. | |
26 | ||
27 | Signed-off-by: Jason Baron <address@hidden> | |
28 | --- | |
29 | hw/ide/ahci.c | 1 + | |
30 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
31 | ||
2802c577 DM |
32 | Index: new/hw/ide/ahci.c |
33 | =================================================================== | |
34 | --- new.orig/hw/ide/ahci.c 2012-09-24 07:15:28.000000000 +0200 | |
35 | +++ new/hw/ide/ahci.c 2012-09-24 07:15:29.000000000 +0200 | |
36 | @@ -1199,6 +1199,7 @@ | |
49bf4938 DM |
37 | pr->irq_stat = 0; |
38 | pr->irq_mask = 0; | |
39 | pr->scr_ctl = 0; | |
40 | + pr->cmd = 0; | |
41 | ahci_reset_port(s, i); | |
42 | } | |
43 | } |