regarding Benchmarking tools

2009-10-08 Thread Pankaj Parakh
Hi Group, I am looking for a benchmarking tool for KVM bench marking, some tool like XENMON. I tried virt-manager but I want to log the details. Any sugession any body Thanks Pankaj Parakh -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: kvm guest: hrtimer: interrupt too slow

2009-10-08 Thread Michael Tokarev
[skip everything] Yesterday I was lucky enough to actually watch what's going on when the delay actually happens. I run desktop environment on a kvm virtual machine here. The server is on diskless terminal, and the rest, incl. the window manager etc, is started from a VM. And yesterday, during

Re: kvm guest: hrtimer: interrupt too slow

2009-10-08 Thread Thomas Gleixner
On Wed, 7 Oct 2009, Marcelo Tosatti wrote: On Thu, Oct 08, 2009 at 01:17:35AM +0200, Frederic Weisbecker wrote: What about getting rid of the retry loop, instead? So something like: - run hrtimer callbacks (once) - while (tick_program_event(expires)) expires = ktime_add_ns(expires,

Re: kvm guest: hrtimer: interrupt too slow

2009-10-08 Thread Thomas Gleixner
On Thu, 8 Oct 2009, Michael Tokarev wrote: Yesterday I was lucky enough to actually watch what's going on when the delay actually happens. I run desktop environment on a kvm virtual machine here. The server is on diskless terminal, and the rest, incl. the window manager etc, is started from

Re: kvm guest: hrtimer: interrupt too slow

2009-10-08 Thread Michael Tokarev
[] hrtimer: interrupt too slow, forcing clock min delta to 461487495 ns [] All that does not make sense anymore in a guest. The hang detection and warnings, the recalibrations of the min_clock_deltas are completely wrong in this context. Not only does it spuriously warn, but the minimum timer

Re: kvm guest: hrtimer: interrupt too slow

2009-10-08 Thread Michael Tokarev
Thomas Gleixner wrote: On Thu, 8 Oct 2009, Michael Tokarev wrote: Yesterday I was lucky enough to actually watch what's going on when the delay actually happens. I run desktop environment on a kvm virtual machine here. The server is on diskless terminal, and the rest, incl. the window manager

Re: kvm guest: hrtimer: interrupt too slow

2009-10-08 Thread Thomas Gleixner
On Thu, 8 Oct 2009, Michael Tokarev wrote: Thomas Gleixner wrote: On Thu, 8 Oct 2009, Michael Tokarev wrote: Yesterday I was lucky enough to actually watch what's going on when the delay actually happens. I run desktop environment on a kvm virtual machine here. The server is on

[PATCH 2/9] KVM: SVM: Move INTR vmexit out of atomic code

2009-10-08 Thread Joerg Roedel
The nested SVM code emulates a #vmexit caused by a request to open the irq window right in the request function. This is a bug because the request function runs with preemption and interrupts disabled but the #vmexit emulation might sleep. This can cause a schedule()-while-atomic bug and is fixed

[PATCH 4/9] KVM: SVM: Add tracepoint for nested #vmexit

2009-10-08 Thread Joerg Roedel
This patch adds a tracepoint for every #vmexit we get from a nested guest. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c |6 ++ arch/x86/kvm/trace.h | 36 arch/x86/kvm/x86.c |1 + 3 files changed, 43 insertions(+),

[PATCH 0/9 v2] KVM: Nested SVM fixes and tracepoint conversion

2009-10-08 Thread Joerg Roedel
Hi Avi, Marcelo, this series of patches contains bugfixes for the Nested SVM code and the conversion of Nested SVM debugging to tracepoints. The fixes are: 1) A patch Alex already sent (1/9) but which was not yet applied. It fixes a lost event_inj problem when we emulate

[PATCH 5/9] KVM: SVM: Add tracepoint for injected #vmexit

2009-10-08 Thread Joerg Roedel
This patch adds a tracepoint for a nested #vmexit that gets re-injected to the guest. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c |6 ++ arch/x86/kvm/trace.h | 33 + arch/x86/kvm/x86.c |1 + 3 files changed, 40

[PATCH 8/9] KVM: SVM: Add tracepoint for skinit instruction

2009-10-08 Thread Joerg Roedel
This patch adds a tracepoint for the event that the guest executed the SKINIT instruction. This information is important because SKINIT is an SVM extenstion not yet implemented by nested SVM and we may need this information for debugging hypervisors that do not yet run on nested SVM.

[PATCH 7/9] KVM: SVM: Add tracepoint for invlpga instruction

2009-10-08 Thread Joerg Roedel
This patch adds a tracepoint for the event that the guest executed the INVLPGA instruction. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c |3 +++ arch/x86/kvm/trace.h | 23 +++ arch/x86/kvm/x86.c |1 + 3 files changed, 27 insertions(+),

[PATCH 3/9] KVM: SVM: Add tracepoint for nested vmrun

2009-10-08 Thread Joerg Roedel
This patch adds a dedicated kvm tracepoint for a nested vmrun. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c |6 ++ arch/x86/kvm/trace.h | 33 + arch/x86/kvm/x86.c |1 + 3 files changed, 40 insertions(+), 0 deletions(-)

[PATCH 6/9] KVM: SVM: Add tracepoint for #vmexit because intr pending

2009-10-08 Thread Joerg Roedel
This patch adds a special tracepoint for the event that a nested #vmexit is injected because kvm wants to inject an interrupt into the guest. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c |2 +- arch/x86/kvm/trace.h | 18 ++ arch/x86/kvm/x86.c

[PATCH 1/9] KVM: SVM: Notify nested hypervisor of lost event injections

2009-10-08 Thread Joerg Roedel
From: Alexander Graf ag...@suse.de If event_inj is valid on a #vmexit the host CPU would write the contents to exit_int_info, so the hypervisor knows that the event wasn't injected. We don't do this in nested SVM by now which is a bug and fixed by this patch. Signed-off-by: Alexander Graf

Re: [PATCH qemu-kvm] Enable UFO on virtio-net and tap devices

2009-10-08 Thread Mark McLoughlin
On Wed, 2009-10-07 at 14:50 -0700, Sridhar Samudrala wrote: linux 2.6.32 includes UDP fragmentation offload support in software. So we can enable UFO on the host tap device if supported and allow setting UFO on virtio-net in the guest. Hmm, we really need to detect whether the host has tuntap

Re: kvm: test: timer testcase

2009-10-08 Thread Avi Kivity
On 10/07/2009 09:02 PM, Marcelo Tosatti wrote: Test timer interrupts (HPET, LAPIC, PIT) in correlation with ACPI/TSC counters. New tests/variations are easy to add. Signed-off-by: Marcelo Tosattimtosa...@redhat.com Index: qemu-kvm/kvm/user/config-x86-common.mak

Re: bad? encoding for KVM_SET_IRQCHIP

2009-10-08 Thread Avi Kivity
On 10/06/2009 12:40 AM, Robert Henry wrote: I am concerned about an apparent misencoding for ioctl KVM_SET_IRQCHIP kvm/include/linux/kvm.h defines KVM_SET_IRQCHIP as #define KVM_SET_IRQCHIP _IOR(KVMIO, 0x63, struct kvm_irqchip) But the verb SET in the ioctl name would imply that

Re: [PATCH] qemu-kvm: move msi-x to Makefile.target

2009-10-08 Thread Avi Kivity
On 10/06/2009 02:21 PM, Michael S. Tsirkin wrote: KVM interrupt injection support depends on target, so MSI-X needs to be in Makefile.target for interrupt injection to work. We'll be able to clean it up once interrupt injection is upstream. This fixes virtio breakage with kvm caused by

[ kvm-Bugs-2874689 ] qemu-kvm-0.11.0 will not boot gpxe e1000

2009-10-08 Thread SourceForge.net
Bugs item #2874689, was opened at 2009-10-08 07:54 Message generated for change (Tracker Item Submitted) made by dondster You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2874689group_id=180599 Please note that this message will contain a full copy of the

Re: [PATCH] qemu-kvm: move msi-x to Makefile.target

2009-10-08 Thread Avi Kivity
On 10/08/2009 02:43 PM, Avi Kivity wrote: On 10/06/2009 02:21 PM, Michael S. Tsirkin wrote: KVM interrupt injection support depends on target, so MSI-X needs to be in Makefile.target for interrupt injection to work. We'll be able to clean it up once interrupt injection is upstream. This fixes

Re: [PATCH 3/3] qemu-kvm: convert kvm_types to ISO

2009-10-08 Thread Avi Kivity
On 10/07/2009 01:19 PM, Michael S. Tsirkin wrote: Convert kvm-types to use ISO C types so that it can be included independently of other headers. This is on top of header patch set I sent previously. Applied first two, but these headers are completely unnecessary for userspace, so I

[ kvm-Bugs-2874699 ] qemu-kvm-0.11.0 will not boot gpxe e1000

2009-10-08 Thread SourceForge.net
Bugs item #2874699, was opened at 2009-10-08 08:18 Message generated for change (Tracker Item Submitted) made by dondster You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2874699group_id=180599 Please note that this message will contain a full copy of the

Re: [PATCH] qemu-kvm: move msi-x to Makefile.target

2009-10-08 Thread Avi Kivity
On 10/08/2009 02:57 PM, Avi Kivity wrote: On 10/08/2009 02:43 PM, Avi Kivity wrote: On 10/06/2009 02:21 PM, Michael S. Tsirkin wrote: KVM interrupt injection support depends on target, so MSI-X needs to be in Makefile.target for interrupt injection to work. We'll be able to clean it up once

Re: [PATCH] qemu-kvm: kvm headers update

2009-10-08 Thread Avi Kivity
On 10/06/2009 07:09 PM, Arnd Bergmann wrote: On Tuesday 06 October 2009, Avi Kivity wrote: On 10/05/2009 09:27 PM, Michael S. Tsirkin wrote: Or is this the output of 'make headers_install'? yes. I just added include to kvm_types to add the CONFIG_ stuff. Or

Re: [PATCH v2 3/9] provide in-kernel ioapic

2009-10-08 Thread Anthony Liguori
Glauber Costa wrote: This patch provides kvm with an in-kernel ioapic. We are currently not enabling it. The code is heavily based on what's in qemu-kvm.git. It really ought to be it's own file and own device model. Having the code mixed in with ioapic.c is confusing because it's unclear

Re: [PATCH v2 3/9] provide in-kernel ioapic

2009-10-08 Thread Avi Kivity
On 10/08/2009 03:49 PM, Anthony Liguori wrote: Glauber Costa wrote: This patch provides kvm with an in-kernel ioapic. We are currently not enabling it. The code is heavily based on what's in qemu-kvm.git. It really ought to be it's own file and own device model. Having the code mixed in

KVM: use proper hrtimer function to retrieve expiration time

2009-10-08 Thread Marcelo Tosatti
hrtimer-base can be temporarily NULL due to racing hrtimer_start. See switch_hrtimer_base/lock_hrtimer_base. Use hrtimer_get_remaining which is robust against it. CC: sta...@kernel.org Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c

Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Anthony Liguori
Glauber Costa wrote: This patch provides kvm with an in-kernel apic. We are currently not enabling it. The code is heavily based on what's in qemu-kvm.git. Signed-off-by: Glauber Costa glom...@redhat.com --- hw/apic.c | 135 +++-- kvm.h

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Avi Kivity
On 10/08/2009 03:55 PM, Anthony Liguori wrote: Glauber Costa wrote: This patch provides kvm with an in-kernel apic. We are currently not enabling it. The code is heavily based on what's in qemu-kvm.git. Signed-off-by: Glauber Costa glom...@redhat.com --- hw/apic.c | 135

Re: KVM: use proper hrtimer function to retrieve expiration time

2009-10-08 Thread Avi Kivity
On 10/08/2009 03:55 PM, Marcelo Tosatti wrote: hrtimer-base can be temporarily NULL due to racing hrtimer_start. See switch_hrtimer_base/lock_hrtimer_base. Use hrtimer_get_remaining which is robust against it. Thanks, applied and queued for 2.6.32. -- error compiling committee.c: too

Re: [Qemu-devel] Release plan for 0.12.0

2009-10-08 Thread Anthony Liguori
Jens Osterkamp wrote: On Wednesday 30 September 2009, Anthony Liguori wrote: o VMState conversion -- I expect most of the pc target to be completed o qdev conversion -- I hope that we'll get most of the pc target completely converted to qdev o storage live migration o switch to SeaBIOS

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Glauber Costa
On Thu, Oct 08, 2009 at 04:09:27PM +0200, Avi Kivity wrote: On 10/08/2009 03:55 PM, Anthony Liguori wrote: Glauber Costa wrote: This patch provides kvm with an in-kernel apic. We are currently not enabling it. The code is heavily based on what's in qemu-kvm.git. Signed-off-by: Glauber

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Anthony Liguori
Avi Kivity wrote: On 10/08/2009 03:55 PM, Anthony Liguori wrote: You should probably just setup VMState such that it directly saves kvm_lapic_state and then have the pre/post functions call the kernel ioctls to sync it. There's not a whole lot of point switching the state between two

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Avi Kivity
On 10/08/2009 04:26 PM, Anthony Liguori wrote: Avi Kivity wrote: On 10/08/2009 03:55 PM, Anthony Liguori wrote: You should probably just setup VMState such that it directly saves kvm_lapic_state and then have the pre/post functions call the kernel ioctls to sync it. There's not a whole lot

buildbot failure in qemu-kvm on default_x86_64_out_of_tree

2009-10-08 Thread qemu-kvm
The Buildbot has detected a new failure of default_x86_64_out_of_tree on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_x86_64_out_of_tree/builds/45 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qemu_kvm_1

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Glauber Costa
On Thu, Oct 08, 2009 at 04:31:57PM +0200, Avi Kivity wrote: On 10/08/2009 04:26 PM, Anthony Liguori wrote: Avi Kivity wrote: On 10/08/2009 03:55 PM, Anthony Liguori wrote: You should probably just setup VMState such that it directly saves kvm_lapic_state and then have the pre/post

Re: [PATCH v2 2/4] KVM: introduce xinterface API for external interaction with guests

2009-10-08 Thread Avi Kivity
On 10/07/2009 02:48 PM, Gregory Haskins wrote: If f() can cause another agent to write to p (by freeing it to a global list, for example), then it is its responsibility to issue the smp_rmb(), otherwise no calculation that took place before f() and accessed p is safe. IOW: David is

Re: [Qemu-devel] Re: [PATCH v2 4/9] provide in-kernel apic

2009-10-08 Thread Glauber Costa
On Thu, Oct 08, 2009 at 09:39:13AM -0500, Anthony Liguori wrote: The sync stuff is really ugly too. It would be much cleaner to have a separate state for the in-kernel device models that saved the structures from the kernel directly instead of having to translate between formats. More

[PATCH 1/3] pc-bios: enable io/memory unconditionally

2009-10-08 Thread Michael S. Tsirkin
VGA adapters need to claim memory and i/o transactions even if they do not have any i/o or memory bars. E.g. PCI spec, page 297, gives an example of such a device: Programming interface b VGA-compatible controller. Memory addresses 0A h through 0B

[PATCH 0/3] qemu: reset-related fixes

2009-10-08 Thread Michael S. Tsirkin
On Wed, Oct 07, 2009 at 10:20:19AM +0200, Avi Kivity wrote: Reset BARs and a couple of other registers on bus reset, as per PCI spec. This commit breaks Windows XP restart. After a restart Windows switches from 800x600 cirrus logic vga to 640x480 standard vga. So I think this is a

[PATCH 3/3] qemu: cleanup unused macros in cirrus

2009-10-08 Thread Michael S. Tsirkin
Cirrus vga has a copy of many PCI macros, and it doesn't even use them. Clean up. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/cirrus_vga.c | 37 + 1 files changed, 1 insertions(+), 36 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c

[PATCH 2/3] qemu: make cirrus init value pci spec compliant

2009-10-08 Thread Michael S. Tsirkin
PCI memory should be disabled at reset, otherwise we might claim transactions at address 0. I/O should also be disabled, although for cirrus it is harmless to enable it as we do not have I/O bar. Note: need bios fix for this patch to work: currently pc-bios incorrently assumes that it does not

Re: [PATCH 0/3] qemu: reset-related fixes

2009-10-08 Thread Michael S. Tsirkin
On Thu, Oct 08, 2009 at 04:52:26PM +0200, Michael S. Tsirkin wrote: On Wed, Oct 07, 2009 at 10:20:19AM +0200, Avi Kivity wrote: Reset BARs and a couple of other registers on bus reset, as per PCI spec. This commit breaks Windows XP restart. After a restart Windows switches from

Re: kvm guest: hrtimer: interrupt too slow

2009-10-08 Thread Thomas Gleixner
On Thu, 8 Oct 2009, Michael Tokarev wrote: Thomas Gleixner wrote: I'm really missing the big picture here. What means causes timers to be calculated on the wrong CPU etc ? And what do you consider a scheduling mistake ? From the initial diagnostics by Marcelo: It seems the way

Re: [PATCH 0/3] qemu: reset-related fixes

2009-10-08 Thread Anthony Liguori
Michael S. Tsirkin wrote: On Wed, Oct 07, 2009 at 10:20:19AM +0200, Avi Kivity wrote: Reset BARs and a couple of other registers on bus reset, as per PCI spec. This commit breaks Windows XP restart. After a restart Windows switches from 800x600 cirrus logic vga to 640x480

Re: [PATCH 3/3] qemu: cleanup unused macros in cirrus

2009-10-08 Thread Juan Quintela
Michael S. Tsirkin m...@redhat.com wrote: Cirrus vga has a copy of many PCI macros, and it doesn't even use them. Clean up. @@ -3248,8 +3213,8 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev) /* setup PCI */ pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_CIRRUS);

Re: [PATCH 2/3] qemu: make cirrus init value pci spec compliant

2009-10-08 Thread Avi Kivity
On 10/08/2009 04:52 PM, Michael S. Tsirkin wrote: PCI memory should be disabled at reset, otherwise we might claim transactions at address 0. I/O should also be disabled, although for cirrus it is harmless to enable it as we do not have I/O bar. Note: need bios fix for this patch to work:

[PATCHv2] pcbios: enable io/memory unconditionally

2009-10-08 Thread Michael S. Tsirkin
VGA adapters need to claim memory and i/o transactions even if they do not have any i/o or memory bars. E.g. PCI spec, page 297, gives an example of such a device: Programming interface b VGA-compatible controller. Memory addresses 0A h through 0B

Re: [PATCH v2 3/9] provide in-kernel ioapic

2009-10-08 Thread Jan Kiszka
Avi Kivity wrote: On 10/08/2009 03:49 PM, Anthony Liguori wrote: Glauber Costa wrote: This patch provides kvm with an in-kernel ioapic. We are currently not enabling it. The code is heavily based on what's in qemu-kvm.git. It really ought to be it's own file and own device model. Having

[PATCHv2] seabios: enable io/memory unconditionally

2009-10-08 Thread Michael S. Tsirkin
VGA adapters need to claim memory and i/o transactions even if they do not have any i/o or memory bars. E.g. PCI spec, page 297, gives an example of such a device: Programming interface b VGA-compatible controller. Memory addresses 0A h through 0B h. I/O addresses

[PATCHv2 0/4] qemu: cirrus reset-related fixes

2009-10-08 Thread Michael S. Tsirkin
On Wed, Oct 07, 2009 at 10:20:19AM +0200, Avi Kivity wrote: Reset BARs and a couple of other registers on bus reset, as per PCI spec. This commit breaks Windows XP restart. After a restart Windows switches from 800x600 cirrus logic vga to 640x480 standard vga. Reposting fom qemu tree

[PATCHv2 1/4] qemu: update pcbios to enable i/o for cirrus

2009-10-08 Thread Michael S. Tsirkin
before making cirrus pci spec compliant, need to fix pcibios to enable i/o for it. The relevant patch is: pcbios: enable io/memory unconditionally Signed-off-by: Michael S. Tsirkin m...@redhat.com --- roms/pcbios |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCHv2 2/4] qemu: update seabios to enable i/o for cirrus

2009-10-08 Thread Michael S. Tsirkin
Need to update seabios submodule before making cirrus PCI spec compliant. the relevant patch is: seabios: enable io/memory unconditionally Signed-off-by: Michael S. Tsirkin m...@redhat.com --- roms/seabios |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCHv2 4/4] qemu: cleanup unused macros in cirrus

2009-10-08 Thread Michael S. Tsirkin
Cirrus vga has a copy of many PCI macros, and it doesn't even use them. Clean up. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/cirrus_vga.c | 37 + 1 files changed, 1 insertions(+), 36 deletions(-) diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c

[PATCHv2 3/4] qemu: make cirrus init value pci spec compliant

2009-10-08 Thread Michael S. Tsirkin
PCI memory should be disabled at reset, otherwise we might claim transactions at address 0. I/O should also be disabled, although for cirrus it is harmless to enable it as we do not have I/O bar. Note: need bios fix for this patch to work: currently pc-bios incorrently assumes that it does not

Re: [PATCH 3/9] KVM: SVM: Add tracepoint for nested vmrun

2009-10-08 Thread Avi Kivity
On 10/08/2009 12:03 PM, Joerg Roedel wrote: This patch adds a dedicated kvm tracepoint for a nested vmrun. Signed-off-by: Joerg Roedeljoerg.roe...@amd.com --- arch/x86/kvm/svm.c |6 ++ arch/x86/kvm/trace.h | 33 + arch/x86/kvm/x86.c |1 + 3

Re: [PATCH 7/9] KVM: SVM: Add tracepoint for invlpga instruction

2009-10-08 Thread Avi Kivity
On 10/08/2009 12:03 PM, Joerg Roedel wrote: This patch adds a tracepoint for the event that the guest executed the INVLPGA instruction. + + TP_printk(rip=0x%016llx asid=%d adress=0x%016llx\n, + __entry-rip, __entry-asid, __entry-address) +); s/adress/address/. Also,

Re: [PATCH 2/3] qemu: make cirrus init value pci spec compliant

2009-10-08 Thread Michael S. Tsirkin
On Thu, Oct 08, 2009 at 05:29:29PM +0200, Avi Kivity wrote: On 10/08/2009 04:52 PM, Michael S. Tsirkin wrote: PCI memory should be disabled at reset, otherwise we might claim transactions at address 0. I/O should also be disabled, although for cirrus it is harmless to enable it as we do not

Re: [PATCHv2] seabios: enable io/memory unconditionally

2009-10-08 Thread Gleb Natapov
Add seabios maintainer to CC. On Thu, Oct 08, 2009 at 05:53:46PM +0200, Michael S. Tsirkin wrote: VGA adapters need to claim memory and i/o transactions even if they do not have any i/o or memory bars. E.g. PCI spec, page 297, gives an example of such a device: Programming interface

Re: [Qemu-devel] Re: [PATCH v2 3/9] provide in-kernel ioapic

2009-10-08 Thread Jamie Lokier
Avi Kivity wrote: On 10/08/2009 03:49 PM, Anthony Liguori wrote: Glauber Costa wrote: This patch provides kvm with an in-kernel ioapic. We are currently not enabling it. The code is heavily based on what's in qemu-kvm.git. It really ought to be it's own file and own device model. Having

Re: [PATCH 3/3] qemu: cleanup unused macros in cirrus

2009-10-08 Thread Michael S. Tsirkin
On Thu, Oct 08, 2009 at 05:24:35PM +0200, Juan Quintela wrote: Michael S. Tsirkin m...@redhat.com wrote: Cirrus vga has a copy of many PCI macros, and it doesn't even use them. Clean up. @@ -3248,8 +3213,8 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev) /* setup PCI */

Re: [PATCH 1/9] KVM: SVM: Notify nested hypervisor of lost event injections

2009-10-08 Thread Avi Kivity
On 10/08/2009 12:03 PM, Joerg Roedel wrote: From: Alexander Grafag...@suse.de If event_inj is valid on a #vmexit the host CPU would write the contents to exit_int_info, so the hypervisor knows that the event wasn't injected. We don't do this in nested SVM by now which is a bug and fixed by

Re: [Qemu-devel] Re: [PATCH v2 3/9] provide in-kernel ioapic

2009-10-08 Thread Anthony Liguori
Jamie Lokier wrote: Avi Kivity wrote: On 10/08/2009 03:49 PM, Anthony Liguori wrote: Glauber Costa wrote: This patch provides kvm with an in-kernel ioapic. We are currently not enabling it. The code is heavily based on what's in qemu-kvm.git. It really ought to be

Re: [PATCH 2/3] qemu: make cirrus init value pci spec compliant

2009-10-08 Thread Avi Kivity
On 10/08/2009 06:06 PM, Michael S. Tsirkin wrote: On Thu, Oct 08, 2009 at 05:29:29PM +0200, Avi Kivity wrote: On 10/08/2009 04:52 PM, Michael S. Tsirkin wrote: PCI memory should be disabled at reset, otherwise we might claim transactions at address 0. I/O should also be disabled,

Re: [PATCH 3/9] KVM: SVM: Add tracepoint for nested vmrun

2009-10-08 Thread Joerg Roedel
On Thu, Oct 08, 2009 at 05:58:22PM +0200, Avi Kivity wrote: On 10/08/2009 12:03 PM, Joerg Roedel wrote: This patch adds a dedicated kvm tracepoint for a nested vmrun. Signed-off-by: Joerg Roedeljoerg.roe...@amd.com --- arch/x86/kvm/svm.c |6 ++ arch/x86/kvm/trace.h | 33

Re: [Qemu-devel] Re: [PATCH v2 3/9] provide in-kernel ioapic

2009-10-08 Thread Avi Kivity
On 10/08/2009 06:07 PM, Jamie Lokier wrote: Haven't we already confirmed that it *isn't* just an ioapic accelerator because you can't migrate between in-kernel iopic and qemu's ioapic? We haven't confirmed it. Both implement the same spec, and if you can't migrate between them, one of

Re: [PATCH 7/9] KVM: SVM: Add tracepoint for invlpga instruction

2009-10-08 Thread Joerg Roedel
On Thu, Oct 08, 2009 at 06:01:55PM +0200, Avi Kivity wrote: On 10/08/2009 12:03 PM, Joerg Roedel wrote: This patch adds a tracepoint for the event that the guest executed the INVLPGA instruction. + +TP_printk(rip=0x%016llx asid=%d adress=0x%016llx\n, + __entry-rip,

[PATCHv3 4/4] qemu: cleanup unused macros in cirrus

2009-10-08 Thread Michael S. Tsirkin
Cirrus vga has a copy of many PCI macros, and it doesn't even use them. Clean up. Also do not init header type, it has the right value by default. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Respin only the last patch in the series: improve comment, and remove a commented out line I

Re: [PATCH 3/9] KVM: SVM: Add tracepoint for nested vmrun

2009-10-08 Thread Avi Kivity
On 10/08/2009 06:15 PM, Joerg Roedel wrote: On Thu, Oct 08, 2009 at 05:58:22PM +0200, Avi Kivity wrote: On 10/08/2009 12:03 PM, Joerg Roedel wrote: This patch adds a dedicated kvm tracepoint for a nested vmrun. Signed-off-by: Joerg Roedeljoerg.roe...@amd.com --- arch/x86/kvm/svm.c

Re: [PATCH 7/9] KVM: SVM: Add tracepoint for invlpga instruction

2009-10-08 Thread Avi Kivity
On 10/08/2009 06:18 PM, Joerg Roedel wrote: Also, kvm tracepoints don't use '=' in TP_printk(), please keep it consistent. I had it with key: value formating first but decided to do it this way because it simplifies automatic parsing of these trace events. With this format a script can

Re: [PATCH 1/9] KVM: SVM: Notify nested hypervisor of lost event injections

2009-10-08 Thread Joerg Roedel
On Thu, Oct 08, 2009 at 06:12:28PM +0200, Avi Kivity wrote: On 10/08/2009 12:03 PM, Joerg Roedel wrote: From: Alexander Grafag...@suse.de If event_inj is valid on a #vmexit the host CPU would write the contents to exit_int_info, so the hypervisor knows that the event wasn't injected. We

Re: [Qemu-devel] Re: [PATCH v2 3/9] provide in-kernel ioapic

2009-10-08 Thread Gleb Natapov
On Thu, Oct 08, 2009 at 06:17:57PM +0200, Avi Kivity wrote: On 10/08/2009 06:07 PM, Jamie Lokier wrote: Haven't we already confirmed that it *isn't* just an ioapic accelerator because you can't migrate between in-kernel iopic and qemu's ioapic? We haven't confirmed it. Both implement the

Re: [PATCH 7/9] KVM: SVM: Add tracepoint for invlpga instruction

2009-10-08 Thread Joerg Roedel
On Thu, Oct 08, 2009 at 06:21:09PM +0200, Avi Kivity wrote: On 10/08/2009 06:18 PM, Joerg Roedel wrote: Also, kvm tracepoints don't use '=' in TP_printk(), please keep it consistent. I had it with key: value formating first but decided to do it this way because it simplifies automatic

Re: [PATCH 1/9] KVM: SVM: Notify nested hypervisor of lost event injections

2009-10-08 Thread Avi Kivity
On 10/08/2009 06:22 PM, Joerg Roedel wrote: On Thu, Oct 08, 2009 at 06:12:28PM +0200, Avi Kivity wrote: On 10/08/2009 12:03 PM, Joerg Roedel wrote: From: Alexander Grafag...@suse.de If event_inj is valid on a #vmexit the host CPU would write the contents to exit_int_info, so the

Re: [Qemu-devel] Re: [PATCH v2 3/9] provide in-kernel ioapic

2009-10-08 Thread Avi Kivity
On 10/08/2009 06:22 PM, Gleb Natapov wrote: On Thu, Oct 08, 2009 at 06:17:57PM +0200, Avi Kivity wrote: On 10/08/2009 06:07 PM, Jamie Lokier wrote: Haven't we already confirmed that it *isn't* just an ioapic accelerator because you can't migrate between in-kernel iopic and qemu's

Re: [PATCH 1/9] KVM: SVM: Notify nested hypervisor of lost event injections

2009-10-08 Thread Joerg Roedel
On Thu, Oct 08, 2009 at 06:25:30PM +0200, Avi Kivity wrote: On 10/08/2009 06:22 PM, Joerg Roedel wrote: On Thu, Oct 08, 2009 at 06:12:28PM +0200, Avi Kivity wrote: On 10/08/2009 12:03 PM, Joerg Roedel wrote: From: Alexander Grafag...@suse.de If event_inj is valid on a #vmexit the host CPU

Re: [Qemu-devel] Re: [PATCH v2 3/9] provide in-kernel ioapic

2009-10-08 Thread Gleb Natapov
On Thu, Oct 08, 2009 at 06:29:53PM +0200, Avi Kivity wrote: On 10/08/2009 06:22 PM, Gleb Natapov wrote: On Thu, Oct 08, 2009 at 06:17:57PM +0200, Avi Kivity wrote: On 10/08/2009 06:07 PM, Jamie Lokier wrote: Haven't we already confirmed that it *isn't* just an ioapic accelerator because you

Re: [PATCH 1/9] KVM: SVM: Notify nested hypervisor of lost event injections

2009-10-08 Thread Avi Kivity
On 10/08/2009 06:32 PM, Joerg Roedel wrote: No. The L1 guest needs to execute VMRUN with an interrupt to inject to the L2 guest with event_inj. On that VMRUN instruction emulation an interrupt becomes pending which causes an immediate #vmexit from L2 to L2 again without even entering the L2

Re: [Qemu-devel] Re: [PATCH v2 3/9] provide in-kernel ioapic

2009-10-08 Thread Avi Kivity
On 10/08/2009 06:34 PM, Gleb Natapov wrote: So suppose I have simple watchdog device that required to be poked every second, otherwise it resets a computer. On migration we have to migrate time elapsed since last poke, but if device doesn't expose it to software in any way you are saying we can

Re: [PATCH 1/9] KVM: SVM: Notify nested hypervisor of lost event injections

2009-10-08 Thread Alexander Graf
Am 08.10.2009 um 18:38 schrieb Avi Kivity a...@redhat.com: On 10/08/2009 06:32 PM, Joerg Roedel wrote: No. The L1 guest needs to execute VMRUN with an interrupt to inject to the L2 guest with event_inj. On that VMRUN instruction emulation an interrupt becomes pending which causes an

Re: [Qemu-devel] Re: [PATCH v2 3/9] provide in-kernel ioapic

2009-10-08 Thread Gleb Natapov
On Thu, Oct 08, 2009 at 06:42:07PM +0200, Avi Kivity wrote: On 10/08/2009 06:34 PM, Gleb Natapov wrote: So suppose I have simple watchdog device that required to be poked every second, otherwise it resets a computer. On migration we have to migrate time elapsed since last poke, but if device

kvm: test: timer testcase (v2)

2009-10-08 Thread Marcelo Tosatti
Avi, vm.o needs print.o (all other comments addressed). - Test timer interrupts (HPET, LAPIC, PIT) in correlation with ACPI/TSC counters. New tests/variations are easy to add. Signed-off-by: Marcelo Tosattimtosa...@redhat.com Index: qemu-kvm/kvm/user/config-x86-common.mak

Re: [Qemu-devel] Re: [PATCH 2/3] qemu: make cirrus init value pci spec compliant

2009-10-08 Thread Jamie Lokier
Avi Kivity wrote: On 10/08/2009 06:06 PM, Michael S. Tsirkin wrote: On Thu, Oct 08, 2009 at 05:29:29PM +0200, Avi Kivity wrote: On 10/08/2009 04:52 PM, Michael S. Tsirkin wrote: PCI memory should be disabled at reset, otherwise we might claim transactions at address 0. I/O should

[PATCH] include stdlib.h in qemu-kvm.h

2009-10-08 Thread Glauber Costa
abort() needs it. Build with kvm disabled breaks without it. Signed-off-by: Glauber Costa glom...@redhat.com --- qemu-kvm.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu-kvm.h b/qemu-kvm.h index 4a86d19..98fbbdf 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -13,6

Re: kvm guest: hrtimer: interrupt too slow

2009-10-08 Thread Marcelo Tosatti
On Thu, Oct 08, 2009 at 10:05:01AM +0200, Thomas Gleixner wrote: On Wed, 7 Oct 2009, Marcelo Tosatti wrote: On Thu, Oct 08, 2009 at 01:17:35AM +0200, Frederic Weisbecker wrote: What about getting rid of the retry loop, instead? So something like: - run hrtimer callbacks (once) -

Re: [Qemu-devel] Re: [PATCH 2/3] qemu: make cirrus init value pci spec compliant

2009-10-08 Thread Michael S. Tsirkin
On Thu, Oct 08, 2009 at 07:40:12PM +0100, Jamie Lokier wrote: Avi Kivity wrote: On 10/08/2009 06:06 PM, Michael S. Tsirkin wrote: On Thu, Oct 08, 2009 at 05:29:29PM +0200, Avi Kivity wrote: On 10/08/2009 04:52 PM, Michael S. Tsirkin wrote: PCI memory should be disabled at

Re: kvm guest: hrtimer: interrupt too slow

2009-10-08 Thread Marcelo Tosatti
On Thu, Oct 08, 2009 at 06:06:39PM +0400, Michael Tokarev wrote: Thomas Gleixner wrote: On Thu, 8 Oct 2009, Michael Tokarev wrote: Thomas Gleixner wrote: On Thu, 8 Oct 2009, Michael Tokarev wrote: Yesterday I was lucky enough to actually watch what's going on when the delay actually

Re: kvm guest: hrtimer: interrupt too slow

2009-10-08 Thread Thomas Gleixner
On Thu, 8 Oct 2009, Marcelo Tosatti wrote: On Thu, Oct 08, 2009 at 10:05:01AM +0200, Thomas Gleixner wrote: On Wed, 7 Oct 2009, Marcelo Tosatti wrote: On Thu, Oct 08, 2009 at 01:17:35AM +0200, Frederic Weisbecker wrote: What about getting rid of the retry loop, instead? So something

Re: kvm guest: hrtimer: interrupt too slow

2009-10-08 Thread Michael Tokarev
Thomas Gleixner wrote: [] Also it's not clear to me why the problem does only happen with kvm_clock and not with acpi_pm timer emulation (according to the reporter) and is restricted to SMP guests. I just reproduced it with acpi_pm. I explained it already to Marcelo, the problem is that the

Re: [PATCH qemu-kvm] Enable UFO on virtio-net and tap devices

2009-10-08 Thread Sridhar Samudrala
On Thu, 2009-10-08 at 11:07 +0100, Mark McLoughlin wrote: On Wed, 2009-10-07 at 14:50 -0700, Sridhar Samudrala wrote: linux 2.6.32 includes UDP fragmentation offload support in software. So we can enable UFO on the host tap device if supported and allow setting UFO on virtio-net in the

Re: [PATCH v4: kvm 2/4] Kill the confusing tsc_ref_khz and ref_freq variables.

2009-10-08 Thread Jan Kiszka
Zachary Amsden wrote: They are globals, not clearly protected by any ordering or locking, and vulnerable to various startup races. Instead, for variable TSC machines, register the cpufreq notifier and get the TSC frequency directly from the cpufreq machinery. Not only is it always right,

buildbot failure in qemu-kvm on default_i386_debian_5_0

2009-10-08 Thread qemu-kvm
The Buildbot has detected a new failure of default_i386_debian_5_0 on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_i386_debian_5_0/builds/107 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qemu_kvm_2

buildbot failure in qemu-kvm on default_i386_out_of_tree

2009-10-08 Thread qemu-kvm
The Buildbot has detected a new failure of default_i386_out_of_tree on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_i386_out_of_tree/builds/44 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qemu_kvm_2

Re: [Qemu-devel] [PATCHv2] seabios: enable io/memory unconditionally

2009-10-08 Thread Kevin O'Connor
Hi Michael, On Thu, Oct 08, 2009 at 05:53:46PM +0200, Michael S. Tsirkin wrote: VGA adapters need to claim memory and i/o transactions even if they do not have any i/o or memory bars. E.g. PCI spec, page 297, gives an example of such a device: Programming interface b

dynamic scsi disk attach seems to be broken in qemu(-kvm)-0.11, libvirt-0.7.1

2009-10-08 Thread Dustin Kirkland
We're experiencing what we believe to be a regression in qemu-kvm-0.11 and libvirt-0.7.0, from previous versions of kvm-84 and libvirt-0.6.1: Dynamically attaching sdb (a second scsi disk) fails. (Note that I have tested this against libvirt-0.7.1 built from source as well--same results.) Here