Re: [Qemu-devel] [PATCH v7] kvm: notify host when the guest is panicked

2012-07-22 Thread Wen Congyang
At 07/23/2012 04:19 AM, Sasha Levin Wrote: > On 07/22/2012 09:22 PM, Anthony Liguori wrote: >> Sasha Levin writes: >> >>> On 07/21/2012 09:12 AM, Wen Congyang wrote: +#define KVM_PV_PORT (0x505UL) + #ifdef __KERNEL__ #include @@ -221,6 +223,11 @@ static inl

Re: [net-next RFC V5 4/5] virtio_net: multiqueue support

2012-07-22 Thread Jason Wang
On 07/21/2012 08:02 PM, Sasha Levin wrote: On 07/20/2012 03:40 PM, Michael S. Tsirkin wrote: - err = init_vqs(vi); + if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_VQ)) + vi->has_cvq = true; + How about we disable multiqueue if there's no cvq? Will make logic a bit si

Re: [net-next RFC V5 4/5] virtio_net: multiqueue support

2012-07-22 Thread Jason Wang
On 07/20/2012 09:40 PM, Michael S. Tsirkin wrote: On Thu, Jul 05, 2012 at 06:29:53PM +0800, Jason Wang wrote: This patch converts virtio_net to a multi queue device. After negotiated VIRTIO_NET_F_MULTIQUEUE feature, the virtio device has many tx/rx queue pairs, and driver could read the number f

Re: [net-next RFC V5 5/5] virtio_net: support negotiating the number of queues through ctrl vq

2012-07-22 Thread Jason Wang
On 07/20/2012 08:33 PM, Michael S. Tsirkin wrote: On Thu, Jul 05, 2012 at 06:29:54PM +0800, Jason Wang wrote: This patch let the virtio_net driver can negotiate the number of queues it wishes to use through control virtqueue and export an ethtool interface to let use tweak it. As current multiq

Re: [PATCH 2/9] KVM: x86: simplify read_emulated

2012-07-22 Thread Xiao Guangrong
On 07/21/2012 03:52 AM, Marcelo Tosatti wrote: > On Fri, Jul 20, 2012 at 09:15:44PM +0800, Xiao Guangrong wrote: >> On 07/20/2012 06:58 PM, Marcelo Tosatti wrote: >>> On Fri, Jul 20, 2012 at 10:17:36AM +0800, Xiao Guangrong wrote: On 07/20/2012 07:58 AM, Marcelo Tosatti wrote: >> -

RE: [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation

2012-07-22 Thread Bhushan Bharat-R65777
> -Original Message- > From: Wood Scott-B07421 > Sent: Saturday, July 21, 2012 2:59 AM > To: Bhushan Bharat-R65777 > Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; ag...@suse.de; Bhushan > Bharat- > R65777 > Subject: Re: [PATCH 2/2 v5] KVM: PPC: booke: Add watchdog emulation > > On 0

Re: [Qemu-devel] [PATCH v7.5] kvm: notify host when the guest is panicked

2012-07-22 Thread Wen Congyang
At 07/23/2012 07:50 AM, Sasha Levin Wrote: > On 07/23/2012 12:36 AM, Anthony Liguori wrote: >> Sasha Levin writes: >> >>> On 07/22/2012 09:14 PM, Anthony Liguori wrote: Sasha Levin writes: > On 07/21/2012 10:44 AM, Wen Congyang wrote: >> We can know the guest is panicked when th

Re: [Qemu-devel] [PATCH v7.5] kvm: notify host when the guest is panicked

2012-07-22 Thread Wen Congyang
At 07/22/2012 07:39 PM, Sasha Levin Wrote: > On 07/21/2012 10:44 AM, Wen Congyang wrote: >> We can know the guest is panicked when the guest runs on xen. >> But we do not have such feature on kvm. >> >> Another purpose of this feature is: management app(for example: >> libvirt) can do auto dump whe

Re: [Qemu-devel] [PATCH v7.5] kvm: notify host when the guest is panicked

2012-07-22 Thread Sasha Levin
On 07/23/2012 12:36 AM, Anthony Liguori wrote: > Sasha Levin writes: > >> On 07/22/2012 09:14 PM, Anthony Liguori wrote: >>> Sasha Levin writes: >>> On 07/21/2012 10:44 AM, Wen Congyang wrote: > We can know the guest is panicked when the guest runs on xen. > But we do not have such

Re: [Qemu-devel] [PATCH v7] kvm: notify host when the guest is panicked

2012-07-22 Thread Sasha Levin
On 07/23/2012 12:29 AM, Anthony Liguori wrote: > Sasha Levin writes: > >> On 07/22/2012 10:19 PM, Sasha Levin wrote: >>> On 07/22/2012 09:22 PM, Anthony Liguori wrote: Sasha Levin writes: > On 07/21/2012 09:12 AM, Wen Congyang wrote: >> +#define KVM_PV_PORT (0x505UL) >>

Re: [Qemu-devel] [PATCH v7.5] kvm: notify host when the guest is panicked

2012-07-22 Thread Anthony Liguori
Sasha Levin writes: > On 07/22/2012 09:14 PM, Anthony Liguori wrote: >> Sasha Levin writes: >> >>> On 07/21/2012 10:44 AM, Wen Congyang wrote: We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose of this featur

Re: [Qemu-devel] [PATCH v7] kvm: notify host when the guest is panicked

2012-07-22 Thread Anthony Liguori
Sasha Levin writes: > On 07/22/2012 10:19 PM, Sasha Levin wrote: >> On 07/22/2012 09:22 PM, Anthony Liguori wrote: >>> Sasha Levin writes: >>> On 07/21/2012 09:12 AM, Wen Congyang wrote: > +#define KVM_PV_PORT (0x505UL) > + > #ifdef __KERNEL__ > #include >

Re: [Qemu-devel] [PATCH v7] kvm: notify host when the guest is panicked

2012-07-22 Thread Anthony Liguori
Sasha Levin writes: > On 07/22/2012 09:22 PM, Anthony Liguori wrote: >> Sasha Levin writes: >> >>> On 07/21/2012 09:12 AM, Wen Congyang wrote: +#define KVM_PV_PORT (0x505UL) + #ifdef __KERNEL__ #include @@ -221,6 +223,11 @@ static inline void kvm_disable

Re: linux-next: manual merge of the staging tree with the target-merge tree

2012-07-22 Thread Nicholas A. Bellinger
On Sat, 2012-07-21 at 19:07 -0700, Greg KH wrote: > On Fri, Jul 20, 2012 at 09:42:28PM +0300, Michael S. Tsirkin wrote: > > It's very similar to how it was with nouveau: we are not sure > > we can commit to the userspace ABI yet. > > Then you are in trouble :) > I agree with MST here that tcm

Re: [PATCH 2/2] kthread_worker: reimplement flush_kthread_work() to allow freeing the work item being executed

2012-07-22 Thread Andy Walls
On Sun, 2012-07-22 at 09:49 -0700, Tejun Heo wrote: > Hello, > > On Sat, Jul 21, 2012 at 02:20:06PM -0400, Andy Walls wrote: > > > + worker->current_work = work; > > > spin_unlock_irq(&worker->lock); > > > > > > if (work) { > > > __set_current_state(TASK_RUNNING); > > > w

Re: [PATCH 1/2] kthread_worker: reorganize to prepare for flush_kthread_work() reimplementation

2012-07-22 Thread Andy Walls
On Sun, 2012-07-22 at 09:46 -0700, Tejun Heo wrote: > Hello, > > On Sat, Jul 21, 2012 at 01:13:27PM -0400, Andy Walls wrote: > > > +/* insert @work before @pos in @worker */ > > > > Hi Tejun, > > > > Would a comment that the caller should be holding worker->lock be useful > > here? Anyway, comm

Re: [PATCH 2/2] kthread_worker: reimplement flush_kthread_work() to allow freeing the work item being executed

2012-07-22 Thread Andy Walls
Hi Tejun, Thanks for responding to my previous questions. I have one more. On Sat, 2012-07-21 at 14:20 -0400, Andy Walls wrote: > On Thu, 2012-07-19 at 14:16 -0700, Tejun Heo wrote: > > From 06f9a06f4aeecdb9d07014713ab41b548ae219b5 Mon Sep 17 00:00:00 2001 > > From: Tejun Heo > > Date: Thu, 19

Re: [Qemu-devel] [PATCH v7] kvm: notify host when the guest is panicked

2012-07-22 Thread Sasha Levin
On 07/22/2012 10:19 PM, Sasha Levin wrote: > On 07/22/2012 09:22 PM, Anthony Liguori wrote: >> Sasha Levin writes: >> >>> On 07/21/2012 09:12 AM, Wen Congyang wrote: +#define KVM_PV_PORT (0x505UL) + #ifdef __KERNEL__ #include @@ -221,6 +223,11 @@ static inl

Re: [Qemu-devel] [PATCH v7] kvm: notify host when the guest is panicked

2012-07-22 Thread Sasha Levin
On 07/22/2012 09:22 PM, Anthony Liguori wrote: > Sasha Levin writes: > >> On 07/21/2012 09:12 AM, Wen Congyang wrote: >>> +#define KVM_PV_PORT(0x505UL) >>> + >>> #ifdef __KERNEL__ >>> #include >>> >>> @@ -221,6 +223,11 @@ static inline void kvm_disable_steal_time(void) >>> } >>> #e

Re: [Qemu-devel] [PATCH v7.5] kvm: notify host when the guest is panicked

2012-07-22 Thread Sasha Levin
On 07/22/2012 09:14 PM, Anthony Liguori wrote: > Sasha Levin writes: > >> On 07/21/2012 10:44 AM, Wen Congyang wrote: >>> We can know the guest is panicked when the guest runs on xen. >>> But we do not have such feature on kvm. >>> >>> Another purpose of this feature is: management app(for exampl

Re: [Qemu-devel] [PATCH v7] kvm: notify host when the guest is panicked

2012-07-22 Thread Anthony Liguori
Sasha Levin writes: > On 07/21/2012 09:12 AM, Wen Congyang wrote: >> +#define KVM_PV_PORT (0x505UL) >> + >> #ifdef __KERNEL__ >> #include >> >> @@ -221,6 +223,11 @@ static inline void kvm_disable_steal_time(void) >> } >> #endif >> >> +static inline unsigned int kvm_arch_pv_features(void)

Re: [Qemu-devel] [PATCH v7.5] kvm: notify host when the guest is panicked

2012-07-22 Thread Anthony Liguori
Sasha Levin writes: > On 07/21/2012 10:44 AM, Wen Congyang wrote: >> We can know the guest is panicked when the guest runs on xen. >> But we do not have such feature on kvm. >> >> Another purpose of this feature is: management app(for example: >> libvirt) can do auto dump when the guest is panic

Re: [PATCH RFC V5 0/3] kvm: Improving directed yield in PLE handler

2012-07-22 Thread Rik van Riel
On 07/22/2012 08:34 AM, Raghavendra K T wrote: On 07/20/2012 11:06 PM, Marcelo Tosatti wrote: On Wed, Jul 18, 2012 at 07:07:17PM +0530, Raghavendra K T wrote: Currently Pause Loop Exit (PLE) handler is doing directed yield to a random vcpu on pl-exit. We already have filtering while choosing t

[PATCH UPDATED 1/2] kthread_worker: reorganize to prepare for flush_kthread_work() reimplementation

2012-07-22 Thread Tejun Heo
>From 9a2e03d8ed518a61154f18d83d6466628e519f94 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Thu, 19 Jul 2012 13:52:53 -0700 Make the following two non-functional changes. * Separate out insert_kthread_work() from queue_kthread_work(). * Relocate struct kthread_flush_work and kthread_flush_wor

Re: [PATCH 2/2] kthread_worker: reimplement flush_kthread_work() to allow freeing the work item being executed

2012-07-22 Thread Tejun Heo
Hello, On Sat, Jul 21, 2012 at 02:20:06PM -0400, Andy Walls wrote: > > + worker->current_work = work; > > spin_unlock_irq(&worker->lock); > > > > if (work) { > > __set_current_state(TASK_RUNNING); > > work->func(work); > > If the call to 'work->func(work);' fre

Re: [PATCH 1/2] kthread_worker: reorganize to prepare for flush_kthread_work() reimplementation

2012-07-22 Thread Tejun Heo
Hello, On Sat, Jul 21, 2012 at 01:13:27PM -0400, Andy Walls wrote: > > +/* insert @work before @pos in @worker */ > > Hi Tejun, > > Would a comment that the caller should be holding worker->lock be useful > here? Anyway, comment or not: > > Acked-by: Andy Walls Will add lockdep_assert_held()

[PATCH] kvm tools: remove unused field from virtio-blk

2012-07-22 Thread Sasha Levin
Signed-off-by: Sasha Levin --- tools/kvm/virtio/blk.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/tools/kvm/virtio/blk.c b/tools/kvm/virtio/blk.c index beebd24..1fb969f 100644 --- a/tools/kvm/virtio/blk.c +++ b/tools/kvm/virtio/blk.c @@ -40,7 +40,6 @@ struct blk_dev {

[PATCH] kvm tools: don't bother tracking is_dir

2012-07-22 Thread Sasha Levin
This is something we can calculate on the fly, and doesn't justify the overhead of tracking it all over fid transitions. Signed-off-by: Sasha Levin --- tools/kvm/include/kvm/virtio-9p.h |1 - tools/kvm/virtio/9p.c | 16 +++- 2 files changed, 11 insertions(+), 6 dele

[PATCH] kvm tools: use correct error value for virtio-9p RLERROR

2012-07-22 Thread Sasha Levin
RLERROR expects positive error values, passing negative values causes guest kernel panic. Signed-off-by: Sasha Levin --- tools/kvm/virtio/9p.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/virtio/9p.c b/tools/kvm/virtio/9p.c index 201ea95..c663dab 100644 --

[PATCH] kvm tools: support injecting arbitrary sysrqs

2012-07-22 Thread Sasha Levin
Add support to 'lkvm debug' to inject arbitrary sysrqs using a new '-s ' argument. Signed-off-by: Sasha Levin --- tools/kvm/builtin-debug.c |7 +++ tools/kvm/builtin-run.c |5 - tools/kvm/hw/serial.c |7 +++ tools/kvm/include/kvm/

[PATCH] kvm tools: dynamically allocate p9 fids

2012-07-22 Thread Sasha Levin
This removes the limit for p9 fids and the huge fid array that came along with it. Instead, it dynamically allocates fids and stores them in a rb-tree. This is useful when the guest needs a lot of fids, such as when stress testing guests. Signed-off-by: Sasha Levin --- tools/kvm/include/kvm/vir

Re: [PATCH v5 0/4] kvm: level irqfd and new eoifd

2012-07-22 Thread Gleb Natapov
On Fri, Jul 20, 2012 at 01:07:32PM +0300, Michael S. Tsirkin wrote: > On Thu, Jul 19, 2012 at 12:48:07PM -0600, Alex Williamson wrote: > > On Thu, 2012-07-19 at 20:45 +0300, Michael S. Tsirkin wrote: > > > On Thu, Jul 19, 2012 at 11:29:38AM -0600, Alex Williamson wrote: > > > > On Thu, 2012-07-19 a

[PATCH] KVM: Don't update PPR on any APIC read

2012-07-22 Thread Avi Kivity
The current code will update the PPR on almost any APIC read; however that's only required if we read the PPR. kvm_update_ppr() shows up in some profiles, albeit with a low usage (~1%). This should reduce it further (it will still be called during interrupt processing). Signed-off-by: Avi Kivity

Re: [PATCH RFC V5 0/3] kvm: Improving directed yield in PLE handler

2012-07-22 Thread Avi Kivity
On 07/22/2012 03:34 PM, Raghavendra K T wrote: > > Thanks Marcelo for the review. Avi, Rik, Christian, please let me know > if this series looks good now. > It looks fine to me. Christian, is this okay for s390? -- error compiling committee.c: too many arguments to function -- To unsubscrib

Re: [PATCH RFC V5 0/3] kvm: Improving directed yield in PLE handler

2012-07-22 Thread Raghavendra K T
On 07/20/2012 11:06 PM, Marcelo Tosatti wrote: On Wed, Jul 18, 2012 at 07:07:17PM +0530, Raghavendra K T wrote: Currently Pause Loop Exit (PLE) handler is doing directed yield to a random vcpu on pl-exit. We already have filtering while choosing the candidate to yield_to. This change adds more

Re: [Qemu-devel] [PATCH v7.5] kvm: notify host when the guest is panicked

2012-07-22 Thread Sasha Levin
On 07/21/2012 10:44 AM, Wen Congyang wrote: > We can know the guest is panicked when the guest runs on xen. > But we do not have such feature on kvm. > > Another purpose of this feature is: management app(for example: > libvirt) can do auto dump when the guest is panicked. If management > app does