[PATCH] kvm-intel: Auto-load on CPUs with VMX.

2012-03-21 Thread Josh Triplett
Enable x86 feature-based autoloading for the kvm-intel module on CPUs with X86_FEATURE_VMX. Signed-off-by: Josh Triplett j...@joshtriplett.org --- I've tested this and it works correctly. I can also supply the obvious equivalent patch for kvm-amd on AMD CPUs with SVM, but I don't have any such

RE: [Qemu-devel] [PATCH v4 4/7] RTC: Set internal millisecond register to 500ms when reset divider

2012-03-21 Thread Zhang, Yang Z
-Original Message- From: Stefano Stabellini [mailto:stefano.stabell...@eu.citrix.com] Sent: Wednesday, March 21, 2012 1:39 AM To: Zhang, Yang Z Cc: qemu-de...@nongnu.org; Paolo Bonzini; aligu...@us.ibm.com; kvm@vger.kernel.org Subject: Re: [Qemu-devel] [PATCH v4 4/7] RTC: Set

RE: [Qemu-devel] [PATCH v4 2/7] RTC: Update the RTC clock only when reading it

2012-03-21 Thread Zhang, Yang Z
-Original Message- From: Stefano Stabellini [mailto:stefano.stabell...@eu.citrix.com] Sent: Tuesday, March 20, 2012 10:16 PM To: Zhang, Yang Z Cc: qemu-de...@nongnu.org; Paolo Bonzini; aligu...@us.ibm.com; kvm@vger.kernel.org Subject: Re: [Qemu-devel] [PATCH v4 2/7] RTC: Update the

Re: [Qemu-devel] [PATCH v4 5/7] RTC:Add RTC update-ended interrupt support

2012-03-21 Thread Paolo Bonzini
Il 20/03/2012 19:35, Stefano Stabellini ha scritto: This is the function that is used to figure out whether we need the timers or not, the condition seems to be: (Not (REG_C_UF | REG_C_AF)) And (Not (REG_B_SET)) Shouldn't actually check for UIE being enabled? No, you need to set UF in

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Gleb Natapov
On Wed, Mar 21, 2012 at 08:56:03AM +0800, Wen Congyang wrote: At 03/20/2012 11:45 PM, Gleb Natapov Wrote: On Tue, Mar 20, 2012 at 05:59:16PM +0800, Wen Congyang wrote: At 03/19/2012 03:33 PM, Wen Congyang Wrote: At 03/08/2012 03:57 PM, Wen Congyang Wrote: We can know the guest is paniced

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Wen Congyang
At 03/21/2012 05:11 PM, Gleb Natapov Wrote: On Wed, Mar 21, 2012 at 08:56:03AM +0800, Wen Congyang wrote: At 03/20/2012 11:45 PM, Gleb Natapov Wrote: On Tue, Mar 20, 2012 at 05:59:16PM +0800, Wen Congyang wrote: At 03/19/2012 03:33 PM, Wen Congyang Wrote: At 03/08/2012 03:57 PM, Wen Congyang

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Gleb Natapov
On Wed, Mar 21, 2012 at 05:35:49PM +0800, Wen Congyang wrote: At 03/21/2012 05:11 PM, Gleb Natapov Wrote: On Wed, Mar 21, 2012 at 08:56:03AM +0800, Wen Congyang wrote: At 03/20/2012 11:45 PM, Gleb Natapov Wrote: On Tue, Mar 20, 2012 at 05:59:16PM +0800, Wen Congyang wrote: At 03/19/2012

[PATCH RFC V6 1/11] x86/spinlock: replace pv spinlocks with pv ticketlocks

2012-03-21 Thread Raghavendra K T
From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Rather than outright replacing the entire spinlock implementation in order to paravirtualize it, keep the ticket lock implementation but add a couple of pvops hooks on the slow patch (long spin on lock, unlocking a contended lock). Ticket

[PATCH RFC V6 2/11] x86/ticketlock: don't inline _spin_unlock when using paravirt spinlocks

2012-03-21 Thread Raghavendra K T
From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com The code size expands somewhat, and its probably better to just call a function rather than inline it. Signed-off-by: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com ---

[PATCH RFC V6 6/11] xen/pvticketlocks: add xen_nopvspin parameter to disable xen pv ticketlocks

2012-03-21 Thread Raghavendra K T
From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Signed-off-by: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com --- arch/x86/xen/spinlock.c | 14 ++

[PATCH RFC V6 10/11] xen/pvticketlock: allow interrupts to be enabled while blocking

2012-03-21 Thread Raghavendra K T
From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com If interrupts were enabled when taking the spinlock, we can leave them enabled while blocking to get the lock. If we can enable interrupts while waiting for the lock to become available, and we take an interrupt before entering the poll,

[PATCH RFC V6 11/11] xen: enable PV ticketlocks on HVM Xen

2012-03-21 Thread Raghavendra K T
From: Stefano Stabellini stefano.stabell...@eu.citrix.com Signed-off-by: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Reviewed-by: Konrad Rzeszutek Wilk konrad.w...@oracle.com Signed-off-by: Raghavendra K T raghavendra...@linux.vnet.ibm.com --- arch/x86/xen/smp.c |1 + 1 files changed,

[PATCH RFC V6 3/11] x86/ticketlock: collapse a layer of functions

2012-03-21 Thread Raghavendra K T
From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Now that the paravirtualization layer doesn't exist at the spinlock level any more, we can collapse the __ticket_ functions into the arch_ functions. Signed-off-by: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Signed-off-by:

[PATCH RFC V6 9/11] x86/ticketlock: add slowpath logic

2012-03-21 Thread Raghavendra K T
From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Maintain a flag in the LSB of the ticket lock tail which indicates whether anyone is in the lock slowpath and may need kicking when the current holder unlocks. The flags are set when the first locker enters the slowpath, and cleared when

[PATCH RFC V6 7/11] x86/pvticketlock: use callee-save for lock_spinning

2012-03-21 Thread Raghavendra K T
From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Although the lock_spinning calls in the spinlock code are on the uncommon path, their presence can cause the compiler to generate many more register save/restores in the function pre/postamble, which is in the fast path. To avoid this,

[PATCH RFC V6 8/11] x86/pvticketlock: when paravirtualizing ticket locks, increment by 2

2012-03-21 Thread Raghavendra K T
From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Increment ticket head/tails by 2 rather than 1 to leave the LSB free to store a is in slowpath state bit. This halves the number of possible CPUs for a given ticket size, but this shouldn't matter in practice - kernels built for 32k+ CPU

Re: performance trouble

2012-03-21 Thread David Cure
hello, Le Tue, Mar 20, 2012 at 02:38:22PM +0200, Gleb Natapov ecrivait : Try to add feature policy='disable' name='hypervisor'/ to cpu definition in XML and check command line. ok I try this but I can't use cpu model to map the host cpu (my libvirt is 0.9.8) so I use

[PATCH RFC V6 5/11] xen/pvticketlock: Xen implementation for PV ticket locks

2012-03-21 Thread Raghavendra K T
From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Replace the old Xen implementation of PV spinlocks with and implementation of xen_lock_spinning and xen_unlock_kick. xen_lock_spinning simply registers the cpu in its entry in lock_waiting, adds itself to the waiting_cpus set, and blocks

[PATCH RFC V6 0/11] Paravirtualized ticketlocks

2012-03-21 Thread Raghavendra K T
From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Changes since last posting: (Raghavendra K T) [ - Rebased to linux-3.3-rc6. - used function+enum in place of macro (better type checking) - use cmpxchg while resetting zero status for possible race [suggested by Dave Hansen for

[PATCH RFC V6 4/11] xen: defer spinlock setup until boot CPU setup

2012-03-21 Thread Raghavendra K T
From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com There's no need to do it at very early init, and doing it there makes it impossible to use the jump_label machinery. Signed-off-by: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com Reviewed-by: Konrad Rzeszutek Wilk

[PATCH uq/master] kvm: Drop unused kvm_pit_in_kernel

2012-03-21 Thread Jan Kiszka
This is now implied by kvm_irqchip_in_kernel. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kvm-all.c |6 -- kvm-stub.c |6 -- kvm.h |2 -- 3 files changed, 0 insertions(+), 14 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 21c7dd2..7f8c188 100644 ---

Re: [PATCH RFC V6 1/11] x86/spinlock: replace pv spinlocks with pv ticketlocks

2012-03-21 Thread Attilio Rao
On 21/03/12 10:20, Raghavendra K T wrote: From: Jeremy Fitzhardingejeremy.fitzhardi...@citrix.com Rather than outright replacing the entire spinlock implementation in order to paravirtualize it, keep the ticket lock implementation but add a couple of pvops hooks on the slow patch (long spin on

Re: [PATCH 1/1] Fixed integer constant is too large for ‘long’ type warning

2012-03-21 Thread Avi Kivity
On 03/20/2012 01:49 PM, Sasikantha babu wrote: --- arch/x86/kvm/pmu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Missing signoff. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of

Re: PATCH: nVMX: Better MSR_IA32_FEATURE_CONTROL handling

2012-03-21 Thread Avi Kivity
On 03/19/2012 06:53 PM, Nadav Har'El wrote: Hi, in a minute I'll send a new version of the MSR_IA32_FEATURE_CONTROL patch for nested VMX; I just wanted to reply first to your comments so you'll know what to expect: On Wed, Mar 07, 2012, Avi Kivity wrote about Re: PATCH: nVMX: Better

Re: [PATCH 0/5] qemu-kvm: Prepare kvm PIT for upstream merge

2012-03-21 Thread Avi Kivity
On 03/19/2012 05:29 PM, Jan Kiszka wrote: Some preparation patches to arrange qemu-kvm for merging in latest qemu with its own in-kernel PIT support. Later on, we can switch to that version without losing features on the way, even just temporarily. Thanks, applied. -- error compiling

Re: [PATCH] pci-assign: Fall back to host-side MSI if INTx sharing fails

2012-03-21 Thread Avi Kivity
On 03/19/2012 11:56 AM, Jan Kiszka wrote: If the host or the device does not support INTx sharing, retry the IRQ assignment with host-side MSI support enabled but warn about potential consequences. This allows to preserve the previous behavior where we defaulted to MSI and did not support INTx

Re: [PATCH] qemu-kvm: Drop installation of self-built optionroms

2012-03-21 Thread Avi Kivity
On 03/19/2012 06:58 PM, Jan Kiszka wrote: All corresponding binaries are now in pc-bios, so we can remove this diff to upstream. Thanks, applied. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

[PATCH] Fixed integer constant is too large for 'long' type warning

2012-03-21 Thread Sasikantha babu
Signed-off-by: Sasikantha babu sasikanth@gmail.com --- arch/x86/kvm/pmu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c index 7aad544..9395230 100644 --- a/arch/x86/kvm/pmu.c +++ b/arch/x86/kvm/pmu.c @@ -365,7 +365,7 @@ int

Re: [PATCH RFC V6 1/11] x86/spinlock: replace pv spinlocks with pv ticketlocks

2012-03-21 Thread Stephan Diestelhorst
On Wednesday 21 March 2012, 13:04:25 Attilio Rao wrote: On 21/03/12 10:20, Raghavendra K T wrote: From: Jeremy Fitzhardingejeremy.fitzhardi...@citrix.com Rather than outright replacing the entire spinlock implementation in order to paravirtualize it, keep the ticket lock implementation

Re: User question: balloon memory, currentMemory and Linux/FreeBSD guests

2012-03-21 Thread Avi Kivity
On 03/14/2012 01:51 PM, Andy Smith wrote: Hi, I'm a KVM user, using it for the first time and so far very happy with it. I wonder if someone can help me get my head round the issue of balloon memory and overallocation. Basically I have a Debian wheezy/sid KVM server, on which I have a

Re: [PATCH uq/master] kvm: Drop unused kvm_pit_in_kernel

2012-03-21 Thread Avi Kivity
On 03/21/2012 02:36 PM, Jan Kiszka wrote: This is now implied by kvm_irqchip_in_kernel. So we can't have -no-kvm-pit? No huge loss, but unexpected. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of

Re: [PATCH] Fixed integer constant is too large for 'long' type warning

2012-03-21 Thread Avi Kivity
On 03/21/2012 03:19 PM, Sasikantha babu wrote: Signed-off-by: Sasikantha babu sasikanth@gmail.com Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH uq/master] kvm: Drop unused kvm_pit_in_kernel

2012-03-21 Thread Jan Kiszka
On 2012-03-21 14:36, Avi Kivity wrote: On 03/21/2012 02:36 PM, Jan Kiszka wrote: This is now implied by kvm_irqchip_in_kernel. So we can't have -no-kvm-pit? No huge loss, but unexpected. See e81dda195556e72f8cd294998296c1051aab30a8. Jan -- Siemens AG, Corporate Technology, CT T DE IT

Re: Can VMX provide real mode support?

2012-03-21 Thread Jan Kiszka
On 2012-03-21 13:38, GaoYi wrote: Hi Jan, Since the newest Intel-VT supports the guest OS under the real mode, which was already supported in AMD-V, can the VMX in the latest KVM support that case? Yes, both with our without that unrestricted guest support (as Intel called it), real

Re: [PATCH] kvm-intel: Auto-load on CPUs with VMX.

2012-03-21 Thread Avi Kivity
On 03/21/2012 08:33 AM, Josh Triplett wrote: Enable x86 feature-based autoloading for the kvm-intel module on CPUs with X86_FEATURE_VMX. Signed-off-by: Josh Triplett j...@joshtriplett.org --- I've tested this and it works correctly. I can also supply the obvious equivalent patch for

Re: [PATCH uq/master] kvm: Drop unused kvm_pit_in_kernel

2012-03-21 Thread Gleb Natapov
On Wed, Mar 21, 2012 at 02:39:47PM +0100, Jan Kiszka wrote: On 2012-03-21 14:36, Avi Kivity wrote: On 03/21/2012 02:36 PM, Jan Kiszka wrote: This is now implied by kvm_irqchip_in_kernel. So we can't have -no-kvm-pit? No huge loss, but unexpected. See

Re: Can VMX provide real mode support?

2012-03-21 Thread Avi Kivity
On 03/21/2012 03:40 PM, Jan Kiszka wrote: On 2012-03-21 13:38, GaoYi wrote: Hi Jan, Since the newest Intel-VT supports the guest OS under the real mode, which was already supported in AMD-V, can the VMX in the latest KVM support that case? Yes, both with our without that

Re: [PATCH uq/master] kvm: Drop unused kvm_pit_in_kernel

2012-03-21 Thread Jan Kiszka
On 2012-03-21 14:41, Gleb Natapov wrote: On Wed, Mar 21, 2012 at 02:39:47PM +0100, Jan Kiszka wrote: On 2012-03-21 14:36, Avi Kivity wrote: On 03/21/2012 02:36 PM, Jan Kiszka wrote: This is now implied by kvm_irqchip_in_kernel. So we can't have -no-kvm-pit? No huge loss, but unexpected.

Re: [PATCH RFC V6 1/11] x86/spinlock: replace pv spinlocks with pv ticketlocks

2012-03-21 Thread Attilio Rao
On 21/03/12 13:22, Stephan Diestelhorst wrote: On Wednesday 21 March 2012, 13:04:25 Attilio Rao wrote: On 21/03/12 10:20, Raghavendra K T wrote: From: Jeremy Fitzhardingejeremy.fitzhardi...@citrix.com Rather than outright replacing the entire spinlock implementation in order to

Re: [PATCH RFC V6 1/11] x86/spinlock: replace pv spinlocks with pv ticketlocks

2012-03-21 Thread Stephan Diestelhorst
On Wednesday 21 March 2012, 13:49:28 Attilio Rao wrote: On 21/03/12 13:22, Stephan Diestelhorst wrote: On Wednesday 21 March 2012, 13:04:25 Attilio Rao wrote: On 21/03/12 10:20, Raghavendra K T wrote: From: Jeremy Fitzhardingejeremy.fitzhardi...@citrix.com Rather than

Re: [PATCH RFC V6 1/11] x86/spinlock: replace pv spinlocks with pv ticketlocks

2012-03-21 Thread Attilio Rao
On 21/03/12 14:25, Stephan Diestelhorst wrote: On Wednesday 21 March 2012, 13:49:28 Attilio Rao wrote: On 21/03/12 13:22, Stephan Diestelhorst wrote: On Wednesday 21 March 2012, 13:04:25 Attilio Rao wrote: On 21/03/12 10:20, Raghavendra K T wrote: From: Jeremy

[PATCH 0/2] Improve iteration through sptes from rmap

2012-03-21 Thread Takuya Yoshikawa
By removing sptep from rmap_iterator, I could achieve 15% performance improvement without inlining. Takuya Yoshikawa (3): KVM: MMU: Make pte_list_desc fit cache lines well KVM: MMU: Improve iteration through sptes from rmap -- 1.7.5.4 -- To unsubscribe from this list: send the line

[PATCH 1/2] KVM: MMU: Make pte_list_desc fit cache lines well

2012-03-21 Thread Takuya Yoshikawa
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp We have PTE_LIST_EXT + 1 pointers in this structure and these 40/20 bytes do not fit cache lines well. Furthermore, some allocators may use 64/32-byte objects for the pte_list_desc cache. This patch solves this problem by changing

Re: [PATCH RFC V6 1/11] x86/spinlock: replace pv spinlocks with pv ticketlocks

2012-03-21 Thread Raghavendra K T
On 03/21/2012 08:03 PM, Attilio Rao wrote: On 21/03/12 14:25, Stephan Diestelhorst wrote: On Wednesday 21 March 2012, 13:49:28 Attilio Rao wrote: On 21/03/12 13:22, Stephan Diestelhorst wrote: On Wednesday 21 March 2012, 13:04:25 Attilio Rao wrote: On 21/03/12 10:20, Raghavendra K T wrote:

[PATCH 2/2] KVM: MMU: Improve iteration through sptes from rmap

2012-03-21 Thread Takuya Yoshikawa
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp Iteration using rmap_next(), the actual body is pte_list_next(), is inefficient: every time we call it we start from checking whether rmap holds a single spte or points to a descriptor which links more sptes. In the case of shadow paging,

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Corey Minyard
Look at drivers/char/ipmi/ipmi_msghandler.c. It has code to send panic event over IMPI. The code is pretty complex. Of course if we a going to implement something more complex than simple hypercall for panic notification we better do something more interesting with it than just saying panic

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Gleb Natapov
On Wed, Mar 21, 2012 at 11:18:16AM -0500, Corey Minyard wrote: Look at drivers/char/ipmi/ipmi_msghandler.c. It has code to send panic event over IMPI. The code is pretty complex. Of course if we a going to implement something more complex than simple hypercall for panic notification we

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Avi Kivity
On 03/21/2012 06:18 PM, Corey Minyard wrote: Look at drivers/char/ipmi/ipmi_msghandler.c. It has code to send panic event over IMPI. The code is pretty complex. Of course if we a going to implement something more complex than simple hypercall for panic notification we better do something more

RE: [Qemu-devel] [PATCH v4 4/7] RTC: Set internal millisecond register to 500ms when reset divider

2012-03-21 Thread Stefano Stabellini
On Wed, 21 Mar 2012, Zhang, Yang Z wrote: struct tm *tm = s-current_tm; -int64_t host_usec, guest_sec, guest_usec; +int64_t host_usec, guest_sec, guest_usec, offset_usec, old_guest_usec; host_usec = qemu_get_clock_ns(host_clock) / NS_PER_USEC; +

Re: [Qemu-devel] [PATCH v4 5/7] RTC:Add RTC update-ended interrupt support

2012-03-21 Thread Stefano Stabellini
On Wed, 21 Mar 2012, Paolo Bonzini wrote: Il 20/03/2012 19:35, Stefano Stabellini ha scritto: This is the function that is used to figure out whether we need the timers or not, the condition seems to be: (Not (REG_C_UF | REG_C_AF)) And (Not (REG_B_SET)) Shouldn't actually check for

Re: [PATCH RFC V6 2/11] x86/ticketlock: don't inline _spin_unlock when using paravirt spinlocks

2012-03-21 Thread Linus Torvalds
On Wed, Mar 21, 2012 at 3:21 AM, Raghavendra K T raghavendra...@linux.vnet.ibm.com wrote: From: Jeremy Fitzhardinge jeremy.fitzhardi...@citrix.com The code size expands somewhat, and its probably better to just call a function rather than inline it. Signed-off-by: Jeremy Fitzhardinge

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Daniel P. Berrange
On Wed, Mar 21, 2012 at 06:25:16PM +0200, Avi Kivity wrote: On 03/21/2012 06:18 PM, Corey Minyard wrote: Look at drivers/char/ipmi/ipmi_msghandler.c. It has code to send panic event over IMPI. The code is pretty complex. Of course if we a going to implement something more complex than

Re: performance trouble

2012-03-21 Thread Peter Lieven
On 21.03.2012 12:10, David Cure wrote: hello, Le Tue, Mar 20, 2012 at 02:38:22PM +0200, Gleb Natapov ecrivait : Try to addfeature policy='disable' name='hypervisor'/ to cpu definition in XML and check command line. ok I try this but I can't usecpu model to map the

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Avi Kivity
On 03/21/2012 07:04 PM, Daniel P. Berrange wrote: In fact the feature can be implemented 100% host side by searching for a panic string signature in the console logs. You can even go one better and search for the panic string in the guest memory directly, which is what virt-dmesg does

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Jan Kiszka
On 2012-03-21 18:34, Avi Kivity wrote: On 03/21/2012 07:04 PM, Daniel P. Berrange wrote: In fact the feature can be implemented 100% host side by searching for a panic string signature in the console logs. You can even go one better and search for the panic string in the guest memory

Re: [PATCH 12/38] powerpc/booke: Provide exception macros with interrupt name

2012-03-21 Thread Scott Wood
On 03/21/2012 01:04 PM, Kumar Gala wrote: On Feb 28, 2012, at 6:09 PM, Alexander Graf wrote: From: Scott Wood scottw...@freescale.com DO_KVM will need to identify the particular exception type. There is an existing set of arbitrary numbers that Linux passes, but it's an undocumented

[Bug 42779] KVM domain hangs after loading initrd with Xenomai kernel

2012-03-21 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42779 --- Comment #20 from Avi Kivity a...@redhat.com 2012-03-21 18:21:33 --- Please try git://git.kernel.org/pub/scm/virt/kvm/kvm.git emulator-movq this emulates the two movq instructions used. There may be other unemulated instructions

[PATCH 0/2] Emulate MMX MOVQ

2012-03-21 Thread Avi Kivity
This patchset emulates two instructions: MOVQ mm, mm/m64 MOVQ mm/m64, mm Needed by https://bugzilla.kernel.org/show_bug.cgi?id=42779. However it seems to fail sometimes in my unit test, generating a math fault at the fwait instruction (which is duly trapped). Hints appreciated. Avi Kivity

[PATCH 1/2] KVM: x86 emulator: MMX support

2012-03-21 Thread Avi Kivity
General support for the MMX instruction set. Special care is taken to trap pending x87 exceptions so that they are properly reflected to the guest. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/include/asm/kvm_emulate.h |4 +- arch/x86/kvm/emulate.c | 90

[PATCH 2/2] KVM: x86 emulator: implement MMX MOVQ (opcodes 0f 6f, 0f 7f)

2012-03-21 Thread Avi Kivity
Needed by some framebuffer drivers. See https://bugzilla.kernel.org/show_bug.cgi?id=42779 Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

Re: [Qemu-devel] [RESEND][PATCH 2/2 v3] deal with guest panicked event

2012-03-21 Thread Anthony Liguori
On 03/09/2012 04:22 PM, Marcelo Tosatti wrote: On Thu, Mar 08, 2012 at 11:56:56AM +, Daniel P. Berrange wrote: On Thu, Mar 08, 2012 at 01:52:45PM +0200, Avi Kivity wrote: On 03/08/2012 01:36 PM, Daniel P. Berrange wrote: On Thu, Mar 08, 2012 at 01:28:56PM +0200, Avi Kivity wrote: On

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Anthony Liguori
On 03/13/2012 05:47 AM, Avi Kivity wrote: On 03/13/2012 11:18 AM, Daniel P. Berrange wrote: On Mon, Mar 12, 2012 at 12:33:33PM +0200, Avi Kivity wrote: On 03/12/2012 11:04 AM, Wen Congyang wrote: Do you have any other comments about this patch? Not really, but I'm not 100% convinced the

[PATCH 1/3][Autotest][virt] autotest.base_utils: Move virt.utils.Thread to common_lib

2012-03-21 Thread Jiří Župka
Move the class virt.utils.Thread to base_utils.InterruptedThread thus it can be used in general utils. Signed-off-by: Jiří Župka jzu...@redhat.com --- client/common_lib/base_utils.py| 65 ++ .../kvm/tests/migration_with_file_transfer.py |6 +-

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Anthony Liguori
On 03/15/2012 06:46 AM, Avi Kivity wrote: On 03/15/2012 01:25 PM, Jan Kiszka wrote: There was such vm exit (KVM_EXIT_HYPERCALL), but it was deemed to be a bad idea. BTW, this would help a lot in emulating hypercalls of other hypervisors (or of KVM's VAPIC in the absence of in-kernel irqchip

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Anthony Liguori
On 03/21/2012 11:25 AM, Avi Kivity wrote: On 03/21/2012 06:18 PM, Corey Minyard wrote: Look at drivers/char/ipmi/ipmi_msghandler.c. It has code to send panic event over IMPI. The code is pretty complex. Of course if we a going to implement something more complex than simple hypercall for

Re: [PATCH 12/38] powerpc/booke: Provide exception macros with interrupt name

2012-03-21 Thread Kumar Gala
On Mar 21, 2012, at 1:19 PM, Scott Wood wrote: On 03/21/2012 01:04 PM, Kumar Gala wrote: On Feb 28, 2012, at 6:09 PM, Alexander Graf wrote: From: Scott Wood scottw...@freescale.com DO_KVM will need to identify the particular exception type. There is an existing set of arbitrary

Re: [PATCH 1/2] Isolation groups

2012-03-21 Thread Alex Williamson
On Sat, 2012-03-17 at 15:57 +1100, David Gibson wrote: On Fri, Mar 16, 2012 at 01:31:18PM -0600, Alex Williamson wrote: On Fri, 2012-03-16 at 14:45 +1100, David Gibson wrote: On Thu, Mar 15, 2012 at 02:15:01PM -0600, Alex Williamson wrote: On Wed, 2012-03-14 at 20:58 +1100, David Gibson

Re: [Qemu-devel] [PATCH v4 5/7] RTC:Add RTC update-ended interrupt support

2012-03-21 Thread Paolo Bonzini
Il 21/03/2012 17:54, Stefano Stabellini ha scritto: No, you need to set UF in case the code observes it without actually enabling interrupt delivery on the ISA bus. Well, if it is just about updating UF, can we do it only when the user reads REG_C? Perhaps, but for AF it is much

Re: [PATCH 1/2] KVM: x86 emulator: MMX support

2012-03-21 Thread Avi Kivity
On 03/21/2012 08:40 PM, Avi Kivity wrote: +static int flush_pending_x87_faults(struct x86_emulate_ctxt *ctxt) +{ + bool fault = false; + + ctxt-ops-get_fpu(ctxt); + asm volatile(1: fwait \n\t + 2: \n\t + .pushsection .fixup,\ax\ \n\t +

[PATCH v2 uq/master] kvm: Drop unused kvm_pit_in_kernel

2012-03-21 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com This is now implied by kvm_irqchip_in_kernel. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Rebased over latest uq/master. kvm-all.c |6 -- kvm-stub.c |6 -- kvm.h |2 -- 3 files changed, 0 insertions(+), 14 deletions(-)

[RFC][PATCH 0/2] uq/master: Basic MSI support for in-kernel irqchip mode

2012-03-21 Thread Jan Kiszka
Some half a year ago when I posted my first attempt to refactor MSI for KVM support, we came to the conclusion that it might suffice to do transparent dynamic routing for user-space injected MSI messages. These two patches now implement such an approach for upstream. As QEMU does not yet include

[RFC][PATCH 2/2] KVM: x86: Wire up MSI support for in-kernel irqchip

2012-03-21 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com Catch writes to the MSI MMIO region in the KVM APIC and forward them to the kernel. Provide the kernel support GSI routing, this allows to enable MSI support also for in-kernel irqchip mode. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/apic.c

[RFC][PATCH 1/2] kvm: Introduce basic MSI support in-kernel irqchips

2012-03-21 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com This patch basically adds kvm_irqchip_send_msi, a service for sending arbitrary MSI messages to KVM's in-kernel irqchip models. As the current KVI API requires us to establish a static route from a pseudo GSI to the target MSI message and inject the MSI

Re: [PATCH v4 1/2] qemu-socket: change inet_connect() to to support nonblock socket

2012-03-21 Thread Michael Roth
On Mon, Mar 19, 2012 at 10:11:54PM +0800, Amos Kong wrote: Change inet_connect(const char *str, int socktype) to inet_connect(const char *str, bool block, int *sock_err), socktype is unused, block is used to assign if set socket to block/nonblock, sock_err is used to restore socket error.

RE: [Qemu-devel] [PATCH v4 5/7] RTC:Add RTC update-ended interrupt support

2012-03-21 Thread Zhang, Yang Z
-Original Message- From: Stefano Stabellini [mailto:stefano.stabell...@eu.citrix.com] Sent: Wednesday, March 21, 2012 2:04 AM On Mon, 19 Mar 2012, Zhang, Yang Z wrote: Use a timer to emulate update cycle. When update cycle ended and UIE is setting, then raise an interrupt. The

RE: [PATCH v4 0/7] RTC: New logic to emulate RTC

2012-03-21 Thread Zhang, Yang Z
-Original Message- From: Paolo Bonzini [mailto:pbonz...@redhat.com] I attach a patch that fixes some problems with divider reset and in general simplifies the logic. Even with the patch, however, I still see failures in my test case unfortunately. Probably there are rounding errors

Re: [PATCH v4 0/7] RTC: New logic to emulate RTC

2012-03-21 Thread Paolo Bonzini
Il 22/03/2012 01:23, Zhang, Yang Z ha scritto: Actually, I also see some failures during testing. And most of them are fail to pass the 244us update cycle checking. Since we are in emulation environment, we cannot ensure it always greater than 244us. So I think it should not be a bug. Yes,

Re: [Qemu-devel] [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-21 Thread Wen Congyang
At 03/22/2012 03:19 AM, Anthony Liguori Wrote: On 03/21/2012 11:25 AM, Avi Kivity wrote: On 03/21/2012 06:18 PM, Corey Minyard wrote: Look at drivers/char/ipmi/ipmi_msghandler.c. It has code to send panic event over IMPI. The code is pretty complex. Of course if we a going to implement

Re: vhost question

2012-03-21 Thread Steve Glass
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Just some further information concerning my earlier question concerning vhost and virtio. I'm using virtio to implement an emulated mac80211 device in the guest. A simple network simulation will be used to control delivery of frames between guests

RE: [PATCH v4 0/7] RTC: New logic to emulate RTC

2012-03-21 Thread Zhang, Yang Z
-Original Message- From: Paolo Bonzini [mailto:pbonz...@redhat.com] Il 22/03/2012 01:23, Zhang, Yang Z ha scritto: Actually, I also see some failures during testing. And most of them are fail to pass the 244us update cycle checking. Since we are in emulation environment, we

Re: [PATCH v4 0/7] RTC: New logic to emulate RTC

2012-03-21 Thread Paolo Bonzini
Il 22/03/2012 04:03, Zhang, Yang Z ha scritto: Yes, that's fine. But I also see some cases in which the first upgrade cycle after divider reset is not reported. The second, 1.5 seconds after divider reset, is fine. I think your patch can fix it. Right? No. :( It makes it a lot less

RE: [PATCH v4 0/7] RTC: New logic to emulate RTC

2012-03-21 Thread Zhang, Yang Z
-Original Message- From: Paolo Bonzini [mailto:pbonz...@redhat.com] Sent: Thursday, March 22, 2012 11:05 AM To: Zhang, Yang Z Cc: qemu-de...@nongnu.org; aligu...@us.ibm.com; kvm@vger.kernel.org Subject: Re: [PATCH v4 0/7] RTC: New logic to emulate RTC Il 22/03/2012 04:03, Zhang,

Re: [PATCH v4 1/2] qemu-socket: change inet_connect() to to support nonblock socket

2012-03-21 Thread Amos Kong
- Original Message - On Mon, Mar 19, 2012 at 10:11:54PM +0800, Amos Kong wrote: Change inet_connect(const char *str, int socktype) to inet_connect(const char *str, bool block, int *sock_err), socktype is unused, block is used to assign if set socket to block/nonblock, sock_err is

[PATCH v5 0/2] support to migrate with IPv6 address

2012-03-21 Thread Amos Kong
Those patches make tcp migration use the help functions in qemu-socket.c for support IPv6 migration. Changes from v1: - split different changes to small patches, it will be easier to review - fixed some problem according to Kevin's comment Changes from v2: - fix issue of returning real error -

[PATCH v5 1/4] sockets: introduce set_socket_error()

2012-03-21 Thread Amos Kong
Introduce set_socket_error() to set the errno, use WSASetLastError() for win32. Sometimes, clean work would rewrite errno in error path, we can use this function to restore real errno. Signed-off-by: Amos Kong ak...@redhat.com --- qemu_socket.h |2 ++ 1 files changed, 2 insertions(+), 0

[PATCH v5 2/4] qemu-socket: change inet_connect() to to support nonblock socket

2012-03-21 Thread Amos Kong
Change inet_connect(const char *str, int socktype) to inet_connect(const char *str, bool block), socktype is unused, block is used to assign if set socket to block/nonblock. Retry to connect when -EINTR/-EWOULDBLOCK is got. Connect's successful for nonblock socket when following errors are got:

[PATCH v5 3/4] sockets: pass back errors in inet_listen()

2012-03-21 Thread Amos Kong
Use set_socket_error() to restore real erron, set errno to EINVAL for parse error. Signed-off-by: Amos Kong ak...@redhat.com --- qemu-sockets.c | 21 - 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/qemu-sockets.c b/qemu-sockets.c index 908479e..f1c6524

[PATCH v5 4/4] use inet_listen()/inet_connect() to support ipv6 migration

2012-03-21 Thread Amos Kong
Use help functions in qemu-socket.c for tcp migration, which already support ipv6 addresses. For IPv6 brackets must be mandatory if you require a port. Referencing to RFC5952, the recommended format is: [2312::8274]:5200 test status: Successed listen side: qemu-kvm -incoming

Re: [PATCH 12/38] powerpc/booke: Provide exception macros with interrupt name

2012-03-21 Thread Scott Wood
On 03/21/2012 01:04 PM, Kumar Gala wrote: On Feb 28, 2012, at 6:09 PM, Alexander Graf wrote: From: Scott Wood scottw...@freescale.com DO_KVM will need to identify the particular exception type. There is an existing set of arbitrary numbers that Linux passes, but it's an undocumented

Re: [PATCH 12/38] powerpc/booke: Provide exception macros with interrupt name

2012-03-21 Thread Kumar Gala
On Mar 21, 2012, at 1:19 PM, Scott Wood wrote: On 03/21/2012 01:04 PM, Kumar Gala wrote: On Feb 28, 2012, at 6:09 PM, Alexander Graf wrote: From: Scott Wood scottw...@freescale.com DO_KVM will need to identify the particular exception type. There is an existing set of arbitrary