[COMMIT master] document boot option to -drive parameter

2010-05-04 Thread Avi Kivity
From: Bruce Rogers brog...@novell.com The boot option is missing from the documentation for the -drive parameter. If there is a better way to descibe it, I'm all ears. Signed-off-by: Bruce Rogers brog...@novell.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/qemu-options.hx

[COMMIT master] Test cmps between two IO locations.

2010-05-04 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/user/test/x86/emulator.c b/kvm/user/test/x86/emulator.c index c6adbb5..db84c13 100644 --- a/kvm/user/test/x86/emulator.c +++

[COMMIT master] test: access: don't expect fetch fault indication if !efer.nx

2010-05-04 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Bit 4 of the page-fault error code can only be set if efer.nx=1. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/user/test/x86/access.c b/kvm/user/test/x86/access.c index 5addd15..3338fbc 100644 ---

[COMMIT master] test: access: consolidate test failure reporting into a function

2010-05-04 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/kvm/user/test/x86/access.c b/kvm/user/test/x86/access.c index dbc1213..0906691 100644 --- a/kvm/user/test/x86/access.c +++ b/kvm/user/test/x86/access.c @@

[COMMIT master] test: access: allow the processor not to set pde.a if a fault occurs

2010-05-04 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Some processors only set accessed bits if the translation is valid; allow this behaviour. This squelchs errors running with EPT. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/user/test/x86/access.c

[COMMIT master] Add test for ljmp.

2010-05-04 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Test that ljmp with operand in IO memory works. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/user/test/x86/emulator.c b/kvm/user/test/x86/emulator.c index db84c13..4967d1f 100644 ---

[COMMIT master] qemu-kvm: fix crash on reboot with vhost-net

2010-05-04 Thread Avi Kivity
From: Michael S. Tsirkin m...@redhat.com When vhost-net is disabled on reboot, we set msix mask notifier to NULL to disable further mask/unmask notifications. Code currently tries to pass this NULL to notifier, leading to a crash. The right thing to do is to add explicit APIs to enable/disable

[COMMIT master] qemu-kvm tests cleanup

2010-05-04 Thread Avi Kivity
From: Naphtali Sprei nsp...@redhat.com Mainly removed unused/unnecessary files and references to them Signed-off-by: Naphtali Sprei nsp...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/user/README b/kvm/user/README new file mode 100644 index 000..6a83831 ---

[COMMIT master] qemu-kvm tests: add printing for passing tests

2010-05-04 Thread Avi Kivity
From: Naphtali Sprei nsp...@redhat.com Signed-off-by: Naphtali Sprei nsp...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/user/test/x86/realmode.c b/kvm/user/test/x86/realmode.c index bfc2942..bc4ed97 100644 --- a/kvm/user/test/x86/realmode.c +++

[COMMIT master] Merge branch 'upstream-merge'

2010-05-04 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com * upstream-merge: (65 commits) block: read-only: open cdrom as read-only when using monitor's change command fix whitespace bogon in some versions of make Changes to usb-linux to conform to coding style Add KVM CFLAGS to vhost build QMP:

[COMMIT master] Merge branch 'upstream-merge'

2010-05-04 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com * upstream-merge: (243 commits) virtio-serial: Implement flow control for individual ports virtio-serial: Discard data that guest sends us when ports aren't connected virtio-serial: Apps should consume all data that guest sends out / Fix virtio api

[COMMIT master] qemu-kvm: emulator tests: fix msr test

2010-05-04 Thread Avi Kivity
From: Naphtali Sprei nsp...@redhat.com use correct 64 bit mode inline assembly constraints use a canonical form address when writing to the MSR_KERNEL_GS_BASE MSR Signed-off-by: Naphtali Sprei nsp...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[COMMIT master] kvm test: Fix i386 crossbuild

2010-05-04 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com This fixes make ARCH=i386 of the KVM micro tests on x86-64 hosts. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/kvm/user/config-x86-common.mak b/kvm/user/config-x86-common.mak index

Re: [PATCH 1/2] x86: eliminate TS_XSAVE

2010-05-04 Thread Avi Kivity
On 05/04/2010 12:45 AM, H. Peter Anvin wrote: I was trying to avoid a performance regression relative to the current code, as it appears that some care was taken to avoid the memory reference. I agree that it's probably negligible compared to the save/restore code. If the x86 maintainers

2.6.33.3: possible recursive locking detected

2010-05-04 Thread CaT
I'm currently running 2.6.33.3 in a KVM instance emulating a core2duo on 1 cpu with virtio HDs running on top of a core2duo host running 2.6.33.3. qemu-kvm version 0.12.3. When doing: echo noop /sys/block/vdd/queue/scheduler I got: [ 1424.438241] = [

Re: [PATCH 16/22] KVM: MMU: Track page fault data in struct vcpu

2010-05-04 Thread Avi Kivity
On 05/03/2010 07:32 PM, Joerg Roedel wrote: On Tue, Apr 27, 2010 at 03:58:36PM +0300, Avi Kivity wrote: So we probably need to upgrade gva_t to a u64. Please send this as a separate patch, and test on i386 hosts. Are there _any_ regular tests of KVM on i386 hosts? For me this is

Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Avi Kivity
On 05/04/2010 07:38 AM, Rusty Russell wrote: On Fri, 19 Feb 2010 08:52:20 am Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph, could you look over this please? I note that the interface seems full of warts to me, this might be a

Re: [Qemu-devel] Qemu-KVM 0.12.3 and Multipath - Assertion

2010-05-04 Thread Kevin Wolf
Am 03.05.2010 23:26, schrieb Peter Lieven: Hi Qemu/KVM Devel Team, i'm using qemu-kvm 0.12.3 with latest Kernel 2.6.33.3. As backend we use open-iSCSI with dm-multipath. Multipath is configured to queue i/o if no path is available. If we create a failure on all paths, qemu starts to

Re: 2.6.33.3: possible recursive locking detected

2010-05-04 Thread Avi Kivity
On 05/04/2010 10:03 AM, CaT wrote: I'm currently running 2.6.33.3 in a KVM instance emulating a core2duo on 1 cpu with virtio HDs running on top of a core2duo host running 2.6.33.3. qemu-kvm version 0.12.3. Doesn't appear to be related to kvm. Copying lkml. When doing: echo

Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Jens Axboe
On Tue, May 04 2010, Rusty Russell wrote: On Fri, 19 Feb 2010 08:52:20 am Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph, could you look over this please? I note that the interface seems full of warts to me, this might be

Re: Booting/installing WindowsNT

2010-05-04 Thread Avi Kivity
On 05/03/2010 08:03 PM, Michael Tokarev wrote: Michael, can you try to use -cpu host,-vme and see if that makes a difference? With -cpu host,-vme winNT boots just fine as with just -cpu host. I also tried with -cpu qemu64 and kvm64, with +vme and -vme (4 combinations in total) - in all cases

Re: [PATCH 16/22] KVM: MMU: Track page fault data in struct vcpu

2010-05-04 Thread Roedel, Joerg
On Tue, May 04, 2010 at 03:53:57AM -0400, Avi Kivity wrote: On 05/03/2010 07:32 PM, Joerg Roedel wrote: On Tue, Apr 27, 2010 at 03:58:36PM +0300, Avi Kivity wrote: So we probably need to upgrade gva_t to a u64. Please send this as a separate patch, and test on i386 hosts.

Re: [PATCH 16/22] KVM: MMU: Track page fault data in struct vcpu

2010-05-04 Thread Avi Kivity
On 05/04/2010 12:11 PM, Roedel, Joerg wrote: On Tue, May 04, 2010 at 03:53:57AM -0400, Avi Kivity wrote: On 05/03/2010 07:32 PM, Joerg Roedel wrote: On Tue, Apr 27, 2010 at 03:58:36PM +0300, Avi Kivity wrote: So we probably need to upgrade gva_t to a u64. Please send this

[PATCH] qemu-kvm: Process exit requests in kvm loop

2010-05-04 Thread Jan Kiszka
This unbreaks the monitor quit command for qemu-kvm. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- qemu-kvm.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 91f0222..43d599d 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -2047,6

Re: KVM: x86: properly update ready_for_interrupt_injection

2010-05-04 Thread Avi Kivity
On 05/04/2010 05:04 AM, Marcelo Tosatti wrote: The recent changes to emulate string instructions without entering guest mode exposed a bug where pending interrupts are not properly reflected in ready_for_interrupt_injection. The result is that userspace overwrites a previously queued interrupt,

Re: [PATCH v2] KVM: x86: avoid unnecessary bitmap allocation when memslot is clean

2010-05-04 Thread Avi Kivity
On 04/28/2010 12:50 PM, Takuya Yoshikawa wrote: Hi Marcelo, Avi, I updated the patch as follows. Changelog: 1. Inserted one r = -ENOMEM; line following Avi's advice. 2. Little change of explanation about performance improvements. I'm now testing and cleaning up my next patch series based

Re: [PATCH 16/22] KVM: MMU: Track page fault data in struct vcpu

2010-05-04 Thread Roedel, Joerg
On Tue, May 04, 2010 at 05:20:02AM -0400, Avi Kivity wrote: On 05/04/2010 12:11 PM, Roedel, Joerg wrote: On Tue, May 04, 2010 at 03:53:57AM -0400, Avi Kivity wrote: On 05/03/2010 07:32 PM, Joerg Roedel wrote: On Tue, Apr 27, 2010 at 03:58:36PM +0300, Avi Kivity wrote:

Re: apparent key mapping error for usb keyboard

2010-05-04 Thread Avi Kivity
On 04/27/2010 12:46 PM, Michael Tokarev wrote: I've a debian bugreport that claims to have a fix for apparently wrong keymap for usb keyboard. I noticed this before with ps/2 keyboard too, the sympthoms were that e.g windows keys were not working in guests, but later on that has been fixed.

Re: [PATCH 16/22] KVM: MMU: Track page fault data in struct vcpu

2010-05-04 Thread Avi Kivity
On 05/04/2010 12:37 PM, Roedel, Joerg wrote: This is the lockdep warning I get when I start booting a Linux kernel. It is with the nested-npt patchset but the warning occurs without it too (slightly different backtraces then). [60390.953424]

Re: [PATCH 16/22] KVM: MMU: Track page fault data in struct vcpu

2010-05-04 Thread Avi Kivity
On 05/04/2010 12:45 PM, Avi Kivity wrote: Just a silly bug. kvm_pdptr_read() can cause a guest memory read on svm, in this case with the mmu lock taken. I'll post something to fix it. I guess this was not reported because most svm machines have npt, and this requires npt=0 to trigger.

[PATCH] KVM: MMU: Don't read pdptrs with mmu spinlock held in mmu_alloc_roots

2010-05-04 Thread Avi Kivity
On svm, kvm_read_pdptr() may require reading guest memory, which can sleep. Push the spinlock into mmu_alloc_roots(), and only take it after we've read the pdptr. Signed-off-by: Avi Kivity a...@redhat.com --- Marcelo, dropping and re-acquiring the lock before mmu_sync_roots(), is fine, yes?

[PATCH] KVM: kvm_pdptr_read() may sleep

2010-05-04 Thread Avi Kivity
Annotate it thusly. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/kvm_cache_regs.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/kvm_cache_regs.h b/arch/x86/kvm/kvm_cache_regs.h index cff851c..d2a98f8 100644 ---

Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Christoph Hellwig
On Tue, May 04, 2010 at 02:08:24PM +0930, Rusty Russell wrote: On Fri, 19 Feb 2010 08:52:20 am Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph, could you look over this please? I note that the interface seems full of warts to

Re: [PATCH] KVM: MMU: Don't read pdptrs with mmu spinlock held in mmu_alloc_roots

2010-05-04 Thread Roedel, Joerg
On Tue, May 04, 2010 at 06:03:50AM -0400, Avi Kivity wrote: On svm, kvm_read_pdptr() may require reading guest memory, which can sleep. Push the spinlock into mmu_alloc_roots(), and only take it after we've read the pdptr. This fixes the lockdep issue for me. Thanks. Tested-by: Joerg Roedel

[GIT PULL] amended: first round of vhost-net enhancements for net-next

2010-05-04 Thread Michael S. Tsirkin
David, This is an amended pull request: I have rebased the tree to the correct patches. This has been through basic tests and seems to work fine here. The following tree includes a couple of enhancements that help vhost-net. Please pull them for net-next. Another set of patches is under

Re: [Qemu-devel] Qemu-KVM 0.12.3 and Multipath - Assertion

2010-05-04 Thread Peter Lieven
hi kevin, i set a breakpint at bmdma_active_if. the first 2 breaks encountered when the last path in the multipath failed, but the assertion was not true. when i kicked one path back in the breakpoint was reached again, this time leading to an assert. the stacktrace is from the point shortly

Re: [PATCH 16/22] KVM: MMU: Track page fault data in struct vcpu

2010-05-04 Thread Roedel, Joerg
On Tue, May 04, 2010 at 05:50:50AM -0400, Avi Kivity wrote: On 05/04/2010 12:45 PM, Avi Kivity wrote: Just a silly bug. kvm_pdptr_read() can cause a guest memory read on svm, in this case with the mmu lock taken. I'll post something to fix it. I guess this was not reported

[PATCH] KVM: Fix wallclock version writing race

2010-05-04 Thread Avi Kivity
Wallclock writing uses an unprotected global variable to hold the version; this can cause one guest to interfere with another if both write their wallclock at the same time. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/x86.c | 12 ++-- 1 files changed, 10 insertions(+), 2

Re: [PATCH 16/22] KVM: MMU: Track page fault data in struct vcpu

2010-05-04 Thread Avi Kivity
On 05/04/2010 03:00 PM, Roedel, Joerg wrote: On Tue, May 04, 2010 at 05:50:50AM -0400, Avi Kivity wrote: On 05/04/2010 12:45 PM, Avi Kivity wrote: Just a silly bug. kvm_pdptr_read() can cause a guest memory read on svm, in this case with the mmu lock taken. I'll post something to

Re: Booting/installing WindowsNT

2010-05-04 Thread Andre Przywara
Avi Kivity wrote: On 05/03/2010 08:03 PM, Michael Tokarev wrote: Michael, can you try to use -cpu host,-vme and see if that makes a difference? With -cpu host,-vme winNT boots just fine as with just -cpu host. I also tried with -cpu qemu64 and kvm64, with +vme and -vme (4 combinations in

Re: [Qemu-devel] Qemu-KVM 0.12.3 and Multipath - Assertion

2010-05-04 Thread Kevin Wolf
Am 04.05.2010 13:38, schrieb Peter Lieven: hi kevin, i set a breakpint at bmdma_active_if. the first 2 breaks encountered when the last path in the multipath failed, but the assertion was not true. when i kicked one path back in the breakpoint was reached again, this time leading to an

Re: Booting/installing WindowsNT

2010-05-04 Thread Michael Tokarev
Andre Przywara wrote: [] I managed to get a NT4 CD and can acknowledge the issues you see. I am about to debug this now. With -cpu host (on a AMD K8, similar to Michael's) I get to the point Michael mentioned: Microsoft (R) Windows NT (TM) Version 4.0 (Build 1381). 1 System Processor [512

[RFC][PATCH 0/12] KVM, x86, ppc, asm-generic: moving dirty bitmaps to user space

2010-05-04 Thread Takuya Yoshikawa
Hi, sorry for sending from my personal account. The following series are all from me: From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp The 3rd version of moving dirty bitmaps to user space. From this version, we add x86 and ppc and asm-generic people to CC lists. [To KVM people]

[RFC][PATCH 1/12 applied today] KVM: x86: avoid unnecessary bitmap allocation when memslot is clean

2010-05-04 Thread Takuya Yoshikawa
Although we always allocate a new dirty bitmap in x86's get_dirty_log(), it is only used as a zero-source of copy_to_user() and freed right after that when memslot is clean. This patch uses clear_user() instead of doing this unnecessary zero-source allocation. Performance improvement: as we can

[RFC][PATCH 2/12] KVM: introduce slot level dirty state management

2010-05-04 Thread Takuya Yoshikawa
This patch introduces is_dirty member for each memory slot. Using this member, we remove the dirty bitmap scans which are done in get_dirty_log(). This is important for moving dirty bitmaps to user space because we don't have any good ways to check bitmaps in user space with low cost and scanning

[RFC][PATCH 3/12] KVM: introduce wrapper functions to create and destroy dirty bitmaps

2010-05-04 Thread Takuya Yoshikawa
We will change the vmalloc() and vfree() to do_mmap() and do_munmap() later. This patch makes it easy and cleanup the code. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp Signed-off-by: Fernando Luis Vazquez Cao ferna...@oss.ntt.co.jp --- virt/kvm/kvm_main.c | 27

[RFC][PATCH 4/12] x86: introduce copy_in_user() for 32-bit

2010-05-04 Thread Takuya Yoshikawa
During the work of KVM's dirty page logging optimization, we encountered the need of copy_in_user() for 32-bit x86 and ppc: these will be used for manipulating dirty bitmaps in user space. So we implement copy_in_user() for 32-bit with existing generic copy user helpers. Signed-off-by: Takuya

[RFC][PATCH 5/12] x86: introduce __set_bit() like function for bitmaps in user space

2010-05-04 Thread Takuya Yoshikawa
During the work of KVM's dirty page logging optimization, we encountered the need of manipulating bitmaps in user space efficiantly. To achive this, we introduce a uaccess function for setting a bit in user space following Avi's suggestion. KVM is now using dirty bitmaps for live-migration and

[RFC][PATCH 6/12 not tested yet] PPC: introduce copy_in_user() for 32-bit

2010-05-04 Thread Takuya Yoshikawa
During the work of KVM's dirty page logging optimization, we encountered the need of copy_in_user() for 32-bit ppc and x86: these will be used for manipulating dirty bitmaps in user space. So we implement copy_in_user() for 32-bit with __copy_tofrom_user(). Signed-off-by: Takuya Yoshikawa

[patch uq/master 5/9] kvm: synchronize state from cpu context

2010-05-04 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com It is not safe to retrieve the KVM internal state of a given cpu while its potentially modifying it. Queue the request to run on cpu context, similarly to qemu-kvm. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu/kvm-all.c

[patch uq/master 4/9] port qemu-kvm's on_vcpu code

2010-05-04 Thread Marcelo Tosatti
run_on_cpu allows to execute work on a given CPUState context. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu/cpu-all.h === --- qemu.orig/cpu-all.h +++ qemu/cpu-all.h @@ -818,6 +818,7 @@ void

[patch uq/master 6/9] add cpu_is_stopped helper

2010-05-04 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu/cpu-all.h === --- qemu.orig/cpu-all.h +++ qemu/cpu-all.h @@ -818,6 +818,7 @@ void cpu_watchpoint_remove_all(CPUState void cpu_single_step(CPUState *env, int enabled);

[patch uq/master 9/9] kvm: enable smp 1

2010-05-04 Thread Marcelo Tosatti
Process INIT/SIPI requests and enable -smp 1. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu/kvm-all.c === --- qemu.orig/kvm-all.c +++ qemu/kvm-all.c @@ -593,11 +593,6 @@ int kvm_init(int smp_cpus) int ret;

[RFC][PATCH 7/12 not tested yet] PPC: introduce __set_bit() like function for bitmaps in user space

2010-05-04 Thread Takuya Yoshikawa
During the work of KVM's dirty page logging optimization, we encountered the need of manipulating bitmaps in user space efficiantly. To achive this, we introduce a uaccess function for setting a bit in user space following Avi's suggestion. KVM is now using dirty bitmaps for live-migration and

[RFC][PATCH resend 8/12] asm-generic: bitops: introduce le bit offset macro

2010-05-04 Thread Takuya Yoshikawa
Although we can use *_le_bit() helpers to treat bitmaps le arranged, having le bit offset calculation as a seperate macro gives us more freedom. For example, KVM has le arranged dirty bitmaps for VGA, live-migration and they are used in user space too. To avoid bitmap copies between kernel and

[RFC][PATCH 9/12] KVM: introduce a wrapper function of set_bit_user_non_atomic()

2010-05-04 Thread Takuya Yoshikawa
This is not to break the build for other architectures than x86 and ppc. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp Signed-off-by: Fernando Luis Vazquez Cao ferna...@oss.ntt.co.jp --- arch/ia64/include/asm/kvm_host.h|5 + arch/powerpc/include/asm/kvm_host.h |6

[RFC][PATCH RFC 10/12] KVM: move dirty bitmaps to user space

2010-05-04 Thread Takuya Yoshikawa
We move dirty bitmaps to user space. - Allocation and destruction: we use do_mmap() and do_munmap(). The new bitmap space is twice longer than the original one and we use the additional space for double buffering: this makes it possible to update the active bitmap while letting the user

[RFC][PATCH 11/12] KVM: introduce new API for getting/switching dirty bitmaps

2010-05-04 Thread Takuya Yoshikawa
Now that dirty bitmaps are accessible from user space, we export the addresses of these to achieve zero-copy dirty log check: KVM_GET_USER_DIRTY_LOG_ADDR We also need an API for triggering dirty bitmap switch to take the full advantage of double buffered bitmaps. KVM_SWITCH_DIRTY_LOG See

[RFC][PATCH 12/12 sample] qemu-kvm: use new API for getting/switching dirty bitmaps

2010-05-04 Thread Takuya Yoshikawa
We use new API for light dirty log access if KVM supports it. This conflicts with Marcelo's patches. So please take this as a sample patch. Signed-off-by: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp --- kvm/include/linux/kvm.h | 11 ++ qemu-kvm.c | 81

Re: [PATCH 1/3 v2] KVM MMU: make kvm_mmu_zap_page() return the number of zapped sp in total.

2010-05-04 Thread Marcelo Tosatti
On Mon, May 03, 2010 at 09:38:54PM +0800, Gui Jianfeng wrote: Hi Marcelo Actually, it doesn't only affect kvm_mmu_change_mmu_pages() but also affects kvm_mmu_remove_some_alloc_mmu_pages() which is called by mmu shrink routine. This will induce upper layer get a wrong number, so i think

[patch uq/master 0/9] enable smp 1 and related fixes

2010-05-04 Thread Marcelo Tosatti
-- 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 uq/master 1/9] kvm: set cpu_single_env around KVM_RUN ioctl

2010-05-04 Thread Marcelo Tosatti
Zero cpu_single_env before leaving global lock protection, and restore on return. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu/kvm-all.c === --- qemu.orig/kvm-all.c +++ qemu/kvm-all.c @@ -846,9 +846,11 @@ int

[patch uq/master 8/9] kvm: validate context for kvm cpu get/put operations

2010-05-04 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com Validate that KVM vcpu state is only read/written from cpu thread itself or that cpu is stopped. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: qemu/target-i386/kvm.c === ---

KVM call minutes for May 4

2010-05-04 Thread Chris Wright
KVM Forum topic ideas - mgmt interface (qemud) - working breakout sessions are welcome at the Forum stable tree - have a volunteer (thanks Justin) - Anthony will write up proposal which is basically - bug fixes actively proposed for stable tree - stable maintainer collects and applies -

Re: [PATCH] KVM: VMX: Avoid writing HOST_CR0 every entry

2010-05-04 Thread Marcelo Tosatti
On Mon, May 03, 2010 at 05:18:54PM +0300, Avi Kivity wrote: cr0.ts may change between entries, so we copy cr0 to HOST_CR0 before each entry. That is slow, so instead, set HOST_CR0 to have TS set unconditionally (which is a safe value), and issue a clts() just before exiting vcpu context if

Re: [RFC][PATCH resend 8/12] asm-generic: bitops: introduce le bit offset macro

2010-05-04 Thread Arnd Bergmann
On Tuesday 04 May 2010, Takuya Yoshikawa wrote: Although we can use *_le_bit() helpers to treat bitmaps le arranged, having le bit offset calculation as a seperate macro gives us more freedom. For example, KVM has le arranged dirty bitmaps for VGA, live-migration and they are used in user

[ kvm-Bugs-2996643 ] qemu-kvm -smb crashes with Samba 3.5.2

2010-05-04 Thread SourceForge.net
Bugs item #2996643, was opened at 2010-05-04 17:23 Message generated for change (Tracker Item Submitted) made by edolstra You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2996643group_id=180599 Please note that this message will contain a full copy of the

kvm guest: hrtimer issue with smp.

2010-05-04 Thread Stuart Sheldon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi all, Saw a long thread on this back in Oct. but did not see if this was resolved or not. We are experiencing hrtimer: interrupt took huge_number ns errors on the guest console with -smp 2 running on an Intel host. Both are running 2.6.33.3

[PATCH] KVM testing: New winutils.iso SHA1, refactoring some code

2010-05-04 Thread Lucas Meneghel Rodrigues
Make it possible to download the winutils.iso file right from its repository, making very convenient for users to perform windows testing. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com --- client/tests/kvm/get_started.py | 65 +++--- 1 files changed,

Re: [RFC][PATCH resend 8/12] asm-generic: bitops: introduce le bit offset macro

2010-05-04 Thread Avi Kivity
On 05/04/2010 06:03 PM, Arnd Bergmann wrote: On Tuesday 04 May 2010, Takuya Yoshikawa wrote: Although we can use *_le_bit() helpers to treat bitmaps le arranged, having le bit offset calculation as a seperate macro gives us more freedom. For example, KVM has le arranged dirty bitmaps for

Re: [PATCH] KVM: Fix wallclock version writing race

2010-05-04 Thread Avi Kivity
On 05/04/2010 03:02 PM, Avi Kivity wrote: Wallclock writing uses an unprotected global variable to hold the version; this can cause one guest to interfere with another if both write their wallclock at the same time. Signed-off-by: Avi Kivitya...@redhat.com This was pointed out by

Re: [PATCH] KVM: Fix wallclock version writing race

2010-05-04 Thread Glauber Costa
On Tue, May 04, 2010 at 03:02:24PM +0300, Avi Kivity wrote: Wallclock writing uses an unprotected global variable to hold the version; this can cause one guest to interfere with another if both write their wallclock at the same time. makes sense to me. ACK. -- To unsubscribe from this

Re: Booting/installing WindowsNT

2010-05-04 Thread Avi Kivity
On 05/04/2010 06:27 PM, Andre Przywara wrote: 3. In all other cases so far it BSoDs with STOP 0x3E error right before displaying that kernel message. MSDN talks about a mulitprocessor configuration error: http://msdn.microsoft.com/en-us/library/ms819006.aspx I suspected the offline CPUs in

Re: [PATCH] KVM: Get rid of KVM_REQ_KICK

2010-05-04 Thread Marcelo Tosatti
On Mon, May 03, 2010 at 05:19:08PM +0300, Avi Kivity wrote: KVM_REQ_KICK poisons vcpu-requests by having a bit set during normal operation. This causes the fast path check for a clear vcpu-requests to fail all the time, triggering tons of atomic operations. Avi, Do you have numbers? Fix

Re: [PATCH] KVM: Get rid of KVM_REQ_KICK

2010-05-04 Thread Avi Kivity
On 05/04/2010 07:31 PM, Marcelo Tosatti wrote: On Mon, May 03, 2010 at 05:19:08PM +0300, Avi Kivity wrote: KVM_REQ_KICK poisons vcpu-requests by having a bit set during normal operation. This causes the fast path check for a clear vcpu-requests to fail all the time, triggering tons of

Re: [Qemu-devel] Qemu-KVM 0.12.3 and Multipath - Assertion

2010-05-04 Thread Christoph Hellwig
On Tue, May 04, 2010 at 04:01:35PM +0200, Kevin Wolf wrote: Great, I'm going to submit it as a proper patch then. Christoph, by now I'm pretty sure it's right, but can you have another look if this is correct, anyway? It looks correct to me - we really shouldn't update the the fields until

Re: [PATCH 1/2] x86: eliminate TS_XSAVE

2010-05-04 Thread Suresh Siddha
On Sun, 2010-05-02 at 07:53 -0700, Avi Kivity wrote: The fpu code currently uses current-thread_info-status TS_XSAVE as a way to distinguish between XSAVE capable processors and older processors. The decision is not really task specific; instead we use the task status to avoid a global memory

Re: [PATCH 2/2] x86: Introduce 'struct fpu' and related API

2010-05-04 Thread Suresh Siddha
On Sun, 2010-05-02 at 07:53 -0700, Avi Kivity wrote: Currently all fpu state access is through tsk-thread.xstate. Since we wish to generalize fpu access to non-task contexts, wrap the state in a new 'struct fpu' and convert existing access to use an fpu API. Signal frame handlers are not

Re: [PATCH 1/2] x86: eliminate TS_XSAVE

2010-05-04 Thread Suresh Siddha
On Tue, 2010-05-04 at 00:41 -0700, Avi Kivity wrote: On 05/04/2010 12:45 AM, H. Peter Anvin wrote: I was trying to avoid a performance regression relative to the current code, as it appears that some care was taken to avoid the memory reference. I agree that it's probably negligible

Re: [PATCH 1/2] x86: eliminate TS_XSAVE

2010-05-04 Thread H. Peter Anvin
On 05/04/2010 11:15 AM, Suresh Siddha wrote: On Tue, 2010-05-04 at 00:41 -0700, Avi Kivity wrote: On 05/04/2010 12:45 AM, H. Peter Anvin wrote: I was trying to avoid a performance regression relative to the current code, as it appears that some care was taken to avoid the memory reference.

Re: virtio: put last_used and last_avail index into ring itself.

2010-05-04 Thread Michael S. Tsirkin
virtio: put last_used and last_avail index into ring itself. Generally, the other end of the virtio ring doesn't need to see where you're up to in consuming the ring. However, to completely understand what's going on from the outside, this information must be exposed. For example, if you

[PATCH 0/2] fix kvmclock bug - memory corruption

2010-05-04 Thread Glauber Costa
This patch series fixes I bug I just found with kvmclock, when I booted into a kernel without kvmclock enabled. Since I am setting msrs, I took the oportunity to use yet another function from upstream qemu (patch 1). Enjoy Glauber Costa (2): replace set_msr_entry with kvm_msr_entry turn off

[PATCH 1/2] replace set_msr_entry with kvm_msr_entry

2010-05-04 Thread Glauber Costa
this is yet another function that upstream qemu implements, so we can just use its implementation. Signed-off-by: Glauber Costa glom...@redhat.com --- qemu-kvm-x86.c| 39 --- target-i386/kvm.c |3 +++ 2 files changed, 19 insertions(+), 23

[PATCH 2/2] turn off kvmclock when resetting cpu

2010-05-04 Thread Glauber Costa
Currently, in the linux kernel, we reset kvmclock if we are rebooting into a crash kernel through kexec. The rationale, is that a new kernel won't follow the same memory addresses, and the memory where kvmclock is located in the first kernel, will be something else in the second one. We don't do

Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Christoph Hellwig
On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph, could you look over this please? I note that the interface seems full of warts to me, this might be a first step to cleaning them. The

Re: [Qemu-devel] [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Christoph Hellwig
On Tue, Apr 20, 2010 at 02:46:35AM +0100, Jamie Lokier wrote: Does this mean that virtio-blk supports all three combinations? 1. FLUSH that isn't a barrier 2. FLUSH that is also a barrier 3. Barrier that is not a flush 1 is good for fsync-like operations; 2 is good for

Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Michael S. Tsirkin
On Tue, May 04, 2010 at 08:54:59PM +0200, Christoph Hellwig wrote: On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph, could you look over this please? I note that the interface seems

Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Michael S. Tsirkin
On Tue, May 04, 2010 at 09:56:18PM +0300, Michael S. Tsirkin wrote: On Tue, May 04, 2010 at 08:54:59PM +0200, Christoph Hellwig wrote: On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph,

Re: [Qemu-devel] [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Michael S. Tsirkin
On Tue, May 04, 2010 at 08:56:14PM +0200, Christoph Hellwig wrote: On Tue, Apr 20, 2010 at 02:46:35AM +0100, Jamie Lokier wrote: Does this mean that virtio-blk supports all three combinations? 1. FLUSH that isn't a barrier 2. FLUSH that is also a barrier 3. Barrier that is not

Re: [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Jamie Lokier
Jens Axboe wrote: On Tue, May 04 2010, Rusty Russell wrote: ISTR someone mentioning a desire for such an API years ago, so CC'ing the usual I/O suspects... It would be nice to have a more fuller API for this, but the reality is that only the flush approach is really workable. Even just

Re: [PATCH 0/2] fix kvmclock bug - memory corruption

2010-05-04 Thread Zachary Amsden
On 05/04/2010 08:35 AM, Glauber Costa wrote: This patch series fixes I bug I just found with kvmclock, when I booted into a kernel without kvmclock enabled. Since I am setting msrs, I took the oportunity to use yet another function from upstream qemu (patch 1). Enjoy Glauber Costa (2):

Re: [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Jamie Lokier
Rusty Russell wrote: On Fri, 19 Feb 2010 08:52:20 am Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph, could you look over this please? I note that the interface seems full of warts to me, this might be a first step to

Re: [PATCH 1/3 v2] KVM MMU: make kvm_mmu_zap_page() return the number of zapped sp in total.

2010-05-04 Thread Gui Jianfeng
Marcelo Tosatti wrote: On Mon, May 03, 2010 at 09:38:54PM +0800, Gui Jianfeng wrote: Hi Marcelo Actually, it doesn't only affect kvm_mmu_change_mmu_pages() but also affects kvm_mmu_remove_some_alloc_mmu_pages() which is called by mmu shrink routine. This will induce upper layer get a

[PATCH] KVM: make kvm_mmu_zap_page() return the number of pages it actually freed.

2010-05-04 Thread Gui Jianfeng
Currently, kvm_mmu_zap_page() returning the number of freed children sp. This might confuse the caller, because caller don't know the actual freed number. Let's make kvm_mmu_zap_page() return the number of pages it actually freed. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com ---

[PATCH] KVM: mark page dirty when page is actually modified.

2010-05-04 Thread Gui Jianfeng
Sometime cmpxchg_gpte doesn't modify gpte, in such case, don't mark page table page as dirty. Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- arch/x86/kvm/paging_tmpl.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h

vCPU scalability for linux VMs

2010-05-04 Thread Alec Istomin
Gentlemen, Reaching out with a non-development question, sorry if it's not appropriate here. I'm looking for a way to improve Linux SMP VMs performance under KVM. My preliminary results show that single vCPU Linux VMs perform up to 10 times better than 4vCPU Linux VMs (consolidated

[PATCH] KVM: Fix debug output error

2010-05-04 Thread Gui Jianfeng
Fix a debug output error in walk_addr Signed-off-by: Gui Jianfeng guijianf...@cn.fujitsu.com --- arch/x86/kvm/paging_tmpl.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 89d66ca..d2c5164 100644 ---

Re: 2.6.33.3: possible recursive locking detected

2010-05-04 Thread Yong Zhang
On Tue, May 04, 2010 at 11:37:37AM +0300, Avi Kivity wrote: On 05/04/2010 10:03 AM, CaT wrote: I'm currently running 2.6.33.3 in a KVM instance emulating a core2duo on 1 cpu with virtio HDs running on top of a core2duo host running 2.6.33.3. qemu-kvm version 0.12.3. Can you try commit

Re: 2.6.33.3: possible recursive locking detected

2010-05-04 Thread Américo Wang
On Wed, May 5, 2010 at 10:32 AM, Yong Zhang yong.zh...@windriver.com wrote: On Tue, May 04, 2010 at 11:37:37AM +0300, Avi Kivity wrote: On 05/04/2010 10:03 AM, CaT wrote: I'm currently running 2.6.33.3 in a KVM instance emulating a core2duo on 1 cpu with virtio HDs running on top of a core2duo

Re: [RFC][PATCH resend 8/12] asm-generic: bitops: introduce le bit offset macro

2010-05-04 Thread Takuya Yoshikawa
On Tue, 04 May 2010 19:08:23 +0300 Avi Kivity a...@redhat.com wrote: On 05/04/2010 06:03 PM, Arnd Bergmann wrote: On Tuesday 04 May 2010, Takuya Yoshikawa wrote: ... So let us use the le bit offset calculation part by defining it as a new macro: generic_le_bit_offset() . Does

  1   2   >