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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <A6AD88C3F2289247BE726C37303E1EB894F11D64@orsmsx505.amr.corp.intel.com>
Date:	Wed, 18 Feb 2009 09:28:44 -0800
From:	"Yu, Fenghua" <fenghua.yu@...el.com>
To:	'Ingo Molnar' <mingo@...e.hu>,
	'Linus Torvalds' <torvalds@...ux-foundation.org>
CC:	'David Woodhouse' <dwmw2@...radead.org>,
	'Stephen Rothwell' <sfr@...b.auug.org.au>,
	"'iommu@...ts.linux-foundation.org'" 
	<iommu@...ts.linux-foundation.org>,
	'LKML' <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] Suspend and Resume Support for Intel IOMMU


>> On Wed, 18 Feb 2009, Fenghua Yu wrote:
>> >
>> > +static int vtd_enabled;
>> ..
>> > +static int iommu_resume(struct sys_device *dev)
>> > +{
>> ..
>> > +	if (!vtd_enabled)
>> > +		return 0;
>> 
>> Hmm. Why do this?
>> 
>> Wouldn't it be much more logical to only register the 
>> iommu_sysdev if the thing is enabled, rather than having an 
>> odd flag that gets tested at runtime?
>
>The sysdev_class_register() could be done straight in 
>intel_iommu_init(), because that gets called by pci_iommu_init() 
>which is an fs_initcall() - so all the sysdev facilities should 
>be up and running already.

That was my original concern. I'll remove the vtd_enabled flag and
register device_iommu in intel_iommu_init() in an updated patch.

Thanks.

-Fenghua

--
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