Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Ingo Molnar
* Matt Evans m...@ozlabs.org wrote: [...] I haven't looked closely at Matt's patches, but it should be possible to use [un]signed long long for the u64/s64 types, I would think. In tools/kvm/ we are using our own u64/s64 definitions, not glibc's, so i think it should be fine -

Re: [PATCH] kvm tools: Add 'kvm nmi' command

2011-12-07 Thread Ingo Molnar
* Sasha Levin levinsasha...@gmail.com wrote: This patch adds a 'kvm nmi' command which can be used to trigger NMIs in guests. Mostly useful for debugging purposes. Could we make this something like 'kvm debug nmi'? We already have some debug functionality, right? Those should be

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 18:28 +1100, Matt Evans wrote: On 07/12/11 18:24, Alexander Graf wrote: On 07.12.2011, at 08:19, Matt Evans m...@ozlabs.org wrote: On 07/12/11 17:34, Sasha Levin wrote: On Wed, 2011-12-07 at 17:17 +1100, Matt Evans wrote: On 06/12/11 19:20, Sasha Levin wrote:

Re: [Qemu-devel] winXP Standard PC HAL and qemu-kvm = 0.15

2011-12-07 Thread Kevin Wolf
Am 06.12.2011 19:21, schrieb Jan Kiszka: On 2011-12-06 19:13, Michael Tokarev wrote: On 06.12.2011 20:57, Michael Tokarev wrote: On 06.12.2011 20:38, Jan Kiszka wrote: On 2011-12-06 17:29, Michael Tokarev wrote: [] It appears there are two issues here, one is fixed by

Re: [PATCH 02/10] nEPT: MMU context for nested EPT

2011-12-07 Thread Nadav Har'El
On Sun, Nov 13, 2011, Orit Wasserman wrote about Re: [PATCH 02/10] nEPT: MMU context for nested EPT: +++ b/arch/x86/kvm/mmu.h @@ -48,6 +48,11 @@ #define PFERR_RSVD_MASK (1U 3) #define PFERR_FETCH_MASK (1U 4) +#define EPT_WRITABLE_MASK 2 +#define EPT_EXEC_MASK 4 This is another

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-07 Thread Stefan Hajnoczi
On Wed, Dec 7, 2011 at 3:03 AM, Jason Wang jasow...@redhat.com wrote: On 12/06/2011 09:15 PM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 10:21 AM, Jason Wangjasow...@redhat.com  wrote: On 12/06/2011 05:18 PM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 6:33 AM, Jason

Re: [libvirt] (no subject)

2011-12-07 Thread Daniel P. Berrange
On Wed, Dec 07, 2011 at 08:21:06AM +0200, Sasha Levin wrote: On Tue, 2011-12-06 at 14:38 +, Daniel P. Berrange wrote: On Fri, Nov 11, 2011 at 07:56:58PM +0800, Osier Yang wrote: * KVM tool manages the network completely itself (with DHCP support?), no way to configure, except

Re: [Qemu-devel] winXP Standard PC HAL and qemu-kvm = 0.15

2011-12-07 Thread Michael Tokarev
On 07.12.2011 13:02, Kevin Wolf wrote: Am 06.12.2011 19:21, schrieb Jan Kiszka: [] For the 0.15 .. 1.0 change, the first commit which restores the (broken in 0.15) functionality is this one: commit 86fbf97ceb4a9c46a609dd4ae053ba4262b68fe8 Author: Jan Kiszka jan.kis...@siemens.com Date:

[PATCH] kvm tools: Allow the user to pass a FD to use as a TAP device

2011-12-07 Thread Sasha Levin
This allows users to pass a pre-configured fd to use for the network interface. For example: kvm run -n mode=tap,fd=3 3/dev/net/tap3 Cc: Daniel P. Berrange berra...@redhat.com Cc: Osier Yang jy...@redhat.com Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c

Re: [PATCH 02/10] nEPT: MMU context for nested EPT

2011-12-07 Thread Avi Kivity
On 12/07/2011 11:06 AM, Nadav Har'El wrote: On Sun, Nov 13, 2011, Orit Wasserman wrote about Re: [PATCH 02/10] nEPT: MMU context for nested EPT: +++ b/arch/x86/kvm/mmu.h @@ -48,6 +48,11 @@ #define PFERR_RSVD_MASK (1U 3) #define PFERR_FETCH_MASK (1U 4) +#define

Re: [PATCH] KVM: Document KVM_NMI

2011-12-07 Thread Avi Kivity
On 12/06/2011 10:50 PM, Sasha Levin wrote: Cc: Avi Kivity a...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Cc: kvm@vger.kernel.org Somehow, the changelog became the place where people manage their cc lists. +4.64 KVM_NMI + +Capability: basic +Architectures: none +Type: vcpu

Re: [PATCH] kvm tools: Add 'kvm nmi' command

2011-12-07 Thread Gleb Natapov
On Tue, Dec 06, 2011 at 10:42:55PM +0200, Sasha Levin wrote: +static void handle_nmi(int fd, u32 type, u32 len, u8 *msg) +{ + u32 vcpu = *(u32 *)msg; + + ioctl(kvm_cpus[vcpu]-vcpu_fd, KVM_NMI); You need to check that vcpu apic's LINT1 is configured to receive NMI (and not masked

Re: [PATCH 1/1 V6] qemu-kvm: fix improper nmi emulation

2011-12-07 Thread Avi Kivity
On 10/17/2011 06:00 PM, Lai Jiangshan wrote: From: Lai Jiangshan la...@cn.fujitsu.com Currently, NMI interrupt is blindly sent to all the vCPUs when NMI button event happens. This doesn't properly emulate real hardware on which NMI button event triggers LINT1. Because of this, NMI is sent to

Re: [PATCH] kvm tools: Add 'kvm nmi' command

2011-12-07 Thread Cyrill Gorcunov
On Wed, Dec 07, 2011 at 12:21:52PM +0200, Gleb Natapov wrote: On Tue, Dec 06, 2011 at 10:42:55PM +0200, Sasha Levin wrote: +static void handle_nmi(int fd, u32 type, u32 len, u8 *msg) +{ + u32 vcpu = *(u32 *)msg; + + ioctl(kvm_cpus[vcpu]-vcpu_fd, KVM_NMI); You need to check that

Re: [PATCH] kvm tools: Add 'kvm nmi' command

2011-12-07 Thread Gleb Natapov
On Wed, Dec 07, 2011 at 02:31:11PM +0400, Cyrill Gorcunov wrote: On Wed, Dec 07, 2011 at 12:21:52PM +0200, Gleb Natapov wrote: On Tue, Dec 06, 2011 at 10:42:55PM +0200, Sasha Levin wrote: +static void handle_nmi(int fd, u32 type, u32 len, u8 *msg) +{ + u32 vcpu = *(u32 *)msg; + +

Re: [net-next RFC PATCH 0/5] Series short description

2011-12-07 Thread Rusty Russell
On Mon, 05 Dec 2011 16:58:37 +0800, Jason Wang jasow...@redhat.com wrote: multiple queue virtio-net: flow steering through host/guest cooperation Hello all: This is a rough series adds the guest/host cooperation of flow steering support based on Krish Kumar's multiple queue virtio-net

Re: [PATCH] kvm tools: Add 'kvm nmi' command

2011-12-07 Thread Cyrill Gorcunov
On Wed, Dec 07, 2011 at 12:33:05PM +0200, Gleb Natapov wrote: On Wed, Dec 07, 2011 at 02:31:11PM +0400, Cyrill Gorcunov wrote: On Wed, Dec 07, 2011 at 12:21:52PM +0200, Gleb Natapov wrote: On Tue, Dec 06, 2011 at 10:42:55PM +0200, Sasha Levin wrote: +static void handle_nmi(int fd, u32

Re: [PATCH] kvm tools: Add 'kvm nmi' command

2011-12-07 Thread Gleb Natapov
On Wed, Dec 07, 2011 at 02:37:25PM +0400, Cyrill Gorcunov wrote: On Wed, Dec 07, 2011 at 12:33:05PM +0200, Gleb Natapov wrote: On Wed, Dec 07, 2011 at 02:31:11PM +0400, Cyrill Gorcunov wrote: On Wed, Dec 07, 2011 at 12:21:52PM +0200, Gleb Natapov wrote: On Tue, Dec 06, 2011 at 10:42:55PM

[PATCH] KVM: Document KVM_NMI

2011-12-07 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- Documentation/virtual/kvm/api.txt | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 7945b0b..38f68ca 100644 ---

Re: [PATCH] qemu-kvm: Move make-release to scripts/qemu-kvm

2011-12-07 Thread Avi Kivity
On 12/06/2011 04:34 PM, Jan Kiszka wrote: Save the qemu-kvm release helper before deleting the kvm directory. Thanks, applied. Anything else useful remaining in /kvm? Otherwise I would release my dinosaur extinction patch. Are we clear on vgabios? -- error compiling committee.c: too many

Re: [PATCH] kvm tools: Add 'kvm nmi' command

2011-12-07 Thread Cyrill Gorcunov
On Wed, Dec 07, 2011 at 12:41:50PM +0200, Gleb Natapov wrote: Yup, but while we support linux kernels only it should be fine. Still of course on long term we need a check. Tomorrow someone will send a patch to change how Linux behaves and slightly older kvmtool will not be able to run

Re: [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-12-07 Thread Marcelo Tosatti
On Wed, Nov 30, 2011 at 02:29:59PM +0530, Raghavendra K T wrote: Add a hypercall to KVM hypervisor to support pv-ticketlocks KVM_HC_KICK_CPU allows the calling vcpu to kick another vcpu out of halt state. The presence of these hypercalls is indicated to guest via

Re: [Xen-devel] [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-12-07 Thread Avi Kivity
On 12/06/2011 06:49 PM, Konrad Rzeszutek Wilk wrote: On Sun, Dec 04, 2011 at 11:36:58PM +0530, Raghavendra K T wrote: On 12/02/2011 01:20 AM, Raghavendra K T wrote: Have you tested it on AMD machines? There are some differences in the hypercall infrastructure there. Yes. 'll test on

Re: [PATCH] KVM: Document KVM_NMI

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 12:43 +0200, Avi Kivity wrote: Signed-off-by: Avi Kivity a...@redhat.com --- Documentation/virtual/kvm/api.txt | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/Documentation/virtual/kvm/api.txt

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-07 Thread Jason Wang
On 12/06/2011 11:42 PM, Sridhar Samudrala wrote: On 12/6/2011 5:15 AM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 10:21 AM, Jason Wangjasow...@redhat.com wrote: On 12/06/2011 05:18 PM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 6:33 AM, Jason Wangjasow...@redhat.com wrote: On

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-07 Thread Jason Wang
On 12/07/2011 07:10 AM, Sridhar Samudrala wrote: On 12/6/2011 8:14 AM, Michael S. Tsirkin wrote: On Tue, Dec 06, 2011 at 07:42:54AM -0800, Sridhar Samudrala wrote: On 12/6/2011 5:15 AM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 10:21 AM, Jason Wangjasow...@redhat.com wrote: On

Re: [net-next RFC PATCH 0/5] Series short description

2011-12-07 Thread Jason Wang
On 12/07/2011 03:30 PM, Rusty Russell wrote: On Mon, 05 Dec 2011 16:58:37 +0800, Jason Wangjasow...@redhat.com wrote: multiple queue virtio-net: flow steering through host/guest cooperation Hello all: This is a rough series adds the guest/host cooperation of flow steering support based on

Re: [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-12-07 Thread Raghavendra K T
On 12/07/2011 04:18 PM, Marcelo Tosatti wrote: On Wed, Nov 30, 2011 at 02:29:59PM +0530, Raghavendra K T wrote: +/* + * kvm_pv_kick_cpu_op: Kick a vcpu. + * + * @cpu - vcpu to be kicked. + */ +static void kvm_pv_kick_cpu_op(struct kvm *kvm, int cpu) +{ + struct kvm_vcpu *vcpu =

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-07 Thread Jason Wang
On 12/07/2011 05:08 PM, Stefan Hajnoczi wrote: [...] Consider the complexity of the host nic each with their own steering features, this series make the first step with minimal effort to try to let guest driver and host tap/macvtap co-operate like what physical nic does. There may be

Re: [PATCH] KVM: Document KVM_NMI

2011-12-07 Thread Avi Kivity
On 12/07/2011 01:02 PM, Sasha Levin wrote: I don't see the QEMU patch doing a stop before grabbing LAPIC state. Or does it happen somewhere before? It got dropped on the floor; it's now in next. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list:

Re: [PATCH] KVM: Document KVM_NMI

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 14:12 +0200, Avi Kivity wrote: On 12/07/2011 01:02 PM, Sasha Levin wrote: I don't see the QEMU patch doing a stop before grabbing LAPIC state. Or does it happen somewhere before? It got dropped on the floor; it's now in next. I was talking about that patch you

Re: [PATCH] KVM: Document KVM_NMI

2011-12-07 Thread Avi Kivity
On 12/07/2011 02:20 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 14:12 +0200, Avi Kivity wrote: On 12/07/2011 01:02 PM, Sasha Levin wrote: I don't see the QEMU patch doing a stop before grabbing LAPIC state. Or does it happen somewhere before? It got dropped on the floor; it's now in

Re: [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-12-07 Thread Marcelo Tosatti
On Wed, Dec 07, 2011 at 05:24:59PM +0530, Raghavendra K T wrote: On 12/07/2011 04:18 PM, Marcelo Tosatti wrote: On Wed, Nov 30, 2011 at 02:29:59PM +0530, Raghavendra K T wrote: +/* + * kvm_pv_kick_cpu_op: Kick a vcpu. + * + * @cpu - vcpu to be kicked. + */ +static void

Re: [PATCH] KVM: Document KVM_NMI

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 14:31 +0200, Avi Kivity wrote: On 12/07/2011 02:20 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 14:12 +0200, Avi Kivity wrote: On 12/07/2011 01:02 PM, Sasha Levin wrote: I don't see the QEMU patch doing a stop before grabbing LAPIC state. Or does it happen

Re: [PATCH] KVM: Document KVM_NMI

2011-12-07 Thread Avi Kivity
On 12/07/2011 02:37 PM, Sasha Levin wrote: It's really implied by the fact that vcpu ioctls must be issued from the same thread. Oh, I totally forgot about that (here, and in my 'kvm nmi' patch). It keeps biting people. We should make the kernel warn about it. The reason it's important

Re: [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-12-07 Thread Avi Kivity
On 12/07/2011 02:33 PM, Marcelo Tosatti wrote: Also Avi pointed that, logically kvm_arch_vcpu_ioctl_set_mpstate should be called only in vcpu thread, so after further debugging, I noticed that, setting vcpuN-mp_state = KVM_MP_STATE_RUNNABLE; is not necessary. I 'll remove that in the

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Paolo Bonzini
On 12/07/2011 09:16 AM, Ingo Molnar wrote: That's what's happening here; we're __powerpc64__ and !__KERNEL__, tools/kvm/include/linux/types.h includes asm/types.h so gets the int-l64.h definition of __u64, as above. :/ builtin-run.c:389: error: format `%llx' expects type `long long

Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

2011-12-07 Thread Avi Kivity
On 12/06/2011 02:03 PM, Rusty Russell wrote: On Tue, 06 Dec 2011 11:58:21 +0200, Avi Kivity a...@redhat.com wrote: On 12/06/2011 07:07 AM, Rusty Russell wrote: Yes, but the hypervisor/trusted party would simply have to do the copy; the rings themselves would be shared A would say copy

Re: [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-12-07 Thread Marcelo Tosatti
On Wed, Dec 07, 2011 at 02:47:05PM +0200, Avi Kivity wrote: On 12/07/2011 02:33 PM, Marcelo Tosatti wrote: Also Avi pointed that, logically kvm_arch_vcpu_ioctl_set_mpstate should be called only in vcpu thread, so after further debugging, I noticed that, setting vcpuN-mp_state =

Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

2011-12-07 Thread Sasha Levin
On Sun, 2011-12-04 at 20:23 +0200, Sasha Levin wrote: [snip] Rusty, Michael, does the below looks a reasonable optimization for you? should I send it as a patch? Something like the following patch: diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Avi Kivity
On 12/07/2011 10:29 AM, Sasha Levin wrote: I also got another one, but it's **completely untested** (not even compiled). Alex, Matt, any chance one of you can loan a temporary ppc shell for the upcoming tests of KVM tool/ppc KVM? qemu offers free ppc shells -- error compiling committee.c:

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-07 Thread Avi Kivity
On 12/07/2011 08:44 AM, Alexander Graf wrote: On 07.12.2011, at 01:32, Matt Evans m...@ozlabs.org wrote: On 06/12/11 19:22, Sasha Levin wrote: If KVM_RUN can actually return anything besides 0 or -1 it may be also worthwhile to update Documentation/virtual/kvm/api.txt . What are the

Re: [PATCH 1/2] KVM: VMX: Notify if VMX is already in use

2011-12-07 Thread Avi Kivity
On 12/01/2011 08:30 PM, Sasha Levin wrote: Currently we silently fail if VMX is already in use by a different virtualization technology. This is bad since it's non-obvious for the user, and its not too uncommon for users to have several of these installed on same host. This patch adds a

Re: [PATCH 1/2] KVM: VMX: Notify if VMX is already in use

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 16:17 +0200, Avi Kivity wrote: On 12/01/2011 08:30 PM, Sasha Levin wrote: Currently we silently fail if VMX is already in use by a different virtualization technology. This is bad since it's non-obvious for the user, and its not too uncommon for users to have

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 16:11 +0200, Avi Kivity wrote: On 12/07/2011 10:29 AM, Sasha Levin wrote: I also got another one, but it's **completely untested** (not even compiled). Alex, Matt, any chance one of you can loan a temporary ppc shell for the upcoming tests of KVM tool/ppc KVM?

Re: [PATCH 1/2] KVM: VMX: Notify if VMX is already in use

2011-12-07 Thread Avi Kivity
On 12/07/2011 04:18 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 16:17 +0200, Avi Kivity wrote: On 12/01/2011 08:30 PM, Sasha Levin wrote: Currently we silently fail if VMX is already in use by a different virtualization technology. This is bad since it's non-obvious for the user,

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Avi Kivity
On 12/07/2011 04:22 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 16:11 +0200, Avi Kivity wrote: On 12/07/2011 10:29 AM, Sasha Levin wrote: I also got another one, but it's **completely untested** (not even compiled). Alex, Matt, any chance one of you can loan a temporary ppc shell for

Re: [PATCH 1/2] KVM: VMX: Notify if VMX is already in use

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 16:23 +0200, Avi Kivity wrote: On 12/07/2011 04:18 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 16:17 +0200, Avi Kivity wrote: On 12/01/2011 08:30 PM, Sasha Levin wrote: Currently we silently fail if VMX is already in use by a different virtualization

Re: [PATCH 1/2] KVM: VMX: Notify if VMX is already in use

2011-12-07 Thread Avi Kivity
On 12/07/2011 04:24 PM, Sasha Levin wrote: That's odd. IIRC when we discussed this with them, they were executing VMXON/VMXOFF dynamically. Looks like they changed this. Anyway, please adjust according to Joerg's comment (and add the word using), and I'll apply. I've seen it the

Re: [PATCH 2/5 V5] Add functions to check if the host has stopped the vm

2011-12-07 Thread Avi Kivity
On 12/05/2011 10:19 PM, Eric B Munson wrote: When a host stops or suspends a VM it will set a flag to show this. The watchdog will use these functions to determine if a softlockup is real, or the result of a suspended VM. +bool kvm_check_and_clear_guest_paused(int cpu) +{ + bool ret

Re: [PATCH 3/5 V5] Add ioctl for KVMCLOCK_GUEST_STOPPED

2011-12-07 Thread Avi Kivity
On 12/05/2011 10:19 PM, Eric B Munson wrote: Now that we have a flag that will tell the guest it was suspended, create an interface for that communication using a KVM ioctl. @@ -3295,6 +3295,10 @@ long kvm_arch_vcpu_ioctl(struct file *filp, goto out; } + case

[PATCH v2 1/2] KVM: VMX: Notify if VMX is already in use

2011-12-07 Thread Sasha Levin
Currently we silently fail if VMX is already in use by a different virtualization technology. This is bad since it's non-obvious for the user, and its not too uncommon for users to have several of these installed on same host. This patch adds a message to notify the user of the problem.

[PATCH v2 2/2] KVM: SVM: Notify if SVM is already in use

2011-12-07 Thread Sasha Levin
Currently we silently fail if SVM is already in use by a different virtualization technology. This is bad since it's non-obvious for the user, and its not too uncommon for users to have several of these installed on same host. This patch adds a message to notify the user of the problem.

Re: [PATCH 4/5 V5] Add generic stubs for kvm stop check functions

2011-12-07 Thread Avi Kivity
On 12/05/2011 10:19 PM, Eric B Munson wrote: diff --git a/include/asm-generic/kvm_para.h b/include/asm-generic/kvm_para.h new file mode 100644 index 000..177e1eb --- /dev/null +++ b/include/asm-generic/kvm_para.h @@ -0,0 +1,14 @@ +#ifndef _ASM_GENERIC_KVM_PARA_H +#define

Re: [PATCH 5/5 V5] Add check for suspended vm in softlockup detector

2011-12-07 Thread Avi Kivity
On 12/05/2011 10:19 PM, Eric B Munson wrote: A suspended VM can cause spurious soft lockup warnings. To avoid these, the watchdog now checks if the kernel knows it was stopped by the host and skips the warning if so. When the watchdog is reset successfully, clear the guest paused flag.

Re: [PATCH 0/5 V5] Avoid soft lockup message when KVM is stopped by host

2011-12-07 Thread Avi Kivity
On 12/05/2011 10:18 PM, Eric B Munson wrote: Changes from V4: Rename KVM_GUEST_PAUSED to KVMCLOCK_GUEST_PAUSED Add description of KVMCLOCK_GUEST_PAUSED ioctl to api.txt Changes from V3: Include CC's on patch 3 Drop clear flag ioctl and have the watchdog clear the flag when it is reset

Re: [PATCH 1/2] KVM: VMX: Notify if VMX is already in use

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 16:26 +0200, Avi Kivity wrote: On 12/07/2011 04:24 PM, Sasha Levin wrote: That's odd. IIRC when we discussed this with them, they were executing VMXON/VMXOFF dynamically. Looks like they changed this. Anyway, please adjust according to Joerg's comment (and

Re: [PATCH rebased 2/2] KVM: Use memdup_user instead of kmalloc/copy_from_user

2011-12-07 Thread Avi Kivity
On 12/04/2011 07:36 PM, Sasha Levin wrote: Switch to using memdup_user when possible. This makes code more smaller and compact, and prevents errors. Thanks, applied. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-12-07 Thread Avi Kivity
On 12/07/2011 03:39 PM, Marcelo Tosatti wrote: Also I think we can keep the kicked flag in vcpu-requests, no need for new storage. Was going to suggest it but it violates the currently organized processing of entries at the beginning of vcpu_enter_guest. That is, this kicked flag is

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Alexander Graf
On 07.12.2011, at 15:25, Avi Kivity a...@redhat.com wrote: On 12/07/2011 04:22 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 16:11 +0200, Avi Kivity wrote: On 12/07/2011 10:29 AM, Sasha Levin wrote: I also got another one, but it's **completely untested** (not even compiled). Alex, Matt, any

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-07 Thread Alexander Graf
On 07.12.2011, at 15:12, Avi Kivity a...@redhat.com wrote: On 12/07/2011 08:44 AM, Alexander Graf wrote: On 07.12.2011, at 01:32, Matt Evans m...@ozlabs.org wrote: On 06/12/11 19:22, Sasha Levin wrote: If KVM_RUN can actually return anything besides 0 or -1 it may be also worthwhile to

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-07 Thread Stefan Hajnoczi
On Wed, Dec 7, 2011 at 12:10 PM, Jason Wang jasow...@redhat.com wrote: On 12/07/2011 05:08 PM, Stefan Hajnoczi wrote: [...]  Consider the complexity of the host nic each with their own steering  features,  this series make the first step with minimal effort to try to let  guest driver

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-07 Thread Avi Kivity
On 12/07/2011 05:01 PM, Alexander Graf wrote: Will do when I'm back on a keyboard ;). Siri, write a patch for bugzilla #123456 and post it upstream. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

Re: [PATCH v2 1/2] KVM: VMX: Notify if VMX is already in use

2011-12-07 Thread Andreas Färber
Am 07.12.2011 15:34, schrieb Sasha Levin: Currently we silently fail if VMX is already in use by a different virtualization technology. This is bad since it's non-obvious for the user, and its not too uncommon for users to have several of these installed on same host. This patch adds a

Re: [PATCH 1/2] KVM: VMX: Notify if VMX is already in use

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 16:26 +0200, Avi Kivity wrote: On 12/07/2011 04:24 PM, Sasha Levin wrote: That's odd. IIRC when we discussed this with them, they were executing VMXON/VMXOFF dynamically. Looks like they changed this. Anyway, please adjust according to Joerg's comment (and

Re: [PATCH 1/2] KVM: VMX: Notify if VMX is already in use

2011-12-07 Thread Avi Kivity
On 12/07/2011 05:15 PM, Sasha Levin wrote: Ah, maybe they do it differently on AMD. Or they changed things. I've grabbed their code just to see whats going on there and traced the vmxon calls back to module init. Are you sure it ever happened on-demand and not on init? If you are, I'll

Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

2011-12-07 Thread Michael S. Tsirkin
On Wed, Dec 07, 2011 at 04:02:45PM +0200, Sasha Levin wrote: On Sun, 2011-12-04 at 20:23 +0200, Sasha Levin wrote: [snip] Rusty, Michael, does the below looks a reasonable optimization for you? OK overall but a bit hard to say for sure as it looks pretty incomplete ... should I send it

vfio / iommu domain attributes

2011-12-07 Thread Stuart Yoder
In the vfio RFC thread there seemed to be convergence that some new iommu_ops API is needed to set some platform specific aspects of an iommu domain. On Wed, Nov 30, 2011 at 10:58 AM, Alex Williamson alex.william...@redhat.com wrote: [cut] In that case, you should definitely be following what

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Alexander Graf
On 07.12.2011, at 16:25, Sasha Levin levinsasha...@gmail.com wrote: On Wed, 2011-12-07 at 16:00 +0100, Alexander Graf wrote: On 07.12.2011, at 15:25, Avi Kivity a...@redhat.com wrote: On 12/07/2011 04:22 PM, Sasha Levin wrote: On Wed, 2011-12-07 at 16:11 +0200, Avi Kivity wrote: On

Re: [PATCH] kvm tools: Allow the user to pass a FD to use as a TAP device

2011-12-07 Thread Pekka Enberg
On Wed, Dec 7, 2011 at 11:37 AM, Sasha Levin levinsasha...@gmail.com wrote: This allows users to pass a pre-configured fd to use for the network interface. For example:        kvm run -n mode=tap,fd=3 3/dev/net/tap3 Cc: Daniel P. Berrange berra...@redhat.com Cc: Osier Yang jy...@redhat.com

Re: [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-12-07 Thread Raghavendra K T
On 12/07/2011 06:03 PM, Marcelo Tosatti wrote: On Wed, Dec 07, 2011 at 05:24:59PM +0530, Raghavendra K T wrote: On 12/07/2011 04:18 PM, Marcelo Tosatti wrote: Yes you are right. It was potentially racy and it was harmful too!. I had observed that it was stalling the CPU before I introduced

Re: [PATCH 1/4] KVM: x86 emulator: Use opcode::execute for Group 2 instructions

2011-12-07 Thread Avi Kivity
On 12/06/2011 11:05 AM, Takuya Yoshikawa wrote: Group 2: C0, C1, D0, D1, D2, D3 According to the SDM, the case 6 of em_grp2() should be treated as undefined and the opcode D2/D3 should be decoded using the SrcCL. emulate_2op_SrcB(ctxt, rcr); break; case

Re: vfio / iommu domain attributes

2011-12-07 Thread Joerg Roedel
On Wed, Dec 07, 2011 at 09:54:39AM -0600, Stuart Yoder wrote: Alex, Alexey I'm wondering if you've had any new thoughts on this over the last week. For Freescale, our iommu domain attributes would look something like: -domain iova base address -domain iova window size I agree with

Re: [PATCH] kvm tools: Allow the user to pass a FD to use as a TAP device

2011-12-07 Thread Daniel P. Berrange
On Wed, Dec 07, 2011 at 06:28:12PM +0200, Pekka Enberg wrote: On Wed, Dec 7, 2011 at 11:37 AM, Sasha Levin levinsasha...@gmail.com wrote: This allows users to pass a pre-configured fd to use for the network interface. For example:        kvm run -n mode=tap,fd=3 3/dev/net/tap3 Cc:

Re: [PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-12-07 Thread Raghavendra K T
On 12/07/2011 08:22 PM, Avi Kivity wrote: On 12/07/2011 03:39 PM, Marcelo Tosatti wrote: Also I think we can keep the kicked flag in vcpu-requests, no need for new storage. Was going to suggest it but it violates the currently organized processing of entries at the beginning of

Re: [PATCH 0/4] KVM: x86 emulator: Move em_grp from switch statement to decode table

2011-12-07 Thread Avi Kivity
On 12/06/2011 11:04 AM, Takuya Yoshikawa wrote: I removed em_grp1a() and em_grp9() but kept em_grp2() and em_grp45() because they would produce a lot of trivial functions. We could convert the various emulate_2op_blah() macros to generate functions instead of statements, that would greatly

Re: [PATCH 0/4] KVM: x86 emulator: Move em_grp from switch statement to decode table

2011-12-07 Thread Avi Kivity
On 12/07/2011 06:51 PM, Avi Kivity wrote: On 12/06/2011 11:04 AM, Takuya Yoshikawa wrote: I removed em_grp1a() and em_grp9() but kept em_grp2() and em_grp45() because they would produce a lot of trivial functions. We could convert the various emulate_2op_blah() macros to generate functions

Re: [net-next RFC PATCH 0/5] Series short description

2011-12-07 Thread Ben Hutchings
On Wed, 2011-12-07 at 19:31 +0800, Jason Wang wrote: On 12/07/2011 03:30 PM, Rusty Russell wrote: On Mon, 05 Dec 2011 16:58:37 +0800, Jason Wangjasow...@redhat.com wrote: multiple queue virtio-net: flow steering through host/guest cooperation Hello all: This is a rough series adds

Re: [PATCH] kvm tools: Add 'kvm nmi' command

2011-12-07 Thread Pekka Enberg
On Wed, 2011-12-07 at 09:16 +0100, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: This patch adds a 'kvm nmi' command which can be used to trigger NMIs in guests. Mostly useful for debugging purposes. Could we make this something like 'kvm debug nmi'? We already

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Pekka Enberg
On Wed, 7 Dec 2011, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: [...] I haven't looked closely at Matt's patches, but it should be possible to use [un]signed long long for the u64/s64 types, I would think. In tools/kvm/ we are using our own u64/s64 definitions, not glibc's, so

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Pekka Enberg
On 12/07/2011 09:16 AM, Ingo Molnar wrote: That's what's happening here; we're __powerpc64__ and !__KERNEL__, tools/kvm/include/linux/types.h includes asm/types.h so gets the int-l64.h definition of __u64, as above. :/ builtin-run.c:389: error: format `%llx' expects type `long long

Re: [PATCH] kvm tools: Allow the user to pass a FD to use as a TAP device

2011-12-07 Thread Pekka Enberg
On Wed, 7 Dec 2011, Daniel P. Berrange wrote: On Wed, Dec 07, 2011 at 06:28:12PM +0200, Pekka Enberg wrote: On Wed, Dec 7, 2011 at 11:37 AM, Sasha Levin levinsasha...@gmail.com wrote: This allows users to pass a pre-configured fd to use for the network interface. For example:        kvm run

Re: [PATCH] kvm tools: Add 'kvm nmi' command

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 19:13 +0200, Pekka Enberg wrote: On Wed, 2011-12-07 at 09:16 +0100, Ingo Molnar wrote: * Sasha Levin levinsasha...@gmail.com wrote: This patch adds a 'kvm nmi' command which can be used to trigger NMIs in guests. Mostly useful for debugging purposes.

Re: [PATCH 1/8] kvm tools: Add initial SPAPR PPC64 architecture support

2011-12-07 Thread Scott Wood
On 12/07/2011 01:35 AM, Matt Evans wrote: Hi Scott, On 07/12/11 05:03, Scott Wood wrote: On 12/05/2011 10:05 PM, Matt Evans wrote: This patch adds a new arch directory, powerpc, basic file structure, register setup and where necessary stubs out arch-specific functions (e.g. interrupts,

Re: vfio / iommu domain attributes

2011-12-07 Thread Scott Wood
On 12/07/2011 10:38 AM, Joerg Roedel wrote: On Wed, Dec 07, 2011 at 09:54:39AM -0600, Stuart Yoder wrote: Alex, Alexey I'm wondering if you've had any new thoughts on this over the last week. For Freescale, our iommu domain attributes would look something like: -domain iova base address

Re: vfio / iommu domain attributes

2011-12-07 Thread Stuart Yoder
On Wed, Dec 7, 2011 at 10:38 AM, Joerg Roedel joerg.roe...@amd.com wrote: On Wed, Dec 07, 2011 at 09:54:39AM -0600, Stuart Yoder wrote: Alex, Alexey I'm wondering if you've had any new thoughts on this over the last week. For Freescale, our iommu domain attributes would look something like:  

[PATCH] kvm tools: Correctly limit nrcpus to max_cpus

2011-12-07 Thread Matt Evans
Fix a typo where kvm-nrcpus was set, then immediately overwritten with older value. Signed-off-by: Matt Evans m...@ozlabs.org --- tools/kvm/builtin-run.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index

Re: [PATCH 1/8] kvm tools: Add initial SPAPR PPC64 architecture support

2011-12-07 Thread Matt Evans
On 08/12/11 05:31, Scott Wood wrote: On 12/07/2011 01:35 AM, Matt Evans wrote: Hi Scott, On 07/12/11 05:03, Scott Wood wrote: On 12/05/2011 10:05 PM, Matt Evans wrote: This patch adds a new arch directory, powerpc, basic file structure, register setup and where necessary stubs out

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-07 Thread Matt Evans
Hi Sasha, On 06/12/11 19:22, Sasha Levin wrote: If KVM_RUN can actually return anything besides 0 or -1 it may be also worthwhile to update Documentation/virtual/kvm/api.txt . What are the cases where it happens? It sounds like Alex is considering KVM PPC's return value in this case (and

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Matt Evans
On 08/12/11 04:14, Pekka Enberg wrote: On Wed, 7 Dec 2011, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: [...] I haven't looked closely at Matt's patches, but it should be possible to use [un]signed long long for the u64/s64 types, I would think. In tools/kvm/ we are using our

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Ingo Molnar
* Matt Evans m...@ozlabs.org wrote: On 08/12/11 04:14, Pekka Enberg wrote: On Wed, 7 Dec 2011, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: [...] I haven't looked closely at Matt's patches, but it should be possible to use [un]signed long long for the u64/s64 types,

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Matt Evans
On 08/12/11 15:49, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: On 08/12/11 04:14, Pekka Enberg wrote: On Wed, 7 Dec 2011, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: [...] I haven't looked closely at Matt's patches, but it should be possible to use [un]signed

Re: [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check

2011-12-07 Thread Sasha Levin
On Thu, 2011-12-08 at 14:03 +1100, Matt Evans wrote: Hi Sasha, On 06/12/11 19:22, Sasha Levin wrote: If KVM_RUN can actually return anything besides 0 or -1 it may be also worthwhile to update Documentation/virtual/kvm/api.txt . What are the cases where it happens? It sounds like

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Matt Evans
On 08/12/11 15:56, Matt Evans wrote: On 08/12/11 15:49, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: On 08/12/11 04:14, Pekka Enberg wrote: On Wed, 7 Dec 2011, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: [...] I haven't looked closely at Matt's patches, but it

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Ingo Molnar
* Matt Evans m...@ozlabs.org wrote: Since tools/kvm/include/linux/types.h only requires __u32, __u64 et al from asm/types.h, wouldn't it be most straightforward to just #include asm-generic/int-ll64.h? This avoids #define __KERNEL__ breaking other includes brought into userland, avoids

buildbot failure in kvm on next-ppc44x

2011-12-07 Thread kvm
The Buildbot has detected a new failure on builder next-ppc44x while building kvm. Full details are available at: http://buildbot.b1-systems.de/kvm/builders/next-ppc44x/builds/374 Buildbot URL: http://buildbot.b1-systems.de/kvm/ Buildslave for this Build: b1_kvm_1 Build Reason: The Nightly

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Matt Evans
On 08/12/11 16:49, Ingo Molnar wrote: * Matt Evans m...@ozlabs.org wrote: Since tools/kvm/include/linux/types.h only requires __u32, __u64 et al from asm/types.h, wouldn't it be most straightforward to just #include asm-generic/int-ll64.h? This avoids #define __KERNEL__ breaking other

[PATCH] KVM: Fix warning in emulator_cmpxchg_emulated

2011-12-07 Thread Sasha Levin
Make sure 'exchanged' is initialized. Fixes the following warning: arch/x86/kvm/x86.c: In function 'emulator_cmpxchg_emulated': arch/x86/kvm/x86.c:3794:7: warning: 'exchanged' may be used uninitialized in this function Signed-off-by: Sasha Levin levinsasha...@gmail.com --- arch/x86/kvm/x86.c |

Re: [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing u64s and link appropriately

2011-12-07 Thread Ingo Molnar
* Matt Evans m...@ozlabs.org wrote: [...] I haven't looked closely at Matt's patches, but it should be possible to use [un]signed long long for the u64/s64 types, I would think. In tools/kvm/ we are using our own u64/s64 definitions, not glibc's, so i think it should be fine -

Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code

2011-12-07 Thread Sasha Levin
On Wed, 2011-12-07 at 18:28 +1100, Matt Evans wrote: On 07/12/11 18:24, Alexander Graf wrote: On 07.12.2011, at 08:19, Matt Evans m...@ozlabs.org wrote: On 07/12/11 17:34, Sasha Levin wrote: On Wed, 2011-12-07 at 17:17 +1100, Matt Evans wrote: On 06/12/11 19:20, Sasha Levin wrote:

  1   2   >