[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 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 @@ -226,17 +226,11

[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 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 @@ -19,13 +19,13 @@ #include stdio.h -static uint64_t map_addr(struct

[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 3/3] kvm: allow qemu to set EPT identity mapping address

2010-03-08 Thread Marcelo Tosatti
From: Sheng Yang sh...@linux.intel.com 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 mtosa...@redhat.com Index: qemu-kvm/target-i386/kvm.c

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

2010-03-08 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com 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,

[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 mtosa...@redhat.com Index: qemu-kvm/kvm-all.c === --- qemu-kvm.orig/kvm-all.c +++ qemu-kvm/kvm-all.c @@ -721,6 +721,28 @@ static int

[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 yoshikawa.tak...@oss.ntt.co.jp --- arch/x86/kvm/svm.c | 25 +++-- 1 files changed, 15 insertions(+), 10

[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 yj...@cn.fujitsu.com --- 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

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

[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 yj...@cn.fujitsu.com --- arch/s390/kvm/kvm-s390.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git

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 as

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

[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 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 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 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: KVM on 440GP

2010-03-08 Thread Hollis Blanchard
On Fri, Jan 22, 2010 at 12:04 PM, Corey Minyard miny...@acm.org wrote: Here's how far I can get now: r...@xilinx-ml507:~# ./qemu-system-ppcemb --enable-kvm -nographic -m 64 -M bambo o -kernel uImage.bamboo -L . -append -serial tcp::,server QEMU waiting for connection on:

<    1   2