[PATCHv5] uio: add generic driver for PCI 2.3 devices

2009-07-20 Thread Michael S. Tsirkin
This adds a generic uio driver that can bind to any PCI device. First user will be virtualization where a qemu userspace process needs to give guest OS access to the device. Interrupts are handled using the Interrupt Disable bit in the PCI command register and Interrupt Status bit in the PCI

[PATCH 1/2] KVM: Introduce KVM_SET_IDENTITY_MAP_ADDR ioctl

2009-07-20 Thread Sheng Yang
Now KVM allow guest to modify guest's physical address of EPT's identity mapping page. (discard uncessary check when setting address) Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/vmx.c | 13 +

[PATCH] kvm: Drop obsolete cpu_get/put in make_all_cpus_request

2009-07-20 Thread Jan Kiszka
spin_lock disables preemption, so we can simply read the current cpu. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- virt/kvm/kvm_main.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 7cd1c10..98e4ec8 100644 ---

RE: KVM vs Xen/OpenVZ for VPS hosting business

2009-07-20 Thread Martin Maurer
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of howard chen Sent: Sonntag, 19. Juli 2009 11:47 To: kvm@vger.kernel.org Subject: KVM vs Xen/OpenVZ for VPS hosting business Hello, Currently both Xen and OpenVZ are well known and

[PATCH] enable x2APIC without interrupt remapping under KVM

2009-07-20 Thread Gleb Natapov
KVM would like to provide x2APIC interface to a guest without emulating interrupt remapping device. The reason KVM prefers guest to use x2APIC is that x2APIC interface is better virtualizable and provides better performance than mmio xAPIC interface: - msr exits are faster than mmio (no page

Re: [PATCH] Add UUID option into kvm command line

2009-07-20 Thread Lucas Meneghel Rodrigues
On Fri, 2009-07-17 at 23:17 +0800, Yolkfull Chow wrote: Signed-off-by: Yolkfull Chow yz...@redhat.com --- client/tests/kvm/kvm_vm.py | 24 1 files changed, 24 insertions(+), 0 deletions(-) Ok, I've followed the discussion around this patch, thanks Yolkfull and

Re: [KVM_AUTOTEST] add kvm hugepage variant

2009-07-20 Thread Lucas Meneghel Rodrigues
On Fri, 2009-07-10 at 12:01 +0200, Lukáš Doktor wrote: After discussion I split the patches. Hi Lukáš, sorry for the delay answering your patch. Looks good to me in general, I have some remarks to make: 1) When posting patches to the autotest kvm tests, please cross post the autotest mailing

Re: [KVM_AUTOTEST] set English environment

2009-07-20 Thread Lucas Meneghel Rodrigues
2009/7/9 Lukáš Doktor ldok...@redhat.com: Set English environment before test executions. This is critical because we are parsing outputs of commands, which are localized! Tested by: ldok...@redhat.com on RHEL5.4 with kvm-83-72.el5 Ok, fair enough to have this extra security. Thanks,

Re: KVM vs Xen/OpenVZ for VPS hosting business

2009-07-20 Thread Alexey Eromenko
- howard chen howac...@gmail.com wrote: Hello, Currently both Xen and OpenVZ are well known and mature product used in hosting companies. How about KVM? What are the advantages if I use KVM as the VPS solution? E.g. performance? Due to a difference between virtualization and

Re: [ANNOUNCE] kvm-88 release (CAN NOT install modules on debian/amd64/2.6.30)

2009-07-20 Thread Marcelo Tosatti
On Sun, Jul 19, 2009 at 11:41:20AM +0800, John Wong wrote: Marcelo Tosatti 提到: On Mon, Jul 13, 2009 at 12:01:25AM +0800, John Wong wrote: [/ramdisk/kvm-88/kvm/kernel/x86/kvm.ko] undefined! WARNING: __tracepoint_kvm_mmu_pagetable_walk [/ramdisk/kvm-88/kvm/kernel/x86/kvm.ko]

[KVM-AUTOTEST PATCH 0/17] kvm_subprocess, guestwizard improvements, timedrift and other small things

2009-07-20 Thread Michael Goldish
The following patch series includes all the patches I sent that have not been applied yet. They are all rebased against the latest HEAD (including the recent UUID patch). Some new things are included too, such as a simple time drift test for Windows. Sorry for posting so many commits at once.

[KVM-AUTOTEST PATCH 02/17] Modify kvm_vm and kvm_preprocessing to use the new kvm_subprocess module

2009-07-20 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_preprocessing.py | 27 ++-- client/tests/kvm/kvm_vm.py| 111 +++- 2 files changed, 59 insertions(+), 79 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py

[KVM-AUTOTEST PATCH 01/17] Add new module kvm_subprocess

2009-07-20 Thread Michael Goldish
This module is intended to be used for controlling all child processes in KVM tests: both QEMU processes and SSH/SCP/Telnet processes. Processes started with this module keep running and can be interacted with even after the parent process exits. The current run_bg() utility tracks a child

[KVM-AUTOTEST PATCH 03/17] Modify remote_login and remote_scp in kvm_utils to use kvm_subprocess

2009-07-20 Thread Michael Goldish
Also remove a reference to kvm_log that was left behind. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index

[KVM-AUTOTEST PATCH 04/17] Modify run_autotest() in kvm_tests.py to use the new kvm_subprocess module.

2009-07-20 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_tests.py |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py index 2d11fed..5991aed 100644 --- a/client/tests/kvm/kvm_tests.py +++

[KVM-AUTOTEST PATCH 05/17] Remove kvm_spawn and run_bg() from kvm_utils.py.

2009-07-20 Thread Michael Goldish
These are now provided by kvm_subprocess.py. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_utils.py | 477 + 1 files changed, 2 insertions(+), 475 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py

[KVM-AUTOTEST PATCH 06/17] kvm_guest_wizard: rename output_dir to debug_dir in barrier_2()

2009-07-20 Thread Michael Goldish
The name 'debug_dir' makes it clearer that it corresponds to test.debugdir. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_guest_wizard.py | 20 ++-- 1 files changed, 10 insertions(+), 10 deletions(-) diff --git

[KVM-AUTOTEST PATCH 07/17] kvm_guest_wizard: pass 'params' directly to barrier_2()

2009-07-20 Thread Michael Goldish
Currently parameters for barrier_2() are extracted from 'params' in the main run_steps() test routine, and then passed to barrier_2(). Instead, let barrier_2() extract parameters from 'params' as it sees fit. This will make adding new parameters slightly easier and cleaner. Signed-off-by: Michael

[KVM-AUTOTEST PATCH 08/17] kvm_guest_wizard: allow keeping screendump history for debugging purposes

2009-07-20 Thread Michael Goldish
Add two new step file test parameters: - keep_screendump_history: if equals 'yes', screendump history is saved in test.debugdir/barrier_history in JPG format. Each screendump taken by the test is saved if it differs from the previous screendump. By default, when a barrier succeeds all

[KVM-AUTOTEST PATCH 10/17] KVM test: optionally convert PPM files to PNG format after test

2009-07-20 Thread Michael Goldish
This is intended to save disk space. Requires ImageMagick (uses mogrify). To enable: convert_ppm_files_to_png = yes To enable only for failed tests: convert_ppm_files_to_png_on_error = yes Reminder: by default PPM files are removed after the test (and after the conversion, if requested). To

[KVM-AUTOTEST PATCH 11/17] KVM test: kvm_tests.cfg.sample: convert PPM files to PNG by default

2009-07-20 Thread Michael Goldish
By default, always remove PPM files, and keep PNG files only for failed tests. This shouldn't do much harm, because while PPMs can be incorporated directly into step files, PNGs can be converted back to PPMs easily, and take less disk space. (PNG is a lossless compression format.) The

[KVM-AUTOTEST PATCH 12/17] KVM test: add simple timedrift test (mainly for Windows)

2009-07-20 Thread Michael Goldish
1) Log into a guest. 2) Take a time reading from the guest and host. 3) Run load on the guest and host. 4) Take a second time reading. 5) Stop the load and rest for a while. 6) Take a third time reading. 7) If the drift immediately after load is higher than a user- specified value (in %), fail. If

[KVM-AUTOTEST PATCH 14/17] KVM test: fix string and docstring indentation in kvm_config.py

2009-07-20 Thread Michael Goldish
Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_config.py | 99 +--- 1 files changed, 52 insertions(+), 47 deletions(-) diff --git a/client/tests/kvm/kvm_config.py b/client/tests/kvm/kvm_config.py index 99ccb2a..7e8b1db 100755 ---

[KVM-AUTOTEST PATCH 13/17] KVM test: fix a parsing problem in kvm_config.py

2009-07-20 Thread Michael Goldish
Allow kvm_config to parse weird lines that seem to contain several operators, such as: time_filter_re = (?=TIME: ...) The '?=' is recognized as the operator instead of the '='. To fix this, select the operator closest to the beginning of the line. Signed-off-by: Michael Goldish

[KVM-AUTOTEST PATCH 15/17] KVM test: add timedrift test to kvm_tests.cfg.sample

2009-07-20 Thread Michael Goldish
Currently the test will only run on Windows. It should be able to run on Linux just as well, but if I understand correctly, testing time drift on Linux is less interesting. Also make some tiny cosmetic changes (spacing), and move the stress_boot test before the shutdown test (shutdown should be

[KVM-AUTOTEST PATCH 16/17] KVM test: initialize some VM attributes in __init__() to prevent trouble

2009-07-20 Thread Michael Goldish
'redirs' and 'vnc_port' might be used before they're defined, if make_qemu_command() is called before create(). To make sure this doesn't happen, define them in the VM constructor. Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/kvm_vm.py |2 ++ 1 files changed, 2

Re: [PATCH] replace qemu_kvm_cpu_env

2009-07-20 Thread Marcelo Tosatti
On Wed, Jul 15, 2009 at 01:22:12PM -0400, Glauber Costa wrote: We now have an upstream qemu function that does exactly that, but in a kvm-independent way. Use it. Signed-off-by: Glauber Costa glom...@redhat.com --- hw/acpi.c | 24 +--- 1 files changed, 1

Re: [PATCH] kvm-390: fix wait_queue handling

2009-07-20 Thread Marcelo Tosatti
On Thu, Jul 16, 2009 at 05:17:37PM +0200, Christian Bornträger wrote: From: Christian Borntraeger borntrae...@de.ibm.com There are two waitqueues in kvm for wait handling: vcpu-wq for virt/kvm/kvm_main.c and vpcu-arch.local_int.wq for the s390 specific wait code. the wait handling in

[ kvm-Bugs-2823765 ] about KVM-88 ?

2009-07-20 Thread SourceForge.net
Bugs item #2823765, was opened at 2009-07-18 21:59 Message generated for change (Comment added) made by mtosatti You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2823765group_id=180599 Please note that this message will contain a full copy of the comment

Re: Timeout of network interface with OpenBSD 4.5 VM

2009-07-20 Thread Chris Dukes
Per a posting to openbsd misc mailing list on the 15th by Nick Osborn All good advice, but in the meantime a kernel without acpimadt, ioapic, and mpbios drivers will do the job. It appears they must be completely removed rather than just disabled. And he goes on to post a minimal kernel

Re: KVM crashes when using certain USB device

2009-07-20 Thread Erik Rull
Hi there, try to switch to USB 1.1 - not the best way but this helped my Windows XP running and doing things like printing, formatting USB keys or using a Dongle (Aladin, I think, it's also HASP) USB 2.0 was not really working well with KVM :-( Best regards, Erik G wrote: On Thu, Jul 16,

Re: [ANNOUNCE] kvm-88 release (CAN NOT install modules on debian/amd64/2.6.30)

2009-07-20 Thread John Wong
Marcelo Tosatti 提到: John, I don't know what is going on, works for me on 2.6.30 host. Maybe try without --kerneldir? Hi Marcelo, yes i did, i can not compile it without --kerneldir, then i try --kerneldir, but still not work. Are you use Debian? Anyone use Debian/amd64/sid here? Debian

Re: [PATCHv4] uio: add generic driver for PCI 2.3 devices

2009-07-20 Thread Jesse Barnes
On Wed, 15 Jul 2009 23:39:11 +0200 Hans J. Koch h...@linutronix.de wrote: On Wed, Jul 15, 2009 at 11:13:40PM +0300, Michael S. Tsirkin wrote: This adds a generic uio driver that can bind to any PCI device. First user will be virtualization where a qemu userspace process needs to give guest

Re: [PATCH -v7] QEMU-KVM: MCE: Add MCE simulation support to qemu/kvm

2009-07-20 Thread Marcelo Tosatti
On Mon, Jul 20, 2009 at 10:00:53AM +0800, Huang Ying wrote: KVM ioctls are used to initialize MCE simulation and inject MCE. The real MCE simulation is implemented in Linux kernel. The Kernel part has been merged. ChangeLog: v7: - Re-based on qemu-kvm.git/next branch v6: -

Re: [PATCHv4] uio: add generic driver for PCI 2.3 devices

2009-07-20 Thread Michael S. Tsirkin
On Mon, Jul 20, 2009 at 10:17:02AM -0700, Jesse Barnes wrote: On Wed, 15 Jul 2009 23:39:11 +0200 Hans J. Koch h...@linutronix.de wrote: On Wed, Jul 15, 2009 at 11:13:40PM +0300, Michael S. Tsirkin wrote: This adds a generic uio driver that can bind to any PCI device. First user will be

Re: [PATCHv5] uio: add generic driver for PCI 2.3 devices

2009-07-20 Thread Hans J. Koch
On Mon, Jul 20, 2009 at 10:29:34AM +0300, Michael S. Tsirkin wrote: This adds a generic uio driver that can bind to any PCI device. First user will be virtualization where a qemu userspace process needs to give guest OS access to the device. Interrupts are handled using the Interrupt

Re: [PATCHv5] uio: add generic driver for PCI 2.3 devices

2009-07-20 Thread Michael S. Tsirkin
On Mon, Jul 20, 2009 at 09:09:43PM +0200, Hans J. Koch wrote: On Mon, Jul 20, 2009 at 10:29:34AM +0300, Michael S. Tsirkin wrote: This adds a generic uio driver that can bind to any PCI device. First user will be virtualization where a qemu userspace process needs to give guest OS access

Re: [PATCHv5] uio: add generic driver for PCI 2.3 devices

2009-07-20 Thread Greg KH
On Mon, Jul 20, 2009 at 10:52:27PM +0300, Michael S. Tsirkin wrote: On Mon, Jul 20, 2009 at 09:09:43PM +0200, Hans J. Koch wrote: On Mon, Jul 20, 2009 at 10:29:34AM +0300, Michael S. Tsirkin wrote: This adds a generic uio driver that can bind to any PCI device. First user will be

[PATCH] fix segfault with -no-kvm

2009-07-20 Thread Glauber Costa
Our PIT implementation calls qemu_kvm_pit_in_kernel without checking for kvm_enabled() as does everybody else. It will make it dereference kvm_context pointer wich will be NULL. Signed-off-by: Glauber Costa glom...@redhat.com --- hw/i8254.c |4 ++-- 1 files changed, 2 insertions(+), 2

[PATCH 0/9] More integration with qemu.git

2009-07-20 Thread Glauber Costa
Marcelo: Attention: this is _not_ a resent of my last series. I'm deferring resending that until we reach consensus on the ioctl error values. This one is another one I had on trigger. I tested it across reboots, system_resets, shutdown, migration, and normal use. It tries to glue together a

[PATCH 3/9] change order of kvm_init call.

2009-07-20 Thread Glauber Costa
The goal is to get rid of the call to kvm_init. But those things are subtle, and often break. So do it in a separate patch, to help finding potential issues in future bisections. Signed-off-by: Glauber Costa glom...@redhat.com --- vl.c | 18 +- 1 files changed, 9 insertions(+),

[PATCH 5/9] fold second pass of kvm initialization

2009-07-20 Thread Glauber Costa
From: Glauber Costa glom...@t60.(none) There is no reason why kvm_init_ap() and friends are placed outside kvm_init(). After we call kvm_init(), no extra initialization step should be necessary. There are now no references to KVM_UPSTREAM outside of kvm*.c files Signed-off-by: Glauber Costa

[PATCH 4/9] use qemu version of kvm initialization

2009-07-20 Thread Glauber Costa
Our code now looks like qemu's a lot. Remove ours, and leave just qemu's. Signed-off-by: Glauber Costa glom...@redhat.com --- vl.c | 11 --- 1 files changed, 0 insertions(+), 11 deletions(-) diff --git a/vl.c b/vl.c index 86a6d70..ae9e0b4 100644 --- a/vl.c +++ b/vl.c @@ -5935,7

[PATCH 7/9] reuse env stop and stopped states

2009-07-20 Thread Glauber Costa
qemu CPUState already provides stop and stopped states. And they mean exactly that. There is no need for us to provide our own. Signed-off-by: Glauber Costa glom...@redhat.com --- cpu-defs.h |2 -- qemu-kvm.c | 30 -- vl.c |2 +- 3 files changed, 13

[PATCH 8/9] kvm_send_ipi

2009-07-20 Thread Glauber Costa
Provide a wrapper to pthread kill. It is more elegant because we only need to pass a CPUState pointer, meaning signall this cpu Signed-off-by: Glauber Costa glom...@redhat.com --- qemu-kvm.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/qemu-kvm.c

[PATCH 6/9] remove kvm_in* functions

2009-07-20 Thread Glauber Costa
We can use plain qemu's here, and save a couple of lines/complexity. I'm leaving outb for later, because the SMM thing makes it a little bit less trivial. Signed-off-by: Glauber Costa glom...@redhat.com --- qemu-kvm.c | 25 - 1 files changed, 4 insertions(+), 21

[PATCH 9/9] remove kvm_abi variable

2009-07-20 Thread Glauber Costa
We're not using this for anything Signed-off-by: Glauber Costa glom...@redhat.com --- qemu-kvm.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index c89146d..b9eed8e 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -43,7 +43,6 @@ int kvm_pit = 1;

Re: [PATCHv5] uio: add generic driver for PCI 2.3 devices

2009-07-20 Thread Jesse Barnes
On Mon, 20 Jul 2009 12:55:36 -0700 Greg KH gre...@suse.de wrote: On Mon, Jul 20, 2009 at 10:52:27PM +0300, Michael S. Tsirkin wrote: On Mon, Jul 20, 2009 at 09:09:43PM +0200, Hans J. Koch wrote: On Mon, Jul 20, 2009 at 10:29:34AM +0300, Michael S. Tsirkin wrote: This adds a generic

Re: KVM crashes when using certain USB device

2009-07-20 Thread Jim Paris
G wrote: I'm not too familiar with valgrind output, I have only used it on smaller programs I've written myself, so I don't know what to think of the messages (and amount of messages; valgrind told me to use --error-limit=no). I do get a bit nervous from all the complaints about uninitialized

Re: [PATCH 1/2] kvm: use get_desc_base() and get_desc_limit()

2009-07-20 Thread Marcelo Tosatti
On Sat, Jul 18, 2009 at 11:58:32PM +0900, Akinobu Mita wrote: Use get_desc_base() and get_desc_limit() to get the base address and limit in desc_struct. Cc: Avi Kivity a...@redhat.com Cc: kvm@vger.kernel.org Signed-off-by: Akinobu Mita akinobu.m...@gmail.com --- Applied both, thanks.

Re: [PATCH] kvm: Drop obsolete cpu_get/put in make_all_cpus_request

2009-07-20 Thread Marcelo Tosatti
Jan, This was suggested but we thought it might be safer to keep the get_cpu/put_cpu pair in case -rt kernels require it (which might be bullshit, but nobody verified). On Mon, Jul 20, 2009 at 11:30:12AM +0200, Jan Kiszka wrote: spin_lock disables preemption, so we can simply read the current

Re: [KVM_AUTOTEST] set English environment

2009-07-20 Thread Arnd Bergmann
On Thursday 09 July 2009, Lukáš Doktor wrote: --- orig/client/tests/kvm/control 2009-07-08 13:18:07.0 +0200 +++ new/client/tests/kvm/control2009-07-09 12:32:32.0 +0200 @@ -45,6 +45,8 @@ Each test is appropriately documented on import sys, os +# set

[PATCH 1/2][v2] KVM: Introduce KVM_SET_IDENTITY_MAP_ADDR ioctl

2009-07-20 Thread Sheng Yang
Now KVM allow guest to modify guest's physical address of EPT's identity mapping page. (change from v1, discard unnecessary check, change ioctl to accept parameter address rather than value) Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/include/asm/kvm_host.h |1 +

Re: KVM and kernel 2.6.30 file system madness

2009-07-20 Thread Mark van Walraven
On Wed, Jul 15, 2009 at 02:33:03PM +0530, Amit Shah wrote: On (Wed) Jul 15 2009 [09:52:36], Robert Wimmer wrote: Hi! Are you using virtio-block? Yes. OK, then there is a known problem. I think the fix is waiting to be applied. Amit, would you kindly state the problem with