virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PULL] virtio and lguest
@ 2012-01-12  5:22 Rusty Russell
  2012-01-13  0:29 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Rusty Russell @ 2012-01-12  5:22 UTC (permalink / raw)
  To: torvalds
  Cc: Stratos Psomadakis, Michael S. Tsirkin,
	lkml - Kernel Mailing List, virtualization, Sasha Levin,
	Amit Shah, Jacek Galowicz, Christoph Hellwig, Davidlohr Bueso

(I called the tag to-linus.  I think it worked).

To git@github.com:rustyrussell/linux.git
 + 3ed0016...b6c96c0 master -> master (forced update)
 + 815645d...f8e8df5 to-linus -> to-linus (forced update)
+ git request-pull remotes/origin/master git://github.com/rustyrussell/linux.git
The following changes since commit e343a895a9f342f239c5e3c5ffc6c0b1707e6244:

  Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost (2012-01-10 18:04:27 -0800)

are available in the git repository at:

  git://github.com/rustyrussell/linux.git master

Amit Shah (12):
      virtio: pci: switch to new PM API
      virtio: pci: add PM notification handlers for restore, freeze, thaw, poweroff
      virtio: console: Move vq and vq buf removal into separate functions
      virtio: console: Add freeze and restore handlers to support S4
      virtio: console: Disable callbacks for virtqueues at start of S4 freeze
      virtio: blk: Move vq initialization to separate function
      virtio: blk: Add freeze, restore handlers to support S4
      virtio: net: Move vq initialization into separate function
      virtio: net: Move vq and vq buf removal into separate function
      virtio: net: Add freeze, restore handlers to support S4
      virtio: balloon: Move vq initialization into separate function
      virtio: balloon: Add freeze, restore handlers to support S4

Davidlohr Bueso (1):
      lguest: move the lguest tool to the tools directory

Jacek Galowicz (1):
      lguest: switch segment-voodoo-numbers to readable symbols

Michael S. Tsirkin (1):
      virtio_blk: fix config handler race

Rusty Russell (7):
      virtio: harsher barriers for rpmsg.
      virtio: document functions better.
      virtio: rename virtqueue_add_buf_gfp to virtqueue_add_buf
      virtio: support unlocked queue kick
      virtio: avoid modulus operation.
      virtio: expose added descriptors immediately.
      virtio: add debugging if driver doesn't kick.

Sasha Levin (1):
      virtio-balloon: Trivial cleanups

Stratos Psomadakis (1):
      lguest: Make sure interrupt is allocated ok by lguest_setup_irq

 arch/x86/lguest/boot.c                             |   21 +-
 drivers/block/virtio_blk.c                         |   87 +++++++-
 drivers/char/hw_random/virtio-rng.c                |    2 +-
 drivers/char/virtio_console.c                      |  140 +++++++++---
 drivers/lguest/Makefile                            |    2 +-
 drivers/lguest/lguest_device.c                     |   18 +-
 drivers/lguest/segments.c                          |   28 ++-
 drivers/net/virtio_net.c                           |  125 ++++++++---
 drivers/s390/kvm/kvm_virtio.c                      |    2 +-
 drivers/virtio/virtio_balloon.c                    |  108 +++++++--
 drivers/virtio/virtio_mmio.c                       |    4 +-
 drivers/virtio/virtio_pci.c                        |  110 +++++++++-
 drivers/virtio/virtio_ring.c                       |  245 +++++++++++++++++---
 include/linux/virtio.h                             |   75 ++-----
 include/linux/virtio_ring.h                        |    1 +
 net/9p/trans_virtio.c                              |    6 +-
 {Documentation/virtual => tools}/lguest/.gitignore |    0
 {Documentation/virtual => tools}/lguest/Makefile   |    0
 {Documentation/virtual => tools}/lguest/extract    |    0
 {Documentation/virtual => tools}/lguest/lguest.c   |    2 +-
 {Documentation/virtual => tools}/lguest/lguest.txt |    0
 tools/virtio/linux/virtio.h                        |   22 +--
 tools/virtio/virtio_test.c                         |    6 +-
 23 files changed, 757 insertions(+), 247 deletions(-)
 rename {Documentation/virtual => tools}/lguest/.gitignore (100%)
 rename {Documentation/virtual => tools}/lguest/Makefile (100%)
 rename {Documentation/virtual => tools}/lguest/extract (100%)
 rename {Documentation/virtual => tools}/lguest/lguest.c (99%)
 rename {Documentation/virtual => tools}/lguest/lguest.txt (100%)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PULL] virtio and lguest
  2012-01-12  5:22 [PULL] virtio and lguest Rusty Russell
@ 2012-01-13  0:29 ` Linus Torvalds
  2012-01-13  2:29   ` Rusty Russell
  2012-01-13 10:48   ` Amit Shah
  0 siblings, 2 replies; 4+ messages in thread
From: Linus Torvalds @ 2012-01-13  0:29 UTC (permalink / raw)
  To: Rusty Russell
  Cc: Stratos Psomadakis, Michael S. Tsirkin,
	lkml - Kernel Mailing List, virtualization, Sasha Levin,
	Amit Shah, Jacek Galowicz, Christoph Hellwig, Davidlohr Bueso

On Wed, Jan 11, 2012 at 9:22 PM, Rusty Russell <rusty@rustcorp.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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PULL] virtio and lguest
  2012-01-13  0:29 ` Linus Torvalds
@ 2012-01-13  2:29   ` Rusty Russell
  2012-01-13 10:48   ` Amit Shah
  1 sibling, 0 replies; 4+ messages in thread
From: Rusty Russell @ 2012-01-13  2:29 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Stratos Psomadakis, Michael S. Tsirkin,
	lkml - Kernel Mailing List, virtualization, Sasha Levin,
	Amit Shah, Jacek Galowicz, Christoph Hellwig, Davidlohr Bueso

On Thu, 12 Jan 2012 16:29:14 -0800, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> On Wed, Jan 11, 2012 at 9:22 PM, Rusty Russell <rusty@rustcorp.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)

Ok, I'll confess complete ignorance, and wait for Amit to respond.  I
must admit that PM for virtual devices is not a personal priority...

Thanks,
Rusty.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PULL] virtio and lguest
  2012-01-13  0:29 ` Linus Torvalds
  2012-01-13  2:29   ` Rusty Russell
@ 2012-01-13 10:48   ` Amit Shah
  1 sibling, 0 replies; 4+ messages in thread
From: Amit Shah @ 2012-01-13 10:48 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Stratos Psomadakis, Michael S. Tsirkin,
	lkml - Kernel Mailing List, virtualization, Sasha Levin,
	Jacek Galowicz, Christoph Hellwig, Davidlohr Bueso

Hi,

On (Thu) 12 Jan 2012 [16:29:14], Linus Torvalds wrote:
> On Wed, Jan 11, 2012 at 9:22 PM, Rusty Russell <rusty@rustcorp.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.

The idea behind this patchset is to get S4 working properly.  There's
no change to the way S3 was/is being done, and the state-setting is
done only in the S3 PM callbacks.

> 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

For S4, we need some driver-specific (not just virtio-specific) work
to be done on the freeze/restore callbacks...

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

... and we also have separate stuff to be done in thaw/restore/freeze
callbacks for different drivers.  So using the *_PM_OPS() macros
wouldn't have worked.

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

I think your concern is with the way S3 is being done, and I volunteer
to look at improving the situation there.  Might take a while, though.

		Amit

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-13 10:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-12  5:22 [PULL] virtio and lguest Rusty Russell
2012-01-13  0:29 ` Linus Torvalds
2012-01-13  2:29   ` Rusty Russell
2012-01-13 10:48   ` Amit Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).