host kernel: 2.6.39-rc2+
qemu-kvm : 05f1737582ab6c075476bde931c5eafbc62a9349
(gdb) r -monitor stdio -m 800 ~/RHEL-Server-6.0-64-virtio.qcow2 -snapshot
-device virtio-net-pci,netdev=he -netdev tap,vhost=on,id=he
(qemu) [New Thread 0x7fffbe7dd700 (LWP 10410)]
[New Thread 0x7fffbdfdc700 (LWP 10411)
'head' is an index of VirtQueueElement, it should less than vring.num
Signed-off-by: Amos Kong
---
hw/virtio.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/virtio.c b/hw/virtio.c
index 6e8814c..a3d0eee 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -27
Qemu should abort when 'queue_size' is less than or equals to zero.
Signed-off-by: Amos Kong
---
hw/virtio.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/hw/virtio.c b/hw/virtio.c
index a3d0eee..855fe54 100644
--- a/hw/virtio.c
+++ b/hw/virtio.c
@@ -61
ble.
Signed-off-by: Amos Kong
---
hw/virtio-serial-bus.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index 9a12104..aae8456 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -727,7 +727,8 @
On Wed, Jun 15, 2011 at 11:36:02PM +0300, Michael S. Tsirkin wrote:
> On Wed, Jun 15, 2011 at 10:25:33PM +0800, Amos Kong wrote:
> > Qemu should abort when 'queue_size' is less than or equals to zero.
> >
> > Signed-off-by: Amos Kong
>
> BTW, these patche
On Wed, Jun 15, 2011 at 11:30:32PM +0300, Michael S. Tsirkin wrote:
> On Wed, Jun 15, 2011 at 10:25:24PM +0800, Amos Kong wrote:
> > 'head' is an index of VirtQueueElement, it should less than vring.num
> >
> > Signed-off-by: Amos Kong
> > ---
> > hw
It's not valid for queue_size to be negative, then the type ought
to be unsigned.
Changes from V1:
- drop the check and just define it to unsigned.
Signed-off-by: Amos Kong
---
hw/virtio.c |2 +-
hw/virtio.h |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
I try to hotplug 28 * 8 multiple-function devices to guest with
old host kernel, ioeventfds in host kernel will be exhausted, then
qemu fails to allocate ioeventfds for blk/nic devices.
It's better to add detail error here.
Signed-off-by: Amos Kong
---
kvm-all.c |4
1 files chang
On Wed, May 22, 2013 at 11:32:27AM +0200, Stefan Hajnoczi wrote:
> On Wed, May 22, 2013 at 12:57:35PM +0800, Amos Kong wrote:
> > I try to hotplug 28 * 8 multiple-function devices to guest with
> > old host kernel, ioeventfds in host kernel will be exhausted, then
> > q
On Thu, May 23, 2013 at 09:46:07AM +0200, Stefan Hajnoczi wrote:
> On Wed, May 22, 2013 at 09:48:21PM +0800, Amos Kong wrote:
> > On Wed, May 22, 2013 at 11:32:27AM +0200, Stefan Hajnoczi wrote:
> > > On Wed, May 22, 2013 at 12:57:35PM +0800, Amos Kong wrote:
> > >
pit, pic, ioapic, coalesced_mmio. They couldn't be limited
by maximum file descriptor.
Currently only ioeventfds take too much kvm_io_bus devices,
so just exclude it from counting kvm_io_range limit.
Also fixed one indent issue in kvm_host.h
Signed-off-by: Amos Kong
---
include/linux/kvm_h
QEMU commandline:
./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -m 2000 -drive
file=/images/nolvm.qcow2 --kernel /home/devel/linux/arch/x86/boot/bzImage
-append "ro root=/dev/sda1 console=ttyS0,115200" -monitor
unix:/tmp/m,nowait,server -device
virtio-net-pci,netdev=h0,vectors=17,mq=on,i
On Mon, Jul 28, 2014 at 01:25:14PM +0530, Amit Shah wrote:
> On (Mon) 28 Jul 2014 [15:32:42], Amos Kong wrote:
> > QEMU commandline:
> >
> > ./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -m 2000 -drive
> > file=/images/nolvm.qcow2 --kernel /home/devel/
On Mon, Jul 28, 2014 at 02:42:13PM +0530, Amit Shah wrote:
> On (Mon) 28 Jul 2014 [16:49:20], Amos Kong wrote:
> > On Mon, Jul 28, 2014 at 01:25:14PM +0530, Amit Shah wrote:
> > > On (Mon) 28 Jul 2014 [15:32:42], Amos Kong wrote:
> > > > QEMU commandline:
> >
3.16 (guest hangs with two rng devices)
3.16 + quick fix (can startup with two rng devices) (hotplug issue 1 + hotplug
issue 2 exist)
lates torvalds/linux.git + amit 4 patches (can startup with two rng devices)
(only hotplug issue 2 exists)
However, the 4 patches also fixed the hang issue, the h
When we try to hot-remove a busy virtio-rng device from QEMU monitor,
the device can't be hot-removed. Because virtio-rng driver hangs at
wait_for_completion_killable().
This patch fixed the hang by completing have_data completion before
unregistering a virtio-rng device.
Signed-off-by:
On Tue, Aug 05, 2014 at 06:28:54PM +0800, Amos Kong wrote:
> 3.16 (guest hangs with two rng devices)
> 3.16 + quick fix (can startup with two rng devices) (hotplug issue 1 +
> hotplug issue 2 exist)
> lates torvalds/linux.git + amit 4 patches (can startup with two rng devices)
>
On Wed, Aug 06, 2014 at 01:35:15AM +0800, Amos Kong wrote:
> When we try to hot-remove a busy virtio-rng device from QEMU monitor,
> the device can't be hot-removed. Because virtio-rng driver hangs at
> wait_for_completion_killable().
>
> This patch fixed the hang by
One VM only has 128 msix interrupt, virtio-config interrupt
has less workload. This patch shares one normal interrupt
for configuration between virtio devices.
Signed-off-by: Amos Kong
---
drivers/virtio/virtio_pci.c | 41 -
1 file changed, 16 insertions
On Mon, Sep 01, 2014 at 09:37:30AM +0300, Michael S. Tsirkin wrote:
>
Hi Michael,
> On Mon, Sep 01, 2014 at 01:41:54PM +0800, Amos Kong wrote:
> > One VM only has 128 msix interrupt, virtio-config interrupt
> > has less workload. This patch shares one normal interrupt
Tha
On Wed, Aug 06, 2014 at 01:55:29PM +0530, Amit Shah wrote:
> On (Wed) 06 Aug 2014 [16:05:41], Amos Kong wrote:
> > On Wed, Aug 06, 2014 at 01:35:15AM +0800, Amos Kong wrote:
> > > When we try to hot-remove a busy virtio-rng device from QEMU monitor,
> > > the device ca
On Mon, Sep 08, 2014 at 11:29:51PM +0800, Amos Kong wrote:
> On Wed, Aug 06, 2014 at 01:55:29PM +0530, Amit Shah wrote:
> > On (Wed) 06 Aug 2014 [16:05:41], Amos Kong wrote:
> > > On Wed, Aug 06, 2014 at 01:35:15AM +0800, Amos Kong wrote:
> > > > When we try to hot-r
core use wrong
buffer bytes. Before real unregistering we should return -ENODEV for
reading.
When we hot-unplug the device, dd process in guest will exit.
$ dd if=/dev/hwrng of=/dev/null
dd: error reading ‘/dev/hwrng’: No such device
Signed-off-by: Amos Kong
Cc: sta...@vger.kernel.org
-
Hi Amit, Rusty
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1127062
steps:
- Read random data by 'dd if=/dev/hwrng of=/dev/null' in guest
- check sysfs files in the same time, 'cat /sys/class/misc/hw_random/rng_*'
Result: cat process will get stuck, it will return if we kill dd process.
We
(Resend to fix the subject)
Hi Amit, Rusty
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1127062
steps:
- Read random data by 'dd if=/dev/hwrng of=/dev/null' in guest
- check sysfs files in the same time, 'cat /sys/class/misc/hw_random/rng_*'
Result: cat process will get stuck, it will retur
ading.
Thanks for the help of Amit.
Cc: sta...@vger.kernel.org
V2: reset data_avail (Amit)
adjust unregister order
V3: split patch, update commitlog
Amos Kong (2):
virtio-rng: fix stuck of hot-unplugging busy device
virtio-rng: skip reading when we start to remove the device
drivers/char/hw_r
core use wrong
buffer bytes.
Signed-off-by: Amos Kong
Cc: sta...@vger.kernel.org
---
drivers/char/hw_random/virtio-rng.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/char/hw_random/virtio-rng.c
b/drivers/char/hw_random/virtio-rng.c
index 2e3139e..849b228 100644
--- a/drivers
Before we really unregister the hwrng device, reading will get stuck if
the virtio device is reset. We should return error for reading when we
start to remove the device.
Signed-off-by: Amos Kong
Cc: sta...@vger.kernel.org
---
drivers/char/hw_random/virtio-rng.c | 5 +
1 file changed, 5
On Wed, Sep 10, 2014 at 11:04:54AM +0530, Amit Shah wrote:
> Hi Amos,
>
> On (Tue) 09 Sep 2014 [19:14:02], Amos Kong wrote:
> > When we try to hot-remove a busy virtio-rng device from QEMU monitor,
> > the device can't be hot-removed. Because
On Wed, Sep 10, 2014 at 11:22:12AM +0530, Amit Shah wrote:
> On (Tue) 09 Sep 2014 [23:23:07], Amos Kong wrote:
> > (Resend to fix the subject)
> >
> > Hi Amit, Rusty
> >
> > RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1127062
> > steps:
> > -
On Wed, Sep 10, 2014 at 02:49:38PM +0800, Amos Kong wrote:
> On Wed, Sep 10, 2014 at 11:22:12AM +0530, Amit Shah wrote:
> > On (Tue) 09 Sep 2014 [23:23:07], Amos Kong wrote:
> > > (Resend to fix the subject)
> > >
> > > Hi Amit, Rusty
> > >
> >
() is executing in user context.
This patch removed need_resched() and increase delay to 10 jiffies,
then other tasks can have chance to execute protected code.
Delaying 1 jiffy also works, but 10 jiffies is safer.
Signed-off-by: Amos Kong
---
drivers/char/hw_random/core.c | 3 +--
1 file chang
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
to execute protected code, the problem is resolved.
Thanks.
Amos Kong (2):
virtio-rng cleanup: move some code out of mutex protection
virtio-rng: fix stuck in catting hwrng attributes
drivers/char/hw_random/core.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
--
1.9.3
On Thu, Sep 11, 2014 at 09:08:03PM +0930, Rusty Russell wrote:
> Amos Kong writes:
> > When I check hwrng attributes in sysfs, cat process always gets
> > stuck if guest has only 1 vcpu and uses a slow rng backend.
> >
> > Currently we check if there is any tasks waiti
On Sun, Sep 14, 2014 at 01:12:58AM +0800, Amos Kong wrote:
> On Thu, Sep 11, 2014 at 09:08:03PM +0930, Rusty Russell wrote:
> > Amos Kong writes:
> > > When I check hwrng attributes in sysfs, cat process always gets
> > > stuck if guest has only 1 vcpu
On Thu, Sep 11, 2014 at 11:38:38AM +0530, Amit Shah wrote:
> On (Wed) 10 Sep 2014 [17:07:07], Amos Kong wrote:
> > When I check hwrng attributes in sysfs, cat process always gets
> > stuck if guest has only 1 vcpu and uses a slow rng backend.
> >
> > Currently we
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/co
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
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/cor
the issue by changing rng_dev_read() to always
schedule 10 jiffies after release mutex lock, then cat process can
have chance to get the lock and execute protected code without stuck.
Thanks.
V2: update commitlog to describe PATCH 2, split second patch.
Amos Kong (3):
virtio-rng cleanup: move
e here.
This patch removed need_resched() and always schedule other tasks
then other tasks can have chance to hold the lock and execute
protected code.
Signed-off-by: Amos Kong
---
drivers/char/hw_random/core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/char
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.
> &g
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_
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:
> >
> > ...
&
On Thu, Sep 18, 2014 at 12:18:23PM +0930, Rusty Russell wrote:
> current_rng holds one reference, and we bump it every time we want
> to do a read from it.
>
> This means we only hold the rng_mutex to grab or drop a reference,
> so accessing /sys/devices/virtual/misc/hw_random/rng_current doesn't
From: Rusty Russell
Another interesting anti-pattern.
Signed-off-by: Rusty Russell
---
drivers/char/hw_random/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 6420409..12187dd 100644
--- a/drivers/char/hw_random/core.
In next patch, we use reference counting for each struct hwrng,
changing reference count also needs to take mutex_lock. Before
releasing the lock, if we try to stop a kthread that waits to
take the lock to reduce the referencing count, deadlock will
occur.
Signed-off-by: Amos Kong
---
drivers
From: Rusty Russell
The previous patch added one potential problem: we can still be
reading from a hwrng when it's unregistered. Add a wait for zero
in the hwrng_unregister path.
Signed-off-by: Rusty Russell
---
drivers/char/hw_random/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git
From: Rusty Russell
Interesting anti-pattern.
Signed-off-by: Rusty Russell
---
drivers/char/hw_random/core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 9f6f5bb..6420409 100644
--- a/drivers/char/h
ty Russell
Signed-off-by: Amos Kong
---
drivers/char/hw_random/core.c | 136 +-
include/linux/hw_random.h | 2 +
2 files changed, 95 insertions(+), 43 deletions(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index a0905c
deadlock, update current patch 3 to fix reference
counting issue
Amos Kong (1):
hw_random: move some code out mutex_lock for avoiding underlying
deadlock
Rusty Russell (5):
hw_random: place mutex around read functions and buffers.
hw_random: use reference counts on each struct hwrng.
From: Rusty Russell
There's currently a big lock around everything, and it means that we
can't query sysfs (eg /sys/devices/virtual/misc/hw_random/rng_current)
while the rng is reading. This is a real problem when the rng is slow,
or blocked (eg. virtio_rng with qemu's default /dev/random backen
On Thu, Sep 18, 2014 at 12:13:08PM +0930, Rusty Russell wrote:
> Amos Kong writes:
>
> > 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 &
> >
> >
On Thu, Sep 18, 2014 at 08:37:44PM +0800, Amos Kong wrote:
> From: Rusty Russell
>
> current_rng holds one reference, and we bump it every time we want
> to do a read from it.
>
> This means we only hold the rng_mutex to grab or drop a reference,
> so accessing /sys
On Mon, Oct 20, 2014 at 10:42:11AM +1030, Rusty Russell wrote:
> Amos Kong writes:
> > We got a warning in boot stage when above set_current_rng() is executed,
> > it can be fixed by init rng->ref in hwrng_init().
> >
> >
> > @@ -166,6 +169,8 @@ static inl
On Fri, Oct 31, 2014 at 03:23:21PM +0800, Herbert Xu wrote:
> On Fri, Oct 31, 2014 at 10:28:00AM +1030, Rusty Russell wrote:
> > Herbert Xu writes:
> > > On Thu, Sep 18, 2014 at 08:37:45PM +0800, Amos Kong wrote:
> > >> From: Rusty Russell
> > >>
>
On Sun, Nov 02, 2014 at 11:08:09PM +0800, Herbert Xu wrote:
> On Sun, Nov 02, 2014 at 11:06:13PM +0800, Amos Kong wrote:
> > On Fri, Oct 31, 2014 at 03:23:21PM +0800, Herbert Xu wrote:
> > > On Fri, Oct 31, 2014 at 10:28:00AM +1030, Rusty Russell wrote:
> > > > Herber
On Tue, Oct 21, 2014 at 10:15:23PM +0800, Herbert Xu wrote:
> On Thu, Sep 18, 2014 at 12:18:24PM +0930, Rusty Russell wrote:
> > The previous patch added one potential problem: we can still be
> > reading from a hwrng when it's unregistered. Add a wait for zero
> > in the hwrng_unregister path.
>
From: Rusty Russell
Another interesting anti-pattern.
Signed-off-by: Rusty Russell
---
drivers/char/hw_random/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index fc5de7d..b2cc8a1 100644
--- a/drivers/char/hw_random/core.
In next patch, we use reference counting for each struct hwrng,
changing reference count also needs to take mutex_lock. Before
releasing the lock, if we try to stop a kthread that waits to
take the lock to reduce the referencing count, deadlock will
occur.
Signed-off-by: Amos Kong
---
drivers
ed by Herbert
V3: initialize kref to 1
V2: added patch 2 to fix a deadlock, update current patch 3 to fix reference
counting issue
Amos Kong (1):
hw_random: move some code out mutex_lock for avoiding underlying
deadlock
Rusty Russell (5):
hw_random: place mutex around read functions and buff
ef (thanks Amos Kong)
v2: fix missing put_rng() on exit path (thanks Amos Kong)
Signed-off-by: Rusty Russell
Signed-off-by: Amos Kong
---
drivers/char/hw_random/core.c | 142 +-
include/linux/hw_random.h | 2 +
2 files changed, 101 insertions(+), 43
From: Rusty Russell
There's currently a big lock around everything, and it means that we
can't query sysfs (eg /sys/devices/virtual/misc/hw_random/rng_current)
while the rng is reading. This is a real problem when the rng is slow,
or blocked (eg. virtio_rng with qemu's default /dev/random backen
From: Rusty Russell
The previous patch added one potential problem: we can still be
reading from a hwrng when it's unregistered. Add a wait for zero
in the hwrng_unregister path.
v4: add cleanup_done flag to insure that cleanup is done
Signed-off-by: Rusty Russell
Signed-off-by: Amos
From: Rusty Russell
Interesting anti-pattern.
Signed-off-by: Rusty Russell
---
drivers/char/hw_random/core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index c31bf91..fc5de7d 100644
--- a/drivers/char/h
On Wed, Nov 12, 2014 at 02:11:23PM +1030, Rusty Russell wrote:
> Amos Kong writes:
> > From: Rusty Russell
> >
> > current_rng holds one reference, and we bump it every time we want
> > to do a read from it.
> >
> > This means we only hold the rng_mu
On Wed, Nov 12, 2014 at 02:33:00PM +1030, Rusty Russell wrote:
> Amos Kong writes:
> > From: Rusty Russell
> >
> > The previous patch added one potential problem: we can still be
> > reading from a hwrng when it's unregistered. Add a wait for zero
> > in
On Wed, Nov 12, 2014 at 02:33:00PM +1030, Rusty Russell wrote:
> Amos Kong writes:
> > From: Rusty Russell
> >
> > The previous patch added one potential problem: we can still be
> > reading from a hwrng when it's unregistered. Add a wait for zero
> > in
that cleanup is done
Signed-off-by: Rusty Russell
Signed-off-by: Amos Kong
---
drivers/char/hw_random/core.c | 12
include/linux/hw_random.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 83516cb..06
From: Rusty Russell
Another interesting anti-pattern.
Signed-off-by: Rusty Russell
---
drivers/char/hw_random/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index a9286bf..4d13ac5 100644
--- a/drivers/char/hw_random/core.
From: Rusty Russell
Interesting anti-pattern.
Signed-off-by: Rusty Russell
---
drivers/char/hw_random/core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 067270b..a9286bf 100644
--- a/drivers/char/h
he cleanup
v3: initialize kref (thanks Amos Kong)
v2: fix missing put_rng() on exit path (thanks Amos Kong)
Signed-off-by: Rusty Russell
Signed-off-by: Amos Kong
---
drivers/char/hw_random/core.c | 135 --
include/linux/hw_random.h | 2 +
2 files c
e patch 4 to fix corrupt, decrease last reference for triggering
the cleanup, fix unregister race pointed by Herbert
V3: initialize kref to 1
V2: added patch 2 to fix a deadlock, update current patch 3 to fix reference
counting issue
Amos Kong (1):
hw_random: move some code out mutex_l
In next patch, we use reference counting for each struct hwrng,
changing reference count also needs to take mutex_lock. Before
releasing the lock, if we try to stop a kthread that waits to
take the lock to reduce the referencing count, deadlock will
occur.
Signed-off-by: Amos Kong
---
drivers
From: Rusty Russell
There's currently a big lock around everything, and it means that we
can't query sysfs (eg /sys/devices/virtual/misc/hw_random/rng_current)
while the rng is reading. This is a real problem when the rng is slow,
or blocked (eg. virtio_rng with qemu's default /dev/random backen
From: Rusty Russell
Another interesting anti-pattern.
Signed-off-by: Rusty Russell
---
drivers/char/hw_random/core.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index a9286bf..4d13ac5 100644
--- a/drivers/char/hw_random/core.
he cleanup
v3: initialize kref (thanks Amos Kong)
v2: fix missing put_rng() on exit path (thanks Amos Kong)
Signed-off-by: Rusty Russell
Signed-off-by: Amos Kong
---
drivers/char/hw_random/core.c | 135 --
include/linux/hw_random.h | 2 +
2 files c
In next patch, we use reference counting for each struct hwrng,
changing reference count also needs to take mutex_lock. Before
releasing the lock, if we try to stop a kthread that waits to
take the lock to reduce the referencing count, deadlock will
occur.
Signed-off-by: Amos Kong
---
drivers
From: Rusty Russell
There's currently a big lock around everything, and it means that we
can't query sysfs (eg /sys/devices/virtual/misc/hw_random/rng_current)
while the rng is reading. This is a real problem when the rng is slow,
or blocked (eg. virtio_rng with qemu's default /dev/random backen
e patch 4 to fix corrupt, decrease last reference for triggering
the cleanup, fix unregister race pointed by Herbert
V3: initialize kref to 1
V2: added patch 2 to fix a deadlock, update current patch 3 to fix reference
counting issue
Amos Kong (1):
hw_random: move some code out mutex_l
From: Rusty Russell
Interesting anti-pattern.
Signed-off-by: Rusty Russell
---
drivers/char/hw_random/core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 067270b..a9286bf 100644
--- a/drivers/char/h
that cleanup is done
Signed-off-by: Rusty Russell
Signed-off-by: Amos Kong
---
drivers/char/hw_random/core.c | 12
include/linux/hw_random.h | 1 +
2 files changed, 13 insertions(+)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 83516cb..06
On 11/09/12 22:31, Fengguang Wu wrote:
Hi Avi,
In the kvm/next branch, sparse warns about
arch/x86/kvm/emulate.c:232 writeback_registers() error: buffer overflow
'ctxt->_regs' 9 <= 15
This is because the array definition is ctxt._regs[NR_VCPU_REGS] where
NR_VCPU_REGS=9 for i386 and 17 for x86
{
> .name = "copy-on-read",
> .type = QEMU_OPT_BOOL,
> .help = "copy read data from backing file into image
> file",
> - },{
> -.name = "boot",
> -.type = QEMU_OPT_B
- Original Message -
> On Thu, Sep 20, 2012 at 09:46:41AM -0300, Marcelo Tosatti wrote:
> > On Thu, Sep 20, 2012 at 01:55:20PM +0530, Amit Shah wrote:
> > > Commit f349c12c0434e29c79ecde89029320c4002f7253 added the guest
> > > stop
In commitlog of f349c12c0434e29c79ecde89029320c4002f7253:
On Sat, Apr 19, 2014 at 12:08:15PM +0800, Amos Kong wrote:
>
> Hi all,
>
> I'm working on this item in Upstream Networking todolist:
>
> | - Sharing config interrupts
> |Support more devices by sharing a single msi vector
> |between multiple virtio devices.
On Sun, Apr 27, 2014 at 06:03:04PM +0300, Michael S. Tsirkin wrote:
> On Sun, Apr 27, 2014 at 10:35:41PM +0800, Amos Kong wrote:
> > On Sat, Apr 19, 2014 at 12:08:15PM +0800, Amos Kong wrote:
> > >
> > > Hi all,
> > >
> > > I'm wo
y", line 86, in
_autotest_logging_handle_error
09/23 09:50:27 ERROR| traceback:0013| traceback.print_stack()
09/23 09:50:27 ERROR|setup_modu:0087| Future logging formatting exceptions
disabled.
09/23 09:50:27 ERROR| kvm:0067| Test failed: global name
'root_module_name' is not def
0087| Future logging formatting exceptions
disabled.
09/23 09:50:27 ERROR| kvm:0067| Test failed: global name
'root_module_name' is not defined
Signed-off-by: Amos Kong
---
client/setup_modules.py |4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/cl
Test 802.1Q vlan of nic, config it by vconfig command.
1) Create two VMs
2) Setup guests in different vlan by vconfig and test communication by ping
using hard-coded ip address
3) Setup guests in same vlan and test communication by ping
4) Recover the vlan config
Signed-off-by: Amos Kong
uted before 'chvt
1' took full effect? (Just my wild guess.)
I'll appreciate your help.
Regards,
--
Amos Kong
Quality Engineer
Raycom Office(Beijing), Red Hat Inc.
Phone: +86-10-62608183
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
2010/4/18 Øyvind Sæther :
>> > The patch lets me run 1920x1080 resolution, some displays are only that
>> > and not 1920x1200 these days. Gentoos ebuild doesn't seem to make the
>> > vgabios and only uses /pc-bios/vgabios.bin, making kvm/vgabios and
>> > replace vgabios.bin with the VGABIOS-lgpl-la
On Sun, May 2, 2010 at 9:14 PM, Dan Johansson wrote:
> Hi, It's me again.
>
> After some time with a lot to do outside the computer world, I am now
> continuing my "KVM-Project". I have gotten all my KVM-Guest to run separately,
> but when I try to start more then one at the same time I get the fo
On Fri, May 14, 2010 at 4:33 PM, Alexander Graf wrote:
> On 14.05.2010, at 10:10, TianJing wrote:
>> Hi all,
>>
>> i am trying to install kvm on RHEL5.5, the server is power leader
>> S5000VSA, the CPU is intel E5335, and i check that it support vm.
>> when i run the commamd: modprobe kvm_intel
>
Hello all,
Can I ask some question of the offloading function with Virtio-NIC?
I'm interested in KVM virtualization. The virtual NIC is different
from real hardward. And there is also a big distance between
Virtio-NIC and E1000-NIC.
The offloading function of Virtio-NIC close related with the fun
On Mon, May 31, 2010 at 7:44 AM, Amos Kong wrote:
> Hello all,
>
> Can I ask some question of the offloading function with Virtio-NIC?
>
> I'm interested in KVM virtualization. The virtual NIC is different
> from real hardward. And there is also a big distance between
>
/x86.c:3367: error: expected expression before ‘)’ token
Signed-off-by: Amos Kong
---
arch/x86/kvm/x86.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index bb9a24a..097ad3a 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86
When input some invialid words in QMP port, qemu outputs this error message:
"parse error: invalid keyword `%s'"
This patch makes qemu output the content.
Signed-off-by: Amos Kong
---
json-parser.c |7 ++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/
This patchset contains 11 network related subtests, welcome more suggestions
about correctness, design and enhancement.
This is the version 2, thanks your comments.
---
Amos Kong (17):
KVM-test: Add a new macaddress pool algorithm
Add a get_ifname function
KVM Test: Add a
201 - 300 of 398 matches
Mail list logo