Bug 518599 - Win2008/Vista domU IDE controller not disabled after installation
Summary: Win2008/Vista domU IDE controller not disabled after installation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xenpv-win
Version: 5.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 519532 (view as bug list)
Depends On:
Blocks: 515354 516277 523090
TreeView+ depends on / blocked
 
Reported: 2009-08-21 08:22 UTC by Paolo Bonzini
Modified: 2013-01-11 02:34 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 516277
Environment:
Last Closed: 2009-11-16 13:45:02 UTC
Target Upstream Version:


Attachments (Terms of Use)
patch searching the right registry keys for 2k8 (6.51 KB, patch)
2009-08-21 08:22 UTC, Paolo Bonzini
no flags Details | Diff
patch set overhauling set-ide (49.36 KB, patch)
2009-09-16 12:43 UTC, Paolo Bonzini
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2009:1583 normal SHIPPED_LIVE xenpv-win bug fix and enhancement update 2009-11-16 13:44:33 UTC

Description Paolo Bonzini 2009-08-21 08:22:01 UTC
Created attachment 358204 [details]
patch searching the right registry keys for 2k8

Description of problem:
1. Boot drive corruption when booting from "phy:" device (like a loopback).

2. After PV install, Boot drive duplicated in Device/Disk Manager as both the QEMU drive and RHEL SCSI drive (see notes below).

How reproducible:
Always

Steps to Reproduce:
1. Install O/S
2. Install PV drivers
3. Reboot
4. If booting from phy: device, reboot 1 more time to witness hard drive corruption.

Additional info:
Dom0\arch: RHEL 5.2 x86 32-bit
DomU\arch: Windows 2008 Ent x86 32-bit

There is a known workaround: After installing the drivers:

1. Go into registry and set the Atapi service to disabled.
2. Reboot
3. THEN go disable the primary  ATA channel using DevCon (or similar utility)

2/3 are needed because Windows would not let you disable the ATA
Channel while it though the boot device was the QEMU disk (which is
modestly different that the 2003 IDE driver).

Looking at set-ide utilities code, looks like the search/set algorithm is looking for "primary_ide_channel" (and "Secondary...") and then setting a registry key to disable the given device.

The 2008 "ATA Channel" driver does not operate in the same fasion.  "primary_ide_channel" doesn't appear in any of its Id or name fields, and it doesn't respond to the same registry keys (namely "UserMasterDeviceType" and "UserSlaveDeviceType").

The attached prototype fixes the search issue, but setting the same value on the registry key results in nothing.

Comment 1 Paolo Bonzini 2009-08-28 07:49:45 UTC
*** Bug 519532 has been marked as a duplicate of this bug. ***

Comment 2 Paolo Bonzini 2009-08-28 16:17:59 UTC
The "ATA Channel" value is actually present in both W2K3 and W2K8 as key HardwareID under

HKLM\SYSTEM\CurrentControlSet\Enum\PCIIDE\IDEChannel\<identifier>

and in both cases, the Driver key under the same path points to {4d36e96a-e325-11ce-bfc1-08002be10318}.

The difference is indeed that the MasterDeviceType and SlaveDeviceType have disappeared in W2K8 under HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e96a-e325-11ce-bfc1-08002be10318}\0001 and \0002.

There is a new key HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e96a-e325-11ce-bfc1-08002be10318}\0001\Migrated that does not sound very helpful.

There are also slighly more promising new keys HKLM\SYSTEM\CurrentControlSet\Control\Class\{4d36e96a-e325-11ce-bfc1-08002be10318}\0000\Channel0 and \Channel1 in W2K8, on the other hand.  I don't know yet what can be placed in there, I'll look at the DDK documentation.

Comment 5 Paolo Bonzini 2009-09-01 12:35:29 UTC
Finally we have a winner:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCIIDE\IDEChannel\4&17497d5e&0&0\Device Parameters\Target0]
DeviceType=3

Where the second "&0" controls the primary/secondary ("&1"), and the "Target0" controls master/slave ("Target1").  Now I have to find out how to use the Di API to get this registry key, but that seems relatively easy.

Comment 6 Paolo Bonzini 2009-09-16 12:41:26 UTC
The code for the fix is now in the "bz523090" branch of

git://git.engineering.redhat.com/users/pbonzini/xenpv-win.git

Comment 7 Paolo Bonzini 2009-09-16 12:43:31 UTC
Created attachment 361267 [details]
patch set overhauling set-ide

Comment 8 Paolo Bonzini 2009-10-09 15:11:13 UTC
Fixed in 1.0.90-1.

Comment 9 Paolo Bonzini 2009-10-12 08:28:22 UTC
RPMs available from http://people.redhat.com/pbonzini/xenpv-win-1.0.91-1

Comment 11 koka xiong 2009-10-30 05:24:35 UTC
1.Install win2008 guest and Vista guest
2.Install xenpv-win driver
3.Restart the system
4.Go to device manager,and in system devices we can see
RHEL Removed FV Device
Verification passed.

Comment 13 errata-xmlrpc 2009-11-16 13:45:02 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1583.html


Note You need to log in before you can comment on or make changes to this bug.