RE: [PATCH v1 0/3] Provide a zero-copy method on KVM virtio-net.

2010-03-08 Thread Xin, Xiaohui
>On Sat, Mar 06, 2010 at 05:38:35PM +0800, xiaohui@intel.com wrote: >> The idea is simple, just to pin the guest VM user space and then > >let host NIC driver has the chance to directly DMA to it. > >The patches are based on vhost-net backend driver. We add a device > >which provides proto_ops

[PATCH] KVM: s390: Fix possible memory leak of in kvm_arch_vcpu_create()

2010-03-08 Thread Wei Yongjun
This patch fixed possible memory leak in kvm_arch_vcpu_create() under s390, which would happen when kvm_arch_vcpu_create() fails. Signed-off-by: Wei Yongjun --- arch/s390/kvm/kvm-s390.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s3

KVM call agenda for Mar 9

2010-03-08 Thread Chris Wright
- virtio-9p passthrough filesystem support - modular command line helpers Please send in any additional agenda items you are interested in covering. thanks, -chris -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordo

[PATCH] KVM: PPC: Do not create debugfs if fail to create vcpu

2010-03-08 Thread Wei Yongjun
If fail to create the vcpu, we should not create the debugfs for it. Signed-off-by: Wei Yongjun --- arch/powerpc/kvm/powerpc.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 5a8eb95..a0e3172 100644 --- a/ar

[PATCH bugfix] KVM: SVM: Fix memory leaks that happen when svm_create_vcpu() fails

2010-03-08 Thread Takuya Yoshikawa
svm_create_vcpu() does not free the pages allocated during the creation when it fails to complete the allocations. This patch fixes it. Signed-off-by: Takuya Yoshikawa --- arch/x86/kvm/svm.c | 25 +++-- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git a/arch/x

[patch 2/3] kvm: handle internal error

2010-03-08 Thread Marcelo Tosatti
Port qemu-kvm's KVM_EXIT_INTERNAL_ERROR handling to upstream. Signed-off-by: Marcelo Tosatti Index: qemu-kvm/kvm-all.c === --- qemu-kvm.orig/kvm-all.c +++ qemu-kvm/kvm-all.c @@ -721,6 +721,28 @@ static int kvm_handle_io(uint16_t por

[patch 1/3] target-i386: print EFER in cpu_dump_state

2010-03-08 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti Index: qemu-kvm-uq/target-i386/helper.c === --- qemu-kvm-uq.orig/target-i386/helper.c +++ qemu-kvm-uq/target-i386/helper.c @@ -1176,6 +1176,7 @@ void cpu_dump_state(CPUState *env, FILE cpu_x86_dum

[patch 3/3] kvm: allow qemu to set EPT identity mapping address

2010-03-08 Thread Marcelo Tosatti
From: Sheng Yang If we use larger BIOS image than current 256KB, we would need move reserved TSS and EPT identity mapping pages. Currently TSS support this, but not EPT. Signed-off-by: Marcelo Tosatti Index: qemu-kvm/target-i386/kvm.c ===

[patch 0/3] misc uq/master updates

2010-03-08 Thread Marcelo Tosatti
See individual patches for details. -- 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 6/7] kvm-tpr-opt: replace kvm_get_{s,r}egs usage with cpu_synchronize_state

2010-03-08 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti Index: qemu-kvm-tpr/kvm-tpr-opt.c === --- qemu-kvm-tpr.orig/kvm-tpr-opt.c +++ qemu-kvm-tpr/kvm-tpr-opt.c @@ -19,13 +19,13 @@ #include -static uint64_t map_addr(struct kvm_sregs *sregs, target_ulon

[patch 7/7] kvm-tpr-opt: rename env->update_vapic

2010-03-08 Thread Marcelo Tosatti
And remove the confusingly named enable_vapic function. Signed-off-by: Marcelo Tosatti Index: qemu-kvm-tpr/kvm-tpr-opt.c === --- qemu-kvm-tpr.orig/kvm-tpr-opt.c +++ qemu-kvm-tpr/kvm-tpr-opt.c @@ -226,17 +226,11 @@ int kvm_tpr_enable

[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 Index: qemu-kvm-tpr/qemu-kvm-x86.c === --- qemu-kvm-tpr.orig/qemu-kvm-x86.c +++ qemu-kvm-tpr/qemu-kv

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

2010-03-08 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti 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" -#include "qemu-k

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

2010-03-08 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti 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 kvm_tpr_enable_vapic(env); }

[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 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 Index: qemu-kvm-tpr/kvm-tpr-opt.c === --- qemu-k

[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 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 @@ int kvm_get_shado

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 >

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: [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

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 provi

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 s

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: 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), >>

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 wo

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

2010-03-08 Thread Chris Webb
Chris Webb 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 this probably o

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

[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 featu

[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 --- v1 ->

[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 purpose

[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. Signed-of

[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 --- arch/powerp

[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 --- arch/po

[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 --- arch/powerpc/kvm/emulate.c | 20 1 files changed, 20 insertion

[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 --- arch/powerpc/include/asm/kvm_book3s.h |1 + ar

[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 enabl

[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 --- arch/powerpc/kvm/book3s_64_slb.S |2 +- 1 files changed,

[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 --- arch/powerpc/kvm/book3s.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/po

[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 --- arch/powerpc/kvm/book3s_64_emulate.c | 13 + 1 files changed,

[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 supp

[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. I'l

[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 --- arch/powerpc/kvm/book3s.c | 24 1 files changed, 16 insertions(+), 8 deletions(-)

[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 --- 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 changed, 3 insertion

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 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 unix domai

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 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 development cyc

[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 --- client/tests/kvm/kvm_test_utils.py | 13 +++-- client/tests/k

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 wher

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 indication

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 Kivity 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 wo

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)

[PATCH] Fix SIGFPE for vnc display of width/height = 1

2010-03-08 Thread Chris Webb
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. Signed-off-by: Chris Webb --- vnc.c |6 --

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 Kivity 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 unle

Re: linux-aio usable?

2010-03-08 Thread Dustin Kirkland
On Mon, Mar 8, 2010 at 3:48 AM, Avi Kivity 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 do

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 th

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 d

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

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 f

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 s

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 PA

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 igno

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? >>> >> Dur

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 startup

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

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 bee

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 KVM_INTERRUPT_S

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 VCPU_RU

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 1

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

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 anyway

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 ++

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

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

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 k

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 KVM_IRQ_

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]; >>

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 say

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

2010-03-08 Thread Avi Kivity
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 KVM_ENABLE_CAP */ +stru

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

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 >> w

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 li

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, so

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 runn

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 pa

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 barrie

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

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

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, Ta

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 > > 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 proto_ops as sendmsg/re

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 > > 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 Xiaohui > Signed-

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 t

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 to

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 i

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

Re: how to tweak kernel to get the best out of kvm?

2010-03-08 Thread Avi Kivity
On 03/05/2010 05:20 PM, Harald Dunkel wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi folks, Problem: My kvm server (8 cores, 64 GByte RAM, amd64) can eat up all block device or file system performance, so that the kvm clients become almost unresponsive. This is _very_ bad. I would like

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 design

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 http://bugs.debian.org/cgi-bin/bug

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 questi

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 fil

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 abl

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. This

  1   2   >