ts

2010-03-09 Thread Karl
http://aneqedom.maddsites.com/uqyvewox.html -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: linux-aio usable?

2010-03-09 Thread Avi Kivity
On 03/08/2010 10:19 PM, Michael Tokarev wrote: Michael Tokarev wrote: [] Apparently that does not quite work. I just re-compiled kvm with --enable-linux-aio (actually I just installed libaio-dev on debian and qemu-kvm's configure picked it up automatically), and tried a guest. But any I/O

Re: linux-aio usable?

2010-03-09 Thread Avi Kivity
On 03/08/2010 11:27 PM, Nikola Ciprich wrote: It's faster. Hi Avi, Could You give some rough estimate on how much faster? The standard it depends on the workload. I'm stuck with glibc-2.5 now, but I'm always eager to improve performance, so I wonder if it would make sense to

Re: linux-aio usable?

2010-03-09 Thread Michael Tokarev
Avi Kivity wrote: On 03/08/2010 10:19 PM, Michael Tokarev wrote: Michael Tokarev wrote: [] Apparently that does not quite work. I just re-compiled kvm with --enable-linux-aio (actually I just installed libaio-dev on debian and qemu-kvm's configure picked it up automatically), and tried

Portable Ladders - New Catalogue

2010-03-09 Thread Skylax Srl
Portable Ladders - New Catalogue SKYLAX ladders · clean · insulating · antistatic Smart Catalogue: http://www.skylax.com/pdf/smartcatalog.pdf (90 pages) SKYLAX Leitern: elegant · sauber · isoliert · antistatisch Katalog: http://www.skylax.com/pdf/Katalog.pdf (90 Seiten mit

[PATCH] take srcu lock before call to complete_pio()

2010-03-09 Thread Gleb Natapov
complete_pio() may use slot table which is protected by srcu. Signed-off-by: Gleb Natapov g...@redhat.com diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 703f637..3753c11 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -4519,7 +4519,9 @@ int kvm_arch_vcpu_ioctl_run(struct

Re: linux-aio usable?

2010-03-09 Thread Avi Kivity
On 03/09/2010 11:19 AM, Michael Tokarev wrote: Can you elaborate? This sounds like a bug that wants to be fixed. http://thread.gmane.org/gmane.linux.kernel.aio.general/2891 It's missing compat_ioctl for some of the aio opcodes, namely it's PREADV and PWRITE - the only ones used by kvm

Re: [PATCH] KVM: PPC: Do not create debugfs if fail to create vcpu

2010-03-09 Thread Alexander Graf
On 09.03.2010, at 07:13, Wei Yongjun wrote: If fail to create the vcpu, we should not create the debugfs for it. Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com Good catch. I guess a goto out kind of construct would be better, but for a single line of code this is enough. And whoever

Re: [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Arnd Bergmann
On Monday 08 March 2010, Cam Macdonell wrote: enum ivshmem_registers { IntrMask = 0, IntrStatus = 2, Doorbell = 4, IVPosition = 6, IVLiveList = 8 }; The first two registers are the interrupt mask and status registers. Interrupts are triggered when a message is

Re: [PATCH 02/15] KVM: PPC: Allow userspace to unset the IRQ line

2010-03-09 Thread Avi Kivity
On 03/08/2010 08:03 PM, Alexander Graf wrote: Userspace can tell us that it wants to trigger an interrupt. But so far it can't tell us that it wants to stop triggering one. So let's interpret the parameter to the ioctl that we have anyways to tell us if we want to raise or lower the interrupt

Re: [PATCH 09/10] Initialize in-kernel irqchip

2010-03-09 Thread Avi Kivity
On 03/02/2010 08:25 PM, Glauber Costa wrote: On Tue, Mar 02, 2010 at 01:31:35AM -0300, Marcelo Tosatti wrote: On Fri, Feb 26, 2010 at 05:12:20PM -0300, Glauber Costa wrote: Now that we have all devices set up, this patch initializes the irqchip. This is dependant on the io-thread,

Re: [PATCH 14/15] KVM: PPC: Add OSI hypercall interface

2010-03-09 Thread Alexander Graf
On 09.03.2010, at 14:00, Avi Kivity wrote: On 03/08/2010 08:03 PM, Alexander Graf wrote: MOL uses its own hypercall interface to call back into userspace when the guest wants to do something. So let's implement that as an exit reason, specify it with a CAP and only really use it when

Re: [PATCH 13/15] KVM: Add support for enabling capabilities per-vcpu

2010-03-09 Thread Avi Kivity
On 03/09/2010 03:01 PM, Alexander Graf wrote: On 09.03.2010, at 13:56, Avi Kivity wrote: On 03/08/2010 08:03 PM, Alexander Graf wrote: Some times we don't want all capabilities to be available to all our vcpus. One example for that is the OSI interface, implemented in the next

Re: [PATCH 14/15] KVM: PPC: Add OSI hypercall interface

2010-03-09 Thread Alexander Graf
On 09.03.2010, at 14:11, Avi Kivity wrote: On 03/09/2010 03:04 PM, Alexander Graf wrote: + /* KVM_EXIT_OSI */ + struct { + __u64 gprs[32]; + } osi; + +MOL uses a special hypercall interface it calls 'OSI'. To enable it, we catch +hypercalls

[PATCH] KVM test: Make sure check_image script runs on VMs turned off

2010-03-09 Thread Lucas Meneghel Rodrigues
As it is hard to guarantee that a qcow2 image will be in a consistent state with a VM turned on, take an extra safety step and make sure the preprocessor shuts down the VMs before the post process command check_image.py runs. Signed-off-by: Lucas Meneghel Rodrigues l...@redhat.com ---

Re: [PATCH] KVM: PPC: Do not create debugfs if fail to create vcpu

2010-03-09 Thread Avi Kivity
On 03/09/2010 08:13 AM, Wei Yongjun wrote: If fail to create the vcpu, we should not create the debugfs for it. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH] take srcu lock before call to complete_pio()

2010-03-09 Thread Avi Kivity
On 03/09/2010 12:01 PM, Gleb Natapov wrote: complete_pio() may use slot table which is protected by srcu. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH 13/15] KVM: Add support for enabling capabilities per-vcpu

2010-03-09 Thread Alexander Graf
On 09.03.2010, at 13:56, Avi Kivity wrote: On 03/08/2010 08:03 PM, Alexander Graf wrote: Some times we don't want all capabilities to be available to all our vcpus. One example for that is the OSI interface, implemented in the next patch. In order to have a generic mechanism in how to

Re: [PATCH 14/15] KVM: PPC: Add OSI hypercall interface

2010-03-09 Thread Avi Kivity
On 03/09/2010 03:04 PM, Alexander Graf wrote: + /* KVM_EXIT_OSI */ + struct { + __u64 gprs[32]; + } osi; + +MOL uses a special hypercall interface it calls 'OSI'. To enable it, we catch +hypercalls and exit with this exit struct

Re: [PATCH 02/15] KVM: PPC: Allow userspace to unset the IRQ line

2010-03-09 Thread Alexander Graf
On 09.03.2010, at 13:50, Avi Kivity wrote: On 03/08/2010 08:03 PM, Alexander Graf wrote: Userspace can tell us that it wants to trigger an interrupt. But so far it can't tell us that it wants to stop triggering one. So let's interpret the parameter to the ioctl that we have anyways to

Re: [PATCH 02/15] KVM: PPC: Allow userspace to unset the IRQ line

2010-03-09 Thread Avi Kivity
On 03/09/2010 02:54 PM, Alexander Graf wrote: On 09.03.2010, at 13:50, Avi Kivity wrote: On 03/08/2010 08:03 PM, Alexander Graf wrote: Userspace can tell us that it wants to trigger an interrupt. But so far it can't tell us that it wants to stop triggering one. So let's interpret

Re: [patch 0/7] kvm-tpr-opt cleanups

2010-03-09 Thread Avi Kivity
On 03/09/2010 02:47 AM, Marcelo Tosatti wrote: Prepare kvm-tpr-opt.c for upstream merge. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org

Re: [PATCH 14/15] KVM: PPC: Add OSI hypercall interface

2010-03-09 Thread Avi Kivity
On 03/09/2010 03:12 PM, Alexander Graf wrote: On 09.03.2010, at 14:11, Avi Kivity wrote: On 03/09/2010 03:04 PM, Alexander Graf wrote: + /* KVM_EXIT_OSI */ + struct { + __u64 gprs[32]; + } osi; + +MOL uses a

Re: [PATCH 05/10] Don't call apic functions directly from kvm code

2010-03-09 Thread Avi Kivity
On 02/26/2010 10:12 PM, Glauber Costa wrote: It is actually not necessary to call a tpr function to save and load cr8, as cr8 is part of the processor state, and thus, it is much easier to just add it to CPUState. As for apic base, wrap kvm usages, so we can call either the qemu device, or the

[PATCH 17/24] KVM: x86 emulator: Use load_segment_descriptor() instead of kvm_load_segment_descriptor()

2010-03-09 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/emulate.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 094d17c..81ecf47 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@

[PATCH 15/24] KVM: x86 emulator: Provide more callbacks for x86 emulator.

2010-03-09 Thread Gleb Natapov
Provide get_cached_descriptor(), set_cached_descriptor(), get_segment_selector(), set_segment_selector(), get_gdt(), write_std() callbacks. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_emulate.h | 16 + arch/x86/kvm/x86.c | 130

[PATCH 14/24] KVM: x86 emulator: cleanup grp3 return value

2010-03-09 Thread Gleb Natapov
When x86_emulate_insn() does not know how to emulate instruction it exits via cannot_emulate label in all cases except when emulating grp3. Fix that. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/emulate.c | 12 1 files changed, 4 insertions(+), 8 deletions(-) diff

[PATCH 10/24] KVM: x86 emulator: fix mov dr to inject #UD when needed.

2010-03-09 Thread Gleb Natapov
If CR4.DE=1 access to registers DR4/DR5 cause #UD. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/emulate.c | 18 -- 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 5ba082a..dcb9720 100644 ---

[PATCH 09/24] KVM: x86 emulator: inject #UD on access to non-existing CR

2010-03-09 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/emulate.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 54e62dc..5ba082a 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2516,6

[PATCH 06/24] KVM: x86 emulator: fix mov r/m, sreg emulation.

2010-03-09 Thread Gleb Natapov
mov r/m, sreg generates #UD ins sreg is incorrect. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/emulate.c |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 2cc9ef4..2df510b 100644 ---

[PATCH 08/24] KVM: x86 emulator: 0f (20|21|22|23) ignore mod bits.

2010-03-09 Thread Gleb Natapov
Resent spec says that for 0f (20|21|22|23) the 2 bits in the mod field are ignored. Interestingly enough older spec says that 11 is only valid encoding. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/emulate.c |8 1 files changed, 0 insertions(+), 8 deletions(-) diff

[PATCH 04/24] KVM: Provide current CPL as part of emulator context.

2010-03-09 Thread Gleb Natapov
Eliminate the need to call back into KVM to get it from emulator. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_emulate.h |1 + arch/x86/kvm/emulate.c |6 +++--- arch/x86/kvm/x86.c |1 + 3 files changed, 5 insertions(+), 3

[PATCH 21/24] KVM: x86 emulator: remove saved_eip

2010-03-09 Thread Gleb Natapov
c-eip is never written back in case of emulation failure, so no need to set it to old value. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/emulate.c |9 + 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c

[PATCH 13/24] KVM: x86 emulator: If LOCK prefix is used dest arg should be memory.

2010-03-09 Thread Gleb Natapov
If LOCK prefix is used dest arg should be memory, otherwise instruction should generate #UD. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/emulate.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

[PATCH 12/24] KVM: x86 emulator: do not call writeback if msr access fails.

2010-03-09 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/emulate.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 6381df9..45ded7f 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -2559,7

[PATCH 19/24] KVM: x86 emulator: fix in/out emulation.

2010-03-09 Thread Gleb Natapov
in/out emulation is broken now. The breakage is different depending on where IO device resides. If it is in userspace emulator reports emulation failure since it incorrectly interprets kvm_emulate_pio() return value. If IO device is in the kernel emulation of 'in' will do nothing since

[PATCH 11/24] KVM: x86 emulator: fix return values of syscall/sysenter/sysexit emulations

2010-03-09 Thread Gleb Natapov
Return X86EMUL_PROPAGATE_FAULT is fault was injected. Also inject #UD for those instruction when appropriate. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/emulate.c | 17 +++-- 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/emulate.c

Re: [PATCH 02/24] KVM: Provide callback to get/set control registers in emulator ops.

2010-03-09 Thread Avi Kivity
On 03/09/2010 04:09 PM, Gleb Natapov wrote: Use this callback instead of directly call kvm function. Also rename realmode_(set|get)_cr to emulator_(set|get)_cr since function has nothing to do with real mode. + ulong (*get_cr)(int cr, struct kvm_vcpu *vcpu); + void (*set_cr)(int

[PATCH 03/24] KVM: remove realmode_lmsw function.

2010-03-09 Thread Gleb Natapov
Use (get|set)_cr callback to emulate lmsw inside emulator. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_host.h |2 -- arch/x86/kvm/emulate.c |4 ++-- arch/x86/kvm/x86.c |7 --- 3 files changed, 2 insertions(+), 11 deletions(-)

[PATCH 00/24] [RFC] emulator cleanup

2010-03-09 Thread Gleb Natapov
This is the first series of patches that tries to cleanup emulator code. This is mix of bug fixes and moving code that does emulation from x86.c to emulator.c while making it KVM independent. The status of the patches: works for me. realtime.flat test now also pass where it failed before. Gleb

[PATCH 18/24] KVM: Use task switch from emulator.c

2010-03-09 Thread Gleb Natapov
Remove old task switch code from x86.c Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/x86.c | 558 ++-- 1 files changed, 18 insertions(+), 540 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f89502d..5171696

[PATCH 20/24] KVM: x86 emulator: Move string pio emulation into emulator.c

2010-03-09 Thread Gleb Natapov
Currently emulation is done outside of emulator so things like doing ins/outs to/from mmio are broken it also makes it hard (if not impossible) to implement single stepping in the future. The implementation in this patch is not efficient since it exits to userspace for each IO while previous

[PATCH 23/24] KVM: x86 emulator: introduce pio in string read ahead.

2010-03-09 Thread Gleb Natapov
To optimize rep ins instruction do IO in big chunks ahead of time instead of doing it only when required during instruction emulation. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_emulate.h |7 +++ arch/x86/kvm/emulate.c | 34

[PATCH 07/24] KVM: x86 emulator: fix 0f 01 /5 emulation

2010-03-09 Thread Gleb Natapov
It is undefined and should generate #UD. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/emulate.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 2df510b..1a32b78 100644 --- a/arch/x86/kvm/emulate.c

[PATCH 16/24] KVM: x86 emulator: Emulate task switch in emulator.c

2010-03-09 Thread Gleb Natapov
Implement emulation of 16/32 bit task switch in emulator.c Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_emulate.h |5 + arch/x86/kvm/emulate.c | 564 2 files changed, 569 insertions(+), 0 deletions(-) diff --git

[PATCH 22/24] KVM: x86 emulator: restart string instruction without going back to a guest.

2010-03-09 Thread Gleb Natapov
Currently when string instruction is only partially complete we go back to a guest mode, guest tries to reexecute instruction and exits again and at this point emulation continues. Avoid all of this by restarting instruction without going back to a guest mode. Signed-off-by: Gleb Natapov

Re: [PATCH 15/24] KVM: x86 emulator: Provide more callbacks for x86 emulator.

2010-03-09 Thread Avi Kivity
On 03/09/2010 04:09 PM, Gleb Natapov wrote: Provide get_cached_descriptor(), set_cached_descriptor(), get_segment_selector(), set_segment_selector(), get_gdt(), write_std() callbacks. Signed-off-by: Gleb Natapovg...@redhat.com --- arch/x86/include/asm/kvm_emulate.h | 16 +

Re: [PATCH 19/24] KVM: x86 emulator: fix in/out emulation.

2010-03-09 Thread Avi Kivity
On 03/09/2010 04:09 PM, Gleb Natapov wrote: in/out emulation is broken now. The breakage is different depending on where IO device resides. If it is in userspace emulator reports emulation failure since it incorrectly interprets kvm_emulate_pio() return value. If IO device is in the kernel

Re: KVM usability

2010-03-09 Thread Anthony Liguori
On 03/09/2010 07:32 AM, Avi Kivity wrote: On 03/02/2010 04:36 AM, Anthony Liguori wrote: I keep a patch in the SUSE version for quite some time now that bumps the default to 384 for qemu-kvm. That was the first round number where an openSUSE installation worked. If someone works up a patch

Re: KVM usability

2010-03-09 Thread Anthony Liguori
On 03/09/2010 08:38 AM, Alexander Graf wrote: On 09.03.2010, at 15:32, Dustin Kirkland wrote: On Tue, 2010-03-09 at 15:32 +0200, Avi Kivity wrote: On 03/02/2010 04:36 AM, Anthony Liguori wrote: I keep a patch in the SUSE version for quite some time now that bumps the

Re: [PATCH 22/24] KVM: x86 emulator: restart string instruction without going back to a guest.

2010-03-09 Thread Avi Kivity
On 03/09/2010 04:09 PM, Gleb Natapov wrote: Currently when string instruction is only partially complete we go back to a guest mode, guest tries to reexecute instruction and exits again and at this point emulation continues. Avoid all of this by restarting instruction without going back to a

Re: KVM usability

2010-03-09 Thread Avi Kivity
On 03/09/2010 04:50 PM, Anthony Liguori wrote: It's all in the openSUSE build service. The direct access URL (login required FWIW) is here: https://build.opensuse.org/package/view_file?file=kvm-qemu-default-memsize.patchpackage=kvmproject=Virtualization It merely changes DEFAULT_RAM_SIZE

Re: KVM usability

2010-03-09 Thread Alexander Graf
On 09.03.2010, at 15:32, Dustin Kirkland wrote: On Tue, 2010-03-09 at 15:32 +0200, Avi Kivity wrote: On 03/02/2010 04:36 AM, Anthony Liguori wrote: I keep a patch in the SUSE version for quite some time now that bumps the default to 384 for qemu-kvm. That was the first round number where

Re: KVM usability

2010-03-09 Thread Avi Kivity
On 03/09/2010 04:49 PM, Anthony Liguori wrote: On 03/09/2010 07:32 AM, Avi Kivity wrote: On 03/02/2010 04:36 AM, Anthony Liguori wrote: I keep a patch in the SUSE version for quite some time now that bumps the default to 384 for qemu-kvm. That was the first round number where an openSUSE

Re: KVM usability

2010-03-09 Thread Anthony Liguori
On 03/09/2010 08:52 AM, Avi Kivity wrote: On 03/09/2010 04:50 PM, Anthony Liguori wrote: It's all in the openSUSE build service. The direct access URL (login required FWIW) is here:

Re: qemu-kvm upstream segfaults when using -smp 1

2010-03-09 Thread Lucas Meneghel Rodrigues
On Thu, 2010-03-04 at 19:30 +0100, Jan Kiszka wrote: Lucas Meneghel Rodrigues wrote: Hi folks: Today's upstream qemu-kvm.git is crashing when attempting to use -smp 1: 03/04 12:56:12 DEBUG|kvm_vm:0461| Running qemu command: /usr/local/autotest/tests/kvm/qemu -name 'vm1' -monitor

Re: KVM usability

2010-03-09 Thread Avi Kivity
On 03/02/2010 04:36 AM, Anthony Liguori wrote: I keep a patch in the SUSE version for quite some time now that bumps the default to 384 for qemu-kvm. That was the first round number where an openSUSE installation worked. If someone works up a patch and tests at least a couple types of guests

Re: [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Avi Kivity
On 03/08/2010 07:57 PM, Cam Macdonell wrote: Can you provide a spec that describes the device? This would be useful for maintaining the code, writing guest drivers, and as a framework for review. I'm not sure if you want the Qemu command-line part as part of the spec here, but I've

Re: [PATCH 14/15] KVM: PPC: Add OSI hypercall interface

2010-03-09 Thread Avi Kivity
On 03/08/2010 08:03 PM, Alexander Graf wrote: MOL uses its own hypercall interface to call back into userspace when the guest wants to do something. So let's implement that as an exit reason, specify it with a CAP and only really use it when userspace wants us to. The only user of it so far is

Re: [PATCH 13/15] KVM: Add support for enabling capabilities per-vcpu

2010-03-09 Thread Avi Kivity
On 03/08/2010 08:03 PM, Alexander Graf wrote: Some times we don't want all capabilities to be available to all our vcpus. One example for that is the OSI interface, implemented in the next patch. In order to have a generic mechanism in how to enable capabilities individually, this patch

Re: [PATCH 07/24] KVM: x86 emulator: fix 0f 01 /5 emulation

2010-03-09 Thread Avi Kivity
On 03/09/2010 04:09 PM, Gleb Natapov wrote: It is undefined and should generate #UD. Signed-off-by: Gleb Natapovg...@redhat.com --- arch/x86/kvm/emulate.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index

Re: [PATCH bugfix] KVM: SVM: Fix memory leaks that happen when svm_create_vcpu() fails

2010-03-09 Thread Avi Kivity
On 03/09/2010 07:55 AM, Takuya Yoshikawa wrote: svm_create_vcpu() does not free the pages allocated during the creation when it fails to complete the allocations. This patch fixes it. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from

Re: [Qemu-devel] KVM call agenda for Mar 9

2010-03-09 Thread Anthony Liguori
On 03/09/2010 07:44 AM, Luiz Capitulino wrote: On Mon, 8 Mar 2010 22:29:55 -0800 Chris Wrightchr...@redhat.com wrote: - virtio-9p passthrough filesystem support - modular command line helpers Please send in any additional agenda items you are interested in covering. - Summer of

Re: [PATCH 2/4] KVM: Rework VCPU state writeback API

2010-03-09 Thread Anthony Liguori
On 03/08/2010 02:33 PM, Marcelo Tosatti wrote: On Fri, Mar 05, 2010 at 09:37:26PM -0500, Kevin O'Connor wrote: On Thu, Mar 04, 2010 at 03:35:52PM -0300, Marcelo Tosatti wrote: On Thu, Mar 04, 2010 at 12:58:58AM -0500, Kevin O'Connor wrote: On Thu, Mar 04, 2010 at 01:21:12AM

Re: [PATCH 07/24] KVM: x86 emulator: fix 0f 01 /5 emulation

2010-03-09 Thread Gleb Natapov
On Tue, Mar 09, 2010 at 04:27:39PM +0200, Avi Kivity wrote: On 03/09/2010 04:09 PM, Gleb Natapov wrote: It is undefined and should generate #UD. Signed-off-by: Gleb Natapovg...@redhat.com --- arch/x86/kvm/emulate.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff

Re: [Qemu-devel] KVM call agenda for Mar 9

2010-03-09 Thread Luiz Capitulino
On Mon, 8 Mar 2010 22:29:55 -0800 Chris Wright chr...@redhat.com wrote: - virtio-9p passthrough filesystem support - modular command line helpers Please send in any additional agenda items you are interested in covering. - Summer of code 2010 (do we want to join?) - Status of Anthony's

Re: [PATCH 07/24] KVM: x86 emulator: fix 0f 01 /5 emulation

2010-03-09 Thread Avi Kivity
On 03/09/2010 04:33 PM, Gleb Natapov wrote: On Tue, Mar 09, 2010 at 04:27:39PM +0200, Avi Kivity wrote: On 03/09/2010 04:09 PM, Gleb Natapov wrote: It is undefined and should generate #UD. Signed-off-by: Gleb Natapovg...@redhat.com --- arch/x86/kvm/emulate.c |3 +++ 1 files

[PATCH 01/24] KVM: Remove pointer to rflags from realmode_set_cr parameters.

2010-03-09 Thread Gleb Natapov
Mov reg, cr instruction doesn't change flags in any meaningful way, so no need to update rflags after instruction execution. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_host.h |3 +-- arch/x86/kvm/emulate.c |3 +-- arch/x86/kvm/x86.c |

[PATCH 24/24] KVM: small kvm_arch_vcpu_ioctl_run() cleanup.

2010-03-09 Thread Gleb Natapov
Unify all conditions that get us back into emulator after returning from userspace. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/kvm/x86.c | 32 ++-- 1 files changed, 6 insertions(+), 26 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c

Re: [PATCH] KVM: s390: Fix possible memory leak of in kvm_arch_vcpu_create()

2010-03-09 Thread Avi Kivity
On 03/09/2010 08:37 AM, Wei Yongjun wrote: This patch fixed possible memory leak in kvm_arch_vcpu_create() under s390, which would happen when kvm_arch_vcpu_create() fails. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list:

Re: [PATCH] KVM: s390: Fix possible memory leak of in kvm_arch_vcpu_create()

2010-03-09 Thread Carsten Otte
Wei Yongjun wrote: This patch fixed possible memory leak in kvm_arch_vcpu_create() under s390, which would happen when kvm_arch_vcpu_create() fails. Good catch, thanks! Acked-by: Carsten Otte co...@de.ibm.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

[PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Cam Macdonell
On Tue, Mar 9, 2010 at 3:29 AM, Avi Kivity a...@redhat.com wrote: On 03/08/2010 07:57 PM, Cam Macdonell wrote: Can you provide a spec that describes the device?  This would be useful for maintaining the code, writing guest drivers, and as a framework for review. I'm not sure if you want

Re: [PATCH 04/24] KVM: Provide current CPL as part of emulator context.

2010-03-09 Thread Gleb Natapov
On Tue, Mar 09, 2010 at 04:24:45PM +0200, Avi Kivity wrote: On 03/09/2010 04:09 PM, Gleb Natapov wrote: Eliminate the need to call back into KVM to get it from emulator. @@ -3499,6 +3499,7 @@ int emulate_instruction(struct kvm_vcpu *vcpu, vcpu-arch.emulate_ctxt.vcpu = vcpu;

Re: [PATCH 02/24] KVM: Provide callback to get/set control registers in emulator ops.

2010-03-09 Thread Gleb Natapov
On Tue, Mar 09, 2010 at 04:18:09PM +0200, Avi Kivity wrote: On 03/09/2010 04:09 PM, Gleb Natapov wrote: Use this callback instead of directly call kvm function. Also rename realmode_(set|get)_cr to emulator_(set|get)_cr since function has nothing to do with real mode. +ulong

[PATCH 05/24] KVM: Provide current eip as part of emulator context.

2010-03-09 Thread Gleb Natapov
Eliminate the need to call back into KVM to get it from emulator. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_emulate.h |3 ++- arch/x86/kvm/emulate.c | 12 ++-- arch/x86/kvm/x86.c |1 + 3 files changed, 9 insertions(+),

Re: [PATCH 04/24] KVM: Provide current CPL as part of emulator context.

2010-03-09 Thread Avi Kivity
On 03/09/2010 04:09 PM, Gleb Natapov wrote: Eliminate the need to call back into KVM to get it from emulator. @@ -3499,6 +3499,7 @@ int emulate_instruction(struct kvm_vcpu *vcpu, vcpu-arch.emulate_ctxt.vcpu = vcpu; vcpu-arch.emulate_ctxt.eflags =

Re: [PATCH 14/15] KVM: PPC: Add OSI hypercall interface

2010-03-09 Thread Alexander Graf
On 09.03.2010, at 14:19, Avi Kivity wrote: On 03/09/2010 03:12 PM, Alexander Graf wrote: On 09.03.2010, at 14:11, Avi Kivity wrote: On 03/09/2010 03:04 PM, Alexander Graf wrote: +/* KVM_EXIT_OSI */ +struct { +__u64

Re: [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Avi Kivity
On 03/09/2010 02:49 PM, Arnd Bergmann wrote: On Monday 08 March 2010, Cam Macdonell wrote: enum ivshmem_registers { IntrMask = 0, IntrStatus = 2, Doorbell = 4, IVPosition = 6, IVLiveList = 8 }; The first two registers are the interrupt mask and status registers.

[PATCH 02/24] KVM: Provide callback to get/set control registers in emulator ops.

2010-03-09 Thread Gleb Natapov
Use this callback instead of directly call kvm function. Also rename realmode_(set|get)_cr to emulator_(set|get)_cr since function has nothing to do with real mode. Signed-off-by: Gleb Natapov g...@redhat.com --- arch/x86/include/asm/kvm_emulate.h |3 +- arch/x86/include/asm/kvm_host.h|

Re: [PATCH 15/24] KVM: x86 emulator: Provide more callbacks for x86 emulator.

2010-03-09 Thread Gleb Natapov
On Tue, Mar 09, 2010 at 04:43:59PM +0200, Avi Kivity wrote: On 03/09/2010 04:09 PM, Gleb Natapov wrote: Provide get_cached_descriptor(), set_cached_descriptor(), get_segment_selector(), set_segment_selector(), get_gdt(), write_std() callbacks. Signed-off-by: Gleb Natapovg...@redhat.com ---

Re: [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Cam Macdonell
On Tue, Mar 9, 2010 at 6:03 AM, Avi Kivity a...@redhat.com wrote: On 03/09/2010 02:49 PM, Arnd Bergmann wrote: On Monday 08 March 2010, Cam Macdonell wrote: enum ivshmem_registers {     IntrMask = 0,     IntrStatus = 2,     Doorbell = 4,     IVPosition = 6,     IVLiveList = 8 }; The

Re: KVM usability

2010-03-09 Thread Avi Kivity
On 03/09/2010 04:57 PM, Anthony Liguori wrote: On 03/09/2010 08:52 AM, Avi Kivity wrote: On 03/09/2010 04:50 PM, Anthony Liguori wrote: It's all in the openSUSE build service. The direct access URL (login required FWIW) is here:

Re: [PATCH 15/24] KVM: x86 emulator: Provide more callbacks for x86 emulator.

2010-03-09 Thread Avi Kivity
On 03/09/2010 06:25 PM, Gleb Natapov wrote: On Tue, Mar 09, 2010 at 04:43:59PM +0200, Avi Kivity wrote: On 03/09/2010 04:09 PM, Gleb Natapov wrote: Provide get_cached_descriptor(), set_cached_descriptor(), get_segment_selector(), set_segment_selector(), get_gdt(), write_std()

Re: KVM usability

2010-03-09 Thread Anthony Liguori
On 03/09/2010 11:11 AM, Avi Kivity wrote: On 03/09/2010 04:57 PM, Anthony Liguori wrote: On 03/09/2010 08:52 AM, Avi Kivity wrote: On 03/09/2010 04:50 PM, Anthony Liguori wrote: It's all in the openSUSE build service. The direct access URL (login required FWIW) is here:

Re: [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Avi Kivity
On 03/09/2010 05:27 PM, Cam Macdonell wrote: Registers are used for synchronization between guests sharing the same memory object when interrupts are supported (this requires using the shared memory server). How does the driver detect whether interrupts are supported or not?

Re: KVM usability

2010-03-09 Thread Avi Kivity
On 03/09/2010 07:27 PM, Anthony Liguori wrote: Perhaps a json representation of things. We already have the parser. Please no :-) We have a config format, QemuOpts ties nicely into it as does qdev. We just need to represent machine information via QemuOpts and tie -m to manipulating the

Re: [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Anthony Liguori
On 03/09/2010 11:28 AM, Avi Kivity wrote: On 03/09/2010 05:27 PM, Cam Macdonell wrote: Registers are used for synchronization between guests sharing the same memory object when interrupts are supported (this requires using the shared memory server). How does the driver detect whether

Re: [PATCH 15/24] KVM: x86 emulator: Provide more callbacks for x86 emulator.

2010-03-09 Thread Gleb Natapov
On Tue, Mar 09, 2010 at 07:22:51PM +0200, Avi Kivity wrote: On 03/09/2010 06:25 PM, Gleb Natapov wrote: On Tue, Mar 09, 2010 at 04:43:59PM +0200, Avi Kivity wrote: On 03/09/2010 04:09 PM, Gleb Natapov wrote: Provide get_cached_descriptor(), set_cached_descriptor(), get_segment_selector(),

Re: [PATCH 19/24] KVM: x86 emulator: fix in/out emulation.

2010-03-09 Thread Gleb Natapov
On Tue, Mar 09, 2010 at 04:47:24PM +0200, Avi Kivity wrote: On 03/09/2010 04:09 PM, Gleb Natapov wrote: in/out emulation is broken now. The breakage is different depending on where IO device resides. If it is in userspace emulator reports emulation failure since it incorrectly interprets

Re: [PATCH 22/24] KVM: x86 emulator: restart string instruction without going back to a guest.

2010-03-09 Thread Gleb Natapov
On Tue, Mar 09, 2010 at 04:50:29PM +0200, Avi Kivity wrote: On 03/09/2010 04:09 PM, Gleb Natapov wrote: Currently when string instruction is only partially complete we go back to a guest mode, guest tries to reexecute instruction and exits again and at this point emulation continues. Avoid all

Re: [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Cam Macdonell
On Tue, Mar 9, 2010 at 10:28 AM, Avi Kivity a...@redhat.com wrote: On 03/09/2010 05:27 PM, Cam Macdonell wrote:  Registers are used for synchronization between guests sharing the same memory object when interrupts are supported (this requires using the shared memory server). How does the

Re: KVM Guest mmap.c bug

2010-03-09 Thread Bruno Cesar Ribas
On Mon, Mar 08, 2010 at 03:49:01PM +0100, Andrea Arcangeli wrote: On Mon, Mar 08, 2010 at 03:32:19PM +0200, Avi Kivity wrote: It looks unrelated to kvm, though of course random memory corruption cannot be ruled out. Is npt enabled on the host (cat /sys/module/kvm_amd/parameters/npt)?

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Jamie Lokier
Paul Brook wrote: However, coherence could be made host-type-independent by the host mapping and unampping pages, so that each page is only mapped into one guest (or guest CPU) at a time. Just like some clustering filesystems do to maintain coherence. You're assuming that a TLB flush

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Jamie Lokier
Avi Kivity wrote: On 03/08/2010 03:03 PM, Paul Brook wrote: On 03/08/2010 12:53 AM, Paul Brook wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Jamie Lokier
Paul Brook wrote: On 03/08/2010 12:53 AM, Paul Brook wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to

report stolen time via pvclock?

2010-03-09 Thread Thomas Treutner
Hi, I'm referring to this patchset http://www.mail-archive.com/kvm@vger.kernel.org/msg23810.html of Marcelo Tosatti. It seems it was never included or even discussed, although it's nearly half a year old. I wonder if there is a good reason for that? I'd like to use the steal time for my VMs,

Re: report stolen time via pvclock?

2010-03-09 Thread Rik van Riel
On 03/09/2010 04:30 PM, Marcelo Tosatti wrote: On Tue, Mar 09, 2010 at 09:47:38PM +0100, Thomas Treutner wrote: Hi, I'm referring to this patchset http://www.mail-archive.com/kvm@vger.kernel.org/msg23810.html of Marcelo Tosatti. It seems it was never included or even discussed, although it's

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Anthony Liguori
On 03/08/2010 03:54 AM, Jamie Lokier wrote: Alexander Graf wrote: Or we could put in some code that tells the guest the host shm architecture and only accept x86 on x86 for now. If anyone cares for other combinations, they're free to implement them. Seriously, we're looking at an interface

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Anthony Liguori
On 03/08/2010 07:16 AM, Avi Kivity wrote: On 03/08/2010 03:03 PM, Paul Brook wrote: On 03/08/2010 12:53 AM, Paul Brook wrote: Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by

Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

2010-03-09 Thread Paul Brook
In a cross environment that becomes extremely hairy. For example the x86 architecture effectively has an implicit write barrier before every store, and an implicit read barrier before every load. Btw, x86 doesn't have any implicit barriers due to ordinary loads. Only stores and atomics

  1   2   >