Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-21 Thread Jan Kiszka
On 2012-07-20 21:14, Peter Maydell wrote: kvm_allows_irq0_override() is a totally x86 specific concept: move it to the target-specific source file where it belongs. This means we need a new header file for the prototype: kvm_i386.h, in line with the existing kvm_ppc.h. First of all, the patch

[RFC-v4 0/3] tcm_vhost+cmwq fabric driver code for-3.6

2012-07-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Hi MST, Greg-KH Co, The following is -v4 of the in-flight TCM vhost fabric driver for-3.6 code. This series has been rebased into target-pending.git/for-next-merge this evening, and the changelog over the last days from v3 - v4 has been: *)

[RFC-v4 1/3] vhost: Separate vhost-net features from vhost features

2012-07-21 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com In order for other vhost devices to use the VHOST_FEATURES bits the vhost-net specific bits need to be moved to their own VHOST_NET_FEATURES constant. (Asias: Update drivers/vhost/test.c to use VHOST_NET_FEATURES) Signed-off-by: Stefan Hajnoczi

[RFC-v4 2/3] vhost: make vhost work queue visible

2012-07-21 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi stefa...@gmail.com The vhost work queue allows processing to be done in vhost worker thread context, which uses the owner process mm. Access to the vring and guest memory is typically only possible from vhost worker context so it is useful to allow work to be queued

[RFC-v4 3/3] tcm_vhost: Initial merge for vhost level target fabric driver

2012-07-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds the initial code for tcm_vhost, a Vhost level TCM fabric driver for virtio SCSI initiators into KVM guest. This code is currently up and running on v3.5-rc2 host+guest along with the virtio-scsi vdev-scan() patch to allow a proper

[PATCH v7] kvm: notify host when the guest is panicked

2012-07-21 Thread Wen Congyang
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 not do auto dump, the guest's user can do dump by hand

[PATCH 1/6 v7] start vm after reseting it

2012-07-21 Thread Wen Congyang
The guest should run after reseting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate to RUN_STATE_PAUSED when reseting the guest, so the runstate will be changed from RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED to

[PATCH 2/6 v7] kvm: Update kernel headers

2012-07-21 Thread Wen Congyang
Corresponding kvm.git hash: 37e41afa and apply my patch for kvm Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- linux-headers/asm-x86/kvm_para.h |2 ++ linux-headers/linux/kvm_para.h |6 ++ 2 files changed, 8 insertions(+), 0 deletions(-) diff --git

[PATCH 3/6 v7] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-07-21 Thread Wen Congyang
The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json

[PATCH 4/6 v7] add a new qevent: QEVENT_GUEST_PANICKED

2012-07-21 Thread Wen Congyang
This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- monitor.c |1 + monitor.h |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/monitor.c b/monitor.c index 09aa3cd..a388e61 100644 --- a/monitor.c +++ b/monitor.c @@

[PATCH 5/6 v7] introduce a new qom device to deal with panicked event

2012-07-21 Thread Wen Congyang
If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_PORT when it is panciked. This patch introduces a new qom device kvm_pv_ioport to listen this I/O port, and deal with panicked event according to panicked_action's value. The possible actions are: 1. emit

[PATCH 6/6 v7] allow the user to disable pv event support

2012-07-21 Thread Wen Congyang
The qom device uses a fixed PIO port that might conflict with (non-Linux) guest expectations and/or future device models. So allow the user to disable it. Signed-off-by: Wen Congyang we...@cn.fujitsu.com --- hw/pc_piix.c|6 +- qemu-config.c |4 qemu-options.hx |3 ++-

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

2012-07-21 Thread Jan Kiszka
On 2012-07-21 09:12, 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 not do

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

2012-07-21 Thread Wen Congyang
At 07/21/2012 03:19 PM, Jan Kiszka Wrote: On 2012-07-21 09:12, 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

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

2012-07-21 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 07/20/2012

[PATCH v7.5] kvm: notify host when the guest is panicked

2012-07-21 Thread Wen Congyang
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 not do auto dump, the guest's user can do dump by hand

Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-21 Thread Peter Maydell
On 21 July 2012 07:57, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-20 21:14, Peter Maydell wrote: I'm sure this isn't the only x86ism in the KVM generic source files. However the thing I'm specifically trying to do is nuke all the uses of kvm_irqchip_in_kernel() in common code, No,

Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-21 Thread Jan Kiszka
On 2012-07-21 10:54, Peter Maydell wrote: On 21 July 2012 07:57, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-20 21:14, Peter Maydell wrote: I'm sure this isn't the only x86ism in the KVM generic source files. However the thing I'm specifically trying to do is nuke all the uses of

Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-21 Thread Peter Maydell
On 21 July 2012 10:14, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-21 10:54, Peter Maydell wrote: On 21 July 2012 07:57, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-20 21:14, Peter Maydell wrote: I'm sure this isn't the only x86ism in the KVM generic source files. However the thing I'm

Re: [PATCH RESEND] Recognize PCID feature

2012-07-21 Thread Stefan Hajnoczi
On Fri, Jul 20, 2012 at 07:08:21AM +, Mao, Junjie wrote: This patch makes Qemu recognize the PCID feature specified from configuration or command line options. Signed-off-by: Junjie Mao junjie@intel.com --- target-i386/cpu.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-21 Thread Jan Kiszka
On 2012-07-21 11:30, Peter Maydell wrote: On 21 July 2012 10:14, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-21 10:54, Peter Maydell wrote: On 21 July 2012 07:57, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-20 21:14, Peter Maydell wrote: I'm sure this isn't the only x86ism in the KVM

Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-21 Thread Peter Maydell
On 21 July 2012 10:44, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-21 11:30, Peter Maydell wrote: On 21 July 2012 10:14, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-21 10:54, Peter Maydell wrote: On 21 July 2012 07:57, Jan Kiszka jan.kis...@web.de wrote: Naming is x86 specific, semantic

Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-21 Thread Jan Kiszka
On 2012-07-21 11:56, Peter Maydell wrote: On 21 July 2012 10:44, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-21 11:30, Peter Maydell wrote: On 21 July 2012 10:14, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-21 10:54, Peter Maydell wrote: On 21 July 2012 07:57, Jan Kiszka

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

2012-07-21 Thread Sasha Levin
On 07/21/2012 09:12 AM, Wen Congyang wrote: +#define KVM_PV_PORT (0x505UL) + #ifdef __KERNEL__ #include asm/processor.h @@ -221,6 +223,11 @@ static inline void kvm_disable_steal_time(void) } #endif +static inline unsigned int kvm_arch_pv_features(void) +{ + return

Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-21 Thread Peter Maydell
On 21 July 2012 11:22, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-21 11:56, Peter Maydell wrote: Or are you trying to talk about defining interrupt routes when the source and destination are both kernel code but the route needs to be set by userspace (ie is machine specific not cpu

Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-21 Thread Jan Kiszka
On 2012-07-21 12:53, Peter Maydell wrote: On 21 July 2012 11:22, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-21 11:56, Peter Maydell wrote: Or are you trying to talk about defining interrupt routes when the source and destination are both kernel code but the route needs to be set by

Re: qemu fails to build with glibc-2.15

2012-07-21 Thread X O
On Mon, Jul 16, 2012 at 2:37 PM, X O bex...@gmail.com wrote: Hello, I suspect upgrading my system to glibc-2.15 was a mistake. It seems to be qemu-1.0.1, and latter versions including qemu-1.1.1, can't be compiled anymore. Yes, I did search around and that led me to glibc, resp.

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

2012-07-21 Thread Sasha Levin
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 simpler, won't it? multiqueues don't really depend on

Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-21 Thread Jan Kiszka
On 2012-07-21 14:17, Peter Maydell wrote: On 21 July 2012 12:08, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-21 12:53, Peter Maydell wrote: This is still sounding like there is an extra feature which you should probably implement at some point and should certainly design with the intention

Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-21 Thread Peter Maydell
On 21 July 2012 13:35, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-21 14:17, Peter Maydell wrote: You still haven't really explained why we can't just ignore irqfd for now. I don't see how it would particularly affect the design of the kernel implementation very much, and the userspace

Re: [PATCH] kvm: Move kvm_allows_irq0_override() to target-i386

2012-07-21 Thread Jan Kiszka
On 2012-07-21 14:57, Peter Maydell wrote: On 21 July 2012 13:35, Jan Kiszka jan.kis...@web.de wrote: On 2012-07-21 14:17, Peter Maydell wrote: You still haven't really explained why we can't just ignore irqfd for now. I don't see how it would particularly affect the design of the kernel

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

2012-07-21 Thread Andy Walls
On Thu, 2012-07-19 at 14:15 -0700, Tejun Heo wrote: From c9bba34243a86fb3ac82d1bdd0ce4bf796b79559 Mon Sep 17 00:00:00 2001 From: Tejun Heo t...@kernel.org Date: Thu, 19 Jul 2012 13:52:53 -0700 Make the following two non-functional changes. * Separate out insert_kthread_work() from

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

2012-07-21 Thread Andy Walls
On Thu, 2012-07-19 at 14:16 -0700, Tejun Heo wrote: From 06f9a06f4aeecdb9d07014713ab41b548ae219b5 Mon Sep 17 00:00:00 2001 From: Tejun Heo t...@kernel.org Date: Thu, 19 Jul 2012 13:52:53 -0700 kthread_worker provides minimalistic workqueue-like interface for users which need a dedicated

Re: [RFC-v4 1/3] vhost: Separate vhost-net features from vhost features

2012-07-21 Thread Michael S. Tsirkin
On Sat, Jul 21, 2012 at 06:55:36AM +, Nicholas A. Bellinger wrote: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com In order for other vhost devices to use the VHOST_FEATURES bits the vhost-net specific bits need to be moved to their own VHOST_NET_FEATURES constant. (Asias: Update

Re: [RFC-v4 2/3] vhost: make vhost work queue visible

2012-07-21 Thread Michael S. Tsirkin
On Sat, Jul 21, 2012 at 06:55:37AM +, Nicholas A. Bellinger wrote: From: Stefan Hajnoczi stefa...@gmail.com The vhost work queue allows processing to be done in vhost worker thread context, which uses the owner process mm. Access to the vring and guest memory is typically only possible

Re: [RFC-v4 3/3] tcm_vhost: Initial merge for vhost level target fabric driver

2012-07-21 Thread Michael S. Tsirkin
On Sat, Jul 21, 2012 at 06:55:38AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds the initial code for tcm_vhost, a Vhost level TCM fabric driver for virtio SCSI initiators into KVM guest. This code is currently up and running on v3.5-rc2

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

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