[PATCH 3/4 changelog-v2] KVM: Switch to srcu-less get_dirty_log()

2012-03-02 Thread Takuya Yoshikawa
We have seen some problems of the current implementation of get_dirty_log() which uses synchronize_srcu_expedited() for updating dirty bitmaps; e.g. it is noticeable that this sometimes gives us ms order of latency when we use VGA displays. Furthermore the recent discussion on the following thread

Re: [PATCH 0/4] KVM: srcu-less dirty logging -v2

2012-03-02 Thread Takuya Yoshikawa
Takuya Yoshikawa wrote: > v2: changed to protect masked pages > > Live migration gets a bit faster than v1. I have noticed that this version is much faster than version 1 when nr-dirty-pages = 16K, 32K, 64K. So I have updated the description of PATCH 3 a bit: please see "PATCH 3/4 changelog-v2

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

2012-03-02 Thread Eric B Munson
On Sun, 19 Feb 2012 21:22:53 -0500, Eric B Munson wrote: Changes from V14: Update documentation for the pvclock api ... snip When a guest kernel is stopped by the host hypervisor it can look like a soft lockup to the guest kernel. This false warning can mask later soft lockup warnings whi

Re: [PATCH-WIP 01/13] xen/arm: use r12 to pass the hypercall number to the hypervisor

2012-03-02 Thread Nicolas Pitre
On Wed, 29 Feb 2012, Ian Campbell wrote: > On Wed, 2012-02-29 at 12:58 +, Dave Martin wrote: > > On Wed, Feb 29, 2012 at 09:56:02AM +, Ian Campbell wrote: > > > On Wed, 2012-02-29 at 09:34 +, Dave Martin wrote: > > > > On Tue, Feb 28, 2012 at 12:28:29PM +, Stefano Stabellini wrote:

Re: [PATCH-WIP 01/13] xen/arm: use r12 to pass the hypercall number to the hypervisor

2012-03-02 Thread Nicolas Pitre
[ coming back from vacation and trying to catch up ] On Wed, 29 Feb 2012, Dave Martin wrote: > Just had a chat with some tools guys -- apparently, when passing register > arguments to gcc inline asms there really isn't a guarantee that those > variables will be in the expected registers on entry

Re: [Qemu-devel] [PATCH 3/4] net: split hostname and service by last colon

2012-03-02 Thread Laine Stump
On 03/02/2012 05:35 AM, Kevin Wolf wrote: > Am 02.03.2012 10:58, schrieb Amos Kong: >> On 02/03/12 11:38, Amos Kong wrote: > --- a/net.c > +++ b/net.c > @@ -84,7 +84,7 @@ static int get_str_sep(char *buf, int buf_size, > const char **pp, int sep) > const char *p, *p1;

[PATCH v3 4/4] kvm: x86: Add user space part for in-kernel i8254

2012-03-02 Thread Jan Kiszka
This provides the required user space stubs to enable the in-kernel i8254 emulation of KVM. The in-kernel model supports lost tick compensation according to the "delay" policy. This is enabled by default and can be switched off via a device property. Depending on the feature set of the host kerne

[PATCH v3 1/4] i8254: Factor out base class for KVM reuse

2012-03-02 Thread Jan Kiszka
Applying the concept used for the *PICs once again: establish a base class for the i8254 that can be used both by the current user space emulation and the upcoming KVM in-kernel version. We share most of the public interface of the i8254, specifically to the pcspk, vmstate, reset and certain init p

[PATCH v3 0/4] uq/master: Introduce KVM PIT support

2012-03-02 Thread Jan Kiszka
This adds another piece of qemu-kvm to upstream: The accelerated in-kernel model of the i8254. It does this in the same fashion as the interrupt controllers were already introduced. And it even has one bug less than qemu-kvm: PC speaker output still works with KVM acceleration enabled. Changes in

[PATCH v3 2/4] i8254: Open-code timer restore

2012-03-02 Thread Jan Kiszka
Same as for the APIC: To enable migration between accelerated and non-accelerated models, we need to arm the channel 0 timer only inside the emulated PIT model. The common code just saves/restores that timer to the the next_transition_time field. Signed-off-by: Jan Kiszka --- hw/i8254.c|

[PATCH v3 3/4] kvm: Add kvm_has_pit_state2 helper

2012-03-02 Thread Jan Kiszka
To be used for in-kernel PIT emulation. Signed-off-by: Jan Kiszka --- kvm-all.c | 10 ++ kvm-stub.c |5 + kvm.h |1 + 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 77eadf6..278085f 100644 --- a/kvm-all.c +++ b/kvm-all.c @@

Re: [Qemu-devel] Has anybody run Vxworks on KVM?

2012-03-02 Thread Brian Vandenberg
On Fri, Mar 2, 2012 at 9:10 AM, GaoYi wrote: > Hi all, > >I am trying to run Vxworks on KVM under X86_64 platform. Now I can > startup vxworks without 'no-kvm' option. However, the bootup failed with > hardware virtualization selected. Has anybody run it successfully? > >Any of your sugges

Re: [PATCH v2] Dynamically add and remove device specific reset functions

2012-03-02 Thread Jesse Barnes
On Fri, 2 Mar 2012 10:17:53 -0700 Bjorn Helgaas wrote: > On Fri, Mar 2, 2012 at 10:06 AM, Tadeusz Struk > wrote: > > On 02/03/12 16:29, Bjorn Helgaas wrote: > >> Where do you plan to add calls to pci_dev_specific_reset_add()?  In > >> drivers? > > > > Yes, I'm working on a driver for a device w

Re: [PATCH v2] Dynamically add and remove device specific reset functions

2012-03-02 Thread Bjorn Helgaas
On Fri, Mar 2, 2012 at 10:06 AM, Tadeusz Struk wrote: > On 02/03/12 16:29, Bjorn Helgaas wrote: >> Where do you plan to add calls to pci_dev_specific_reset_add()?  In >> drivers? > > Yes, I'm working on a driver for a device with SRIOV capability. > I'll call it from there. > >> Did you consider a

Re: [PATCH] PPC: Don't sync timebase when inside VM

2012-03-02 Thread Scott Wood
On 03/02/2012 10:30 AM, Alexander Graf wrote: > > On 02.03.2012, at 17:20, Scott Wood wrote: > >> On Fri, Mar 02, 2012 at 03:12:33PM +0100, Alexander Graf wrote: >>> When running inside a virtual machine, we can not modify timebase, so >>> let's just not call the functions for it then. >>> >>> Th

Re: [PATCH v2] Dynamically add and remove device specific reset functions

2012-03-02 Thread Tadeusz Struk
On 02/03/12 16:29, Bjorn Helgaas wrote: > Where do you plan to add calls to pci_dev_specific_reset_add()? In > drivers? Yes, I'm working on a driver for a device with SRIOV capability. I'll call it from there. > Did you consider adding a "reset" function pointer to struct > pci_driver? That mig

Re: Has anybody run Vxworks on KVM?

2012-03-02 Thread Jan Kiszka
On 2012-03-02 17:10, GaoYi wrote: > Hi all, > >I am trying to run Vxworks on KVM under X86_64 platform. Now I can > startup vxworks without 'no-kvm' option. However, the bootup failed with > hardware virtualization selected. Has anybody run it successfully? > >Any of your suggestions woul

Re: [PATCH] PPC: Don't sync timebase when inside VM

2012-03-02 Thread Alexander Graf
On 02.03.2012, at 17:20, Scott Wood wrote: > On Fri, Mar 02, 2012 at 03:12:33PM +0100, Alexander Graf wrote: >> When running inside a virtual machine, we can not modify timebase, so >> let's just not call the functions for it then. >> >> This resolves hangs when booting e500 SMP guests on overco

Re: [PATCH v2] Dynamically add and remove device specific reset functions

2012-03-02 Thread Bjorn Helgaas
Thanks! You didn't fix the subject line :) It should contain "PCI: ". Thanks for including the "v2" inside "[PATCH]". That helps keep things straight. On Fri, Mar 2, 2012 at 4:55 AM, wrote: > Hi, > Reworked according to comments. All the text here becomes part of the changelog, so you don't

Re: [PATCH] PPC: Don't sync timebase when inside VM

2012-03-02 Thread Scott Wood
On Fri, Mar 02, 2012 at 03:12:33PM +0100, Alexander Graf wrote: > When running inside a virtual machine, we can not modify timebase, so > let's just not call the functions for it then. > > This resolves hangs when booting e500 SMP guests on overcommitted hosts. > > Reported-by: Stuart Yoder > Si

RE: [PATCH v3 5/7] RTC:Add RTC update-ended interrupt support

2012-03-02 Thread Zhang, Yang Z
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Friday, March 02, 2012 8:14 PM > To: Zhang, Yang Z > Cc: qemu-de...@nongnu.org; Jan Kiszka; kvm@vger.kernel.org; > aligu...@us.ibm.com; Marcelo Tosatti > Subject: Re: [PATCH v3 5

[PATCH] PPC: Don't sync timebase when inside VM

2012-03-02 Thread Alexander Graf
When running inside a virtual machine, we can not modify timebase, so let's just not call the functions for it then. This resolves hangs when booting e500 SMP guests on overcommitted hosts. Reported-by: Stuart Yoder Signed-off-by: Alexander Graf --- arch/powerpc/platforms/85xx/smp.c |7 +++

Re: [Qemu-devel] [PULL] Urgent memory fix for kvm with unaligned memory slots

2012-03-02 Thread Anthony Liguori
On 03/01/2012 07:40 AM, Avi Kivity wrote: The memory core may generate RAM memory regions that are not page aligned, but the kvm code is not prepared to handle them well and will abort under certain conditions. This patch fixes the problem. Please pull from: git://git.kernel.org/pub/scm/vir

Re: [Qemu-devel] [PULL] kvm updates

2012-03-02 Thread Anthony Liguori
On 03/01/2012 06:47 AM, Avi Kivity wrote: This batch of updates is mostly Jan's rework of qemu-kvm's TPR optimization for 32-bit Windows, making Windows XP much faster with kvm enabled on older Intel and any AMD hardware. Any similarities to the original hack are purely coincidental. Please pul

Re: [RFC PATCH v0 1/2] net: bridge: propagate FDB table into hardware

2012-03-02 Thread jamal
On Thu, 2012-03-01 at 14:17 -0800, John Fastabend wrote: > Hmm so I think what I'll do is this... > > both: ndm_flags = 0 > sw : ndm_flags = NTF_SW_FDB > hw : ndm_flags = NTF_HW_FDB > > Then current tools will work with embedded bridges and software > bridges > with the interesting case bein

Re: [PATCH v3 5/7] RTC:Add RTC update-ended interrupt support

2012-03-02 Thread Paolo Bonzini
Il 02/03/2012 08:00, Zhang, Yang Z ha scritto: > Use a timer to emulate update cycle. When update cycle ended and UIE is > setting, > then raise an interrupt. The timer runs only when UF or AF is cleared. Isn't AF=0 the common case when the RTC starts, so the timer always runs until the time cr

[PATCH v2] Dynamically add and remove device specific reset functions

2012-03-02 Thread tadeusz . struk
Hi, Reworked according to comments. I have a use case where I need to cleanup resource allocated for Virtual Functions after a guest OS that used it crashed. This cleanup needs to be done before the VF is being FLRed. The only possible way to do this seems to be by using pci_dev_specific_reset() fu

[Bug 42829] KVM Guest with virtio network driver loses network connectivity

2012-03-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42829 --- Comment #8 from Kurk 2012-03-02 11:36:43 --- Thinking again, this could also be a problem of qemu vs qemu-kvm merges in git. Have a look at these: http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/82851 http://lists.gnu.org/arc

[Bug 42829] KVM Guest with virtio network driver loses network connectivity

2012-03-02 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42829 --- Comment #7 from Kurk 2012-03-02 11:14:10 --- Git bisect result is not network related? Highly unlikely! The "bug reproducer" technique you are using might not be reliable (sorry if that was the one I suggested). Try to make longer tests..

Re: [Qemu-devel] Use getaddrinfo for migration

2012-03-02 Thread Daniel P. Berrange
On Fri, Mar 02, 2012 at 02:25:36PM +0400, Michael Tokarev wrote: > Not a reply to the patch but a general observation. > > I noticed that the tcp migration uses gethostname > (or getaddrinfo after this patch) from the main > thread - is it really the way to go? Note that > DNS query which is done

Re: [Qemu-devel] [PATCH 3/4] net: split hostname and service by last colon

2012-03-02 Thread Kevin Wolf
Am 02.03.2012 10:58, schrieb Amos Kong: > On 02/03/12 11:38, Amos Kong wrote: --- a/net.c +++ b/net.c @@ -84,7 +84,7 @@ static int get_str_sep(char *buf, int buf_size, const char **pp, int sep) const char *p, *p1; int len; p = *pp; -p1 =

Re: Use getaddrinfo for migration

2012-03-02 Thread Michael Tokarev
Not a reply to the patch but a general observation. I noticed that the tcp migration uses gethostname (or getaddrinfo after this patch) from the main thread - is it really the way to go? Note that DNS query which is done may block for a large amount of time. Is it really safe in this context? S

Re: [Qemu-devel] [PATCH 1/4] Use getaddrinfo for migration

2012-03-02 Thread Kevin Wolf
Am 02.03.2012 04:33, schrieb Amos Kong: > On 24/02/12 17:08, Kevin Wolf wrote: >> Am 10.02.2012 07:27, schrieb Amos Kong: >>> This allows us to use ipv4/ipv6 for migration addresses. >>> Once there, it also uses /etc/services names (it came free). >>> >>> Signed-off-by: Juan Quintela >>> Signed-off

Re: [Qemu-devel] [PATCH 1/4] Use getaddrinfo for migration

2012-03-02 Thread Kevin Wolf
Am 02.03.2012 03:50, schrieb Amos Kong: > On 24/02/12 17:34, Kevin Wolf wrote: >> Am 10.02.2012 07:27, schrieb Amos Kong: >>> This allows us to use ipv4/ipv6 for migration addresses. >>> Once there, it also uses /etc/services names (it came free). >>> >>> Signed-off-by: Juan Quintela >>> Signed-off

Re: [Qemu-devel] [PATCH 3/4] net: split hostname and service by last colon

2012-03-02 Thread Amos Kong
On 02/03/12 11:38, Amos Kong wrote: --- a/net.c +++ b/net.c @@ -84,7 +84,7 @@ static int get_str_sep(char *buf, int buf_size, const char **pp, int sep) const char *p, *p1; int len; p = *pp; -p1 = strchr(p, sep); +p1 = strrchr(p, sep); if (!p1) return -1;

RE: [PATCH] qemu-kvm: Fix migration from older version due to i8254 changes

2012-03-02 Thread Ren, Yongjie
This patch works fine. Tested by: Yongjie Ren Best Regards, Yongjie Ren (Jay) > -Original Message- > From: Jan Kiszka [mailto:jan.kis...@siemens.com] > Sent: Friday, March 02, 2012 5:21 PM > To: Avi Kivity; Marcelo Tosatti > Cc: Zhang, Yang Z; Ren, Yongjie; KVM list > Subject: [

[PATCH v3 06/10] qemu-kvm: Use upstream kvm-i8259

2012-03-02 Thread Jan Kiszka
Drop the qemu-kvm version in favor of the equivalent upstream implementation. This allows to move the i8259 back into the hwlib. Note that this also drops the testdev hack and restores proper isa_get_irq. If testdev scripts exist that inject > IRQ15, they need fixing. Testing for these interrupts

[PATCH v3 05/10] qemu-kvm: Use upstream kvm-ioapic

2012-03-02 Thread Jan Kiszka
Drop the qemu-kvm version in favor of the equivalent upstream implementation. Signed-off-by: Jan Kiszka --- hw/ioapic.c | 75 +- hw/pc_piix.c |7 + 2 files changed, 2 insertions(+), 80 deletions(-) diff --git a/hw/ioapic.c b/hw/

[PATCH v3 03/10] qemu-kvm: Use upstream irq routing services

2012-03-02 Thread Jan Kiszka
Replace qemu-kvm's versions of kvm_add_irq_route, kvm_add_routing_entry, kvm_init_irq_routing, kvm_arch_init_irq_routing, and kvm_commit_irq_routes with the corresponding upstream services. Until the MSI API is refactored, we only need to export kvm_add_routing_entry for this. Signed-off-by: Jan K

[PATCH v3 10/10] qemu-kvm: Remove some spurious whitespace diffs to upstream

2012-03-02 Thread Jan Kiszka
Signed-off-by: Jan Kiszka --- hw/i8254.c|1 - kvm.h |1 + target-i386/kvm.c |1 - 3 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/i8254.c b/hw/i8254.c index 668a217..33d94e1 100644 --- a/hw/i8254.c +++ b/hw/i8254.c @@ -459,7 +459,6 @@ static int p

[PATCH v3 02/10] qemu-kvm: Use machine options to configure qemu-kvm defaults

2012-03-02 Thread Jan Kiszka
Upstream is moving towards this mechanism, so start using it in qemu-kvm already to configure the specific defaults: kvm enabled on, just like in-kernel irqchips. Signed-off-by: Jan Kiszka --- hw/pc_piix.c |7 +++ kvm-all.c|8 vl.c |9 ++--- 3 files chang

[PATCH v3 01/10] qemu-kvm: Move kvm_create_pit out of arch init code

2012-03-02 Thread Jan Kiszka
This belongs where the PIT is created and allows us to drop another kvm_irqchip reference. Signed-off-by: Jan Kiszka --- hw/i8254-kvm.c|3 +++ qemu-kvm-x86.c|4 ++-- qemu-kvm.h|2 ++ target-i386/kvm.c |7 --- 4 files changed, 7 insertions(+), 9 deletions(-) d

[PATCH v3 00/10] qemu-kvm: Switch to upstream irqchip services

2012-03-02 Thread Jan Kiszka
Now that upstream has basic irqchip support, we can make use of it for qemu-kvm as well, removing another 700 lines of code here. Changes in v3: - rebased over latest qemu-kvm (next) - included a trivial whitespace diff cleanup - improve user experience of -no-kvm[-irqchip] by not resetting mac

[PATCH v3 08/10] qemu-kvm: Use upstream kvm_irqchip_set_irq instead of kvm_set_irq

2012-03-02 Thread Jan Kiszka
Functions are equivalent, let's switch. Signed-off-by: Jan Kiszka --- hw/msi.c |2 +- hw/msix.c |2 +- kvm-stub.c |2 +- kvm.h |3 +-- qemu-kvm.c | 32 5 files changed, 4 insertions(+), 37 deletions(-) diff --git a/hw/msi.c b/hw/msi.c i

[PATCH v3 09/10] qemu-kvm: Use upstream kvm-apic

2012-03-02 Thread Jan Kiszka
Drop the qemu-kvm version in favor of the equivalent upstream implementation. Signed-off-by: Jan Kiszka --- hw/apic.c | 151 +--- hw/pc.c |5 +-- qemu-kvm-x86.c| 31 --- qemu-kvm.h| 25 - targe

[PATCH v3 07/10] qemu-kvm: Drop unused kvm_get/set_irqchip

2012-03-02 Thread Jan Kiszka
No users remaining. Signed-off-by: Jan Kiszka --- qemu-kvm.c | 28 qemu-kvm.h | 23 --- 2 files changed, 0 insertions(+), 51 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 6c475dd..b414a41 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@

[PATCH v3 04/10] qemu-kvm: Use upstream kvm_irqchip_create

2012-03-02 Thread Jan Kiszka
Drop kvm_create_irqchip in favor of the equivalent upstream version. This also allows to drop the kvm_irqchip global variable. Signed-off-by: Jan Kiszka --- kvm-all.c | 15 --- qemu-kvm.c | 29 - qemu-kvm.h |3 --- vl.c |1 - 4 files cha

[PATCH] qemu-kvm: Fix migration from older version due to i8254 changes

2012-03-02 Thread Jan Kiszka
Old qemu-kvm already contained an equivalent field to i8254's irq_disabled. We therefore have to remove upstream's version restriction here to allow migration from older versions. Signed-off-by: Jan Kiszka --- hw/i8254.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/h

RE: can't restore a guest saved by an older qemu

2012-03-02 Thread Zhang, Yang Z
After restoring i8254, the f->buf_index points to a wrong place. It should be caused by loading i8254. best regards yang > -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On > Behalf Of Jan Kiszka > Sent: Friday, March 02, 2012 4:48 PM > To: Ren,

Re: can't restore a guest saved by an older qemu

2012-03-02 Thread Jan Kiszka
On 2012-03-02 07:33, Ren, Yongjie wrote: > Hi Avi, > I can't restore a guest saved by an older qemu. I wonder if this issue is > introduced by some latest commits on the file 'hw/i8254.c'. > The new commit: b5ed4b6f (on Mar 1)I tried to restore a guest using this > qemu. > The old commit: 9d