[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1312041047200.7093@kaball.uk.xensource.com>
Date: Wed, 4 Dec 2013 10:48:17 +0000
From: Stefano Stabellini <stefano.stabellini@...citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
CC: <stefano.stabellini@...citrix.com>, <ian.campbell@...rix.com>,
<xen-devel@...ts.xenproject.org>, <linux-kernel@...r.kernel.org>,
<boris.ostrovsky@...cle.com>, <david.vrabel@...rix.com>,
<leosilva@...ux.vnet.ibm.com>, <ashley@...leylai.com>,
<peterhuewe@....de>, <mail@...jiv.net>, <tpmdd@...horst.net>,
<tpmdd@...rix.com>, <dmitry.torokhov@...il.com>,
<bhelgaas@...gle.com>, <plagnioj@...osoft.com>,
<tomi.valkeinen@...com>, <tpmdd-devel@...ts.sourceforge.net>,
<linux-input@...r.kernel.org>, <netdev@...r.kernel.org>,
<linux-pci@...r.kernel.org>, <linux-fbdev@...r.kernel.org>
Subject: Re: [PATCH] xen/pvhvm: If xen_platform_pci=0 is set don't blow up.
On Tue, 3 Dec 2013, Konrad Rzeszutek Wilk wrote:
> diff --git a/arch/x86/xen/platform-pci-unplug.c b/arch/x86/xen/platform-pci-unplug.c
> index 0a78524..087dfeb 100644
> --- a/arch/x86/xen/platform-pci-unplug.c
> +++ b/arch/x86/xen/platform-pci-unplug.c
> @@ -69,6 +69,24 @@ static int check_platform_magic(void)
> return 0;
> }
>
> +bool xen_has_pv_devices(void)
> +{
> + if (!xen_domain())
> + return false;
> +
> + if (xen_hvm_domain()) {
> + /* User requested no unplug, so no PV drivers. */
> + if (xen_emul_unplug & XEN_UNPLUG_NEVER)
> + return false;
Considering that if (xen_emul_unplug & XEN_UNPLUG_NEVER) we never set
xen_platform_pci_unplug, this check is redundant.
> + /* And user has xen_platform_pci=0 set in guest config as
> + * driver did not modify the value. */
> + if (!xen_platform_pci_unplug)
> + return false;
> + }
> + return true;
> +}
> +EXPORT_SYMBOL_GPL(xen_has_pv_devices);
> +
> void xen_unplug_emulated_devices(void)
> {
> int r;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists