Re: [PATCH] virtio-pci: also bind to Amazon PCI vendor ID

2014-09-15 Thread Michael S. Tsirkin
On Sun, Sep 14, 2014 at 08:29:33PM -0700, Anthony Liguori wrote: > From: Anthony Liguori > > See https://issues.oasis-open.org/browse/VIRTIO-16 although it > was prematurely closed. The reason it was closed is described in the comments. and I quote: " I think anyone can use a different subsystem

Re: [PATCH] virtio_pci: properly clean up MSI-X state when initialization fails

2014-09-15 Thread Michael S. Tsirkin
On Sun, Sep 14, 2014 at 08:23:26PM -0700, Anthony Liguori wrote: > From: Anthony Liguori > > If MSI-X initialization fails after setting msix_enabled = 1, then > the device is left in an inconsistent state. This would normally > only happen if there was a bug in the device emulation but it still

Re: [virtio-dev] [PATCH 2/2] virtio-gpu/2d: add docs/specs/virtio-gpu.txt

2014-09-15 Thread Gerd Hoffmann
On Sa, 2014-09-13 at 07:14 +1000, Dave Airlie wrote: > >> Can the host refuse due to lack of resources? > > > > Yes. virtgpu_ctrl_hdr.type in the response will be set to > > VIRTGPU_RESP_ERR_* then. Current implementation does that only on > > malloc() failure, there is no accounting (yet) to lim

Re: [Qemu-devel] [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-15 Thread Gerd Hoffmann
Hi, > >> > >> Why do you think that? We have several header files which > >> use QEMU_BUILD_BUG_ON and I don't see any reason why > >> it would have to be invoked from a .c file. > > > Because Gerd wants to share this with linux uapi, and > > you can't use BUILD_BUG_ON in uapi headers on linux.

Re: [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-15 Thread Gerd Hoffmann
> > > > + > > > > +enum virtgpu_ctrl_type { > > > > +VIRTGPU_UNDEFINED = 0, > > > > + > > > > +/* 2d commands */ > > > > +VIRTGPU_CMD_GET_DISPLAY_INFO = 0x0100, > > > > > > Please consider also adding: > > VIRTIO_GPU_ everywhere to make it consistent with other > virtio he

Re: [PATCH 1/2] virtio-gpu/2d: add hardware spec include file

2014-09-15 Thread Michael S. Tsirkin
On Mon, Sep 15, 2014 at 12:40:07PM +0200, Gerd Hoffmann wrote: > > > > > + > > > > > +enum virtgpu_ctrl_type { > > > > > +VIRTGPU_UNDEFINED = 0, > > > > > + > > > > > +/* 2d commands */ > > > > > +VIRTGPU_CMD_GET_DISPLAY_INFO = 0x0100, > > > > > > > > Please consider also a

Re: [PATCH] virtio-pci: also bind to Amazon PCI vendor ID

2014-09-15 Thread Matt Wilson
On Sun, Sep 14, 2014 at 08:29:33PM -0700, Anthony Liguori wrote: > From: Anthony Liguori > > See https://issues.oasis-open.org/browse/VIRTIO-16 although it > was prematurely closed. > > Red Hat has non-redistributable Windows drivers and Microsoft > will not allow anyone else to WHQL certify dri

Re: [PATCH] virtio_pci: properly clean up MSI-X state when initialization fails

2014-09-15 Thread Matt Wilson
On Sun, Sep 14, 2014 at 08:23:26PM -0700, Anthony Liguori wrote: > From: Anthony Liguori > > If MSI-X initialization fails after setting msix_enabled = 1, then > the device is left in an inconsistent state. This would normally > only happen if there was a bug in the device emulation but it still

Re: [PATCH] virtio_pci: properly clean up MSI-X state when initialization fails

2014-09-15 Thread Anthony Liguori
Hi Michael, On Mon, Sep 15, 2014 at 1:32 AM, Michael S. Tsirkin wrote: > On Sun, Sep 14, 2014 at 08:23:26PM -0700, Anthony Liguori wrote: >> From: Anthony Liguori >> >> If MSI-X initialization fails after setting msix_enabled = 1, then >> the device is left in an inconsistent state. This would

Re: [PATCH] virtio-pci: also bind to Amazon PCI vendor ID

2014-09-15 Thread Anthony Liguori
Hi Michael, On Mon, Sep 15, 2014 at 1:20 AM, Michael S. Tsirkin wrote: > On Sun, Sep 14, 2014 at 08:29:33PM -0700, Anthony Liguori wrote: >> From: Anthony Liguori >> >> See https://issues.oasis-open.org/browse/VIRTIO-16 although it >> was prematurely closed. > > The reason it was closed is descr

Re: [PATCH] virtio_pci: properly clean up MSI-X state when initialization fails

2014-09-15 Thread Michael S. Tsirkin
On Mon, Sep 15, 2014 at 07:10:45AM -0700, Anthony Liguori wrote: > Hi Michael, > > On Mon, Sep 15, 2014 at 1:32 AM, Michael S. Tsirkin wrote: > > On Sun, Sep 14, 2014 at 08:23:26PM -0700, Anthony Liguori wrote: > >> From: Anthony Liguori > >> > >> If MSI-X initialization fails after setting msix

[PATCH v2 1/3] virtio-rng cleanup: move some code out of mutex protection

2014-09-15 Thread Amos Kong
It doesn't save too much cpu time as expected, just a cleanup. Signed-off-by: Amos Kong --- drivers/char/hw_random/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index aa30a25..c591d7e 100644 --- a/dr

[PATCH v2 0/3] fix stuck in accessing hwrng attributes

2014-09-15 Thread Amos Kong
If we read hwrng by long-running dd process, it takes too much cpu time and almost hold the mutex lock. When we check hwrng attributes from sysfs by cat, it gets stuck in waiting the lock releaseing. The problem can only be reproduced with non-smp guest with slow backend. This patchset resolves th

[PATCH v2 2/3] hw_random: fix stuck in catting hwrng attributes

2014-09-15 Thread Amos Kong
I started a QEMU (non-smp) guest with one virtio-rng device, and read random data from /dev/hwrng by dd: # dd if=/dev/hwrng of=/dev/null & In the same time, if I check hwrng attributes from sysfs by cat: # cat /sys/class/misc/hw_random/rng_* The cat process always gets stuck with slow backend

[PATCH v2 3/3] hw_random: increase schedule timeout in rng_dev_read()

2014-09-15 Thread Amos Kong
This patch increases the schedule timeout to 10 jiffies, it's more appropriate, then other takes can easy to hold the mutex lock. Signed-off-by: Amos Kong --- drivers/char/hw_random/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/hw_random/core.c b/drivers

Re: [PATCH] virtio-pci: also bind to Amazon PCI vendor ID

2014-09-15 Thread Michael S. Tsirkin
On Mon, Sep 15, 2014 at 07:24:33AM -0700, Anthony Liguori wrote: > Hi Michael, > > On Mon, Sep 15, 2014 at 1:20 AM, Michael S. Tsirkin wrote: > > On Sun, Sep 14, 2014 at 08:29:33PM -0700, Anthony Liguori wrote: > >> From: Anthony Liguori > >> > >> See https://issues.oasis-open.org/browse/VIRTIO-

Re: [PATCH v2 1/3] virtio-rng cleanup: move some code out of mutex protection

2014-09-15 Thread Michael Büsch
On Tue, 16 Sep 2014 00:02:27 +0800 Amos Kong wrote: > It doesn't save too much cpu time as expected, just a cleanup. > > Signed-off-by: Amos Kong > --- > drivers/char/hw_random/core.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/char/hw_random/core.c

Re: [PATCH v2 3/3] hw_random: increase schedule timeout in rng_dev_read()

2014-09-15 Thread Michael Büsch
On Tue, 16 Sep 2014 00:02:29 +0800 Amos Kong wrote: > This patch increases the schedule timeout to 10 jiffies, it's more > appropriate, then other takes can easy to hold the mutex lock. > > Signed-off-by: Amos Kong > --- > drivers/char/hw_random/core.c | 2 +- > 1 file changed, 1 insertion(+),

Re: [PATCH 2/2] virtio-rng: fix stuck in catting hwrng attributes

2014-09-15 Thread Radim Krčmář
2014-09-14 10:25+0800, Amos Kong: > On Sun, Sep 14, 2014 at 09:12:08AM +0800, Amos Kong wrote: > > ... > > > > > diff --git a/drivers/char/hw_random/core.c > > > > > b/drivers/char/hw_random/core.c > > > > > index c591d7e..b5d1b6f 100644 > > > > > --- a/drivers/char/hw_random/core.c > > > > > +++

Re: [PATCH] virtio-pci: also bind to Amazon PCI vendor ID

2014-09-15 Thread Matt Wilson
On Mon, Sep 15, 2014 at 07:23:08PM +0300, Michael S. Tsirkin wrote: > On Mon, Sep 15, 2014 at 07:24:33AM -0700, Anthony Liguori wrote: > > Hi Michael, > > > > On Mon, Sep 15, 2014 at 1:20 AM, Michael S. Tsirkin wrote: > > > On Sun, Sep 14, 2014 at 08:29:33PM -0700, Anthony Liguori wrote: > > >> F

CFP: IEEE/ACM Int. Symposium on Big Data Computing (BDC) 2014 -- 1 week deadline extension

2014-09-15 Thread Ioan Raicu
Call for Papers IEEE/ACM International Symposium on Big Data Computing (BDC) 2014 December 8-11, 2014, London, UK http://www.cloudbus.org/bdc2014 In conjunction with: 7th IEEE/ACM International Conference on Utility and Cloud Computing (UCC 2014) Sponsored by: IEEE Computer Society and ACM (Asso

Re: [PATCH v2 3/3] hw_random: increase schedule timeout in rng_dev_read()

2014-09-15 Thread Amos Kong
On Mon, Sep 15, 2014 at 06:13:31PM +0200, Michael Büsch wrote: > On Tue, 16 Sep 2014 00:02:29 +0800 > Amos Kong wrote: > > > This patch increases the schedule timeout to 10 jiffies, it's more > > appropriate, then other takes can easy to hold the mutex lock. > > > > Signed-off-by: Amos Kong > >

Re: [PATCH v2 1/3] virtio-rng cleanup: move some code out of mutex protection

2014-09-15 Thread Amos Kong
On Mon, Sep 15, 2014 at 06:13:20PM +0200, Michael Büsch wrote: > On Tue, 16 Sep 2014 00:02:27 +0800 > Amos Kong wrote: > > > It doesn't save too much cpu time as expected, just a cleanup. > > > > Signed-off-by: Amos Kong > > --- > > drivers/char/hw_random/core.c | 6 +++--- > > 1 file changed,

Re: [PATCH 2/2] virtio-rng: fix stuck in catting hwrng attributes

2014-09-15 Thread Amos Kong
CC linux-kernel Original thread: http://comments.gmane.org/gmane.linux.kernel.virtualization/22775 On Mon, Sep 15, 2014 at 06:48:46PM +0200, Radim Krčmář wrote: > 2014-09-14 10:25+0800, Amos Kong: > > On Sun, Sep 14, 2014 at 09:12:08AM +0800, Amos Kong wrote: > > > > ... > > > > > > diff --git