Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Asias He
On Tue, Sep 4, 2012 at 9:07 PM, Avi Kivity a...@redhat.com wrote: On 08/24/2012 02:29 PM, Asias He wrote: It is useful to run a X program in guest and display it on host. 1) Make host's x server listen to localhost:6000 host_shell$ socat -d -d TCP-LISTEN:6000,fork,bind=localhost \

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-05 Thread Paolo Bonzini
Il 04/09/2012 22:11, Nicholas A. Bellinger ha scritto: As tgt-tgt_lock is taken in virtscsi_queuecommand_multi() before the atomic_inc_return(tgt-reqs) check, it seems like using atomic_dec() w/o smp_mb__after_atomic_dec or tgt_lock access here is not using atomic.h accessors properly, no..?

Re: [PATCH v2 2/7] s390/kvm: Add support for machine checks.

2012-09-05 Thread Heiko Carstens
On Tue, Sep 04, 2012 at 05:13:25PM +0200, Cornelia Huck wrote: Just some quick comments: [...] int kvm_s390_inject_program_int(struct kvm_vcpu *vcpu, u16 code) { struct kvm_s390_local_interrupt *li = vcpu-arch.local_int; @@ -648,6 +747,12 @@ int kvm_s390_inject_vm(struct kvm *kvm,

Re: expanding virtual disk based on lvm

2012-09-05 Thread Avi Kivity
On 09/04/2012 09:58 PM, Ross Boylan wrote: On Tue, 2012-09-04 at 15:53 +0300, Avi Kivity wrote: On 08/28/2012 11:26 PM, Ross Boylan wrote: My vm launches with -hda /dev/turtle/VD0 -hdb /dev/turtle/VD1, where VD0 and VD1 are lvm logical volumes. I used lvextend to expand them, but the VM,

Re: [PATCH v2 1/7] s390/kvm: Support for I/O interrupts.

2012-09-05 Thread Avi Kivity
On 09/04/2012 06:13 PM, Cornelia Huck wrote: Add support for handling I/O interrupts (standard, subchannel-related ones and rudimentary adapter interrupts). The subchannel-identifying parameters are encoded into the interrupt type. I/O interrupts are floating, so they can't be injected on

Re: [RFC PATCH v2 0/7] s390: virtual css host support.

2012-09-05 Thread Avi Kivity
On 09/04/2012 06:13 PM, Cornelia Huck wrote: Hi, here's the second revision of the virtual channel subsystem support for s390. I changed the representation of the channel subsystem, introducing channel subsystem images, which brings it closer to the actual implementation. A new ioctl for

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Avi Kivity
On 09/05/2012 09:03 AM, Asias He wrote: On Tue, Sep 4, 2012 at 9:07 PM, Avi Kivity a...@redhat.com wrote: On 08/24/2012 02:29 PM, Asias He wrote: It is useful to run a X program in guest and display it on host. 1) Make host's x server listen to localhost:6000 host_shell$ socat -d -d

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Pekka Enberg
On 08/24/2012 02:29 PM, Asias He wrote: It is useful to run a X program in guest and display it on host. 1) Make host's x server listen to localhost:6000 host_shell$ socat -d -d TCP-LISTEN:6000,fork,bind=localhost \ UNIX-CONNECT:/tmp/.X11-unix/X0 2) Start the guest and run

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Ingo Molnar
* Pekka Enberg penb...@kernel.org wrote: On 08/24/2012 02:29 PM, Asias He wrote: It is useful to run a X program in guest and display it on host. 1) Make host's x server listen to localhost:6000 host_shell$ socat -d -d TCP-LISTEN:6000,fork,bind=localhost \

[PATCH 3/3] KVM: Add KVM_VCPU_GET_REG_LIST/KVM_CAP_REG_LIST.

2012-09-05 Thread Rusty Russell
This is a generic interface to find out what you can use KVM_GET_ONE_REG/KVM_SET_ONE_REG on. Archs need to define KVM_HAVE_REG_LIST and then kvm_arch_num_regs() and kvm_arch_copy_reg_indices() functions. It's inspired by KVM_GET_MSR_INDEX_LIST, except it's a per-vcpu ioctl, and uses 64-bit

[PATCH 2/3] KVM: Add KVM_REG_SIZE() helper.

2012-09-05 Thread Rusty Russell
Useful helper for getting length of register given id. Signed-off-by: Rusty Russell rusty.russ...@linaro.org --- include/linux/kvm.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/kvm.h b/include/linux/kvm.h index d808694..8c3760e 100644 --- a/include/linux/kvm.h +++

[PATCH 0/3] KVM_VCPU_GET_REG_LIST API

2012-09-05 Thread Rusty Russell
This is the generic part of the KVM_SET_ONE_REG/KVM_GET_ONE_REG enhancements which ARM wants, rebased onto kvm/next. Rusty Russell (3): KVM: Move KVM_SET_ONE_REG/KVM_GET_ONE_REG to generic code. KVM: Add KVM_REG_SIZE() helper. KVM: Add KVM_VCPU_GET_REG_LIST/KVM_CAP_REG_LIST.

[PATCH 1/3] KVM: Move KVM_SET_ONE_REG/KVM_GET_ONE_REG to generic code.

2012-09-05 Thread Rusty Russell
Avi has indicated that this is the future. For now, make it dependent on KVM_HAVE_ONE_REG (and define that for PPC and S/390). Signed-off-by: Rusty Russell rusty.russ...@linaro.org --- arch/powerpc/include/asm/kvm_host.h |1 + arch/powerpc/kvm/book3s_hv.c|4 ++--

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-05 Thread Rusty Russell
Avi Kivity a...@redhat.com writes: On 09/03/2012 03:33 PM, Rusty Russell wrote: Avi Kivity a...@redhat.com writes: On 09/01/2012 03:35 PM, Rusty Russell wrote: Passing an address in a struct is pretty bad, since it involves compatibility wrappers. Right, some s390 thing. Err, no, i386

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-05 Thread Rusty Russell
Peter Maydell peter.mayd...@linaro.org writes: On 1 September 2012 13:28, Rusty Russell ru...@rustcorp.com.au wrote: Rusty Russell (8): KVM: ARM: Fix walk_msrs() KVM: Move KVM_SET_ONE_REG/KVM_GET_ONE_REG to generic code. KVM: Add KVM_REG_SIZE() helper. KVM: ARM: use

Re: [RFC 5/5] KVM: ARM: Access all registers via KVM_GET_ONE_REG/KVM_SET_ONE_REG.

2012-09-05 Thread Rusty Russell
Christoffer Dall c.d...@virtualopensystems.com writes: that's fine, but then the #define's shouldn't be called something with COPROC in their names. Sure, feel free to rename it. I failed to come up with a concise, clear name, so coproc stuck. Cheers, Rusty. -- To unsubscribe from this list:

Re: [PATCH v2 1/7] s390/kvm: Support for I/O interrupts.

2012-09-05 Thread Cornelia Huck
On Wed, 05 Sep 2012 10:28:53 +0300 Avi Kivity a...@redhat.com wrote: On 09/04/2012 06:13 PM, Cornelia Huck wrote: Add support for handling I/O interrupts (standard, subchannel-related ones and rudimentary adapter interrupts). The subchannel-identifying parameters are encoded into the

Re: [PATCH -v3] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-09-05 Thread Takuya Yoshikawa
On Thu, 30 Aug 2012 19:49:23 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Fri, Aug 31, 2012 at 01:09:56AM +0900, Takuya Yoshikawa wrote: On Thu, 30 Aug 2012 16:21:31 +0300 Michael S. Tsirkin m...@redhat.com wrote: +static u32 apic_read_reg(int reg_off, void *bitmap) +{

[PATCH 00/33] Cleanups and automatic init/exit calls

2012-09-05 Thread Sasha Levin
This patch series is mostly about cleanups: - Clean all the global variables we have to store configuration options. - Remove externed config options between objects. - Adding several exit routines to clean up on exit. - Remove the global 'kvm' object. - Contain arch specific init/exit calls

[PATCH 01/33] kvm tools: introduce kvm_config to store instance-specific config options

2012-09-05 Thread Sasha Levin
Move all the configurable options from global static variables to a self-contained structure. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c| 310 +++-- tools/kvm/include/kvm/kvm-config.h | 53 +++ 2 files changed,

[PATCH 02/33] kvm tools: generate command line options dynamically

2012-09-05 Thread Sasha Levin
Since we now store options in a struct, we should generate the command line options dynamically. This is a pre-requisite to the following patch moving the options into struct kvm. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 132

[PATCH 03/33] kvm tools: split struct kvm into arch specific part

2012-09-05 Thread Sasha Levin
Move all the non-arch specific members into a generic struct, and the arch specific members into a arch specific kvm_arch. This prevents code duplication across different archs. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/include/kvm/kvm.h | 27

[PATCH 05/33] kvm tools: remove redundancy between kvm_config and kvm

2012-09-05 Thread Sasha Levin
Remove some redundant members between struct kvm_config and struct kvm since options are now contained within struct kvm. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 2 -- tools/kvm/hw/rtc.c | 2 +- tools/kvm/include/kvm/kvm.h | 3 ---

[PATCH 04/33] kvm tools: move kvm_config into struct kvm

2012-09-05 Thread Sasha Levin
Contain the options within struct kvm itself. This way options are specific to a given struct kvm and not just global. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 273 +++- tools/kvm/include/kvm/kvm.h | 7 +-

[PATCH 06/33] kvm tools: move ioport_debug into struct kvm_config

2012-09-05 Thread Sasha Levin
This config option was 'extern'ed between different objects. Clean it up and move it into struct kvm_config. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c| 3 +-- tools/kvm/include/kvm/kvm-config.h | 1 + tools/kvm/ioport.c | 5 ++---

[PATCH 09/33] kvm tools: add private ptr to option parser

2012-09-05 Thread Sasha Levin
Support passing a private ptr to CALLBACK options. This will make it possible assigning options into specific struct kvms by passing them directly to parsers. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 13 +++--

[PATCH 08/33] kvm tools: move active_console into struct kvm_config

2012-09-05 Thread Sasha Levin
This config option was 'extern'ed between different objects. Clean it up and move it into struct kvm_config. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c| 9 - tools/kvm/hw/serial.c | 16 ++--

[PATCH 07/33] kvm tools: move mmio_debug into struct kvm_config

2012-09-05 Thread Sasha Levin
This config option was 'extern'ed between different objects. Clean it up and move it into struct kvm_config. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c| 3 +-- tools/kvm/include/kvm/kvm-config.h | 1 + tools/kvm/mmio.c | 3 +-- 3

[PATCH 10/33] kvm tools: disk image related cleanup

2012-09-05 Thread Sasha Levin
Move io debug delay into kvm_config, the parser out of builtin-run into the disk code and make the init/exit functions match the rest of the code in style. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c| 75 ++

[PATCH 11/33] kvm tools: move nrcpus into struct kvm_config

2012-09-05 Thread Sasha Levin
This no longer has to be a global since we now have kvm_config. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c| 31 +++ tools/kvm/include/kvm/kvm-config.h | 1 + 2 files changed, 16 insertions(+), 16 deletions(-) diff

[PATCH 12/33] kvm tools: move kvm_cpus into struct kvm

2012-09-05 Thread Sasha Levin
There's no reason the array of guest specific vcpus is global. Move it into struct kvm. Also split up arch specific vcpu init from the generic code and call it from the kvm_cpu initializer. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/Makefile | 2 +-

[PATCH 13/33] kvm tools: improve framebuffer manager initialization

2012-09-05 Thread Sasha Levin
Make the init and exit functions of the framebuffer similar to the rest of the code. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 6 -- tools/kvm/framebuffer.c | 6 -- tools/kvm/include/kvm/framebuffer.h | 4 ++-- 3 files

[PATCH 14/33] kvm tools: improve term init/exit functions

2012-09-05 Thread Sasha Levin
Make the init and exit functions of the term code similar to the rest of the code. Also move in the pty parser into the term code out of builtin-run. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 19 +-- tools/kvm/include/kvm/term.h | 6

[PATCH 15/33] kvm tools: threadpool exit routine

2012-09-05 Thread Sasha Levin
Add an exit function for the threadpool which will stop all running threads in the pool. Also clean up the init code a bit. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c| 11 ++- tools/kvm/include/kvm/threadpool.h | 3 ++-

[PATCH 16/33] kvm tools: timer cleanup

2012-09-05 Thread Sasha Levin
Make the timer init/exit follow the rest of the code, and move it out of builtin-run. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 12 ++-- tools/kvm/include/kvm/kvm.h | 4 ++-- tools/kvm/kvm.c | 23 +++ 3 files

[PATCH 17/33] kvm tools: virtio-console init/exit

2012-09-05 Thread Sasha Levin
Make the init/exit of virtio-console self-contained, so the global init code won't need to check if it was selected or not. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c| 12 +--- tools/kvm/include/kvm/virtio-console.h | 3 ++-

[PATCH 18/33] kvm tools: virtio-rng init/exit

2012-09-05 Thread Sasha Levin
Make the init/exit of virtio-rng self-contained, so the global init code won't need to check if it was selected or not. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 7 +-- tools/kvm/virtio/rng.c | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-)

[PATCH 19/33] kvm tools: virtio-bln init/exit

2012-09-05 Thread Sasha Levin
Make the init/exit of virtio-balloon self-contained, so the global init code won't need to check if it was selected or not. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c| 11 +-- tools/kvm/include/kvm/virtio-balloon.h | 3 ++-

[PATCH 21/33] kvm tools: virtio-net init/exit

2012-09-05 Thread Sasha Levin
Make the init/exit of virtio-net self-contained, so the global init code won't need to check if it was selected or not. This also moves the bulk of the net-specific initialization code, including the parser, into virtio-net itself. Signed-off-by: Sasha Levin levinsasha...@gmail.com ---

[PATCH 22/33] kvm tools: kvm-ipc cleanup

2012-09-05 Thread Sasha Levin
Move all the kvm-ipc specific code into the relevant file, and modify the ipc callback to pass a ptr to struct kvm as well. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 122 tools/kvm/include/kvm/kvm-ipc.h | 8 +- tools/kvm/kvm-ipc.c

[PATCH 25/33] kvm tools: kernel load/firmware cleanup

2012-09-05 Thread Sasha Levin
Sort out the config initialization order so that configuration is fully initialized before init functions start running, and move the firmware initialization code into kvm.c. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c| 122

[PATCH 27/33] kvm tools: ram init

2012-09-05 Thread Sasha Levin
RAM should be initialized as part of kvm__init, and not somewhere random in the global init code. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 2 -- tools/kvm/kvm.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 28/33] kvm tools: move the rest of the config initializations

2012-09-05 Thread Sasha Levin
These should appear before running any init calls. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index f54a6c1..6e6fbf5 100644 ---

[PATCH 29/33] kvm tools: virtio-9p cleanup

2012-09-05 Thread Sasha Levin
Sort out init/exit calls, move parser into the 9p code and make sure rootfs config is initialized before virtio-9p (or any other init func) is called. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 67 ++

[PATCH 26/33] kvm tools: ioport arch init

2012-09-05 Thread Sasha Levin
Move ioport arch init into ioport init, which is the logical place for that instead of a random place in the global init code. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 2 -- tools/kvm/ioport.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-)

[PATCH 31/33] kvm tools: use init/exit where possible

2012-09-05 Thread Sasha Levin
Switch to using init/exit calls instead of the repeating call blocks in builtin-run. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/Makefile | 1 + tools/kvm/builtin-run.c | 246 +--- tools/kvm/disk/core.c | 2 +

[PATCH 24/33] kvm tools: ui improvements

2012-09-05 Thread Sasha Levin
Move the vesa initialization logic into sdl__init() and vnc__init(), builtin-run shouldn't have to know about the conditions for initializing vesa on it's own. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c| 49 ++

[PATCH 32/33] kvm tools: pass kvm ptr directly to timer injection

2012-09-05 Thread Sasha Levin
This will help us get rid of the global kvm object. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 10 -- tools/kvm/kvm.c | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c

[PATCH 33/33] kvm tools: remove global kvm object

2012-09-05 Thread Sasha Levin
This was ugly, and now we get rid of it. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c| 48 +++--- tools/kvm/hw/i8042.c | 4 ++-- tools/kvm/hw/pci-shmem.c | 2 +- tools/kvm/hw/rtc.c | 10

[PATCH 20/33] kvm tools: pci-shmem init-exit

2012-09-05 Thread Sasha Levin
Make the init/exit of pci-shmem self-contained, so the global init code won't need to check if it was selected or not. Also move the parser out of builtin-run into the pci-shmem code. Signed-off-by: Sasha Levin levinsasha...@gmail.com --- tools/kvm/builtin-run.c | 134

Re: [PATCH v2 2/7] s390/kvm: Add support for machine checks.

2012-09-05 Thread Cornelia Huck
On Wed, 5 Sep 2012 09:22:32 +0200 Heiko Carstens heiko.carst...@de.ibm.com wrote: On Tue, Sep 04, 2012 at 05:13:25PM +0200, Cornelia Huck wrote: Just some quick comments: [...] int kvm_s390_inject_program_int(struct kvm_vcpu *vcpu, u16 code) { struct kvm_s390_local_interrupt

Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic.

2012-09-05 Thread Peter Maydell
On 5 September 2012 07:48, Rusty Russell ru...@rustcorp.com.au wrote: Peter Maydell peter.mayd...@linaro.org writes: This is a problem because it means userspace needs to know the size of each register, and the kernel doesn't provide any way to determine the size. This defeats the idea that

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Asias He
On Wed, Sep 5, 2012 at 4:00 PM, Pekka Enberg penb...@kernel.org wrote: On 08/24/2012 02:29 PM, Asias He wrote: It is useful to run a X program in guest and display it on host. 1) Make host's x server listen to localhost:6000 host_shell$ socat -d -d TCP-LISTEN:6000,fork,bind=localhost \

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Asias He
On Wed, Sep 5, 2012 at 4:09 PM, Ingo Molnar mi...@kernel.org wrote: * Pekka Enberg penb...@kernel.org wrote: On 08/24/2012 02:29 PM, Asias He wrote: It is useful to run a X program in guest and display it on host. 1) Make host's x server listen to localhost:6000 host_shell$ socat -d

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Asias He
On Wed, Sep 5, 2012 at 3:56 PM, Avi Kivity a...@redhat.com wrote: On 09/05/2012 09:03 AM, Asias He wrote: On Tue, Sep 4, 2012 at 9:07 PM, Avi Kivity a...@redhat.com wrote: On 08/24/2012 02:29 PM, Asias He wrote: It is useful to run a X program in guest and display it on host. 1) Make host's

Re: expanding virtual disk based on lvm

2012-09-05 Thread Alexandre DERUMIER
Certainly restart (shutting down qemu and restarting it, not a reset) works, I thought you wanted online resize. You can resize an lvm volume online without restarting the guest. just use lvextend to extend you lvm volume then use qmp block_resize command with the same size. (so the guest

Re: [PATCH -v3] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 05:30:31PM +0900, Takuya Yoshikawa wrote: On Thu, 30 Aug 2012 19:49:23 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Fri, Aug 31, 2012 at 01:09:56AM +0900, Takuya Yoshikawa wrote: On Thu, 30 Aug 2012 16:21:31 +0300 Michael S. Tsirkin m...@redhat.com wrote:

RE: Error: Not supported image type twoGbMaxExtentFlat. - problems using virt-convert - SOLVED

2012-09-05 Thread Lentes, Bernd
Brian wrote: On Tuesday, September 04, 2012 11:26:49 AM Lentes, Bernd wrote: Hi, i want to convert a sles 11 sp2 64bit system (running on VMWare Server 1.09) to libvirt format. Host OS is SLES 11 SP2 64bit. I tried virt-convert --os-variant=sles11 sles_11_vmx/ sles_11_kvm/ . This

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Avi Kivity
On 09/05/2012 12:19 PM, Asias He wrote: On Wed, Sep 5, 2012 at 3:56 PM, Avi Kivity a...@redhat.com wrote: On 09/05/2012 09:03 AM, Asias He wrote: On Tue, Sep 4, 2012 at 9:07 PM, Avi Kivity a...@redhat.com wrote: On 08/24/2012 02:29 PM, Asias He wrote: It is useful to run a X program in guest

Re: [PATCH 00/33] Cleanups and automatic init/exit calls

2012-09-05 Thread Pekka Enberg
On Wed, Sep 5, 2012 at 11:31 AM, Sasha Levin levinsasha...@gmail.com wrote: This patch series is mostly about cleanups: - Clean all the global variables we have to store configuration options. - Remove externed config options between objects. - Adding several exit routines to clean up on

Re: [Qemu-devel] [PATCH] kvm: Fix warning from static code analysis

2012-09-05 Thread Stefan Hajnoczi
On Mon, Sep 03, 2012 at 10:40:40PM +0200, Stefan Weil wrote: Report from smatch: kvm-all.c:1373 kvm_init(135) warn: variable dereferenced before check 's' (see line 1360) 's' cannot by NULL (it was alloced using g_malloc0), so there is no need to check it here. Signed-off-by: Stefan

Re: [PATCH -v3] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-09-05 Thread Takuya Yoshikawa
On Wed, 5 Sep 2012 12:26:49 +0300 Michael S. Tsirkin m...@redhat.com wrote: It's not guaranteed if another thread can modify the bitmap. Is this the case here? If yes we need at least ACCESS_ONCE. In this patch, using the wrapper function to read out a register value forces compilers not to do

Re: [PATCH 2/8] KVM: x86 emulator: use aligned variants of SSE register ops

2012-09-05 Thread Avi Kivity
On 09/04/2012 03:51 PM, Mathias Krause wrote: On Tue, Sep 4, 2012 at 2:13 PM, Avi Kivity a...@redhat.com wrote: On 09/04/2012 03:09 PM, Avi Kivity wrote: On 08/30/2012 02:30 AM, Mathias Krause wrote: As the the compiler ensures that the memory operand is always aligned to a 16 byte memory

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Asias He
On Wed, Sep 5, 2012 at 5:29 PM, Avi Kivity a...@redhat.com wrote: On 09/05/2012 12:19 PM, Asias He wrote: On Wed, Sep 5, 2012 at 3:56 PM, Avi Kivity a...@redhat.com wrote: On 09/05/2012 09:03 AM, Asias He wrote: On Tue, Sep 4, 2012 at 9:07 PM, Avi Kivity a...@redhat.com wrote: On 08/24/2012

Re: [PATCH -v3] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 06:40:26PM +0900, Takuya Yoshikawa wrote: On Wed, 5 Sep 2012 12:26:49 +0300 Michael S. Tsirkin m...@redhat.com wrote: It's not guaranteed if another thread can modify the bitmap. Is this the case here? If yes we need at least ACCESS_ONCE. In this patch, using the

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Avi Kivity
On 09/05/2012 12:46 PM, Asias He wrote: Ok. Then the socat command not only exposes the display to the guest, but also to any local process with access to localhost:6000. Yes. It is a trick for people with 'Xorg -nolisten tcp' enabled. Which is hopefully everyone. -- error compiling

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Asias He
On Wed, Sep 5, 2012 at 5:53 PM, Avi Kivity a...@redhat.com wrote: On 09/05/2012 12:46 PM, Asias He wrote: Ok. Then the socat command not only exposes the display to the guest, but also to any local process with access to localhost:6000. Yes. It is a trick for people with 'Xorg -nolisten

[PATCH -v4] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-09-05 Thread Takuya Yoshikawa
find_highest_vector() and count_vectors(): - Instead of using magic values, define and use proper macros. find_highest_vector(): - Remove likely() which is there only for historical reasons and not doing correct branch predictions anymore. Using such heuristics to optimize this function

Re: [PATCH -v4] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 07:30:01PM +0900, Takuya Yoshikawa wrote: find_highest_vector() and count_vectors(): - Instead of using magic values, define and use proper macros. find_highest_vector(): - Remove likely() which is there only for historical reasons and not doing correct branch

Re: [PATCH 1/2] kvm tools: Export DISPLAY ENV as our default host ip address

2012-09-05 Thread Avi Kivity
On 09/05/2012 01:14 PM, Asias He wrote: On Wed, Sep 5, 2012 at 5:53 PM, Avi Kivity a...@redhat.com wrote: On 09/05/2012 12:46 PM, Asias He wrote: Ok. Then the socat command not only exposes the display to the guest, but also to any local process with access to localhost:6000. Yes. It is a

Re: [PATCH v2] kvm/fpu: Enable fully eager restore kvm FPU

2012-09-05 Thread Avi Kivity
On 09/05/2012 04:26 AM, Xudong Hao wrote: Enable KVM FPU fully eager restore, if there is other FPU state which isn't tracked by CR0.TS bit. Changes from v1: Expand KVM_XSTATE_LAZY to 64 bits before negating it. Signed-off-by: Xudong Hao xudong@intel.com ---

Re: NFS over RDMA small block DIRECT_IO bug

2012-09-05 Thread Avi Kivity
On 09/04/2012 03:04 PM, Myklebust, Trond wrote: On Tue, 2012-09-04 at 11:31 +0200, Andrew Holway wrote: Hello. # Avi Kivity avi(a)redhat recommended I copy kvm in on this. It would also seem relevent to libvirt. # I have a Centos 6.2 server and Centos 6.2 client. [root@store ~]# cat

Re: [PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible

2012-09-05 Thread Avi Kivity
On 09/04/2012 09:41 PM, Michael S. Tsirkin wrote: On Tue, Sep 04, 2012 at 07:34:19PM +0300, Avi Kivity wrote: On 08/31/2012 12:56 PM, Michael S. Tsirkin wrote: On Fri, Aug 31, 2012 at 11:36:07AM +0200, Sasha Levin wrote: On 08/30/2012 03:38 PM, Michael S. Tsirkin wrote: +static unsigned

Re: [PATCH v3 2/2] virtio-ring: Allocate indirect buffers from cache when possible

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 05:21:12PM +0300, Avi Kivity wrote: On 09/04/2012 09:41 PM, Michael S. Tsirkin wrote: On Tue, Sep 04, 2012 at 07:34:19PM +0300, Avi Kivity wrote: On 08/31/2012 12:56 PM, Michael S. Tsirkin wrote: On Fri, Aug 31, 2012 at 11:36:07AM +0200, Sasha Levin wrote: On

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: I assumed you were pointing out the level vs edge interaction. If we call that a userspace bug, I can just drop this. Thanks, Alex level is userspace bug I think :) I don't see how it's a bug. Suppose we have a vfio device that shares

Re: [PATCH v9 0/2] kvm: level irqfd support

2012-09-05 Thread Avi Kivity
On 08/21/2012 10:28 PM, Alex Williamson wrote: Here's the much anticipated re-write of support for level irqfds. As Michael suggested, I've rolled the eoi/ack notification fd into KVM_IRQFD as a new mode. For lack of a better name, as there seems to be objections to associating this

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 08/21/2012 10:29 PM, Alex Williamson wrote: KVM_IRQFD currently uses the reserved KVM_USERSPACE_IRQ_SOURCE_ID which is also shared with userspace injection methods like KVM_IRQ_LINE. This can cause a conflict if an irqfd triggers on a GSI asserted through KVM_IRQ_LINE. Move irqfd to it's

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: I assumed you were pointing out the level vs edge interaction. If we call that a userspace bug, I can just drop this. Thanks, Alex level is userspace bug I think :)

Re: [PATCH v9 0/2] kvm: level irqfd support

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 05:42:38PM +0300, Avi Kivity wrote: On 08/21/2012 10:28 PM, Alex Williamson wrote: Here's the much anticipated re-write of support for level irqfds. As Michael suggested, I've rolled the eoi/ack notification fd into KVM_IRQFD as a new mode. For lack of a better

Re: [PATCH v9 2/2] kvm: On Ack, De-assert Notify KVM_IRQFD extension

2012-09-05 Thread Avi Kivity
On 08/21/2012 10:29 PM, Alex Williamson wrote: For VFIO based device assignment we'd like a mechanism to allow level triggered interrutps to be directly injected into KVM. KVM_IRQFD already allows this for edge triggered interrupts, but for level, we need to watch for acknowledgement of the

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 05:51 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: I assumed you were pointing out the level vs edge interaction. If we call that a userspace bug, I can just drop this. Thanks,

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 05:46:17PM +0300, Avi Kivity wrote: On 08/21/2012 10:29 PM, Alex Williamson wrote: KVM_IRQFD currently uses the reserved KVM_USERSPACE_IRQ_SOURCE_ID which is also shared with userspace injection methods like KVM_IRQ_LINE. This can cause a conflict if an irqfd

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 05:51:53PM +0300, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: I assumed you were pointing out the level vs edge interaction. If we call that a userspace bug, I can just

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:09 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:51:53PM +0300, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: I assumed you were pointing out the level vs edge

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 05:59:46PM +0300, Avi Kivity wrote: On 09/05/2012 05:51 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: I assumed you were pointing out the level vs edge interaction. If

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 06:12:04PM +0300, Avi Kivity wrote: On 09/05/2012 06:09 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:51:53PM +0300, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote:

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:07 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:46:17PM +0300, Avi Kivity wrote: On 08/21/2012 10:29 PM, Alex Williamson wrote: KVM_IRQFD currently uses the reserved KVM_USERSPACE_IRQ_SOURCE_ID which is also shared with userspace injection methods like

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:13 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:59:46PM +0300, Avi Kivity wrote: On 09/05/2012 05:51 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: On 08/22/2012 03:41 AM, Michael S. Tsirkin wrote: I assumed you

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 06:22:57PM +0300, Avi Kivity wrote: On 09/05/2012 06:13 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:59:46PM +0300, Avi Kivity wrote: On 09/05/2012 05:51 PM, Michael S. Tsirkin wrote: On Wed, Sep 05, 2012 at 05:35:43PM +0300, Avi Kivity wrote: On

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-05 Thread Avi Kivity
On 09/05/2012 12:00 AM, Anthony Liguori wrote: Why? The way this is being submitted I don't see why we should treat Jan's patch any different from a patch by IBM or Samsung where we've asked folks to fix the license to comply with what I thought was our new policy (it does not even contain a

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 06:26:54PM +0300, Avi Kivity wrote: On 09/05/2012 12:00 AM, Anthony Liguori wrote: Why? The way this is being submitted I don't see why we should treat Jan's patch any different from a patch by IBM or Samsung where we've asked folks to fix the license to comply

Re: [PATCH v9 1/2] kvm: Use a reserved IRQ source ID for irqfd

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:28 PM, Michael S. Tsirkin wrote: gsi 3 is configured as edge in the ioapic. It has (unusually) two inputs: one driven by userspace, the other by irqfd. cpu 0cpu 1 - irqfd: set to 1 ioapic: recognize

Re: [SeaBIOS] [PATCH v2] add acpi pmtimer support

2012-09-05 Thread Don Slutz
On 09/05/12 01:27, Gerd Hoffmann wrote: On 09/02/12 22:42, Kevin O'Connor wrote: On Tue, Aug 14, 2012 at 07:29:19AM +0200, Gerd Hoffmann wrote: This patch makes seabios use the acpi pmtimer instead of tsc for timekeeping. The pmtimer has a fixed frequency and doesn't need calibration, thus it

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-05 Thread Anthony Liguori
Avi Kivity a...@redhat.com writes: On 09/05/2012 12:00 AM, Anthony Liguori wrote: Why? The way this is being submitted I don't see why we should treat Jan's patch any different from a patch by IBM or Samsung where we've asked folks to fix the license to comply with what I thought was our new

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-05 Thread Avi Kivity
On 09/05/2012 06:41 PM, Anthony Liguori wrote: Avi Kivity a...@redhat.com writes: On 09/05/2012 12:00 AM, Anthony Liguori wrote: Why? The way this is being submitted I don't see why we should treat Jan's patch any different from a patch by IBM or Samsung where we've asked folks to fix the

[PATCH] kvm/x86: use symbolic constant for nr interrupts

2012-09-05 Thread Michael S. Tsirkin
interrupt_bitmap is KVM_NR_INTERRUPTS bits in size, so just use that instead of hard-coded constants and math. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- arch/x86/kvm/x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c

Re: [PATCHv2] x86info: dump kvm cpuid's

2012-09-05 Thread Michael S. Tsirkin
On Mon, Apr 30, 2012 at 05:38:35PM +0300, Michael S. Tsirkin wrote: The following makes 'x86info -r' dump hypervisor leaf cpu ids (for kvm this is signature+features) when running in a vm. On the guest we see the signature and the features: eax in: 0x4000, eax = ebx = 4b4d564b

[PATCH] virtio: support reserved vqs

2012-09-05 Thread Michael S. Tsirkin
virtio network device multiqueue support reserves vq 3 for future use (useful both for future extensions and to make it pretty - this way receive vqs have even and transmit - odd numbers). Make it possible to skip initialization for specific vq numbers by specifying NULL for name. Document this

Re: [PATCH] target-i386: Allow changing of Hypervisor CPUIDs.

2012-09-05 Thread Marcelo Tosatti
On Thu, Aug 30, 2012 at 03:20:35PM -0400, Don Slutz wrote: This is primarily done so that the guest will think it is running under vmware when hypervisor=vmware is specified as a property of a cpu. Also allow this to work in accel=tcg mode. The new cpu properties hyper_level, hyper_extra,

Re: [Qemu-devel] [PATCH 4/4] kvm: i386: Add classic PCI device assignment

2012-09-05 Thread Blue Swirl
On Wed, Sep 5, 2012 at 3:41 PM, Anthony Liguori anth...@codemonkey.ws wrote: Avi Kivity a...@redhat.com writes: On 09/05/2012 12:00 AM, Anthony Liguori wrote: Why? The way this is being submitted I don't see why we should treat Jan's patch any different from a patch by IBM or Samsung where

  1   2   >