[questions] savevm|loadvm

2010-03-30 Thread Wenhao Xu
Hi, all,    I am working with switching QEMU from running in KVM mode to QEMU emulatoin mode dynamically.    Intuitively, if the snapshot created using savevm in kvm mode can be used by the loadvm command in QEMU emulator mode, the switchment could makes use of this.  I tried to do so. However, it

Re: Clocksource tsc unstable (delta = -4398046474878 ns)

2010-03-30 Thread Sebastian Hetze
On Mon, Mar 29, 2010 at 11:31:13AM +0100, Athanasius wrote: On Sun, Mar 28, 2010 at 01:46:35PM +0200, Sebastian Hetze wrote: this message appeared in the KVM guest kern.log last night: Mar 27 22:35:30 guest kernel: [260041.559462] Clocksource tsc unstable (delta = -4398046474878 ns)

[RFC PATCH 0/7] Beginning implementing the AMD IOMMU emulation

2010-03-30 Thread Eduard - Gabriel Munteanu
Hi everybody, This patchset is intended to provide a start for implementing the emulation of the AMD IOMMU. For those who aren't aware yet, I intend to participate as a student in GSoC 2010. The patches are meant to be applied on top of qemu-kvm. In short, this demonstrates a mechanism of

[RFC PATCH 1/7] acpi: qemu_realloc() might return a different pointer

2010-03-30 Thread Eduard - Gabriel Munteanu
We mustn't assume qemu_realloc() returns the same pointer in acpi_table_add(). Therefore, 'p' might be invalid if it's relative to the old value of acpi_tables. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/acpi.c |7 --- 1 files changed, 4 insertions(+), 3

[RFC PATCH 2/7] acpi: split and rename acpi_table_add()

2010-03-30 Thread Eduard - Gabriel Munteanu
We'd like to let emulation code build and insert ACPI tables at bootup, without depending on hacking the BIOS code. This will be used to provide an IVRS table for emulating the AMD IOMMU, for instance. This splits acpi_table_add(), retaining the old behavior of inserting cmdline-supplied tables

[RFC PATCH 4/7] sparc: rename hw/iommu.c

2010-03-30 Thread Eduard - Gabriel Munteanu
hw/iommu.c concerns the SPARC IOMMU. However we intend to implement the AMD IOMMU, which could lead to confusion unless we rename the former. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- Makefile.target |2 +- hw/{iommu.c = sparc_iommu.c} |0

[RFC PATCH 6/7] acpi: cleanup acpi_checksum()

2010-03-30 Thread Eduard - Gabriel Munteanu
This adds newlines in acpi_checksum() to separate the declarations, the body and the return statement. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/acpi.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/acpi.c b/hw/acpi.c index

[RFC PATCH 7/7] acpi: fix bug in acpi_checksum() caused by garbage in checksum field

2010-03-30 Thread Eduard - Gabriel Munteanu
The whole table must sum to zero. We need to ignore garbage in the checksum field (i.e. consider it zero) when checksumming. It is legitimate to have garbage there, as the checksum makes sense only when the table has been filled. Signed-off-by: Eduard - Gabriel Munteanu

[RFC PATCH 5/7] x86-64: AMD IOMMU stub

2010-03-30 Thread Eduard - Gabriel Munteanu
This currently loads a non-functional IVRS ACPI table and provides a skeleton for initializing the AMD IOMMU. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- Makefile.target |1 + hw/amd_iommu.c | 103 +++ hw/pc.c

[RFC PATCH 3/7] acpi: move table header definition into pc.h

2010-03-30 Thread Eduard - Gabriel Munteanu
This moves the table header definition into pc.h to allow other code to build ACPI tables. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- hw/acpi.c | 13 - hw/pc.h | 13 + 2 files changed, 13 insertions(+), 13 deletions(-) diff --git

Re: [questions] savevm|loadvm

2010-03-30 Thread Juan Quintela
Wenhao Xu xuwenhao2...@gmail.com wrote: Hi, all, ¿ï½ I am working with switching QEMU from running in KVM mode to QEMU emulatoin mode dynamically. ¿ï½ Intuitively, if the snapshot created using savevm in kvm mode can be used by the loadvm command in QEMU emulator mode, the switchment could

Re: Strange CPU usage pattern in SMP guest

2010-03-30 Thread Sebastian Hetze
On Tue, Mar 23, 2010 at 06:18:08PM -0300, Marcelo Tosatti wrote: On Mon, Mar 22, 2010 at 01:51:20PM +0100, Sebastian Hetze wrote: On Sun, Mar 21, 2010 at 05:17:38PM +0200, Avi Kivity wrote: On 03/21/2010 04:55 PM, Sebastian Hetze wrote: On Sun, Mar 21, 2010 at 02:19:40PM +0200, Avi Kivity

[PATCH 1/2] KVM test: Make the profiler could be configurated

2010-03-30 Thread Jason Wang
The patch let the profilers could be specified through configuration file. kvm_stat was kept as the default profiler. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_utils.py | 23 ++- client/tests/kvm/tests_base.cfg.sample |2 +- 2 files

[PATCH 2/2] KVM test: Add the hwclock test into guest test

2010-03-30 Thread Jason Wang
Hwclock is useful to do the basic testing of emulated RTC. Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/autotest_control/hwclock.control | 12 client/tests/kvm/tests_base.cfg.sample|3 +++ 2 files changed, 15 insertions(+), 0 deletions(-)

Re: [RFC] vhost-blk implementation

2010-03-30 Thread Avi Kivity
On 03/30/2010 01:51 AM, Badari Pulavarty wrote: Your io wait time is twice as long and your throughput is about half. I think the qmeu block submission does an extra attempt at merging requests. Does blktrace tell you anything interesting? Yes. I see that in my testcase (2M

Re: [RFC] KVM MMU: thinking of shadow page cache

2010-03-30 Thread Avi Kivity
On 03/30/2010 04:59 AM, Xiao Guangrong wrote: When we cached shadow page tables, one guest page table may have many shadow pages, take below case for example: (RO+U) --- |--| __ |--| (W+U ) --- | GP1 | || GP2 | (W+P ) --- |--| |-- |--| There have 3 kinds

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-30 Thread Cam Macdonell
On Mon, Mar 29, 2010 at 2:59 PM, Avi Kivity a...@redhat.com wrote: On 03/28/2010 10:48 PM, Cam Macdonell wrote: On Sat, Mar 27, 2010 at 11:48 AM, Avi Kivitya...@redhat.com  wrote: On 03/26/2010 07:14 PM, Cam Macdonell wrote: I'm not familiar with the uio internals, but for the

KVM call minutes for Mar 30

2010-03-30 Thread Chris Wright
vhost-blk - started w/ vhost-net, nice and modular - qemu merging requests, so outperforming (throughput) for sequential write - random read/write and sequential reads are comparable or better - can't do e.g. qcow2 - spreading work across all cpu workqueues - are there cases where we expect

Re: [Qemu-devel] [RFC PATCH 7/7] acpi: fix bug in acpi_checksum() caused by garbage in checksum field

2010-03-30 Thread Richard Henderson
On 03/30/2010 01:20 AM, Eduard - Gabriel Munteanu wrote: +/* Ignore preexisting garbage in checksum. */ +acpi_hdr = (struct acpi_table_header *) data; +sum -= acpi_hdr-checksum; + return (-sum) 0xff; Wouldn't it be cleaner to adjust the acpi_checksum definition to take and

device limit for kvm_io_bus

2010-03-30 Thread Cam Macdonell
Hi, I'm trying to use ioeventfds for notification between guests. After assigning a handful of ioeventfds I was getting a no space left on device error. The culprit seems to be that only 6 devices are allowed for a guest on the kvm IO bus. The comment indicates a somewhat low number was

Re: Clocksource tsc unstable (delta = -4398046474878 ns)

2010-03-30 Thread Athanasius
On Tue, Mar 30, 2010 at 10:08:28AM +0200, Sebastian Hetze wrote: On Mon, Mar 29, 2010 at 11:31:13AM +0100, Athanasius wrote: I didn't see any such messages but I've had a recent experience with the time on one KVM host leaping *forwards* approx. 5 and 2.5 hours in two separate incidents.

Re: [questions] savevm|loadvm

2010-03-30 Thread Wenhao Xu
Hi, Juan, I am fresh to both QEMU and KVM. But so far, I notice that QEMU uses KVM_SET_USER_MEMORY_REGION to set memory region that KVM can use and uses cpu_register_physical_memory_offset to register the same memory to QEMU emulator, which means QEMU and KVM use the same host virtual memory.

Re: [Qemu-devel] [RFC PATCH 4/7] sparc: rename hw/iommu.c

2010-03-30 Thread Blue Swirl
On 3/30/10, Eduard - Gabriel Munteanu eduard.munte...@linux360.ro wrote: hw/iommu.c concerns the SPARC IOMMU. However we intend to implement the AMD IOMMU, which could lead to confusion unless we rename the former. I was also thinking of renaming the file some time ago. The correct name would

Re: [PATCH 1/2] KVM test: Make the profiler could be configurated

2010-03-30 Thread Michael Goldish
- Jason Wang jasow...@redhat.com wrote: The patch let the profilers could be specified through configuration file. kvm_stat was kept as the default profiler. Looks good. Some minor style comments: Signed-off-by: Jason Wang jasow...@redhat.com --- client/tests/kvm/kvm_utils.py

CfP with Extended Deadline 5th Workshop on Virtualization in High-Performance Cloud Computing (VHPC'10)

2010-03-30 Thread Michael Alexander
Apologies if you received multiple copies of this message. = CALL FOR PAPERS 5th Workshop on Virtualization in High-Performance Cloud Computing VHPC'10 as part of Euro-Par 2010, Island of Ischia-Naples, Italy

Re: Clocksource tsc unstable (delta = -4398046474878 ns)

2010-03-30 Thread Beinicke, Thomas
On Tuesday 30 March 2010 10:08:28 Sebastian Hetze wrote: On Mon, Mar 29, 2010 at 11:31:13AM +0100, Athanasius wrote: On Sun, Mar 28, 2010 at 01:46:35PM +0200, Sebastian Hetze wrote: this message appeared in the KVM guest kern.log last night: Mar 27 22:35:30 guest kernel:

[PATCH][QEMU][VHOST]fix feature bit handling for mergeable rx buffers

2010-03-30 Thread David L Stevens
This patch adds mergeable receive buffer support to qemu-kvm, to allow enabling it when vhost_net supports it. It also adds a missing call to vhost_net_ack_features() to push acked features to vhost_net. The patch is relative to Michael Tsirkin's qemu-kvm git tree.

Re: [Qemu-devel] [RFC PATCH 4/7] sparc: rename hw/iommu.c

2010-03-30 Thread Joerg Roedel
On Tue, Mar 30, 2010 at 08:06:36PM +0300, Blue Swirl wrote: On 3/30/10, Eduard - Gabriel Munteanu eduard.munte...@linux360.ro wrote: hw/iommu.c concerns the SPARC IOMMU. However we intend to implement the AMD IOMMU, which could lead to confusion unless we rename the former. I was also

Re: Clocksource tsc unstable (delta = -4398046474878 ns)

2010-03-30 Thread Zachary Amsden
On 03/30/10 07:04, Beinicke, Thomas wrote: On Tuesday 30 March 2010 10:08:28 Sebastian Hetze wrote: On Mon, Mar 29, 2010 at 11:31:13AM +0100, Athanasius wrote: On Sun, Mar 28, 2010 at 01:46:35PM +0200, Sebastian Hetze wrote: this message appeared in the KVM guest kern.log

Re: [RFC PATCH 0/7] Beginning implementing the AMD IOMMU emulation

2010-03-30 Thread Joerg Roedel
Hello Eduard, On Tue, Mar 30, 2010 at 11:20:01AM +0300, Eduard - Gabriel Munteanu wrote: This patchset is intended to provide a start for implementing the emulation of the AMD IOMMU. For those who aren't aware yet, I intend to participate as a student in GSoC 2010. Great. This is a good

Re: [Qemu-devel] [RFC PATCH 4/7] sparc: rename hw/iommu.c

2010-03-30 Thread Blue Swirl
On 3/30/10, Joerg Roedel j...@8bytes.org wrote: On Tue, Mar 30, 2010 at 08:06:36PM +0300, Blue Swirl wrote: On 3/30/10, Eduard - Gabriel Munteanu eduard.munte...@linux360.ro wrote: hw/iommu.c concerns the SPARC IOMMU. However we intend to implement the AMD IOMMU, which could lead to

Re: [Qemu-devel] [RFC PATCH 4/7] sparc: rename hw/iommu.c

2010-03-30 Thread Eduard - Gabriel Munteanu
On Tue, Mar 30, 2010 at 11:00:10PM +0300, Blue Swirl wrote: On 3/30/10, Joerg Roedel j...@8bytes.org wrote: On Tue, Mar 30, 2010 at 08:06:36PM +0300, Blue Swirl wrote: On 3/30/10, Eduard - Gabriel Munteanu eduard.munte...@linux360.ro wrote: hw/iommu.c concerns the SPARC IOMMU.

Re: Setting nx bit in virtual CPU

2010-03-30 Thread Richard Simpson
OK, thanks for that. Clearly something wrong with my installation. At least now I know it is possible I can keep fiddling until it works. Richard On 30/03/10 03:12, Chris Wright wrote: * Richard Simpson (rs1...@huskydog.org.uk) wrote: So, is there any way of having the nx bit and the

Re: [Qemu-devel] [RFC PATCH 5/7] x86-64: AMD IOMMU stub

2010-03-30 Thread Blue Swirl
On 3/30/10, Eduard - Gabriel Munteanu eduard.munte...@linux360.ro wrote: This currently loads a non-functional IVRS ACPI table and provides a skeleton for initializing the AMD IOMMU. Signed-off-by: Eduard - Gabriel Munteanu eduard.munte...@linux360.ro --- Makefile.target |1 +

Re: PCI passthrough resource remapping

2010-03-30 Thread Kenni Lund
2010/3/30 Chris Wright chr...@redhat.com: * Kenni Lund (ke...@kelu.dk) wrote: Client dmesg: http://pastebin.com/uNG4QK5j Host dmesg: http://pastebin.com/jZu3WKZW I just verified it and I do get the call trace in the host (which disables IRQ 19, used by the PCI USB card), exactly at the same

can't start qemu-kvm on 2.6.34-rc3

2010-03-30 Thread Tomasz Chmielewski
With qemu-kvm 0.12.3 used on 2.6.34-rc3, this command: qemu-kvm -m 1500 -drive file=/srv/kvm/images/im1.qcow2,if=virtio,cache=none,index=0,boot=on -drive file=/srv/kvm/images/im1-backup.qcow2,if=virtio,cache=none,index=1 -net nic,vlan=0,model=virtio,macaddr=F2:4A:51:41:B1:AA -net

Re: PCI passthrough resource remapping

2010-03-30 Thread Alexander Graf
On 31.03.2010, at 00:27, Kenni Lund wrote: 2010/3/30 Chris Wright chr...@redhat.com: * Kenni Lund (ke...@kelu.dk) wrote: Client dmesg: http://pastebin.com/uNG4QK5j Host dmesg: http://pastebin.com/jZu3WKZW I just verified it and I do get the call trace in the host (which disables IRQ 19,

KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3

2010-03-30 Thread Jiri Kosina
Hi, booting 32bit guest on 32bit host on AMD system gives me the following warning when KVM is instructed to boot as SMP: CPU0: AMD QEMU Virtual CPU version 0.9.1 stepping 03 Booting Node 0, Processors #1 Initializing CPU#1 Leaving ESR disabled. Mapping cpu 1 to node 0 [ cut

Re: KVM warning about uncertified CPU for SMP for AMD model 2, stepping3

2010-03-30 Thread Brian Jackson
On Tuesday 30 March 2010 06:03:02 pm Jiri Kosina wrote: Hi, booting 32bit guest on 32bit host on AMD system gives me the following warning when KVM is instructed to boot as SMP: This has been discussed before (fairly recently). Subject was tainted Linux kernel in default SMP QEMU/KVM

[PATCH] kvm: Increase NR_IOBUS_DEVS limit to 200

2010-03-30 Thread Sridhar Samudrala
This patch increases the current hardcoded limit of NR_IOBUS_DEVS from 6 to 200. We are hitting this limit when creating a guest with more than 1 virtio-net device using vhost-net backend. Each virtio-net device requires 2 such devices to service notifications from rx/tx queues. Signed-off-by:

Re: PCI passthrough resource remapping

2010-03-30 Thread Kenni Lund
2010/3/31 Alexander Graf ag...@suse.de: On 31.03.2010, at 00:27, Kenni Lund wrote: 2010/3/30 Chris Wright chr...@redhat.com: * Kenni Lund (ke...@kelu.dk) wrote: Client dmesg: http://pastebin.com/uNG4QK5j Host dmesg: http://pastebin.com/jZu3WKZW I just verified it and I do get the call

Re: PCI passthrough resource remapping

2010-03-30 Thread Chris Wright
* Kenni Lund (ke...@kelu.dk) wrote: 2010/3/30 Chris Wright chr...@redhat.com: * Kenni Lund (ke...@kelu.dk) wrote: Client dmesg: http://pastebin.com/uNG4QK5j Host dmesg: http://pastebin.com/jZu3WKZW I just verified it and I do get the call trace in the host (which disables IRQ 19, used

[027/116] hrtimer: Tune hrtimer_interrupt hang logic

2010-03-30 Thread Greg KH
2.6.32-stable review patch. If anyone has any objections, please let us know. -- From: Thomas Gleixner t...@linutronix.de commit 41d2e494937715d3150e5c75d01f0e75ae899337 upstream. The hrtimer_interrupt hang logic adjusts min_delta_ns based on the execution time of the hrtimer

Re: PCI passthrough resource remapping

2010-03-30 Thread Kenni Lund
2010/3/31 Chris Wright chr...@redhat.com: So I suppose I'll need to get rid of this shared IRQ before I can conclude anything on the patch in git. Hmm, is there some cleaver way of fixing this in Linux, or do I have to fix it by changing BIOS IRQ settings, disabling hardware and/or moving the

Re: PCI passthrough resource remapping

2010-03-30 Thread Chris Wright
* Kenni Lund (ke...@kelu.dk) wrote: 2010/3/31 Alexander Graf ag...@suse.de: The easiest thing coming to mind is to unplug the ivtv card for now. It's really only to verify that the patch does something useful :-). This was not sufficient. Same issue with the ivtv card unplugged...if I

[PATCH v2] Add Mergeable RX buffer feature to vhost_net

2010-03-30 Thread David Stevens
This patch adds support for the Mergeable Receive Buffers feature to vhost_net. Changes: 1) generalize descriptor allocation functions to allow multiple descriptors per packet 2) add socket peek to know datalen at buffer allocation time 3) change

Re: PCI passthrough resource remapping

2010-03-30 Thread Chris Wright
* Kenni Lund (ke...@kelu.dk) wrote: 2010/3/31 Chris Wright chr...@redhat.com: So I suppose I'll need to get rid of this shared IRQ before I can conclude anything on the patch in git. Hmm, is there some cleaver way of fixing this in Linux, or do I have to fix it by changing BIOS IRQ

Re: KVM warning about uncertified CPU for SMP for AMD model 2, stepping 3

2010-03-30 Thread Andi Kleen
On Wed, Mar 31, 2010 at 01:03:02AM +0200, Jiri Kosina wrote: Hi, booting 32bit guest on 32bit host on AMD system gives me the following warning when KVM is instructed to boot as SMP: I guess these warnings could be just disabled. With nearly everyone using multi-core these days they are

How to debug problems when nothing shows up in kvm_stat on kvm-88?

2010-03-30 Thread Neo Jia
hi, I am running official kvm-88 release with my own 32-bit .so library dlopen'ed by qemu-kvm. So it has 32-bit qemu-kvm on 64-bit kvm kernel module. Everything works great but after a while the guest (winxp 32-bit) hard hangs and kvm_stat shows 0. So, is there any way to trace back when the

[KVM-AUTOTEST PATCH] KVM test: kvm_vm: destroy VM if hugepage setup fails

2010-03-30 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 921414d..047505a 100755 --- a/client/tests/kvm/kvm_vm.py +++

Re: [RFC PATCH 0/7] Beginning implementing the AMD IOMMU emulation

2010-03-30 Thread Avi Kivity
On 03/30/2010 10:40 PM, Joerg Roedel wrote: In short, this demonstrates a mechanism of inserting ACPI tables without modifying SeaBIOS or other BIOS implementations. I also have a SeaBIOS equivalent, but I think this approach is better, at least at the moment. I like the approach