[COMMIT master] pci passthrough: zap option rom scanning.

2010-02-07 Thread Avi Kivity
From: Gerd Hoffmann kra...@redhat.com Nowdays (qemu 0.12) seabios loads option roms from pci rom bars. So there is no need any more to scan for option roms and have qemu load them. Zap the code. Signed-off-by: Gerd Hoffmann kra...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com

[COMMIT master] kvm: qemu: Remove reminder for checking dmesg after emulation failure

2010-02-07 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com User can use QEmu to get more information. E.g. using the QEmu built-in disassembly to get the failure instruction like(in the monitor): x /20i $eip to dump the code at $eip, or using x /20i $eip-20 to look around. Signed-off-by: Sheng Yang

[COMMIT master] qemu-kvm: Detect availability of kvm_para.h

2010-02-07 Thread Avi Kivity
From: Jan Kiszka jan.kis...@web.de Will be required for upstream's KVM cpuid, so qemu-kvm will probably morph towards conditional paravirt support as well, depending on CONFIG_KVM_PARA. Make it available already. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti

[COMMIT master] qemu-kvm: Use kvm-kmod headers if available

2010-02-07 Thread Avi Kivity
From: Jan Kiszka jan.kis...@web.de Since kvm-kmod-2.6.32.2 we have an alternative source for recent KVM kernel headers. Use it when available and not overruled by --kerneldir. If there is no kvm-kmod and no --kerneldir, we continue to fall back to the qemu-kvm's kernel headers. Signed-off-by:

[COMMIT master] QMP: Emit Basic events

2010-02-07 Thread Avi Kivity
From: Luiz Capitulino lcapitul...@redhat.com While testing QMP on qemu-kvm I found that it's not emitting basic events like RESET or POWERDOWN. The reason is that in QEMU upstream those events are triggered in QEMU's main loop (ie. vl.c:main_loop()), but control doesn't reach there in qemu-kvm

[COMMIT master] Merge branch 'upstream-merge'

2010-02-07 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com * upstream-merge: (167 commits) Revert block: prevent multiwrite_merge from creating too large iovecs make: qemu-img depends on config-host.h reduce number of reinjects on ACK block: prevent multiwrite_merge from creating too large iovecs block:

[COMMIT master] Merge branch 'upstream-merge'

2010-02-07 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com * upstream-merge: (95 commits) bsd/darwin-user: mmap_frag() users only check for -1 error cris: Prettify register dumps. sparc32 don't mark page dirty when failing sparc64: implement basic IOMMU/interrupt handling Sparc64: byte swap IO port

[COMMIT master] Synchronize kvm headers

2010-02-07 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h index db10887..3fd3371 100644 --- a/kvm/include/linux/kvm.h +++ b/kvm/include/linux/kvm.h @@ -181,6 +181,11 @@ struct kvm_run {

[COMMIT master] Revert roms/seabios to commit id of 0.5.1

2010-02-07 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/roms/seabios b/roms/seabios index 8362699..5da6833 16 --- a/roms/seabios +++ b/roms/seabios @@ -1 +1 @@ -Subproject commit 8362699269d7b3c816981be0e306d7531aa3ea1d +Subproject commit

[COMMIT master] Fix device-assignment.c compilation without KVM_CAP_PCI_SEGMENT

2010-02-07 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 315fc72..4522ef4 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -822,7 +822,9 @@ static int

[COMMIT master] enable PCI multiple-segments for pass-through device

2010-02-07 Thread Avi Kivity
From: Zhai, Edwin edwin.z...@intel.com Enable optional parameter (default 0) - PCI segment (or domain) besides BDF, when assigning PCI device to guest. Signed-off-by: Zhai Edwin edwin.z...@intel.com Acked-by: Chris Wright chr...@sous-sol.org Signed-off-by: Marcelo Tosatti mtosa...@redhat.com

[COMMIT master] KVM: fix Hyper-V hypercall warnings and wrong mask value

2010-02-07 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Fix compilation warnings and wrong mask value. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 47c6e23..a311751 100644 --- a/arch/x86/kvm/x86.c +++

[COMMIT master] KVM: fix cleanup_srcu_struct on vm destruction

2010-02-07 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com cleanup_srcu_struct on VM destruction remains broken: BUG: unable to handle kernel paging request at IP: [802533d2] srcu_read_lock+0x16/0x21 RIP: 0010:[802533d2] [802533d2] srcu_read_lock+0x16/0x21 Call Trace:

[COMMIT master] KVM: MMU: bail out pagewalk on kvm_read_guest error

2010-02-07 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Exit the guest pagetable walk loop if reading gpte failed. Otherwise its possible to enter an endless loop processing the previous present pte. Cc: sta...@kernel.org Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] KVM: x86: Use macros for x86_emulate_ops to avoid future mistakes

2010-02-07 Thread Avi Kivity
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp The return values from x86_emulate_ops are defined in kvm_emulate.h as macros X86EMUL_*. But in emulate.c, we are comparing the return values from these ops with 0 to check if they're X86EMUL_CONTINUE or not: X86EMUL_CONTINUE is defined as 0

[COMMIT master] KVM: VMX: Clean up DR6 emulation

2010-02-07 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com As we trap all debug register accesses, we do not need to switch real DR6 at all. Clean up update_exception_bitmap at this chance, too. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] KVM: VMX: Fix emulation of DR4 and DR5

2010-02-07 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com Make sure DR4 and DR5 are aliased to DR6 and DR7, respectively, if CR4.DE is not set. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index

[COMMIT master] KVM: Fix kvm_coalesced_mmio_ring duplicate allocation

2010-02-07 Thread Avi Kivity
From: Sheng Yang sh...@linux.intel.com The commit 0953ca73 KVM: Simplify coalesced mmio initialization allocate kvm_coalesced_mmio_ring in the kvm_coalesced_mmio_init(), but didn't discard the original allocation... Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM: S390: fix potential array overrun in intercept handling

2010-02-07 Thread Avi Kivity
From: Christian Borntraeger borntrae...@de.ibm.com kvm_handle_sie_intercept uses a jump table to get the intercept handler for a SIE intercept. Static code analysis revealed a potential problem: the intercept_funcs jump table was defined to contain (0x48 2) entries, but we only checked for code

[COMMIT master] KVM: x86: Fix probable memory leak of vcpu-arch.mce_banks

2010-02-07 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com vcpu-arch.mce_banks is malloc in kvm_arch_vcpu_init(), but never free in any place, this may cause memory leak. So this patch fixed to free it in kvm_arch_vcpu_uninit(). Cc: sta...@kernel.org Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by:

[COMMIT master] KVM: x86: Fix leak of free lapic date in kvm_arch_vcpu_init()

2010-02-07 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com In function kvm_arch_vcpu_init(), if the memory malloc for vcpu-arch.mce_banks is fail, it does not free the memory of lapic date. This patch fixed it. Cc: sta...@kernel.org Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM: PPC: Add PVR/PIR init for E500

2010-02-07 Thread Avi Kivity
From: Liu Yu yu@freescale.com commit 513579e3a391a3874c478a8493080822069976e8 change the way we emulate PVR/PIR, which left PVR/PIR uninitialized on E500, and make guest puzzled. Signed-off-by: Liu Yu yu@freescale.com Acked-by: Alexander Graf ag...@suse.de Signed-off-by: Marcelo Tosatti

[COMMIT master] KVM: Move cr0/cr4/efer related helpers to x86.h

2010-02-07 Thread Avi Kivity
From: Avi Kivity a...@redhat.com They have more general scope than the mmu. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 6a429ee..645b245 100644 --- a/arch/x86/kvm/emulate.c +++

[COMMIT master] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/

2010-02-07 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Conflicts: arch/x86/kvm/mmu.c arch/x86/kvm/x86.c Signed-off-by: Marcelo Tosatti mtosa...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More

[COMMIT master] KVM: VMX: Pass cr0.mp through to the guest when the fpu is active

2010-02-07 Thread Avi Kivity
From: Avi Kivity a...@redhat.com When cr0.mp is clear, the guest doesn't expect a #NM in response to a WAIT instruction. Because we always keep cr0.mp set, it will get a #NM, and potentially be confused. Fix by keeping cr0.mp set only when the fpu is inactive, and passing it through when

[COMMIT master] KVM: trace guest fpu loads and unloads

2010-02-07 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 4e781f3..1c0a0c7 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5293,6 +5293,7 @@ void

[COMMIT master] KVM: MMU: Remove some useless code from alloc_mmu_pages()

2010-02-07 Thread Avi Kivity
From: Wei Yongjun yj...@cn.fujitsu.com If we fail to alloc page for vcpu-arch.mmu.pae_root, call to free_mmu_pages() is unnecessary, which just do free the page malloc for vcpu-arch.mmu.pae_root. Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com

[COMMIT master] KVM: Rename vcpu-shadow_efer to efer

2010-02-07 Thread Avi Kivity
From: Avi Kivity a...@redhat.com None of the other registers have the shadow_ prefix. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 7ebf9fe..1522337 100644 ---

[COMMIT master] KVM: PPC E500: Add register l1csr0 emulation

2010-02-07 Thread Avi Kivity
From: Liu Yu yu@freescale.com Latest kernel start to access l1csr0 to contron L1. We just tell guest no operation is on going. Signed-off-by: Liu Yu yu@freescale.com Acked-by: Alexander Graf ag...@suse.de Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] kvmclock: count total_sleep_time when updating guest clock

2010-02-07 Thread Avi Kivity
From: Jason Wang jasow...@redhat.com Current kvm wallclock does not consider the total_sleep_time which could cause wrong wallclock in guest after host suspend/resume. This patch solve this issue by counting total_sleep_time to get the correct host boot time. Cc: sta...@kernel.org Signed-off-by:

[COMMIT master] KVM: fix load_guest_segment_descriptor() to return X86EMUL_*

2010-02-07 Thread Avi Kivity
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp This patch fixes load_guest_segment_descriptor() to return X86EMUL_PROPAGATE_FAULT when it tries to access the descriptor table beyond the limit of it: suggested by Marcelo. I have checked current callers of this helper function, -

[COMMIT master] KVM: mark segments accessed on HW task switch

2010-02-07 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com On HW task switch newly loaded segments should me marked as accessed. Reported-by: Lorenzo Martignoni martig...@gmail.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/x86.c

[COMMIT master] KVM: PIT: control word is write-only

2010-02-07 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com PIT control word (address 0x43) is write-only, reads are undefined. Cc: sta...@kernel.org Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index caad189..6a74246 100644 ---

[COMMIT master] KVM: enable PCI multiple-segments for pass-through device

2010-02-07 Thread Avi Kivity
From: Zhai, Edwin edwin.z...@intel.com Enable optional parameter (default 0) - PCI segment (or domain) besides BDF, when assigning PCI device to guest. Signed-off-by: Zhai Edwin edwin.z...@intel.com Acked-by: Chris Wright chr...@sous-sol.org Signed-off-by: Marcelo Tosatti mtosa...@redhat.com

[COMMIT master] KVM: VMX: Wire up .fpu_activate() callback

2010-02-07 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 363f2f6..820e5fc 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -4140,6 +4140,7 @@ static struct kvm_x86_ops vmx_x86_ops = { .cache_reg =

[COMMIT master] KVM: fix kvm_fix_hypercall() to return X86EMUL_*

2010-02-07 Thread Avi Kivity
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp This patch fixes kvm_fix_hypercall() to propagate X86EMUL_* info generated by emulator_write_emulated() to its callers: suggested by Marcelo. The effect of this is x86_emulate_insn() will begin to handle the page faults which occur in

[COMMIT] [WIN-GUEST-DRIVERS] NetKVM: Change debeug level for packet filtering OID

2010-02-07 Thread Yan Vugenfirer
repository: C:/dev/kvm-guest-drivers-windows branch: master commit 37cc09539a46f37d18751bb05cb6ae76eb6b3709 Author: Yan Vugenfirer yvuge...@redhat.com Date: Sun Feb 7 18:19:40 2010 +0200 [WIN-GUEST-DRIVERS] NetKVM: Change debeug level for packet filtering OID Signed-off-by: Yan

[COMMIT master] KVM: Introduce kvm_host_page_size

2010-02-07 Thread Avi Kivity
From: Joerg Roedel joerg.roe...@amd.com This patch introduces a generic function to find out the host page size for a given gfn. This function is needed by the kvm iommu code. This patch also simplifies the x86 host_mapping_level function. Signed-off-by: Joerg Roedel joerg.roe...@amd.com

Re: [PATCH] vhost-net: switch to smp barriers

2010-02-07 Thread Michael S. Tsirkin
On Mon, Feb 01, 2010 at 07:21:02PM +0200, Michael S. Tsirkin wrote: vhost-net only uses memory barriers to control SMP effects (communication with userspace potentially running on a different CPU), so it should use SMP barriers and not mandatory barriers for memory access ordering, as

Re: [PATCH 02/11] iommu-api: Add iommu_map and iommu_unmap functions

2010-02-07 Thread Avi Kivity
On 01/28/2010 01:37 PM, Joerg Roedel wrote: These two functions provide support for mapping and unmapping physical addresses to io virtual addresses. The difference to the iommu_(un)map_range() is that the new functions take a gfp_order parameter instead of a size. This allows the IOMMU backend

Re: [PATCH] vhost-net: switch to smp barriers

2010-02-07 Thread Avi Kivity
On 02/01/2010 07:21 PM, Michael S. Tsirkin wrote: vhost-net only uses memory barriers to control SMP effects (communication with userspace potentially running on a different CPU), so it should use SMP barriers and not mandatory barriers for memory access ordering, as suggested by

Re: [PATCH v2 00/21] qemu-kvm: Hook cleanups and extended use of upstream code

2010-02-07 Thread Gleb Natapov
On Wed, Feb 03, 2010 at 09:53:25AM +0100, Jan Kiszka wrote: This version addresses the feedback on v2, namely: - assert(vm stopped || current thread == env-thread) on low-level load/save registers - fixed mpstate initialization With those patched, doing info cpus in monitor kill the guest,

Re: [PATCH] vhost-net: switch to smp barriers

2010-02-07 Thread Michael S. Tsirkin
On Sun, Feb 07, 2010 at 11:42:29AM +0200, Avi Kivity wrote: On 02/01/2010 07:21 PM, Michael S. Tsirkin wrote: vhost-net only uses memory barriers to control SMP effects (communication with userspace potentially running on a different CPU), so it should use SMP barriers and not mandatory

Re: [PATCH] vhost-net: switch to smp barriers

2010-02-07 Thread Avi Kivity
On 02/07/2010 11:44 AM, Michael S. Tsirkin wrote: On Sun, Feb 07, 2010 at 11:42:29AM +0200, Avi Kivity wrote: On 02/01/2010 07:21 PM, Michael S. Tsirkin wrote: vhost-net only uses memory barriers to control SMP effects (communication with userspace potentially running on a different

Re: [PATCH 02/11] iommu-api: Add iommu_map and iommu_unmap functions

2010-02-07 Thread Joerg Roedel
On Sun, Feb 07, 2010 at 11:38:30AM +0200, Avi Kivity wrote: On 01/28/2010 01:37 PM, Joerg Roedel wrote: These two functions provide support for mapping and unmapping physical addresses to io virtual addresses. The difference to the iommu_(un)map_range() is that the new functions take a

Re: KVM problems with Xeon L5530

2010-02-07 Thread Avi Kivity
On 01/28/2010 01:02 PM, Matteo Ghezzi wrote: Upgraded to 2.6.33-rc5, same qemu-kvm version, same hardware. The Vnc screen is still black and the virtual machine, but now I don't have anymore messages in the logs but directly at standard output: KVM internal error. Suberror: 2 extra data[0]:

Re: [PATCH 02/11] iommu-api: Add iommu_map and iommu_unmap functions

2010-02-07 Thread Avi Kivity
On 02/07/2010 12:50 PM, Joerg Roedel wrote: On Sun, Feb 07, 2010 at 11:38:30AM +0200, Avi Kivity wrote: On 01/28/2010 01:37 PM, Joerg Roedel wrote: These two functions provide support for mapping and unmapping physical addresses to io virtual addresses. The difference to the

Re: [PATCH v2 00/21] qemu-kvm: Hook cleanups and extended use of upstream code

2010-02-07 Thread Jan Kiszka
Gleb Natapov wrote: On Wed, Feb 03, 2010 at 09:53:25AM +0100, Jan Kiszka wrote: This version addresses the feedback on v2, namely: - assert(vm stopped || current thread == env-thread) on low-level load/save registers - fixed mpstate initialization With those patched, doing info cpus in

Re: [PATCH 01/10] arch/ia64: Fix continuation line formats

2010-02-07 Thread Avi Kivity
On 02/02/2010 09:22 AM, Joe Perches wrote: String constants that are continued on subsequent lines with \ are not good. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message

Re: [PATCH 4/11] arch/x86/kvm: Correct NULL test

2010-02-07 Thread Avi Kivity
On 02/06/2010 10:43 AM, Julia Lawall wrote: From: Julia Lawallju...@diku.dk msr was tested above, so the second test is not needed. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the

Re: [PATCH v2 00/21] qemu-kvm: Hook cleanups and extended use of upstream code

2010-02-07 Thread Gleb Natapov
On Sun, Feb 07, 2010 at 12:28:49PM +0100, Jan Kiszka wrote: Gleb Natapov wrote: On Wed, Feb 03, 2010 at 09:53:25AM +0100, Jan Kiszka wrote: This version addresses the feedback on v2, namely: - assert(vm stopped || current thread == env-thread) on low-level load/save registers - fixed

Re: KVM: VMX: update cr0 read shadow when deactivating cr0.ts passthrough

2010-02-07 Thread Avi Kivity
On 02/01/2010 06:48 PM, Marcelo Tosatti wrote: On fpu deactivation, the cr0 read shadow is not properly updated, since it assumes vcpu-arch.cr0 contains the guest visible cr0 value before guest had control of cr0.ts. This is not true, since cr0 has been decached (from vmx_fpu_deactivate itself

Re: [PATCH 7/8] KVM: Optimize kvm_read_cr[04]_bits()

2010-02-07 Thread Avi Kivity
On 02/05/2010 10:26 AM, Jan Kiszka wrote: Avi Kivity wrote: 'mask' is always a constant, so we can check whether it includes a bit that might be owned by the guest very cheaply, and avoid the decache call. Saves a few hundred bytes of module text. -no-kvm-irqchip -smp 2 is broken

Re: [PATCH 05/11] kvm: Introduce kvm_host_page_size

2010-02-07 Thread Avi Kivity
On 01/28/2010 01:37 PM, Joerg Roedel wrote: This patch introduces a generic function to find out the host page size for a given gfn. This function is needed by the kvm iommu code. This patch also simplifies the x86 host_mapping_level function. Applied to kvm.git since this makes sense

Re: [PATCH 06/11] kvm: Change kvm_iommu_map_pages to map large pages

2010-02-07 Thread Avi Kivity
On 01/29/2010 12:24 AM, Marcelo Tosatti wrote: On Thu, Jan 28, 2010 at 12:37:57PM +0100, Joerg Roedel wrote: This patch changes the implementation of of kvm_iommu_map_pages to map the pages with the host page size into the io virtual address space. Signed-off-by: Joerg

Re: [PATCH 06/11] kvm: Change kvm_iommu_map_pages to map large pages

2010-02-07 Thread Avi Kivity
On 02/05/2010 01:01 PM, Joerg Roedel wrote: Yes, addresses the concern. Are there any further objections against this patchset? If not it would be cool if you could give me some acks for the kvm specific parts of this patchset. There are two ways we can get the kvm bits in: - you

Re: [PATCH 3/8] KVM: Activate fpu on clts

2010-02-07 Thread Avi Kivity
On 02/04/2010 07:56 PM, Avi Kivity wrote: vmx.c doesn't initialize kvm_x86_ops-fpu_activate as far as I see. Gaak. Well, that's obviously unintended. I committed a patch to fix this. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send

Re: [PATCH 02/18] KVM: PPC: Enable MMIO to do 64 bits, fprs and qprs

2010-02-07 Thread Avi Kivity
On 02/04/2010 05:55 PM, Alexander Graf wrote: Right now MMIO access can only happen for GPRs and is at most 32 bit wide. That's actually enough for almost all types of hardware out there. Unfortunately, the guest I was using used FPU writes to MMIO regions, so it ended up writing 64 bit MMIOs

Re: [PATCH 03/18] KVM: PPC: Teach MMIO Signedness

2010-02-07 Thread Avi Kivity
On 02/04/2010 05:55 PM, Alexander Graf wrote: The guest I was trying to get to run uses the LHA and LHAU instructions. Those instructions basically do a load, but also sign extend the result. Since we need to fill our registers by hand when doing MMIO, we also need to sign extend manually.

Re: [PATCH 7/8] KVM: Optimize kvm_read_cr[04]_bits()

2010-02-07 Thread Jan Kiszka
Avi Kivity wrote: On 02/05/2010 10:26 AM, Jan Kiszka wrote: Avi Kivity wrote: 'mask' is always a constant, so we can check whether it includes a bit that might be owned by the guest very cheaply, and avoid the decache call. Saves a few hundred bytes of module text.

Re: [PATCH 7/8] KVM: Optimize kvm_read_cr[04]_bits()

2010-02-07 Thread Avi Kivity
On 02/07/2010 02:33 PM, Jan Kiszka wrote: Avi Kivity wrote: On 02/05/2010 10:26 AM, Jan Kiszka wrote: Avi Kivity wrote: 'mask' is always a constant, so we can check whether it includes a bit that might be owned by the guest very cheaply, and avoid the decache call. Saves a

Re: [PATCH 06/11] kvm: Change kvm_iommu_map_pages to map large pages

2010-02-07 Thread Joerg Roedel
On Sun, Feb 07, 2010 at 02:22:35PM +0200, Avi Kivity wrote: On 02/05/2010 01:01 PM, Joerg Roedel wrote: Yes, addresses the concern. Are there any further objections against this patchset? If not it would be cool if you could give me some acks for the kvm specific parts of this

Re: [PATCH 18/18] KVM: PPC: Implement Paired Single emulation

2010-02-07 Thread Avi Kivity
On 02/04/2010 05:55 PM, Alexander Graf wrote: The one big thing about the Gekko is paired singles. Paired singles are an extension to the instruction set, that adds 32 single precision floating point registers (qprs), some SPRs to modify the behavior of paired singled operations and

Re: [PATCH 00/18] KVM: PPC: Virtualize Gekko guests

2010-02-07 Thread Avi Kivity
On 02/04/2010 05:55 PM, Alexander Graf wrote: In an effort to get KVM on PPC more useful for other userspace users than Qemu, I figured it'd be a nice idea to implement virtualization of the Gekko CPU. The Gekko is the CPU used in the GameCube. In a slightly more modern fashion it lives on in

Re: [PATCH v2 01/21] qemu-kvm: Drop vmport changes

2010-02-07 Thread Avi Kivity
On 02/03/2010 10:53 AM, Jan Kiszka wrote: This attempt to make vmport KVM compatible is half-broken and is scheduled to be replaced by proper upstream support. Does scheduled mean you have patches for adding cpu_synchronize_state() to vmport? -- error compiling committee.c: too many

Re: [PATCH 7/8] KVM: Optimize kvm_read_cr[04]_bits()

2010-02-07 Thread Jan Kiszka
Avi Kivity wrote: On 02/07/2010 02:33 PM, Jan Kiszka wrote: Avi Kivity wrote: On 02/05/2010 10:26 AM, Jan Kiszka wrote: Avi Kivity wrote: 'mask' is always a constant, so we can check whether it includes a bit that might be owned by the guest very cheaply, and avoid the

Re: [PATCH v2 14/21] qemu-kvm: Rework VCPU state writeback API

2010-02-07 Thread Avi Kivity
On 02/03/2010 10:53 AM, Jan Kiszka wrote: This grand cleanup drops all reset and vmsave/load related synchronization points in favor of four(!) generic hooks: - cpu_synchronize_all_states in qemu_savevm_state_complete (initial sync from kernel before vmsave) - cpu_synchronize_all_post_init

Re: [PATCH v2 14/21] qemu-kvm: Rework VCPU state writeback API

2010-02-07 Thread Jan Kiszka
Avi Kivity wrote: On 02/03/2010 10:53 AM, Jan Kiszka wrote: This grand cleanup drops all reset and vmsave/load related synchronization points in favor of four(!) generic hooks: - cpu_synchronize_all_states in qemu_savevm_state_complete (initial sync from kernel before vmsave) -

Re: [PATCH v2 01/21] qemu-kvm: Drop vmport changes

2010-02-07 Thread Jan Kiszka
Avi Kivity wrote: On 02/03/2010 10:53 AM, Jan Kiszka wrote: This attempt to make vmport KVM compatible is half-broken and is scheduled to be replaced by proper upstream support. Does scheduled mean you have patches for adding cpu_synchronize_state() to vmport? See patch 2 in this

Re: [PATCH v2 14/21] qemu-kvm: Rework VCPU state writeback API

2010-02-07 Thread Avi Kivity
On 02/07/2010 03:51 PM, Jan Kiszka wrote: Avi Kivity wrote: On 02/03/2010 10:53 AM, Jan Kiszka wrote: This grand cleanup drops all reset and vmsave/load related synchronization points in favor of four(!) generic hooks: - cpu_synchronize_all_states in qemu_savevm_state_complete

Re: [PATCH 05/11] kvm: Introduce kvm_host_page_size

2010-02-07 Thread Joerg Roedel
On Sun, Feb 07, 2010 at 02:09:36PM +0200, Avi Kivity wrote: On 01/28/2010 01:37 PM, Joerg Roedel wrote: This patch introduces a generic function to find out the host page size for a given gfn. This function is needed by the kvm iommu code. This patch also simplifies the x86 host_mapping_level

Re: [PATCH v2 14/21] qemu-kvm: Rework VCPU state writeback API

2010-02-07 Thread Jan Kiszka
Avi Kivity wrote: On 02/07/2010 03:51 PM, Jan Kiszka wrote: Avi Kivity wrote: On 02/03/2010 10:53 AM, Jan Kiszka wrote: This grand cleanup drops all reset and vmsave/load related synchronization points in favor of four(!) generic hooks: - cpu_synchronize_all_states in

Re: [PATCH v2 14/21] qemu-kvm: Rework VCPU state writeback API

2010-02-07 Thread Avi Kivity
On 02/07/2010 04:26 PM, Jan Kiszka wrote: Well, to me it makes more sense to name them from the point of view of the vcpu that is doing the update. I'm open for a better name - except for sync as writebacks are always synchronous from the POV of the modified VCPU. I meant that the

Re: [PATCH 00/18] KVM: PPC: Virtualize Gekko guests

2010-02-07 Thread Alexander Graf
Am 07.02.2010 um 13:54 schrieb Avi Kivity a...@redhat.com: On 02/04/2010 05:55 PM, Alexander Graf wrote: In an effort to get KVM on PPC more useful for other userspace users than Qemu, I figured it'd be a nice idea to implement virtualization of the Gekko CPU. The Gekko is the CPU used in

Re: [PATCH 03/18] KVM: PPC: Teach MMIO Signedness

2010-02-07 Thread Alexander Graf
Am 07.02.2010 um 13:32 schrieb Avi Kivity a...@redhat.com: On 02/04/2010 05:55 PM, Alexander Graf wrote: The guest I was trying to get to run uses the LHA and LHAU instructions. Those instructions basically do a load, but also sign extend the result. Since we need to fill our registers

Re: [PATCH 02/18] KVM: PPC: Enable MMIO to do 64 bits, fprs and qprs

2010-02-07 Thread Alexander Graf
Am 07.02.2010 um 13:29 schrieb Avi Kivity a...@redhat.com: On 02/04/2010 05:55 PM, Alexander Graf wrote: Right now MMIO access can only happen for GPRs and is at most 32 bit wide. That's actually enough for almost all types of hardware out there. Unfortunately, the guest I was using used

Re: [PATCH 18/18] KVM: PPC: Implement Paired Single emulation

2010-02-07 Thread Alexander Graf
Am 07.02.2010 um 13:50 schrieb Avi Kivity a...@redhat.com: On 02/04/2010 05:55 PM, Alexander Graf wrote: The one big thing about the Gekko is paired singles. Paired singles are an extension to the instruction set, that adds 32 single precision floating point registers (qprs), some SPRs to

Re: [PATCH 03/18] KVM: PPC: Teach MMIO Signedness

2010-02-07 Thread Avi Kivity
On 02/07/2010 05:51 PM, Alexander Graf wrote: +if (vcpu-arch.mmio_sign_extend) { +switch (run-mmio.len) { +#ifdef CONFIG_PPC64 +case 4: +if (gpr 0x8000) +gpr |= 0xULL; +break; Wouldn't gpr = (s64)(gpr 32) 32;

Re: [PATCH 18/18] KVM: PPC: Implement Paired Single emulation

2010-02-07 Thread Avi Kivity
On 02/07/2010 05:57 PM, Alexander Graf wrote:+ +dprintk(KERN_INFO FPU Emulator 0x%x ( 0x%llx, 0x%llx, 0x%llx ), inst, +inout[1], inout[2], inout[3]); + +call_stack =kvmppc_call_stack[(smp_processor_id() * 2)]; +call_stack[0] = inst; +/* call_stack[1] is INS_BLR

Re: [PATCH 00/18] KVM: PPC: Virtualize Gekko guests

2010-02-07 Thread Avi Kivity
On 02/07/2010 05:49 PM, Alexander Graf wrote: Am 07.02.2010 um 13:54 schrieb Avi Kivity a...@redhat.com: On 02/04/2010 05:55 PM, Alexander Graf wrote: In an effort to get KVM on PPC more useful for other userspace users than Qemu, I figured it'd be a nice idea to implement virtualization of

Re: [Qemu-devel] [PATCH] Add assignment operation to config file parser..

2010-02-07 Thread Anthony Liguori
On 02/06/2010 12:59 PM, john cooper wrote: This patch reworks support for both assignment and append in the config file parser. It was motivated by comments received on the cpu model config file format. Commit dc9ca4ba27be4fe6a0284061b8f056c4364fb0d9 changed the behavior of = from assign to

Re: [PATCH 03/18] KVM: PPC: Teach MMIO Signedness

2010-02-07 Thread Anthony Liguori
On 02/07/2010 06:32 AM, Avi Kivity wrote: On 02/04/2010 05:55 PM, Alexander Graf wrote: The guest I was trying to get to run uses the LHA and LHAU instructions. Those instructions basically do a load, but also sign extend the result. Since we need to fill our registers by hand when doing MMIO,

Re: [PATCH] KVM test: Ensure multiple pre/post commands can run

2010-02-07 Thread Michael Goldish
- Lucas Meneghel Rodrigues l...@redhat.com wrote: The way tests are currently defined, running unattended install + hugepages will allways skip unattended install setup step (coincidentally the tests on our test farm were working because previous executions of the unattended install

Re: [PATCH] KVM: tests_base.cfg: major guest OS cleanup

2010-02-07 Thread Michael Goldish
- Lucas Meneghel Rodrigues l...@redhat.com wrote: Major update and cleanup on guest OS definition: * Fedora 8, 9, 10 dropped * RHEL versions bumped to the latest stable versions * Windows 2008, Vista and 7 bumped to the last versions * Some duplicate information re-organized

Re: [PATCH 06/11] kvm: Change kvm_iommu_map_pages to map large pages

2010-02-07 Thread Marcelo Tosatti
On Sun, Feb 07, 2010 at 02:18:19PM +0200, Avi Kivity wrote: On 01/29/2010 12:24 AM, Marcelo Tosatti wrote: On Thu, Jan 28, 2010 at 12:37:57PM +0100, Joerg Roedel wrote: This patch changes the implementation of of kvm_iommu_map_pages to map the pages with the host page size into the io virtual

Re: [PATCH] emulate accessed bit for EPT

2010-02-07 Thread Marcelo Tosatti
On Fri, Feb 05, 2010 at 07:14:13PM +0100, Andrea Arcangeli wrote: On Fri, Feb 05, 2010 at 03:34:23PM -0200, Marcelo Tosatti wrote: But perhaps a module parameter to turn accessed bit emulation off might be handy in the future? Maybe, but somebody should show that this can overall become a

Re: [PATCH 03/18] KVM: PPC: Teach MMIO Signedness

2010-02-07 Thread Alexander Graf
Am 07.02.2010 um 17:27 schrieb Anthony Liguori anth...@codemonkey.ws: On 02/07/2010 06:32 AM, Avi Kivity wrote: On 02/04/2010 05:55 PM, Alexander Graf wrote: The guest I was trying to get to run uses the LHA and LHAU instructions. Those instructions basically do a load, but also sign extend

Re: [PATCH 00/18] KVM: PPC: Virtualize Gekko guests

2010-02-07 Thread Alexander Graf
Avi Kivity wrote: On 02/07/2010 05:49 PM, Alexander Graf wrote: Am 07.02.2010 um 13:54 schrieb Avi Kivity a...@redhat.com: On 02/04/2010 05:55 PM, Alexander Graf wrote: In an effort to get KVM on PPC more useful for other userspace users than Qemu, I figured it'd be a nice idea to implement

Re: [PATCH 03/18] KVM: PPC: Teach MMIO Signedness

2010-02-07 Thread Anthony Liguori
On 02/07/2010 03:35 PM, Alexander Graf wrote: It's technically implementation dependent but I don't know of an implementation that doesn't sign extend. Hrm, would gpr = (s64)(s32)gpr; work? :) Yes. Integer promotion does guarantee sign extension. Regards, Anthony Liguori Alex --

Re: [PATCH] KVM: tests_base.cfg: major guest OS cleanup

2010-02-07 Thread Lucas Meneghel Rodrigues
On Sun, 2010-02-07 at 13:24 -0500, Michael Goldish wrote: Let me explain the reasoning behind this: Looks like you dropped all step file tests, and I don't think this is a good idea. Keeping them is harmless, so I don't think they should be dropped unless they're completely useless. If you

Re: [PATCH] KVM: tests_base.cfg: major guest OS cleanup

2010-02-07 Thread Marcelo Tosatti
On Sun, Feb 07, 2010 at 09:26:21PM -0200, Lucas Meneghel Rodrigues wrote: On Sun, 2010-02-07 at 13:24 -0500, Michael Goldish wrote: Let me explain the reasoning behind this: Looks like you dropped all step file tests, and I don't think this is a good idea. Keeping them is harmless, so I

Re: [PATCH] KVM test: Ensure multiple pre/post commands can run

2010-02-07 Thread Lucas Meneghel Rodrigues
On Sun, 2010-02-07 at 12:59 -0500, Michael Goldish wrote: - Lucas Meneghel Rodrigues l...@redhat.com wrote: The way tests are currently defined, running unattended install + hugepages will allways skip unattended install setup step (coincidentally the tests on our test farm were

Re: [PATCH 1/1 net-next] virtio_net: remove send queue

2010-02-07 Thread Rusty Russell
On Wed, 3 Feb 2010 08:18:51 am Shirley Ma wrote: Use detach buffers API in virtio to free unused buffers in send queue when shutting down virtio_net to avoid maintaining skb link list for each transmit packet. Signed-off-by: Shirley Ma x...@us.ibm.com Hi Shirley, Nice cleanup. Please

Re: [PATCH] KVM: tests_base.cfg: major guest OS cleanup

2010-02-07 Thread Lucas Meneghel Rodrigues
On Sun, 2010-02-07 at 22:44 -0200, Marcelo Tosatti wrote: On Sun, Feb 07, 2010 at 09:26:21PM -0200, Lucas Meneghel Rodrigues wrote: * Removing older versions of distributions like Fedora have good reason: The support cycle of them is very short (18 months), by their very nature (Fedora is

Re: [PATCH] qemu-kvm: Speed up of the dirty-bitmap-traveling

2010-02-07 Thread OHMURA Kei
Sounds logical - do you have numbers on the improvement? Sure. The patch showed approximately 3-7 times speed up when measured with rdtsc. The test environment and detailed results are described below. --- tmp = rdtsc(); /* function of original code*/ t1 += rdtsc() - tmp; tmp = rdtsc();

vnc mouse trouble; -usbdevice tablet no help

2010-02-07 Thread Ross Boylan
I have been unable to get the real mouse and the virtualized mouse to stay together when using kvm with linux host, guest and client. Previous advice (to me and others) was to use -usbdevice tablet. I've tried that, and a variety of kvm/qemu versions, but no luck. Can anyone suggest what to do,

Re: [PATCH 02/18] KVM: PPC: Enable MMIO to do 64 bits, fprs and qprs

2010-02-07 Thread Avi Kivity
On 02/04/2010 05:55 PM, Alexander Graf wrote: Right now MMIO access can only happen for GPRs and is at most 32 bit wide. That's actually enough for almost all types of hardware out there. Unfortunately, the guest I was using used FPU writes to MMIO regions, so it ended up writing 64 bit MMIOs

Re: [PATCH 03/18] KVM: PPC: Teach MMIO Signedness

2010-02-07 Thread Avi Kivity
On 02/04/2010 05:55 PM, Alexander Graf wrote: The guest I was trying to get to run uses the LHA and LHAU instructions. Those instructions basically do a load, but also sign extend the result. Since we need to fill our registers by hand when doing MMIO, we also need to sign extend manually.

Re: [PATCH 18/18] KVM: PPC: Implement Paired Single emulation

2010-02-07 Thread Avi Kivity
On 02/04/2010 05:55 PM, Alexander Graf wrote: The one big thing about the Gekko is paired singles. Paired singles are an extension to the instruction set, that adds 32 single precision floating point registers (qprs), some SPRs to modify the behavior of paired singled operations and

Re: [PATCH 00/18] KVM: PPC: Virtualize Gekko guests

2010-02-07 Thread Avi Kivity
On 02/04/2010 05:55 PM, Alexander Graf wrote: In an effort to get KVM on PPC more useful for other userspace users than Qemu, I figured it'd be a nice idea to implement virtualization of the Gekko CPU. The Gekko is the CPU used in the GameCube. In a slightly more modern fashion it lives on in

  1   2   >