lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F8C025A.6020002@mvista.com>
Date:	Mon, 16 Apr 2012 15:28:26 +0400
From:	Sergei Shtylyov <sshtylyov@...sta.com>
To:	Andy Whitcroft <apw@...onical.com>
CC:	Jeff Garzik <jgarzik@...ox.com>, linux-ide@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	"K. Y. Srinivasan" <kys@...rosoft.com>,
	Mike Sterling <Mike.Sterling@...rosoft.com>,
	Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [PATCH 2/2] UBUNTU: SAUCE: ata_piix: defer disks to the Hyper-V
 drivers by default

Hello.

On 16-04-2012 15:20, 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@...onical.com>
> ---
>   drivers/ata/ata_piix.c |   38 ++++++++++++++++++++++++++++++++++++++
>   1 file changed, 38 insertions(+)

> diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
> index 68013f9..05e0ffa 100644
> --- a/drivers/ata/ata_piix.c
> +++ b/drivers/ata/ata_piix.c
> @@ -1552,6 +1552,41 @@ 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)
> +{
> +	static const struct dmi_system_id ignore_devices[] = {
> +		{
> +			/* 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.

    '*' not needed here.

> +			 */
> +			.ident = "Hyper-V Virtual Machine",
> +			.matches = {
> +				DMI_MATCH(DMI_SYS_VENDOR,
> +						"Microsoft Corporation"),
> +				DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"),
> +			},
> +			.driver_data = (void *)ATA_HOST_IGNORE_ATA,
> +		},
> +
> +		{ }	/* terminate list */
> +	};
> +	const struct dmi_system_id *dmi = dmi_first_match(ignore_devices);
> +
> +	if (dmi) {
> +		unsigned long flags = (unsigned long)dmi->driver_data;
> +
> +		host->flags |= flags;
> +		dev_info(host->dev, "%s detected, device ignore set %08lx\n",

    dev_dbg()?

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ