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: <alpine.DEB.2.02.1312041049310.7093@kaball.uk.xensource.com>
Date:	Wed, 4 Dec 2013 10:51:55 +0000
From:	Stefano Stabellini <stefano.stabellini@...citrix.com>
To:	Ian Campbell <Ian.Campbell@...rix.com>
CC:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
	<stefano.stabellini@...citrix.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 Wed, 4 Dec 2013, Ian Campbell wrote:
> > +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;
> 
> I think you need
> 		if (xen_emul_unpug & XEN_UNPLUG_UNNECESSARY)
> 			return true;
> don't you?

XEN_UNPLUG_UNNECESSARY was introduced to enable the platform PCI device
even if it didn't respond properly to the unplug protocol.
The corresponding parameter is called "unnecessary" because if you pass
it to the kernel you mean that it is unnecessary to unplug the emulated
devices but you can use the pv devices anyway.

So no, we shouldn't check for XEN_UNPLUG_UNNECESSARY here.



> > +		/* 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ