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: <CA+55aFyOy4bWUq6PH3ThM2CXOFwi75FE8HGOJ8DNZjFWw9rq6A@mail.gmail.com>
Date:	Thu, 12 Jan 2012 16:29:14 -0800
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Amit Shah <amit.shah@...hat.com>,
	Christoph Hellwig <hch@....de>, Davidlohr Bueso <dave@....org>,
	Jacek Galowicz <jacek@...owicz.de>,
	"Michael S. Tsirkin" <mst@...hat.com>,
	Sasha Levin <levinsasha928@...il.com>,
	Stratos Psomadakis <psomas@...ab.ece.ntua.gr>,
	virtualization@...ts.linux-foundation.org
Subject: Re: [PULL] virtio and lguest

On Wed, Jan 11, 2012 at 9:22 PM, Rusty Russell <rusty@...tcorp.com.au> wrote:
>
> Amit Shah (12):
>      virtio: pci: switch to new PM API

Hmm. Afaik, this is broken, or at least not complete.

Sure, it switches to the new PM API, but it still does the PCI ops itself.

It should not need to - the PCI layer will do the power state and
standard PCI device state saving. And setting the PCI_D3hot state when
shared interrupts can still happen at suspend time is just a bad idea.

So I think you're doing extra work and introducing bugs by doing so -
the default PCI bus operations should already do all you do, just do
it better. And then you can use the SIMPLE_DEV_PM_OPS() to build the
dev_pm_ops structure and get all the normal cases right automatically.

I don't know if there is any particularly good example of this, but
you can see some of the network drivers for examples of this. Notice
how they don't need to worry about PCI power states etc at all, they
just need to worry about the actual chip suspend/resume (and for a
network driver, you'd do the netif_device_detach/netif_device_attach
etc)

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