[COMMIT master] vhost-net: fix reversed logic in mask notifiers

2010-05-27 Thread Avi Kivity
From: Michael S. Tsirkin m...@redhat.com When guest notifier is assigned, we set mask notifier, which will assign kvm irqfd. When guest notifier is unassigned, mask notifier is unset, which should unassign kvm irqfd. The way to do this is to call mask notifier telling it to mask the vector.

[COMMIT master] device-assignment: don't truncate MSIX capabilities table size

2010-05-27 Thread Avi Kivity
From: Alex Williamson alex.william...@redhat.com PCI_MSIX_TABSIZE is 0x07ff Reported-by: Juan Quintela quint...@redhat.com Signed-off-by: Alex Williamson alex.william...@redhat.com Acked-by: Acked-by: Chris Wright chr...@redhat.com Acked-by: Acked-by: Juan Quintela quint...@redhat.com

[COMMIT master] KVM: MMU: don't check PT_WRITABLE_MASK directly

2010-05-27 Thread Avi Kivity
From: Gui Jianfeng guijianf...@cn.fujitsu.com Since we have is_writable_pte(), make use of it. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index d92984d..136e160 100644 ---

[COMMIT master] KVM: SVM: Fix EFER.LME being stripped

2010-05-27 Thread Avi Kivity
From: Zachary Amsden zams...@redhat.com Must set VCPU register to be the guest notion of EFER even if that setting is not valid on hardware. This was masked by the set in set_efer until 7657fd5ace88e8092f5f3a84117e093d7b893f26 broke that. Fix is simply to set the VCPU register before stripping

[COMMIT master] KVM: SVM: fix compiling warning from erratum 383 fix

2010-05-27 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com fix: arch/x86/kvm/svm.c: In function ‘svm_handle_mce’: arch/x86/kvm/svm.c:1490: warning: unused variable ‘kvm_run’ Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Avi Kivity a...@redhat.com diff --git

[COMMIT master] KVM: MMU: Allow spte.w=1 for gpte.w=0 and cr0.wp=0 only in shadow mode

2010-05-27 Thread Avi Kivity
From: Avi Kivity a...@redhat.com When tdp is enabled, the guest's cr0.wp shouldn't have any effect on spte permissions. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 136e160..39dd8d3 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c

[COMMIT master] KVM: MMU: Remove user access when allowing kernel access to gpte.w=0 page

2010-05-27 Thread Avi Kivity
From: Avi Kivity a...@redhat.com If cr0.wp=0, we have to allow the guest kernel access to a page with pte.w=0. We do that by setting spte.w=1, since the host cr0.wp must remain set so the host can write protect pages. Once we allow write access, we must remove user access otherwise we mistakenly

[COMMIT master] KVM: MMU: Document cr0.wp emulation

2010-05-27 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt index 2201dcb..1e7ecdd 100644 --- a/Documentation/kvm/mmu.txt +++ b/Documentation/kvm/mmu.txt @@ -298,6 +298,25 @@ Host translation updates: - look up

[COMMIT master] KVM: Fix order passed to iommu_unmap

2010-05-27 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com This is obviously a left-over from the the old interface taking the size. Apparently a mostly harmless issue with the current iommu_unmap implementation. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Acked-by: Joerg Roedel joerg.roe...@amd.com

[COMMIT master] KVM: ia64: Add missing spin_unlock in kvm_arch_hardware_enable()

2010-05-27 Thread Avi Kivity
From: Julia Lawall ju...@diku.dk Add a spin_unlock missing on the error path. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @@ expression E1; @@ * spin_lock(E1,...); +... when != E1 if (...) { ... when != E1 * return ...; } ...+ *

RE: [PATCH 1/4] Fix tboot enabled macro

2010-05-27 Thread Wang, Shane
Jan Kiszka wrote: Wang, Shane wrote: Avi Kivity wrote: On 05/26/2010 10:25 AM, Jan Kiszka wrote: This is for CONFIG_INTEL_TXT enabled? Good point but needs to be solved differently. tboot, the variable that is checked by the original header, is not exported to modules. I wonder how this

About upgrade KVM

2010-05-27 Thread satimis
Hi folks, KVM -virtualizer host - Debian 5.0 This virtual machine has been running for sometimes. IIRC the KVM was download from KVM website. Its version is quite old. $ sudo kvm | head -1 QEMU PC emulator version 0.9.1 (kvm-72), Copyright (c) 2003-2008 Fabrice Bellard $ apt-cache

RE: [PATCH 1/4] Fix tboot enabled macro

2010-05-27 Thread Wang, Shane
Wang, Shane wrote: Why is VTX assumed to be disabled? tboot_enabled == 0 but (msr FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX) == 1 if you have VT enabled. If you have VT enabled, VMX outside SMX is 1 always. Shane BTW: In hardware, VT is enabled, TXT is enabled, then outside = 1, inside

Re: [PATCH] device-assignment: don't truncate MSIX capabilities table size

2010-05-27 Thread Jes Sorensen
On 05/26/10 14:48, Avi Kivity wrote: On 05/26/2010 03:27 AM, Juan Quintela wrote: BTW, I also noticed the lack of pci_set_long() and friend functions, but arrived to the same conclusion that you: all the device assignment assumes that the world is x86_64 :) IIRC it used to work on ia64

[PATCH] kvm mmu: optimizations when tdp is in use

2010-05-27 Thread Gui Jianfeng
In case of using tdp, checking write protected page isn't needed and quadrant also no need to be calculated. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/mmu.c

Re: [PATCH] KVM test: Add perfmon into the guest tests

2010-05-27 Thread Jes Sorensen
On 05/25/10 05:05, Chen Cao wrote: perfmon2 API provides access to the hardware performance counters of modern processors. Dependency, To compile the source code of the test, the following packages should be installed, glibc-static-2.11.1-6.x86_64

[PATCH] kvm mmu: don't check PT_WRITABLE_MASK directly

2010-05-27 Thread Gui Jianfeng
Since we have is_writable_pte(), make use of it. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index ce4bbd3..441a5d8 100644 ---

Re: [PATCH] Add Documentation/kvm/msr.txt

2010-05-27 Thread Avi Kivity
On 05/26/2010 09:04 PM, Glauber Costa wrote: This patch adds a file that documents the usage of KVM-specific MSRs. Looks good. A few comments: + +Custom MSR list + + +The current supported Custom MSR list is: + +MSR_KVM_WALL_CLOCK: 0x11 + + data: physical address of a

Re: issue about virtio-net driver to suppoprt vhost mergeable buffer with zero-copy to support PS mode

2010-05-27 Thread Michael S. Tsirkin
On Thu, May 27, 2010 at 09:21:02AM +0800, Xin, Xiaohui wrote: Michael, I'm now looking into the vhost mergeable buffer, and I tried to use it to support PS mode with zero-copy. And I found an issue there that I have to modify the guest virito-net driver. When guest virtio-net driver

Re: About upgrade KVM

2010-05-27 Thread Thomas Mueller
On marking them to install following warning popup:- Mark additional required changes? To be removed kvm To be added libasyncns0 libcap1 libpulse0 - end - My questions are; 1) On deleting the old package whether it would affect the running virtual machine? IMHO they

Re: [PATCH] kvm mmu: optimizations when tdp is in use

2010-05-27 Thread Avi Kivity
On 05/27/2010 11:06 AM, Gui Jianfeng wrote: In case of using tdp, checking write protected page isn't needed and quadrant also no need to be calculated. Signed-off-by: Gui Jianfengguijianf...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |7 +-- 1 files changed, 5 insertions(+), 2

RE: [PATCH 1/4] Fix tboot enabled macro

2010-05-27 Thread Wang, Shane
Jan Kiszka wrote: If TXT is on and VT is locked but KVM sees tboot_enabled == 0, it won't check for FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX during setup and may consider VT unavailable. If vt is locked, txt is on, tboot_enabled = 0, then it will check VMXON_OUTSIDE_SMX. But at this point, if

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Michael S. Tsirkin
On Tue, May 18, 2010 at 05:04:51PM -0700, Sridhar Samudrala wrote: Add a new kernel API to create a singlethread workqueue and attach it's task to current task's cgroup and cpumask. Signed-off-by: Sridhar Samudrala s...@us.ibm.com Could someone familiar with workqueue code please comment on

Re: [PATCH 1/4] Fix tboot enabled macro

2010-05-27 Thread Jan Kiszka
Wang, Shane wrote: Jan Kiszka wrote: If TXT is on and VT is locked but KVM sees tboot_enabled == 0, it won't check for FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX during setup and may consider VT unavailable. If vt is locked, txt is on, tboot_enabled = 0, then it will check

Re: Copy and paste feature across guest and host

2010-05-27 Thread Tomasz Chmielewski
Just installed Fedora13 as guest on KVM. However there is no cross-platform copy and paste feature. I trust I have setup this feature on other guest sometime before. Unfortunately I can't the relevant document. Could you please shed me some light. Pointer would be appreciated. TIA Did you

RE: [PATCH 1/4] Fix tboot enabled macro

2010-05-27 Thread Wang, Shane
Jan Kiszka wrote: The latter. As we have no clue about the actual state (tboot is not exported on older kernels), we are forced to assume some reasonable state. Are you trying to load the latest KVM on the older kernels? Shane -- To unsubscribe from this list: send the line unsubscribe kvm

[Autotest PATCH - updated with current tree] KVM test: Add perfmon into the guest tests

2010-05-27 Thread Chen Cao
perfmon2 API provides access to the hardware performance counters of modern processors. Dependency, To compile the source code of the test, the following packages should be installed, glibc-static-2.11.1-6.x86_64 glibc-headers-2.11.1-6.x86_64 glibc-common-2.11.1-6.x86_64

Re: [PATCH] Fix SVM longmode guests

2010-05-27 Thread Avi Kivity
On 05/27/2010 04:09 AM, Zachary Amsden wrote: In recent testing, I discovered guests failed to boot on my AMD box. Bisecting revealed an EFER related change caused the problem; here is the fix. Yikes, applied, thanks. -- error compiling committee.c: too many arguments to function -- To

[Autotest PATCH] client test - perfmon: Patch the source code of perfmon to remove the -Werror switch

2010-05-27 Thread Chen Cao
On some OSes, the compilation will failed because of this switch, ... gcc -O2 -g -Wall -Werror +-I/home/kcao/projects/autotest/client/tests/perfmon/perfmon-tests-0.3/libpfm-3. +52/lib/../include -D_REENTRANT -DCONFIG_PFMLIB_ARCH_X86_64 -I. -c +pfmlib_os_linux.c cc1: warnings being treated as

[PATCH v6] KVM: x86: Enable XSAVE/XRSTOR for guest

2010-05-27 Thread Sheng Yang
From: Dexuan Cui dexuan@intel.com This patch enable guest to use XSAVE/XRSTOR instructions. We assume that host_xcr0 would use all possible bits that OS supported. And we loaded xcr0 in the same way we handled fpu - do it as late as we can. Signed-off-by: Dexuan Cui dexuan@intel.com

[PATCH] KVM: x86: XSAVE/XRSTOR live migration support

2010-05-27 Thread Sheng Yang
This patch enable save/restore of xsave state. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/include/asm/kvm.h | 29 arch/x86/kvm/x86.c | 79 include/linux/kvm.h|6 +++ 3 files changed, 114

[PATCH] qemu: Enable XSAVE related CPUID

2010-05-27 Thread Sheng Yang
We can support it in KVM now. The initial values are the minimal requirement of XSAVE capable processor. Signed-off-by: Sheng Yang sh...@linux.intel.com --- target-i386/cpuid.c | 32 1 files changed, 32 insertions(+), 0 deletions(-) diff --git

[PATCH] qemu: kvm: Enable XSAVE live migration support

2010-05-27 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu-kvm-x86.c| 77 + qemu-kvm.c| 12 +++ qemu-kvm.h| 14 + target-i386/cpu.h |5 +++ target-i386/machine.c | 20 + 5 files

Re: [PATCH v6] KVM: x86: Enable XSAVE/XRSTOR for guest

2010-05-27 Thread Avi Kivity
On 05/27/2010 12:47 PM, Sheng Yang wrote: From: Dexuan Cuidexuan@intel.com This patch enable guest to use XSAVE/XRSTOR instructions. We assume that host_xcr0 would use all possible bits that OS supported. And we loaded xcr0 in the same way we handled fpu - do it as late as we can.

Re: [PATCH] KVM test: Add perfmon into the guest tests

2010-05-27 Thread Chen Cao
On Thu, May 27, 2010 at 10:08:49AM +0200, Jes Sorensen wrote: On 05/25/10 05:05, Chen Cao wrote: perfmon2 API provides access to the hardware performance counters of modern processors. Dependency, To compile the source code of the test, the following packages should be installed,

[PATCH 1/3] vhost: fix to check the return value of copy_to/from_user() correctly

2010-05-27 Thread Takuya Yoshikawa
copy_to/from_user() returns the number of bytes that could not be copied. So we need to check if it is not zero, and in that case, we should return the error number -EFAULT rather than directly return the return value from copy_to/from_user(). Signed-off-by: Takuya Yoshikawa

[PATCH 2/3] vhost-net: fix to check the return value of copy_to/from_user() correctly

2010-05-27 Thread Takuya Yoshikawa
copy_to/from_user() returns the number of bytes that could not be copied. So we need to check if it is not zero, and in that case, we should return the error number -EFAULT rather than directly return the return value from copy_to/from_user(). Signed-off-by: Takuya Yoshikawa

Re: [PATCH] KVM: x86: XSAVE/XRSTOR live migration support

2010-05-27 Thread Avi Kivity
On 05/27/2010 12:48 PM, Sheng Yang wrote: This patch enable save/restore of xsave state. Signed-off-by: Sheng Yangsh...@linux.intel.com --- arch/x86/include/asm/kvm.h | 29 arch/x86/kvm/x86.c | 79 include/linux/kvm.h

[PATCH 3/3] vhost: fix the memory leak which will happen when memory_access_ok fails

2010-05-27 Thread Takuya Yoshikawa
We need to free newmem when vhost_set_memory() fails to complete. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- drivers/vhost/vhost.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index

Re: [PATCH] KVM test: Add perfmon into the guest tests

2010-05-27 Thread Jes Sorensen
On 05/27/10 11:53, Chen Cao wrote: Jes, Thank you for reminding. I have not noticed your mail this afternoon and resent the patches for the perfmon test, it seems that i may have made a mistake. by the way, could you tell me how to verify that perfmon2 was deprecated in favor of

Re: [PATCH v2] KVM: Fix order passed to iommu_unmap

2010-05-27 Thread Roedel, Joerg
On Wed, May 26, 2010 at 03:36:33PM -0400, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com This is obviously a left-over from the the old interface taking the size. Apparently a mostly harmless issue with the current iommu_unmap implementation. Signed-off-by: Jan Kiszka

Re: [PATCH 2/2] KVM: MMU: fix relaxing permission

2010-05-27 Thread Avi Kivity
On 05/26/2010 05:46 AM, Xiao Guangrong wrote: There is a relaxing permission operation in set_spte(): if guest's CR0.WP is not set and R/W #PF occurs in supervisor-level, the mapping path might set to writable, then user can allow to write. @@ -1859,8 +1859,7 @@ static int set_spte(struct

Re: [PATCH 1/2] KVM: SVM: fix compiling warning

2010-05-27 Thread Avi Kivity
On 05/26/2010 05:44 AM, Xiao Guangrong wrote: fix: arch/x86/kvm/svm.c: In function ‘is_erratum_383’: arch/x86/kvm/svm.c:1459: warning: integer constant is too large for ‘long’ type arch/x86/kvm/svm.c: In function ‘svm_handle_mce’: arch/x86/kvm/svm.c:1490: warning: unused variable ‘kvm_run’

Re: [PATCH 1/4] Fix tboot enabled macro

2010-05-27 Thread Avi Kivity
On 05/27/2010 12:27 PM, Wang, Shane wrote: Jan Kiszka wrote: The latter. As we have no clue about the actual state (tboot is not exported on older kernels), we are forced to assume some reasonable state. Are you trying to load the latest KVM on the older kernels? He is, look at

Re: [PATCH v6] KVM: x86: Enable XSAVE/XRSTOR for guest

2010-05-27 Thread Sheng Yang
On Thursday 27 May 2010 17:52:36 Avi Kivity wrote: On 05/27/2010 12:47 PM, Sheng Yang wrote: From: Dexuan Cuidexuan@intel.com This patch enable guest to use XSAVE/XRSTOR instructions. We assume that host_xcr0 would use all possible bits that OS supported. And we loaded xcr0

Re: [PATCH] KVM: x86: XSAVE/XRSTOR live migration support

2010-05-27 Thread Sheng Yang
On Thursday 27 May 2010 18:02:31 Avi Kivity wrote: On 05/27/2010 12:48 PM, Sheng Yang wrote: This patch enable save/restore of xsave state. Signed-off-by: Sheng Yangsh...@linux.intel.com --- arch/x86/include/asm/kvm.h | 29 arch/x86/kvm/x86.c | 79

Re: [PATCH 1/3] vhost: fix to check the return value of copy_to/from_user() correctly

2010-05-27 Thread Michael S. Tsirkin
On Thu, May 27, 2010 at 06:58:03PM +0900, Takuya Yoshikawa wrote: copy_to/from_user() returns the number of bytes that could not be copied. So we need to check if it is not zero, and in that case, we should return the error number -EFAULT rather than directly return the return value from

Re: [PATCH 2/3] vhost-net: fix to check the return value of copy_to/from_user() correctly

2010-05-27 Thread Michael S. Tsirkin
On Thu, May 27, 2010 at 07:01:58PM +0900, Takuya Yoshikawa wrote: copy_to/from_user() returns the number of bytes that could not be copied. So we need to check if it is not zero, and in that case, we should return the error number -EFAULT rather than directly return the return value from

Re: [PATCH 3/3] vhost: fix the memory leak which will happen when memory_access_ok fails

2010-05-27 Thread Michael S. Tsirkin
On Thu, May 27, 2010 at 07:03:56PM +0900, Takuya Yoshikawa wrote: We need to free newmem when vhost_set_memory() fails to complete. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- Thanks, applied. drivers/vhost/vhost.c |4 +++- 1 files changed, 3 insertions(+), 1

[GIT PULL net-next-2.6] vhost-net cleanups

2010-05-27 Thread Michael S. Tsirkin
David, The following tree is on top of net-next-2.6. Please merge it for 2.6.36. Thanks! The following changes since commit 7a9b149212f3716c598afe973b6261fd58453b7a: Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 (2010-05-20 21:26:12 -0700) are available in the git

Re: [PATCH 2/2] KVM: MMU: fix relaxing permission

2010-05-27 Thread Xiao Guangrong
Avi Kivity wrote: On 05/26/2010 05:46 AM, Xiao Guangrong wrote: There is a relaxing permission operation in set_spte(): if guest's CR0.WP is not set and R/W #PF occurs in supervisor-level, the mapping path might set to writable, then user can allow to write. @@ -1859,8 +1859,7 @@ static

Re: [PATCH 2/2] KVM: MMU: fix relaxing permission

2010-05-27 Thread Avi Kivity
On 05/27/2010 02:00 PM, Xiao Guangrong wrote: The host always sets cr0.wp (in shadow mode) so we can write protect page tables. So when the guest clears cr0.wp, we emulate a gpte with gpte.w=0 and gpte.u=1 in two ways: - spte.w=1, spte.u=0: this will allow the guest kernel to write but trap

Re: [PATCH] KVM: x86: XSAVE/XRSTOR live migration support

2010-05-27 Thread Avi Kivity
On 05/27/2010 01:33 PM, Sheng Yang wrote: If we do that then xcr0 needs to be in a separate structure, say kvm_xcr, with a flags field and reserved space of its own for future xcr growth. I meant to put it into sregs, but found it's already full... How about extended sregs? Isn't

[PATCH 1/3] KVM: MMU: Allow spte.w=1 for gpte.w=0 and cr0.wp=0 only in shadow mode

2010-05-27 Thread Avi Kivity
When tdp is enabled, the guest's cr0.wp shouldn't have any effect on spte permissions. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/mmu.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 136e160..39dd8d3 100644

[PATCH 0/3] Fix cr0.wp=0 emulation

2010-05-27 Thread Avi Kivity
Xiao didn't find the nice cr0.wp=0 trick because it wasn't there, removed accidentally by b70ccb0b3fd. Restore the trick and document it. Avi Kivity (3): KVM: MMU: Allow spte.w=1 for gpte.w=0 and cr0.wp=0 only in shadow mode KVM: MMU: Remove user access when allowing kernel access to

[PATCH 2/3] KVM: MMU: Remove user access when allowing kernel access to gpte.w=0 page

2010-05-27 Thread Avi Kivity
If cr0.wp=0, we have to allow the guest kernel access to a page with pte.w=0. We do that by setting spte.w=1, since the host cr0.wp must remain set so the host can write protect pages. Once we allow write access, we must remove user access otherwise we mistakenly allow the user to write the page.

[PATCH 3/3] KVM: MMU: Document cr0.wp emulation

2010-05-27 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- Documentation/kvm/mmu.txt | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt index 2201dcb..6528ad9 100644 --- a/Documentation/kvm/mmu.txt +++

Re: [PATCH 2/2] KVM: MMU: fix relaxing permission

2010-05-27 Thread Avi Kivity
On 05/27/2010 02:18 PM, Avi Kivity wrote: And, i think use 'spte.w=1, spte.u=0' to emulate 'guest cr0.wp=0 and gpte.w=0' is not a good way since it can completely stop user process access, but in this case, user process is usually read and kernel lazily to write, just like vdso, it will

[GIT PULL net-2.6] vhost-net: error handling fixes

2010-05-27 Thread Michael S. Tsirkin
David, The following tree includes fixes dealing with error handling in vhost-net. It is on top of net-2.6. Please merge it for 2.6.35. Thanks! The following changes since commit 8a74ad60a546b13bd1096b2a61a7a5c6fd9ae17c: net: fix lock_sock_bh/unlock_sock_bh (2010-05-27 00:30:53 -0700) are

Re: [PATCH] device-assignment: don't truncate MSIX capabilities table size

2010-05-27 Thread Avi Kivity
On 05/26/2010 02:08 AM, Alex Williamson wrote: PCI_MSIX_TABSIZE is 0x07ff 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 to majord...@vger.kernel.org More majordomo

Re: [PATCHv2-RFC 0/2] virtio: put last seen used index into ring itself

2010-05-27 Thread Avi Kivity
On 05/26/2010 10:50 PM, Michael S. Tsirkin wrote: Here's a rewrite of the original patch with a new layout. I haven't tested it yet so no idea how this performs, but I think this addresses the cache bounce issue raised by Avi. Posting for early flames/comments. Generally, the Host end of the

Re: [PATCH 2/3] KVM: MMU: Remove user access when allowing kernel access to gpte.w=0 page

2010-05-27 Thread Xiao Guangrong
Avi Kivity wrote: If cr0.wp=0, we have to allow the guest kernel access to a page with pte.w=0. We do that by setting spte.w=1, since the host cr0.wp must remain set so the host can write protect pages. Once we allow write access, we must remove user access otherwise we mistakenly allow the

Re: [PATCH] KVM: x86: Propagate fpu_alloc errors

2010-05-27 Thread Avi Kivity
On 05/25/2010 05:01 PM, Jan Kiszka wrote: Memory allocation may fail. Propagate such errors. Applied, thanks. Signed-off-by: Jan Kiszkajan.kis...@siemens.com --- arch/x86/include/asm/kvm_host.h |2 +- arch/x86/kvm/svm.c |7 ++- arch/x86/kvm/vmx.c

Re: [PATCH] kvm mmu: optimizations when tdp is in use

2010-05-27 Thread Marcelo Tosatti
On Thu, May 27, 2010 at 04:06:34PM +0800, Gui Jianfeng wrote: In case of using tdp, checking write protected page isn't needed and quadrant also no need to be calculated. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |7 +-- 1 files changed, 5

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Oleg Nesterov
On 05/27, Michael S. Tsirkin wrote: On Tue, May 18, 2010 at 05:04:51PM -0700, Sridhar Samudrala wrote: Add a new kernel API to create a singlethread workqueue and attach it's task to current task's cgroup and cpumask. Signed-off-by: Sridhar Samudrala s...@us.ibm.com Could someone

Re: [PATCH] qemu: Enable XSAVE related CPUID

2010-05-27 Thread Avi Kivity
On 05/27/2010 12:50 PM, Sheng Yang wrote: We can support it in KVM now. The initial values are the minimal requirement of XSAVE capable processor. Signed-off-by: Sheng Yangsh...@linux.intel.com --- target-i386/cpuid.c | 32 1 files changed, 32

Re: Copy and paste feature across guest and host

2010-05-27 Thread Dor Laor
On 05/27/2010 12:17 PM, Tomasz Chmielewski wrote: Just installed Fedora13 as guest on KVM. However there is no cross-platform copy and paste feature. I trust I have setup this feature on other guest sometime before. Unfortunately I can't the relevant document. Could you please shed me some

Re: [PATCH 10/17] arch/ia64/kvm: Add missing spin_unlock

2010-05-27 Thread Avi Kivity
On 05/26/2010 06:57 PM, Julia Lawall wrote: From: Julia Lawallju...@diku.dk Add a spin_unlock missing on the error path. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) //smpl @@ expression E1; @@ * spin_lock(E1,...); +... when != E1 if (...) {

[PATCH] KVM: MMU: Document large pages

2010-05-27 Thread Avi Kivity
Signed-off-by: Avi Kivity a...@redhat.com --- Documentation/kvm/mmu.txt | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/Documentation/kvm/mmu.txt b/Documentation/kvm/mmu.txt index 1e7ecdd..6a0cab2 100644 --- a/Documentation/kvm/mmu.txt +++

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Oleg Nesterov
On 05/27, Michael S. Tsirkin wrote: On Thu, May 27, 2010 at 02:44:48PM +0200, Oleg Nesterov wrote: On 05/27, Michael S. Tsirkin wrote: On Tue, May 18, 2010 at 05:04:51PM -0700, Sridhar Samudrala wrote: Add a new kernel API to create a singlethread workqueue and attach it's task

Re: [PATCH] vhost-net: fix reversed logic in mask notifiers

2010-05-27 Thread Avi Kivity
On 05/25/2010 05:00 PM, Michael S. Tsirkin wrote: When guest notifier is assigned, we set mask notifier, which will assign kvm irqfd. When guest notifier is unassigned, mask notifier is unset, which should unassign kvm irqfd. The way to do this is to call mask notifier telling it to mask the

Re: [PATCH] qemu: Enable XSAVE related CPUID

2010-05-27 Thread Sheng Yang
On Thursday 27 May 2010 20:56:17 Avi Kivity wrote: On 05/27/2010 12:50 PM, Sheng Yang wrote: We can support it in KVM now. The initial values are the minimal requirement of XSAVE capable processor. Signed-off-by: Sheng Yangsh...@linux.intel.com --- target-i386/cpuid.c | 32

Re: [PATCHv2-RFC 0/2] virtio: put last seen used index into ring itself

2010-05-27 Thread Michael S. Tsirkin
On Thu, May 27, 2010 at 03:07:52PM +0300, Avi Kivity wrote: I missed the spec patch, can you repost it? Still work in progress, but here it is. Note I am still debating with myself whether we should split avail idx and flags into separate cache lines. diff --git a/virtio-spec.lyx

Re: Copy and paste feature across guest and host

2010-05-27 Thread Markus Breitländer
Am 27.05.2010 15:19, schrieb Dor Laor: On 05/27/2010 12:17 PM, Tomasz Chmielewski wrote: Just installed Fedora13 as guest on KVM. However there is no cross-platform copy and paste feature. I trust I have setup this feature on other guest sometime before. Unfortunately I can't the relevant

Re: [Qemu-devel] [PATCH 0/2] Fix scsi-generic breakage in upstream qemu-kvm.git

2010-05-27 Thread Nicholas A. Bellinger
On Thu, 2010-05-20 at 15:18 +0200, Kevin Wolf wrote: Am 17.05.2010 18:45, schrieb Nicholas A. Bellinger: From: Nicholas Bellinger n...@linux-iscsi.org Greetings, Attached are the updated patches following hch's comments to fix scsi-generic device breakage with find_image_format()

Re: [PATCH] Add Documentation/kvm/msr.txt

2010-05-27 Thread Glauber Costa
On Thu, May 27, 2010 at 11:15:43AM +0300, Avi Kivity wrote: On 05/26/2010 09:04 PM, Glauber Costa wrote: This patch adds a file that documents the usage of KVM-specific MSRs. Looks good. A few comments: + +Custom MSR list + + +The current supported Custom MSR list is: +

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Tejun Heo
Hello, On 05/27/2010 03:12 PM, Michael S. Tsirkin wrote: I don't understand the reasons for this patch, but this doesn't matter. Depending on userspace application, driver can create a lot of work for a workqueue to handle. By making the workqueue thread belong in a cgroup, we make it

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Sridhar Samudrala
On Thu, 2010-05-27 at 14:44 +0200, Oleg Nesterov wrote: On 05/27, Michael S. Tsirkin wrote: On Tue, May 18, 2010 at 05:04:51PM -0700, Sridhar Samudrala wrote: Add a new kernel API to create a singlethread workqueue and attach it's task to current task's cgroup and cpumask.

Re: [PATCH 3/3] KVM test: Add implementation of network based unattended installation

2010-05-27 Thread Lucas Meneghel Rodrigues
On Wed, 2010-05-19 at 17:20 +0800, Jason Wang wrote: This patch could let the unattended installation to be done through the following method: - cdrom: the original method which does the installation from cdrom - url: installing the linux guest from http or ftp, tree url was specified

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Michael S. Tsirkin
On Thu, May 27, 2010 at 06:15:54PM +0200, Tejun Heo wrote: Hello, On 05/27/2010 03:12 PM, Michael S. Tsirkin wrote: I don't understand the reasons for this patch, but this doesn't matter. Depending on userspace application, driver can create a lot of work for a workqueue to handle. By

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Michael S. Tsirkin
On Thu, May 27, 2010 at 09:24:18AM -0700, Sridhar Samudrala wrote: On Thu, 2010-05-27 at 14:44 +0200, Oleg Nesterov wrote: On 05/27, Michael S. Tsirkin wrote: On Tue, May 18, 2010 at 05:04:51PM -0700, Sridhar Samudrala wrote: Add a new kernel API to create a singlethread workqueue and

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Tejun Heo
Hello, On 05/27/2010 06:39 PM, Michael S. Tsirkin wrote: Unless you're gonna convert every driver to use this special kind of workqueue (and what happens when multiple tasks from different cgroups share the driver?), We'll then create a workqueue per task. Each workqueue will have the

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Oleg Nesterov
What I am actually worried about is Tejun's rework, I am not sure cmwq has the this thread services that wq property... On 05/27, Sridhar Samudrala wrote: On Thu, 2010-05-27 at 14:44 +0200, Oleg Nesterov wrote: Instead, cgroup.c (or whoever needs this) can do struct move_struct {

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Michael S. Tsirkin
On Thu, May 27, 2010 at 06:56:20PM +0200, Tejun Heo wrote: Hello, On 05/27/2010 06:39 PM, Michael S. Tsirkin wrote: Unless you're gonna convert every driver to use this special kind of workqueue (and what happens when multiple tasks from different cgroups share the driver?), We'll

[PATCH v3] Add Documentation/kvm/msr.txt

2010-05-27 Thread Glauber Costa
This patch adds a file that documents the usage of KVM-specific MSRs. [ v2: added comments from Randy ] [ v2: added comments from Avi ] Signed-off-by: Glauber Costa glom...@redhat.com --- Documentation/kvm/msr.txt | 152 + 1 files changed, 152

Re: Clock jumps

2010-05-27 Thread john stultz
On Thu, May 27, 2010 at 11:32 AM, Bernhard Schmidt be...@birkenwald.de wrote: Alexander Graf ag...@suse.de wrote: Do you have ntpd running inside the guest? I have a bug report lying around about 2.6.33 with kvm-clock jumping in time when ntpd is used:

[PATCH 0/1] ceph/rbd block driver for qemu-kvm (v2)

2010-05-27 Thread Christian Brunner
Hi, Based on the review notes Blue Swirl sent us after my last mail, Yehuda cleaned up the header files. The patch is much smaller now and I hope that you accept it for inclusion. To build it, you will need the testing (or unstable) git head of ceph now. The required header files will be part

Re: [PATCH] Add Documentation/kvm/msr.txt

2010-05-27 Thread Zachary Amsden
On 05/27/2010 06:02 AM, Glauber Costa wrote: On Thu, May 27, 2010 at 11:15:43AM +0300, Avi Kivity wrote: On 05/26/2010 09:04 PM, Glauber Costa wrote: This patch adds a file that documents the usage of KVM-specific MSRs. Looks good. A few comments: + +Custom MSR

Re: [PATCH] Add Documentation/kvm/msr.txt

2010-05-27 Thread Glauber Costa
On Thu, May 27, 2010 at 10:13:12AM -1000, Zachary Amsden wrote: On 05/27/2010 06:02 AM, Glauber Costa wrote: On Thu, May 27, 2010 at 11:15:43AM +0300, Avi Kivity wrote: On 05/26/2010 09:04 PM, Glauber Costa wrote: This patch adds a file that documents the usage of KVM-specific MSRs. Looks

Re: [PATCH] Add Documentation/kvm/msr.txt

2010-05-27 Thread Zachary Amsden
On 05/27/2010 10:36 AM, Glauber Costa wrote: On Thu, May 27, 2010 at 10:13:12AM -1000, Zachary Amsden wrote: On 05/27/2010 06:02 AM, Glauber Costa wrote: On Thu, May 27, 2010 at 11:15:43AM +0300, Avi Kivity wrote: On 05/26/2010 09:04 PM, Glauber Costa wrote: This

Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueue attached to the current task's cgroup

2010-05-27 Thread Tejun Heo
Hello, Michael. On 05/27/2010 07:32 PM, Michael S. Tsirkin wrote: Well, this is why I proposed adding a new API for creating workqueue within workqueue.c, rather than exposing the task and attaching it to cgroups in our driver: so that workqueue maintainers can fix the implementation if it

Re: Clock jumps

2010-05-27 Thread Zachary Amsden
On 05/27/2010 08:32 AM, Bernhard Schmidt wrote: Alexander Grafag...@suse.de wrote: Hi, Do you have ntpd running inside the guest? I have a bug report lying around about 2.6.33 with kvm-clock jumping in time when ntpd is used: https://bugzilla.novell.com/show_bug.cgi?id=582260 I

Re: Clock jumps

2010-05-27 Thread Bernhard Schmidt
On 27.05.2010 21:08, john stultz wrote: Hi John, I'd be very interested in hearing more about the host side issue. So this happened with the same kernel that you were using before, with no trouble? Correct. Could you also send dmesg output from this boot? And if you can find any older

Re: Clock jumps

2010-05-27 Thread Bernhard Schmidt
On 27.05.2010 23:53, Zachary Amsden wrote: Hello Zachary, I have server side fixes for this kvm-clock which seem to give me a stable clock on this machine, but for true SMP stability, you will need Glauber's guest side changes to kvmclock as well. It is impossible to guarantee strictly

Re: Clock jumps

2010-05-27 Thread Zachary Amsden
On 05/27/2010 12:12 PM, Bernhard Schmidt wrote: On 27.05.2010 23:53, Zachary Amsden wrote: Hello Zachary, I have server side fixes for this kvm-clock which seem to give me a stable clock on this machine, but for true SMP stability, you will need Glauber's guest side changes to kvmclock as

Re: Clock jumps

2010-05-27 Thread Zachary Amsden
On 05/27/2010 12:12 PM, Bernhard Schmidt wrote: On 27.05.2010 23:53, Zachary Amsden wrote: Hello Zachary, I have server side fixes for this kvm-clock which seem to give me a stable clock on this machine, but for true SMP stability, you will need Glauber's guest side changes to kvmclock as

Re: [GIT PULL net-2.6] vhost-net: error handling fixes

2010-05-27 Thread David Miller
From: Michael S. Tsirkin m...@redhat.com Date: Thu, 27 May 2010 14:57:14 +0300 David, The following tree includes fixes dealing with error handling in vhost-net. It is on top of net-2.6. Please merge it for 2.6.35. Thanks! The following changes since commit

Re: Clock jumps

2010-05-27 Thread john stultz
On Thu, 2010-05-27 at 23:48 +0200, Bernhard Schmidt wrote: On 27.05.2010 21:08, john stultz wrote: I'd be very interested in hearing more about the host side issue. So this happened with the same kernel that you were using before, with no trouble? Correct. Could you also send dmesg

Re: [PATCH] Add Documentation/kvm/msr.txt

2010-05-27 Thread Glauber Costa
On Thu, May 27, 2010 at 11:02:35AM -1000, Zachary Amsden wrote: On 05/27/2010 10:36 AM, Glauber Costa wrote: On Thu, May 27, 2010 at 10:13:12AM -1000, Zachary Amsden wrote: On 05/27/2010 06:02 AM, Glauber Costa wrote: On Thu, May 27, 2010 at 11:15:43AM +0300, Avi Kivity wrote: On 05/26/2010

Re: [PATCH] kvm mmu: optimizations when tdp is in use

2010-05-27 Thread Gui Jianfeng
Marcelo Tosatti wrote: On Thu, May 27, 2010 at 04:06:34PM +0800, Gui Jianfeng wrote: In case of using tdp, checking write protected page isn't needed and quadrant also no need to be calculated. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |7 +-- 1

  1   2   >