From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Andy Whitcroft <apw@canonical.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
"K. Y. Srinivasan" <kys@microsoft.com>,
Mike Sterling <Mike.Sterling@microsoft.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH 2/2] ata_piix: defer disks to the Hyper-V drivers by default
Date: Thu, 19 Apr 2012 19:54:17 +0400 [thread overview]
Message-ID: <4F903529.40800@mvista.com> (raw)
In-Reply-To: <1334845990-13418-3-git-send-email-apw@canonical.com>
Hello.
On 04/19/2012 06:33 PM, Andy Whitcroft wrote:
> When we are hosted on a Microsoft Hyper-V hypervisor the guest disks
> are exposed both via the Hyper-V paravirtualised drivers and via an
> emulated SATA disk drive. In this case we want to use the paravirtualised
> drivers if we can as they are much more efficient. Note that the Hyper-V
> paravirtualised drivers only expose the virtual hard disk devices, the
> CDROM/DVD devices must still be enumerated.
> Mark the host controller ATA_HOST_IGNORE_ATA to prevent enumeration of
> disk devices.
> BugLink: http://bugs.launchpad.net/bugs/929545
> BugLink: http://bugs.launchpad.net/bugs/942316
> Signed-off-by: Andy Whitcroft<apw@canonical.com>
> ---
> drivers/ata/ata_piix.c | 36 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
> diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
> index 68013f9..c410ba9 100644
> --- a/drivers/ata/ata_piix.c
> +++ b/drivers/ata/ata_piix.c
> @@ -1552,6 +1552,39 @@ static bool piix_broken_system_poweroff(struct pci_dev *pdev)
> return false;
> }
>
> +static int prefer_ms_hyperv = 1;
> +module_param(prefer_ms_hyperv, int, 0);
> +
> +static void piix_ignore_devices_quirk(struct ata_host *host)
> +{
> +#if defined(CONFIG_HYPERV_STORAGE) || defined(CONFIG_HYPERV_STORAGE_MODULE)
You could instead use:
#if IS_ENABLED(CONFIG_HYPERV_STORAGE)
> + static const struct dmi_system_id ignore_hyperv[] = {
> + {
> + /* 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.
> + */
> + .ident = "Hyper-V Virtual Machine",
> + .matches = {
> + DMI_MATCH(DMI_SYS_VENDOR,
> + "Microsoft Corporation"),
> + DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
> + },
> + },
> + { } /* terminate list */
> + };
> + const struct dmi_system_id *dmi = dmi_first_match(ignore_hyperv);
> +
> + if (dmi&& prefer_ms_hyperv) {
> + host->flags |= ATA_HOST_IGNORE_ATA;
> + dev_info(host->dev, "%s detected, SATA device ignore set\n",
s/SATA/ATA/.
MBR, Sergei
next prev parent reply other threads:[~2012-04-19 15:55 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-29 17:28 [PATCH 1/1] ata_piix: defer disks to the Hyper-V paravirtualised drivers by default Andy Whitcroft
2012-03-30 9:14 ` Victor Miasnikov
2012-04-10 16:08 ` KY Srinivasan
2012-04-12 20:03 ` Jeff Garzik
2012-04-13 7:37 ` Andy Whitcroft
2012-04-14 15:53 ` [PATCH 0/2] Hyper-V disk support Andy Whitcroft
2012-04-14 15:53 ` [PATCH 1/2] libata: add a host flag to ignore detected ATA devices Andy Whitcroft
2012-04-14 15:53 ` [PATCH 2/2] ata_piix: defer disks to the Hyper-V drivers by default Andy Whitcroft
2012-04-14 16:02 ` Alan Cox
2012-04-15 0:10 ` KY Srinivasan
2012-04-16 11:20 ` [PATCH 0/2] Hyper-V disk support V3 Andy Whitcroft
2012-04-16 11:20 ` [PATCH 1/2] libata: add a host flag to ignore detected ATA devices Andy Whitcroft
2012-04-16 11:20 ` [PATCH 2/2] UBUNTU: SAUCE: ata_piix: defer disks to the Hyper-V drivers by default Andy Whitcroft
2012-04-16 11:28 ` Sergei Shtylyov
2012-04-16 11:26 ` [PATCH 0/2] Hyper-V disk support V3 Alan Cox
2012-04-16 18:29 ` Andy Whitcroft
2012-04-16 18:41 ` KY Srinivasan
2012-04-18 20:12 ` Alan Cox
2012-04-18 20:21 ` KY Srinivasan
2012-04-19 8:15 ` 1) boot flag to disable the Hyper-V IDE drivers: ata_piix.prefer_ms_hyperv=0 2) PIIX_IGNORE_ATA_ON_HYPERV Re: [PATCH 0/2] Hyper-V disk support V3 RE: use hv_storvsc instead of ata_piix to handle the IDE disks devices ( but not for the CD-ROM) Victor Miasnikov
2012-04-19 7:40 ` [PATCH 0/2] Hyper-V disk support V3 Andy Whitcroft
2012-04-19 13:17 ` KY Srinivasan
2012-04-19 14:33 ` [PATCH 0/2] Hyper-V disk support V4 Andy Whitcroft
2012-04-19 14:33 ` [PATCH 1/2] libata: add a host flag to ignore detected ATA devices Andy Whitcroft
2012-04-19 14:33 ` [PATCH 2/2] ata_piix: defer disks to the Hyper-V drivers by default Andy Whitcroft
2012-04-19 15:54 ` Sergei Shtylyov [this message]
2012-05-04 21:15 ` [PATCH 0/2] Hyper-V disk support V5 Andy Whitcroft
2012-05-04 21:15 ` [PATCH 1/2] libata: add a host flag to ignore detected ATA devices Andy Whitcroft
2012-05-07 19:43 ` Jeff Garzik
2012-05-04 21:15 ` [PATCH 2/2] ata_piix: defer disks to the Hyper-V drivers by default Andy Whitcroft
2012-04-16 15:32 ` [PATCH 0/2] Hyper-V disk support V3 Jeff Garzik
2012-04-16 18:28 ` Andy Whitcroft
-- strict thread matches above, loose matches on Subject: below --
2012-05-27 1:09 [ 00/91] 3.4.1-stable review Greg KH
2012-05-28 14:18 ` [ 00/91] 3.4.1-stable review Fw: [PATCH 1/2] libata: add a host flag to ignore detected ATA devices FW: use hv_storvsc instead of ata_piix to handle the IDE disks devices ( but not for the CD-ROM) Victor Miasnikov
2012-05-28 20:35 ` Greg KH
2012-05-29 6:34 ` Linux on Hyper-V 1) cd006086fa5d ata_piix: defer disks to the Hyper-V drivers by default 2) db63a4c8115a libata: add a host flag to ignore detected ATA device " Victor Miasnikov
2012-06-01 9:20 ` Greg KH
2012-06-01 16:17 ` Linux on Hyper-V 1) cd006086fa5d ata_piix: defer disks to the Hyper-V drivers by default 2) db63a4c8115a libata: add a host flag to ignore detected ATA device FW: use hv_storvsc instead of ata_piix to handle the IDE disks devices ( but not for the CD-R Victor Miasnikov
2012-06-01 16:26 ` Greg KH
2012-06-01 19:23 ` Linux on Hyper-V 1) cd006086fa5d ata_piix: defer disks to the Hyper-V drivers by default 2) db63a4c8115a libata: add a host flag to ignore detected ATA device FW: use hv_storvsc instead of ata_piix to handle the IDE disks devices ( but not for the KY Srinivasan
2012-06-02 1:22 ` Greg KH
2012-06-04 12:33 ` Victor Miasnikov
2012-06-05 4:59 ` [PATCH 2/2] ata_piix: defer disks to the Hyper-V drivers by default Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F903529.40800@mvista.com \
--to=sshtylyov@mvista.com \
--cc=Mike.Sterling@microsoft.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=apw@canonical.com \
--cc=jgarzik@pobox.com \
--cc=kys@microsoft.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox