RE: [PATCH 2/2] ata_piix: defer disks to the Hyper-V drivers bydefault

From: KY Srinivasan
Date: Sat Apr 14 2012 - 20:10:30 EST




> -----Original Message-----
> From: Alan Cox [mailto:alan@xxxxxxxxxxxxxxxxxxx]
> Sent: Saturday, April 14, 2012 12:02 PM
> To: Andy Whitcroft
> Cc: Jeff Garzik; linux-ide@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; KY
> Srinivasan; Mike Sterling
> Subject: Re: [PATCH 2/2] ata_piix: defer disks to the Hyper-V drivers by default
>
> O> +#ifdef CONFIG_X86
> > + /* On Hyper-V hypervisors the disks are exposed on both the emulated
> > + * SATA controller and on the paravirtualised drivers. The CD/DVD
> > + * devices are only exposed on the emulated controller. Request we
> > + * ignore ATA devices on this host.
> > + */
> > + if (prefer_ms_hyperv && x86_hyper == &x86_hyper_ms_hyperv) {
> > + host->flags |= ATA_HOST_IGNORE_ATA;
> > + dev_info(&pdev->dev, "Hyper-V hypervisor detected, ignoring
> ATA disks\n");
> > + }
> > +#endif
>
> Does hyper-v not set its own unique and identifable pci
> subvendor/subdevice ?

Number of elements of the virtual BIOS we present the guest can be used
to detect that we are running on Hyper-V. Additionally, we are exporting state based
on CPU detection which is what Andy is using here. As far as I know these are the only
ways to detect that we are running on Hyper-V.

Regards,

K. Y
>
> Alan
>
>



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/