Re: [RFC][ PATCH 3/3] vhost-net: Add mergeable RX buffer support to vhost-net

2010-03-08 Thread Michael S. Tsirkin
On Sun, Mar 07, 2010 at 06:06:51PM -0800, David Stevens wrote: Michael S. Tsirkin m...@redhat.com wrote on 03/07/2010 08:26:33 AM: On Tue, Mar 02, 2010 at 05:20:34PM -0700, David Stevens wrote: This patch glues them all together and makes sure we notify whenever we don't have enough

Re: kvm-kmod-2.6.33 (or 2.6.32) messes up pages on guest exit

2010-03-08 Thread Henrik Holst
2010/3/8 Jan Kiszka jan.kis...@siemens.com: Henrik Holst wrote: Hi,  I'm running a few Debian Lenny host machines with kernel 2.6.26, in production we use kvm-kmod-2.6.31.5 without any problems. Today I tested to change to kvm-kmod-2.6.33 and everything went just fine up to the moment when

[RFC] Moving dirty bitmaps to userspace - Double buffering approach

2010-03-08 Thread Takuya Yoshikawa
Hi, I would like to hear your comments about the following plan: Moving dirty bitmaps to userspace - Double buffering approach especially I would be glad if I can hear some advice about how to keep the compatibility. Thanks in advance, Takuya --- Overview: Last time, I submitted a

Re: linux-aio usable?

2010-03-08 Thread Avi Kivity
On 03/08/2010 03:46 AM, Bernhard Schmidt wrote: Hi, sorry for this pretty generic question, I did not find any real pros and cons on the net anywhere, but I might just have missed them. In a pure x86_64 environment (~2.6.32 vanilla kernel, 0.12.3 qemu-kvm), is enabling linux-aio in KVM a good

Re: [PATCH 02/18] KVM: MMU: Make tdp_enabled a mmu-context parameter

2010-03-08 Thread Avi Kivity
On 03/03/2010 09:12 PM, Joerg Roedel wrote: This patch changes the tdp_enabled flag from its global meaning to the mmu-context. This is necessary for Nested SVM with emulation of Nested Paging where we need an extra MMU context to shadow the Nested Nested Page Table. diff --git

Re: [PATCH 11/18] KVM: MMU: Add infrastructure for two-level page walker

2010-03-08 Thread Avi Kivity
On 03/03/2010 09:12 PM, Joerg Roedel wrote: This patch introduces a mmu-callback to translate gpa addresses in the walk_addr code. This is later used to translate l2_gpa addresses into l1_gpa addresses. Signed-off-by: Joerg Roedeljoerg.roe...@amd.com --- arch/x86/include/asm/kvm_host.h |1

Re: [PATCH 18/18] KVM: X86: Add KVM_CAP_SVM_CPUID_FIXED

2010-03-08 Thread Avi Kivity
On 03/03/2010 09:12 PM, Joerg Roedel wrote: This capability shows userspace that is can trust the values of cpuid[0x800A] that it gets from the kernel. Old behavior was to just return the host cpuid values which is broken because all additional svm-features need support in the svm emulation

Re: [PATCH 0/18][RFC] Nested Paging support for Nested SVM (aka NPT-Virtualization)

2010-03-08 Thread Avi Kivity
On 03/03/2010 09:12 PM, Joerg Roedel wrote: Hi, here are the patches that implement nested paging support for nested svm. They are somewhat intrusive to the soft-mmu so I post them as RFC in the first round to get feedback about the general direction of the changes. Nevertheless I am proud to

Re: linux-aio usable?

2010-03-08 Thread Bernhard Schmidt
On Mon, Mar 08, 2010 at 11:10:29AM +0200, Avi Kivity wrote: Are there any potential pitfalls? It won't work well unless running on a block device (partition or LVM). What does work well mean in this context? Potential dataloss? Is there any reason one should not compile that feature by

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-08 Thread Alexander Graf
Am 08.03.2010 um 02:45 schrieb Jamie Lokier ja...@shareable.org: Paul Brook wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This

Re: linux-aio usable?

2010-03-08 Thread Avi Kivity
On 03/08/2010 11:48 AM, Bernhard Schmidt wrote: On Mon, Mar 08, 2010 at 11:10:29AM +0200, Avi Kivity wrote: Are there any potential pitfalls? It won't work well unless running on a block device (partition or LVM). What does work well mean in this context? Potential

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-08 Thread Avi Kivity
On 03/08/2010 12:53 AM, Paul Brook wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository.

Re: [PATCH] Support adding a file to qemu's ram allocation

2010-03-08 Thread Avi Kivity
On 03/06/2010 01:52 AM, Cam Macdonell wrote: This avoids the need of using qemu_ram_alloc and mmap with MAP_FIXED to map a host file into guest RAM. This function mmaps the opened file anywhere and adds the memory to the ram blocks. Usage is qemu_add_file_to_ram(fd, size, MAP_SHARED);

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-08 Thread Jamie Lokier
Alexander Graf wrote: Or we could put in some code that tells the guest the host shm architecture and only accept x86 on x86 for now. If anyone cares for other combinations, they're free to implement them. Seriously, we're looking at an interface designed for kvm here. Let's please

Re: [PATCH] Inter-VM shared memory PCI device

2010-03-08 Thread Avi Kivity
On 03/06/2010 01:52 AM, Cam Macdonell wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository.

Corrupted filesystem, possible after livemigration with iSCSI storagebackend.

2010-03-08 Thread Espen Berg
In our KVM system we have two iSCSI backends (master/slave configuration) with failover and two KVM hosts supporting live migration. The iSCSI volumes are shared by the host as a block device in KVM, and the volumes are available on both frontends. After a reboot one of the KVMs where not

Re: KVM PMU virtualization

2010-03-08 Thread Avi Kivity
On 03/01/2010 07:17 PM, Peter Zijlstra wrote: 2. For every emulated performance counter the guest activates kvm allocates a perf_event and configures it for the guest (we may allow kvm to specify the counter index, the guest would be able to use rdpmc unintercepted then). Event

extended vga modes?

2010-03-08 Thread Michael Tokarev
After updating qemu-kvm Debian package to 0.12 we've a bugreport about missing video modes which were present in previous versions. Big thanks to the original reporter, Bjørn Mork, who found what the issue is. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=572991 for the bugreport in

Re: extended vga modes?

2010-03-08 Thread Avi Kivity
On 03/08/2010 12:20 PM, Michael Tokarev wrote: After updating qemu-kvm Debian package to 0.12 we've a bugreport about missing video modes which were present in previous versions. Big thanks to the original reporter, Bjørn Mork, who found what the issue is. See

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-08 Thread Alexander Graf
Jamie Lokier wrote: Alexander Graf wrote: Or we could put in some code that tells the guest the host shm architecture and only accept x86 on x86 for now. If anyone cares for other combinations, they're free to implement them. Seriously, we're looking at an interface designed for kvm

Re: extended vga modes?

2010-03-08 Thread Michael Tokarev
Avi Kivity wrote: [] In short, when vgabios were dropped from qemu-kvm (for whatever yet unknown reason), What do you mean? qemu-kvm still carries a local vgabios (see kvm/vgabios in qemu-kvm.git). Oh my. So we all overlooked it. I asked you several times about the bios sources, in 0.12

Re: extended vga modes?

2010-03-08 Thread Avi Kivity
On 03/08/2010 01:07 PM, Michael Tokarev wrote: Avi Kivity wrote: [] In short, when vgabios were dropped from qemu-kvm (for whatever yet unknown reason), What do you mean? qemu-kvm still carries a local vgabios (see kvm/vgabios in qemu-kvm.git). Oh my. So we all overlooked

request: please merge docs for -netdev in stable

2010-03-08 Thread xming
hi, with version 0.12.x there is a new -netdev option, but the docs cannot be found anywhere. It seems that this commit http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commit;h=96560cb34c3183a4fb1769e4eff4d860a24579a8 is only applied to the unstable but not stable, is it possible to merge this

Re: request: please merge docs for -netdev in stable

2010-03-08 Thread Avi Kivity
Copying qemu-devel On 03/08/2010 01:11 PM, xming wrote: hi, with version 0.12.x there is a new -netdev option, but the docs cannot be found anywhere. It seems that this commit http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commit;h=96560cb34c3183a4fb1769e4eff4d860a24579a8 is only applied to

Re: [PATCH v1 3/3] Let host NIC driver to DMA to guest user space.

2010-03-08 Thread Michael S. Tsirkin
On Sat, Mar 06, 2010 at 05:38:38PM +0800, xiaohui@intel.com wrote: From: Xin Xiaohui xiaohui@intel.com The patch let host NIC driver to receive user space skb, then the driver has chance to directly DMA to guest user space buffers thru single ethX interface. Signed-off-by: Xin

Re: [PATCH v1 1/3] A device for zero-copy based on KVM virtio-net.

2010-03-08 Thread Michael S. Tsirkin
On Sat, Mar 06, 2010 at 05:38:36PM +0800, xiaohui@intel.com wrote: From: Xin Xiaohui xiaohui@intel.com Add a device to utilize the vhost-net backend driver for copy-less data transfer between guest FE and host NIC. It pins the guest user space to the host memory and provides

Re: [RFC] Moving dirty bitmaps to userspace - Double buffering approach

2010-03-08 Thread Avi Kivity
On 03/08/2010 10:22 AM, Takuya Yoshikawa wrote: Hi, I would like to hear your comments about the following plan: Moving dirty bitmaps to userspace - Double buffering approach especially I would be glad if I can hear some advice about how to keep the compatibility. Thanks in advance,

Re: linux-aio usable?

2010-03-08 Thread Christoph Hellwig
On Mon, Mar 08, 2010 at 11:10:29AM +0200, Avi Kivity wrote: Are there any potential pitfalls? It won't work well unless running on a block device (partition or LVM). It will actually work well on pre-allocated filesystem images, at least on XFS and NFS. The real pitfal is that cache=none

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-08 Thread Paul Brook
On 03/08/2010 12:53 AM, Paul Brook wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository.

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-08 Thread Paul Brook
However, coherence could be made host-type-independent by the host mapping and unampping pages, so that each page is only mapped into one guest (or guest CPU) at a time. Just like some clustering filesystems do to maintain coherence. You're assuming that a TLB flush implies a write barrier,

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-08 Thread Avi Kivity
On 03/08/2010 03:03 PM, Paul Brook wrote: On 03/08/2010 12:53 AM, Paul Brook wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This

Re: KVM Guest mmap.c bug

2010-03-08 Thread Avi Kivity
On 03/02/2010 10:25 PM, BRUNO CESAR RIBAS wrote: Hi, I run a bunch of virtual servers using KVM. And I a mmap.c bug on the guest machine. The virtual machines are desktop servers for Thin Clients. My host is running a 2.6.33 kernel and have 32GB of rami, opteron with amd-v. The guest is

Re: [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work

2010-03-08 Thread Avi Kivity
On 03/05/2010 06:50 PM, Alexander Graf wrote: We have wrappers to do for example gpr read/write accesses with, because the contents of registers could be either in the PACA or in the VCPU struct. There's nothing that says we have to have the guest vcpu loaded when using these wrappers though,

Re: [PATCH 03/15] KVM: PPC: Allow userspace to unset the IRQ line

2010-03-08 Thread Avi Kivity
On 03/05/2010 06:50 PM, Alexander Graf wrote: Userspace can tell us that it wants to trigger an interrupt. But so far it can't tell us that it wants to stop triggering one. So let's interpret the parameter to the ioctl that we have anyways to tell us if we want to raise or lower the interrupt

Re: [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work

2010-03-08 Thread Alexander Graf
Avi Kivity wrote: On 03/05/2010 06:50 PM, Alexander Graf wrote: We have wrappers to do for example gpr read/write accesses with, because the contents of registers could be either in the PACA or in the VCPU struct. There's nothing that says we have to have the guest vcpu loaded when using

Re: [PATCH 03/15] KVM: PPC: Allow userspace to unset the IRQ line

2010-03-08 Thread Alexander Graf
Avi Kivity wrote: On 03/05/2010 06:50 PM, Alexander Graf wrote: Userspace can tell us that it wants to trigger an interrupt. But so far it can't tell us that it wants to stop triggering one. So let's interpret the parameter to the ioctl that we have anyways to tell us if we want to raise or

Re: [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work

2010-03-08 Thread Avi Kivity
On 03/08/2010 03:44 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/05/2010 06:50 PM, Alexander Graf wrote: We have wrappers to do for example gpr read/write accesses with, because the contents of registers could be either in the PACA or in the VCPU struct. There's nothing that

Re: [PATCH 14/15] KVM: Add support for enabling capabilities per-vcpu

2010-03-08 Thread Alexander Graf
Avi Kivity wrote: On 03/05/2010 06:50 PM, Alexander Graf wrote: } diff --git a/include/linux/kvm.h b/include/linux/kvm.h index ce28767..c7ed3cb 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -400,6 +400,12 @@ struct kvm_ioeventfd { __u8 pad[36]; }; +/* for

Re: [PATCH 03/15] KVM: PPC: Allow userspace to unset the IRQ line

2010-03-08 Thread Avi Kivity
On 03/08/2010 03:48 PM, Alexander Graf wrote: How does userspace know they exist? #ifdef KVM_INTERRUPT_SET? MOL is the only user of this so far. And that won't work without the hypervisor call anyways. We generally compile on one machine, and run on another. Can you use

Re: [PATCH 14/15] KVM: Add support for enabling capabilities per-vcpu

2010-03-08 Thread Avi Kivity
On 03/08/2010 03:51 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/05/2010 06:50 PM, Alexander Graf wrote: } diff --git a/include/linux/kvm.h b/include/linux/kvm.h index ce28767..c7ed3cb 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@ -400,6 +400,12 @@ struct

Re: [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work

2010-03-08 Thread Alexander Graf
Avi Kivity wrote: On 03/08/2010 03:44 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/05/2010 06:50 PM, Alexander Graf wrote: We have wrappers to do for example gpr read/write accesses with, because the contents of registers could be either in the PACA or in the VCPU struct.

Re: [PATCH 03/15] KVM: PPC: Allow userspace to unset the IRQ line

2010-03-08 Thread Alexander Graf
Avi Kivity wrote: On 03/08/2010 03:48 PM, Alexander Graf wrote: How does userspace know they exist? #ifdef KVM_INTERRUPT_SET? MOL is the only user of this so far. And that won't work without the hypervisor call anyways. We generally compile on one machine, and run on another.

Re: [PATCH 14/15] KVM: Add support for enabling capabilities per-vcpu

2010-03-08 Thread Alexander Graf
Avi Kivity wrote: On 03/08/2010 03:51 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/05/2010 06:50 PM, Alexander Graf wrote: } diff --git a/include/linux/kvm.h b/include/linux/kvm.h index ce28767..c7ed3cb 100644 --- a/include/linux/kvm.h +++ b/include/linux/kvm.h @@

Re: [PATCH 03/15] KVM: PPC: Allow userspace to unset the IRQ line

2010-03-08 Thread Avi Kivity
On 03/08/2010 03:55 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/08/2010 03:48 PM, Alexander Graf wrote: How does userspace know they exist? #ifdef KVM_INTERRUPT_SET? MOL is the only user of this so far. And that won't work without the hypervisor call

Re: [PATCH 03/15] KVM: PPC: Allow userspace to unset the IRQ line

2010-03-08 Thread Alexander Graf
Avi Kivity wrote: On 03/08/2010 03:55 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/08/2010 03:48 PM, Alexander Graf wrote: How does userspace know they exist? #ifdef KVM_INTERRUPT_SET? MOL is the only user of this so far. And that won't work without the

Re: [PATCH 14/15] KVM: Add support for enabling capabilities per-vcpu

2010-03-08 Thread Avi Kivity
On 03/08/2010 03:56 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/08/2010 03:51 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/05/2010 06:50 PM, Alexander Graf wrote: } diff --git a/include/linux/kvm.h b/include/linux/kvm.h index ce28767..c7ed3cb

Re: [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work

2010-03-08 Thread Avi Kivity
On 03/08/2010 03:53 PM, Alexander Graf wrote: So do it the other way around. Always load the registers (of course, do nothing if already loaded) and then access them in just one way. I assume during emulation the registers will always be loaded? During emulation we're always in

Re: [PATCH 03/15] KVM: PPC: Allow userspace to unset the IRQ line

2010-03-08 Thread Avi Kivity
On 03/08/2010 04:01 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/08/2010 03:55 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/08/2010 03:48 PM, Alexander Graf wrote: How does userspace know they exist? #ifdef

Re: [PATCH 13/20] KVM: x86 emulator: fix memory access during x86 emulation

2010-03-08 Thread Stefan Bader
Avi Kivity wrote: On 03/06/2010 03:53 PM, Stefan Bader wrote: i Avi, we currently try to integrate this patch for an update into a 2.6.32 based system (amongst other kvm updates). But as soon as this patch gets added kvm will die on startup in kvm_leave_lazy_mmu. This has been documented

Re: [PATCH 14/15] KVM: Add support for enabling capabilities per-vcpu

2010-03-08 Thread Alexander Graf
Avi Kivity wrote: On 03/08/2010 03:56 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/08/2010 03:51 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/05/2010 06:50 PM, Alexander Graf wrote: } diff --git a/include/linux/kvm.h b/include/linux/kvm.h

Re: [PATCH 13/20] KVM: x86 emulator: fix memory access during x86 emulation

2010-03-08 Thread Avi Kivity
On 03/08/2010 04:10 PM, Stefan Bader wrote: Avi Kivity wrote: On 03/06/2010 03:53 PM, Stefan Bader wrote: i Avi, we currently try to integrate this patch for an update into a 2.6.32 based system (amongst other kvm updates). But as soon as this patch gets added kvm will die on

Re: [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work

2010-03-08 Thread Alexander Graf
Avi Kivity wrote: On 03/08/2010 03:53 PM, Alexander Graf wrote: So do it the other way around. Always load the registers (of course, do nothing if already loaded) and then access them in just one way. I assume during emulation the registers will always be loaded? During emulation

Re: [PATCH 14/15] KVM: Add support for enabling capabilities per-vcpu

2010-03-08 Thread Avi Kivity
On 03/08/2010 04:10 PM, Alexander Graf wrote: When we have reserved fields which are later used for something new, the kernel needs a way to know if the reserved fields are known or not by userspace. One way to do this is to assume a value of zero means the field is unknown to usespace so

Re: [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work

2010-03-08 Thread Avi Kivity
On 03/08/2010 04:14 PM, Alexander Graf wrote: We're looking at two different ifs here. 1) GPR Inside the PACA or not (volatile vs non-volatile) This is constant. Volatile registers go to the PACA; non-volatiles go to the vcpu struct. Okay - so no if (). 2) GPR actually loaded in the

Re: [PATCH 13/20] KVM: x86 emulator: fix memory access during x86 emulation

2010-03-08 Thread Stefan Bader
Avi Kivity wrote: On 03/08/2010 04:10 PM, Stefan Bader wrote: Avi Kivity wrote: On 03/06/2010 03:53 PM, Stefan Bader wrote: i Avi, we currently try to integrate this patch for an update into a 2.6.32 based system (amongst other kvm updates). But as soon as this patch gets added

Re: [PATCH 14/15] KVM: Add support for enabling capabilities per-vcpu

2010-03-08 Thread Alexander Graf
Avi Kivity wrote: On 03/08/2010 04:10 PM, Alexander Graf wrote: When we have reserved fields which are later used for something new, the kernel needs a way to know if the reserved fields are known or not by userspace. One way to do this is to assume a value of zero means the field is

Re: [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work

2010-03-08 Thread Alexander Graf
Avi Kivity wrote: On 03/08/2010 04:14 PM, Alexander Graf wrote: We're looking at two different ifs here. 1) GPR Inside the PACA or not (volatile vs non-volatile) This is constant. Volatile registers go to the PACA; non-volatiles go to the vcpu struct. Okay - so no if (). Eh. r[0 -

Re: [PATCH 14/15] KVM: Add support for enabling capabilities per-vcpu

2010-03-08 Thread Avi Kivity
On 03/08/2010 04:18 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/08/2010 04:10 PM, Alexander Graf wrote: When we have reserved fields which are later used for something new, the kernel needs a way to know if the reserved fields are known or not by userspace. One way to

Re: [PATCH 01/15] KVM: PPC: Make register read/write wrappers always work

2010-03-08 Thread Avi Kivity
On 03/08/2010 04:20 PM, Alexander Graf wrote: Avi Kivity wrote: On 03/08/2010 04:14 PM, Alexander Graf wrote: We're looking at two different ifs here. 1) GPR Inside the PACA or not (volatile vs non-volatile) This is constant. Volatile registers go to the PACA; non-volatiles go to

Re: linux-aio usable?

2010-03-08 Thread Dustin Kirkland
On Mon, Mar 8, 2010 at 3:48 AM, Avi Kivity a...@redhat.com wrote: On 03/08/2010 11:48 AM, Bernhard Schmidt wrote: On Mon, Mar 08, 2010 at 11:10:29AM +0200, Avi Kivity wrote: Are there any potential pitfalls? It won't work well unless running on a block device (partition or LVM). What does

Re: linux-aio usable?

2010-03-08 Thread Avi Kivity
On 03/08/2010 04:25 PM, Dustin Kirkland wrote: On Mon, Mar 8, 2010 at 3:48 AM, Avi Kivitya...@redhat.com wrote: On 03/08/2010 11:48 AM, Bernhard Schmidt wrote: On Mon, Mar 08, 2010 at 11:10:29AM +0200, Avi Kivity wrote: Are there any potential pitfalls? It

Re: KVM Guest mmap.c bug

2010-03-08 Thread Andrea Arcangeli
On Mon, Mar 08, 2010 at 03:32:19PM +0200, Avi Kivity wrote: It looks unrelated to kvm, though of course random memory corruption cannot be ruled out. Is npt enabled on the host (cat /sys/module/kvm_amd/parameters/npt)? Andrea, any idea? Basically find_vma(vma-vm_mm, vma-vm_start) doesn't

Re: linux-aio usable?

2010-03-08 Thread Anthony Liguori
On 03/08/2010 08:26 AM, Avi Kivity wrote: On 03/08/2010 04:25 PM, Dustin Kirkland wrote: On Mon, Mar 8, 2010 at 3:48 AM, Avi Kivitya...@redhat.com wrote: On 03/08/2010 11:48 AM, Bernhard Schmidt wrote: On Mon, Mar 08, 2010 at 11:10:29AM +0200, Avi Kivity wrote: Are there any potential

Re: linux-aio usable?

2010-03-08 Thread Avi Kivity
On 03/08/2010 06:28 PM, Anthony Liguori wrote: I thought there was some autodetection involved, but perhaps I just imagined it. There's no autodetection. linux-aio support in the kernel downgrades to synchronous IO if the underlying storage does not support linux-aio. There is no

Re: raw disks no longer work in latest kvm (kvm-88 was fine)

2010-03-08 Thread Anthony Liguori
On 03/07/2010 10:21 AM, Avi Kivity wrote: On 03/07/2010 12:00 PM, Christoph Hellwig wrote: I can only guess that the info collected so far is not sufficient to understand what's going on: except of I/O error writing block NNN we does not have anything at all. So it's impossible to know where

[PATCH] KVM test: Exposing boot and reboot timeouts in config files

2010-03-08 Thread Lucas Meneghel Rodrigues
Some guests may take longer to boot/reboot in some hosts, so let's expose the boot and reboot timeouts in the tests config file. Also, print the timeouts on the debug messages. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/kvm_test_utils.py | 13 +++--

Re: [Autotest] [PATCH] KVM test: Exposing boot and reboot timeouts in config files

2010-03-08 Thread sudhir kumar
On Mon, Mar 8, 2010 at 10:58 PM, Lucas Meneghel Rodrigues l...@redhat.com wrote: Some guests may take longer to boot/reboot in some hosts, so let's expose the boot and reboot timeouts in the tests config file. Also, print the timeouts on the debug Fine. It seems we missed it during the major

Re: [PATCH] Inter-VM shared memory PCI device

2010-03-08 Thread Cam Macdonell
On Mon, Mar 8, 2010 at 2:56 AM, Avi Kivity a...@redhat.com wrote: On 03/06/2010 01:52 AM, Cam Macdonell wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest.  This patch also supports interrupts between guest by communicating over a

[PATCH 03/15] KVM: PPC: Make DSISR 32 bits wide

2010-03-08 Thread Alexander Graf
DSISR is only defined as 32 bits wide. So let's reflect that in the structs too. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/include/asm/kvm_book3s.h |2 +- arch/powerpc/include/asm/kvm_host.h |2 +- arch/powerpc/kvm/book3s_64_interrupts.S |2 +- 3 files

[PATCH 05/15] KVM: PPC: Split instruction reading out

2010-03-08 Thread Alexander Graf
The current check_ext function reads the instruction and then does the checking. Let's split the reading out so we can reuse it for different functions. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c | 24 1 files changed, 16 insertions(+), 8

[PATCH 00/15] KVM: PPC: MOL bringup patches

2010-03-08 Thread Alexander Graf
Mac-on-Linux has always lacked PPC64 host support. This is going to change now! This patchset contains minor patches to enable MOL, but is mostly about bug fixes that came out of running Mac OS X. With this set and a pretty small patch to MOL I have 10.4.11 running as a guest on a 970MP host.

[PATCH 01/15] KVM: PPC: Ensure split mode works

2010-03-08 Thread Alexander Graf
On PowerPC we can go into MMU Split Mode. That means that either data relocation is on but instruction relocation is off or vice versa. That mode didn't work properly, as we weren't always flushing entries when going into a new split mode, potentially mapping different code or data that we're

[PATCH 08/15] KVM: PPC: Implement mfsr emulation

2010-03-08 Thread Alexander Graf
We emulate the mfsrin instruction already, that passes the SR number in a register value. But we lacked support for mfsr that encoded the SR number in the opcode. So let's implement it. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_emulate.c | 13 + 1

[PATCH 07/15] KVM: PPC: Load VCPU for register fetching

2010-03-08 Thread Alexander Graf
When trying to read or store vcpu register data, we should also make sure the vcpu is actually loaded, so we're 100% sure we get the correct values. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff

[PATCH 10/15] KVM: PPC: Make XER load 32 bit

2010-03-08 Thread Alexander Graf
We have a 32 bit value in the PACA to store XER in. We also do an stw when storing XER in there. But then we load it with ld, completely screwing it up on every entry. Welcome to the Big Endian world. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/book3s_64_slb.S |2 +- 1

[PATCH 06/15] KVM: PPC: Don't reload FPU with invalid values

2010-03-08 Thread Alexander Graf
When the guest activates the FPU, we load it up. That's fine when it wasn't activated before on the host, but if it was we end up reloading FPU values from last time the FPU was deactivated on the host without writing the proper values back to the vcpu struct. This patch checks if the FPU is

[PATCH 04/15] KVM: PPC: Book3S_32 guest MMU fixes

2010-03-08 Thread Alexander Graf
This patch makes the VSID of mapped pages always reflecting all special cases we have, like split mode. It also changes the tlbie mask to 0x0000 according to the spec. The mask we used before was incorrect. Signed-off-by: Alexander Graf ag...@suse.de ---

[PATCH 11/15] KVM: PPC: Implement emulation for lbzux and lhax

2010-03-08 Thread Alexander Graf
We get MMIOs with the weirdest instructions. But every time we do, we need to improve our emulator to implement them. So let's do that - this time it's lbzux and lhax's round. Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/emulate.c | 20 1 files

[PATCH 02/15] KVM: PPC: Allow userspace to unset the IRQ line

2010-03-08 Thread Alexander Graf
Userspace can tell us that it wants to trigger an interrupt. But so far it can't tell us that it wants to stop triggering one. So let's interpret the parameter to the ioctl that we have anyways to tell us if we want to raise or lower the interrupt line. Signed-off-by: Alexander Graf

[PATCH 09/15] KVM: PPC: Implement BAT reads

2010-03-08 Thread Alexander Graf
BATs can't only be written to, you can also read them out! So let's implement emulation for reading BAT values again. While at it, I also made BAT setting flush the segment cache, so we're absolutely sure there's no MMU state left when writing BATs. Signed-off-by: Alexander Graf ag...@suse.de

[PATCH 15/15] KVM: PPC: Make build work without CONFIG_VSX/ALTIVEC

2010-03-08 Thread Alexander Graf
The FPU/Altivec/VSX enablement also brought access to some structure elements that are only defined when the respective config options are enabled. Unfortuately I forgot to check for the config options at some places, so let's do that now. Unbreaks the build when CONFIG_VSX is not set.

[PATCH 13/15] KVM: Add support for enabling capabilities per-vcpu

2010-03-08 Thread Alexander Graf
Some times we don't want all capabilities to be available to all our vcpus. One example for that is the OSI interface, implemented in the next patch. In order to have a generic mechanism in how to enable capabilities individually, this patch introduces a new ioctl that can be used for this

[PATCH 14/15] KVM: PPC: Add OSI hypercall interface

2010-03-08 Thread Alexander Graf
MOL uses its own hypercall interface to call back into userspace when the guest wants to do something. So let's implement that as an exit reason, specify it with a CAP and only really use it when userspace wants us to. The only user of it so far is MOL. Signed-off-by: Alexander Graf

[PATCH 12/15] KVM: PPC: Implement alignment interrupt

2010-03-08 Thread Alexander Graf
Mac OS X has some applications - namely the Finder - that require alignment interrupts to work properly. So we need to implement them. But the spec for 970 and 750 also looks different. While 750 requires the DSISR fields to reflect some instruction bits, the 970 declares this as an optional

Re: [PATCH 00/15] KVM: PPC: MOL bringup patches

2010-03-08 Thread Alexander Graf
Alexander Graf wrote: Mac-on-Linux has always lacked PPC64 host support. This is going to change now! This patchset contains minor patches to enable MOL, but is mostly about bug fixes that came out of running Mac OS X. With this set and a pretty small patch to MOL I have 10.4.11 running as a

Re: [Qemu-devel] [PATCH] Fix SIGFPE for vnc display of width/height = 1

2010-03-08 Thread Chris Webb
Chris Webb ch...@arachsys.com writes: During boot, the screen gets resized to height 1 and a mouse click at this point will cause a division by zero when calculating the absolute pointer position from the pixel (x, y). Return a click in the middle of the screen instead in this case. I think

Re: KVM PMU virtualization

2010-03-08 Thread Avi Kivity
On 02/26/2010 04:42 PM, Peter Zijlstra wrote: Also, intel debugstore things requires a host linear address, It requires a linear address, not a host linear address. Of course, it might not like the linear address mappings changing under its feet. If it has a private tlb, then this won't

Re: linux-aio usable?

2010-03-08 Thread Michael Tokarev
Avi Kivity wrote: On 03/08/2010 03:46 AM, Bernhard Schmidt wrote: Hi, sorry for this pretty generic question, I did not find any real pros and cons on the net anywhere, but I might just have missed them. In a pure x86_64 environment (~2.6.32 vanilla kernel, 0.12.3 qemu-kvm), is enabling

Re: linux-aio usable?

2010-03-08 Thread Michael Tokarev
Michael Tokarev wrote: [] Apparently that does not quite work. I just re-compiled kvm with --enable-linux-aio (actually I just installed libaio-dev on debian and qemu-kvm's configure picked it up automatically), and tried a guest. But any I/O fails. It has nothing to do with kvm. It is

Re: [PATCH 13/20] KVM: x86 emulator: fix memory access during x86 emulation

2010-03-08 Thread Stefan Bader
Avi Kivity wrote: On 03/08/2010 04:10 PM, Stefan Bader wrote: Avi Kivity wrote: On 03/06/2010 03:53 PM, Stefan Bader wrote: i Avi, we currently try to integrate this patch for an update into a 2.6.32 based system (amongst other kvm updates). But as soon as this patch gets added

Re: [PATCH 00/10] uq/master: irqchip-in-kernel support

2010-03-08 Thread Marcelo Tosatti
On Thu, Mar 04, 2010 at 05:33:16PM +0100, Jan Kiszka wrote: Glauber Costa wrote: Hi guys, This is the same in-kernel irqchip support already posted to qemu-devel, just rebased, retested, etc. It passes my basic tests, so it seem to be still in good shape. It is provided against

Re: [PATCH 2/4] KVM: Rework VCPU state writeback API

2010-03-08 Thread Marcelo Tosatti
On Fri, Mar 05, 2010 at 09:37:26PM -0500, Kevin O'Connor wrote: On Thu, Mar 04, 2010 at 03:35:52PM -0300, Marcelo Tosatti wrote: On Thu, Mar 04, 2010 at 12:58:58AM -0500, Kevin O'Connor wrote: On Thu, Mar 04, 2010 at 01:21:12AM -0300, Marcelo Tosatti wrote: The regression seems to be

Re: linux-aio usable?

2010-03-08 Thread Nikola Ciprich
It's faster. Hi Avi, Could You give some rough estimate on how much faster? I'm stuck with glibc-2.5 now, but I'm always eager to improve performance, so I wonder if it would make sense to either port eventfd + aio stuff, or switch to glibc-2.8 for me... --

Re: linux-aio usable?

2010-03-08 Thread Brian Jackson
On Monday 08 March 2010 03:27:36 pm Nikola Ciprich wrote: It's faster. Hi Avi, Could You give some rough estimate on how much faster? I'm stuck with glibc-2.5 now, but I'm always eager to improve performance, so I wonder if it would make sense to either port eventfd + aio stuff, or switch

[patch 5/7] kvm-tpr-opt: remove dead code

2010-03-08 Thread Marcelo Tosatti
Simplify code around kvm_enable_tpr_access_reporting. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu-kvm-tpr/qemu-kvm-x86.c === --- qemu-kvm-tpr.orig/qemu-kvm-x86.c +++ qemu-kvm-tpr/qemu-kvm-x86.c @@ -597,30 +597,16

[patch 4/7] kvm-tpr-opt: clean up usage of bios_enabled

2010-03-08 Thread Marcelo Tosatti
1. bios_enabled must already be set when enable_vapic is called. 2. kvm_tpr_vcpu_start is called during vcpu creation, when bios_enabled is always zero. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu-kvm-tpr/kvm-tpr-opt.c

[patch 0/7] kvm-tpr-opt cleanups

2010-03-08 Thread Marcelo Tosatti
Prepare kvm-tpr-opt.c for upstream merge. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[patch 2/7] kvm-tpr-opt: use device_init

2010-03-08 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu-kvm-tpr/kvm-tpr-opt.c === --- qemu-kvm-tpr.orig/kvm-tpr-opt.c +++ qemu-kvm-tpr/kvm-tpr-opt.c @@ -401,10 +401,12 @@ static void vtpr_ioport_write(void *opaq

[patch 3/7] kvm-tpr-opt: qemu-kvm.h - kvm.h

2010-03-08 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu-kvm-tpr/kvm-tpr-opt.c === --- qemu-kvm-tpr.orig/kvm-tpr-opt.c +++ qemu-kvm-tpr/kvm-tpr-opt.c @@ -14,7 +14,7 @@ #include hw/hw.h #include hw/isa.h #include sysemu.h

[patch 1/7] qemu-kvm: move vapic enablement to kvm_arch_load_regs

2010-03-08 Thread Marcelo Tosatti
update_vapic is used for enabling vcpu's vapic on migration. Use the new writeback states for that. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu-kvm-tpr/qemu-kvm-x86.c === --- qemu-kvm-tpr.orig/qemu-kvm-x86.c +++

  1   2   >