Connection between KVM and QEMU.

2009-07-16 Thread Rakesh Avichal Ughreja
Hello All, I am trying to understand the what is the connection between KVM and QEMU. The way I understand it so far from the information on the net, KVM is an emulator for x86 based machine and it uses the virtualization support provided by the x86 based CPUs. QEMU is a generic emulator and has

Re: Failed to compile kvm-88

2009-07-16 Thread Jun Koi
On Fri, Jul 17, 2009 at 2:59 PM, Sheng Yang wrote: > On Friday 17 July 2009 13:55:02 Jun Koi wrote: >> On Fri, Jul 17, 2009 at 2:45 PM, Sheng Yang wrote: >> > On Friday 17 July 2009 11:34:03 Jun Koi wrote: >> >> Hi, >> >> >> >> I am trying to compile kvm-88, like followings: >> >> >> >> ./configure

Re: Failed to compile kvm-88

2009-07-16 Thread Sheng Yang
On Friday 17 July 2009 13:55:02 Jun Koi wrote: > On Fri, Jul 17, 2009 at 2:45 PM, Sheng Yang wrote: > > On Friday 17 July 2009 11:34:03 Jun Koi wrote: > >> Hi, > >> > >> I am trying to compile kvm-88, like followings: > >> > >> ./configure --disable-xen > >> make > >> > >> Then I get following erro

Re: Failed to compile kvm-88

2009-07-16 Thread Jun Koi
On Fri, Jul 17, 2009 at 2:45 PM, Sheng Yang wrote: > On Friday 17 July 2009 11:34:03 Jun Koi wrote: >> Hi, >> >> I am trying to compile kvm-88, like followings: >> >> ./configure --disable-xen >> make >> >> Then I get following errors. Why do I have such a problem, if I >> already disalbe Xen suppo

How much physical memory can be used to run domains in a KVM machine?

2009-07-16 Thread Zhang Qian
Hi, I have a KVM box which has 4GB physical memory totally, I'd like to know how much I can use to run my domains, and how much will be reserved by hypervisor(KVM) itself? Thanks! Regards, Qian -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord..

Re: Failed to compile kvm-88

2009-07-16 Thread Sheng Yang
On Friday 17 July 2009 11:34:03 Jun Koi wrote: > Hi, > > I am trying to compile kvm-88, like followings: > > ./configure --disable-xen > make > > Then I get following errors. Why do I have such a problem, if I > already disalbe Xen support, like above? How to fix this problem? Comment out all XEN

Failed to compile kvm-88

2009-07-16 Thread Jun Koi
Hi, I am trying to compile kvm-88, like followings: ./configure --disable-xen make Then I get following errors. Why do I have such a problem, if I already disalbe Xen support, like above? How to fix this problem? Thanks lot, J  CC    x86_64-softmmu/disas.o  CC    x86_64-softmmu/i386-dis

Re: [PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code.

2009-07-16 Thread Yang, Sheng
On Friday 17 July 2009 03:14:54 Marcelo Tosatti wrote: > On Thu, Jul 16, 2009 at 11:48:46AM -0700, Jordan Justen wrote: > > On Thu, 2009-07-16 at 11:18 -0700, Marcelo Tosatti wrote: > > > On Thu, Jul 16, 2009 at 11:02:22AM -0700, Jordan Justen wrote: > > > > Although VMX_EPT_IDENTITY_PAGETABLE_ADDR

Re: [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Gregory Haskins
Arnd Bergmann wrote: > On Thursday 16 July 2009, Gregory Haskins wrote: > >> Arnd Bergmann wrote: >> > > >>> Your approach allows passing the vmid from a process that does >>> not own the kvm context. This looks like an intentional feature, >>> but I can't see what this gains us. >>>

Re: [Qemu-devel] [PATCH] rev3: support colon in filenames

2009-07-16 Thread Paul Brook
> So I propose this as a universal quoting scheme: > > \ where is not ASCII alphanumeric. No thank you. This sounds dangerously like the windows command shell quoting rules. At first clance they appear to "just work", however when you actually try to figure out what's going on it gets horri

Re: KVM for Linux 2.6.16?

2009-07-16 Thread Anthony Liguori
Fischer, Anna wrote: Hi, I am trying to compile the kvm-87 module for Linux 2.6.16. I thought that it has been back-ported to such an old kernel. However, I don't seem to be able to compile the module on my kernel. I get the following error: CCtsc2005.o CCscsi-disk.o CCcdrom.

Set the iothread's eventfd/pipe descriptors to non-blocking

2009-07-16 Thread Dor Laor
It replaces the previous fix of using select. >From ab5ae4bb69f8ab6c9a476f7823cb8d6729d31594 Mon Sep 17 00:00:00 2001 From: Dor Laor Date: Wed, 15 Jul 2009 17:53:16 +0300 Subject: [PATCH] Set the iothread's eventfd/pipe descriptors to non-blocking. It fixes migration issue when the destination i

Re: Qemu 0.10.50 CAN NOT get ip from dhcp server

2009-07-16 Thread John Wong
Amit Shah 提到: Is the host a 64-bit host and are you running a 64 bit kernel on the host? Yes, the host is Debian/64-bit/kernel-2.6.30. John Wong 提到: My host system is(uname -a): Linux Debian 2.6.30-1-amd64 #1 SMP Wed Jul 8 12:20:34 UTC 2009 x86_64 GNU/Linux My cpu is Intel core2duo E8400

Re: [PATCH 08/10] Move IO APIC to its own lock.

2009-07-16 Thread Gleb Natapov
On Thu, Jul 16, 2009 at 03:09:30PM -0300, Marcelo Tosatti wrote: > On Thu, Jul 16, 2009 at 10:51:16AM +0300, Gleb Natapov wrote: > > On Wed, Jul 15, 2009 at 06:38:48PM -0300, Marcelo Tosatti wrote: > > > On Wed, Jul 15, 2009 at 11:48:17PM +0300, Gleb Natapov wrote: > > > > > > + spin_unlo

Re: [PATCH -tip -v12 01/11] x86: instruction decoder API

2009-07-16 Thread Masami Hiramatsu
Sam Ravnborg wrote: > On Thu, Jul 16, 2009 at 01:28:54PM -0400, Masami Hiramatsu wrote: >> Sam Ravnborg wrote: diff --git a/arch/x86/include/asm/inat.h b/arch/x86/include/asm/inat.h new file mode 100644 index 000..01e079a --- /dev/null +++ b/arch/x86/include/asm/inat.h

Re: [PATCH -tip -v12 02/11] x86: x86 instruction decoder build-time selftest

2009-07-16 Thread Masami Hiramatsu
Sam Ravnborg wrote: + cmd_posttest = objdump -d $(objtree)/vmlinux | awk -f $(srctree)/arch/x86/scripts/distill.awk | $(obj)/test_get_len + >>> You are using the native objdump here. >>> But I assume this fails miserably when you build x86 on a powerpc host. >>> In other words

Re: [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Zan Lynx
Gregory Haskins wrote: Gregory Haskins wrote: Note that if we are going to generalize the interface to support other guests as you may have been suggesting above, it should probably stay statically linked (and perhaps live in ./lib or something) More specifically, it can no longer live in k

Re: [PATCH -tip -v12 01/11] x86: instruction decoder API

2009-07-16 Thread Sam Ravnborg
On Thu, Jul 16, 2009 at 01:28:54PM -0400, Masami Hiramatsu wrote: > Sam Ravnborg wrote: > >> diff --git a/arch/x86/include/asm/inat.h b/arch/x86/include/asm/inat.h > >> new file mode 100644 > >> index 000..01e079a > >> --- /dev/null > >> +++ b/arch/x86/include/asm/inat.h > >> @@ -0,0 +1,125 @@

Re: [PATCH -tip -v12 02/11] x86: x86 instruction decoder build-time selftest

2009-07-16 Thread Sam Ravnborg
> >> + cmd_posttest = objdump -d $(objtree)/vmlinux | awk -f > >> $(srctree)/arch/x86/scripts/distill.awk | $(obj)/test_get_len > >> + > > > > You are using the native objdump here. > > But I assume this fails miserably when you build x86 on a powerpc host. > > In other words - you broke an

Re: [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Gregory Haskins
Zan Lynx wrote: > Gregory Haskins wrote: >> Gregory Haskins wrote: >>> Note that if we are going to generalize the interface to support other >>> guests as you may have been suggesting above, it should probably stay >>> statically linked (and perhaps live in ./lib or something) >>> >> >> More sp

Re: [PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code.

2009-07-16 Thread Marcelo Tosatti
On Thu, Jul 16, 2009 at 11:48:46AM -0700, Jordan Justen wrote: > On Thu, 2009-07-16 at 11:18 -0700, Marcelo Tosatti wrote: > > On Thu, Jul 16, 2009 at 11:02:22AM -0700, Jordan Justen wrote: > > > Although VMX_EPT_IDENTITY_PAGETABLE_ADDR does not appear to be used within > > > qemu-kvm, this change

Re: [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Arnd Bergmann
On Thursday 16 July 2009, Gregory Haskins wrote: > Arnd Bergmann wrote: > > Your approach allows passing the vmid from a process that does > > not own the kvm context. This looks like an intentional feature, > > but I can't see what this gains us. > > This work is towards the implementation of

Re: [PATCH -tip -v12 02/11] x86: x86 instruction decoder build-time selftest

2009-07-16 Thread Masami Hiramatsu
Masami Hiramatsu wrote: >> You are using the native objdump here. >> But I assume this fails miserably when you build x86 on a powerpc host. >> In other words - you broke an allyesconfig build for -next... >> We have $(OBJDUMP) for this. > > Ah, I see... Would you know actual name of x86-objdump o

Re: [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Gregory Haskins
Gregory Haskins wrote: > Note that if we are going to generalize the interface to support other > guests as you may have been suggesting above, it should probably stay > statically linked (and perhaps live in ./lib or something) > More specifically, it can no longer live in kvm.ko. I guess it

Re: [PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code.

2009-07-16 Thread Jordan Justen
On Thu, 2009-07-16 at 11:18 -0700, Marcelo Tosatti wrote: > On Thu, Jul 16, 2009 at 11:02:22AM -0700, Jordan Justen wrote: > > Although VMX_EPT_IDENTITY_PAGETABLE_ADDR does not appear to be used within > > qemu-kvm, this change mirrors a similar change in the kernel kvm code. > > > > The purpose i

Re: [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Gregory Haskins
Arnd Bergmann wrote: > On Thursday 16 July 2009, Gregory Haskins wrote: > >> Background: The original vbus code was tightly integrated with kvm.ko. Avi >> suggested that we abstract the interfaces such that it could live outside >> of kvm. >> > > The code is still highly kvm-specific, you

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

2009-07-16 Thread Greg KH
On Thu, Jul 16, 2009 at 03:31:01PM +0300, Michael S. Tsirkin wrote: > On Wed, Jul 15, 2009 at 03:08:29PM -0700, Greg KH 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 virt

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

2009-07-16 Thread Greg KH
On Thu, Jul 16, 2009 at 08:03:46PM +0300, Michael S. Tsirkin wrote: > On Thu, Jul 16, 2009 at 08:52:08AM -0700, Greg KH wrote: > > On Thu, Jul 16, 2009 at 05:12:55PM +0200, Hans J. Koch wrote: > > > On Thu, Jul 16, 2009 at 05:07:10PM +0300, Michael S. Tsirkin wrote: > > > > On Wed, Jul 15, 2009 at

Re: [PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code.

2009-07-16 Thread Marcelo Tosatti
On Thu, Jul 16, 2009 at 11:02:22AM -0700, Jordan Justen wrote: > Although VMX_EPT_IDENTITY_PAGETABLE_ADDR does not appear to be used within > qemu-kvm, this change mirrors a similar change in the kernel kvm code. > > The purpose is to move the KVM 'EPT Identity Pages' from: > 0xfffbc000-0xfffbcf

Re: [PATCH 08/10] Move IO APIC to its own lock.

2009-07-16 Thread Marcelo Tosatti
On Thu, Jul 16, 2009 at 10:51:16AM +0300, Gleb Natapov wrote: > On Wed, Jul 15, 2009 at 06:38:48PM -0300, Marcelo Tosatti wrote: > > On Wed, Jul 15, 2009 at 11:48:17PM +0300, Gleb Natapov wrote: > > > > > + spin_unlock(&ioapic->lock); > > > > > + kvm_notify_acked_irq(ioapic-

[PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code.

2009-07-16 Thread Jordan Justen
Although VMX_EPT_IDENTITY_PAGETABLE_ADDR does not appear to be used within qemu-kvm, this change mirrors a similar change in the kernel kvm code. The purpose is to move the KVM 'EPT Identity Pages' from: 0xfffbc000-0xfffbcfff to: 0xfeffc000-0xfeffcfff The step is required to free up the 0xff0

[PATCH 1/3] Update qemu-kvm bios to allow for a larger bios image.

2009-07-16 Thread Jordan Justen
The bios will now reserve more memory via the E820 functions. Previously we reserved: 0xfffbc000-0xfffbcfff - 4KB - KVM kernel module, EPT identity pages tables 0xfffbd000-0xfffb - 12KB - KVM bios, VMC TSS Pages 0xfffc-0x - 256KB - Max KVM bios.bin (usually top 128KB is us

[PATCH 2/3] Move qemu-kvm 'VMC TSS Pages' to allow a larger BIOS image.

2009-07-16 Thread Jordan Justen
Move qemu-kvm 'VMC TSS Pages' from: 0xfffbd000-0xfffb to: 0xfeffd000-0xfeff The step is required to free up the 0xff00-0x (16MB) range for use with bios.bin. This change depends upon a change to kvm/bios/rombios.c so the bios INT15-E820 function will properly reserve the n

Re: [PATCH] Update qemu-kvm to allow a larger BIOS image.

2009-07-16 Thread Jordan Justen
On Wed, Jul 15, 2009 at 10:37 PM, Sheng Yang wrote: > Make sense to me. So what's mattered here is not bios, but qemu-kvm and kvm > code. The user can replace bios binary by UEFI binary easily, but not with kvm > related part. > > I realized you still need separate the qemu-kvm patch into two: one

Re: [PATCH -tip -v12 02/11] x86: x86 instruction decoder build-time selftest

2009-07-16 Thread Masami Hiramatsu
Sam Ravnborg wrote: > On Thu, Jul 16, 2009 at 11:57:06AM -0400, Masami Hiramatsu wrote: >> Add a user-space selftest of x86 instruction decoder at kernel build time. >> When CONFIG_X86_DECODER_SELFTEST=y, Kbuild builds a test harness of x86 >> instruction decoder and performs it after building vmli

Re: [PATCH -tip -v12 01/11] x86: instruction decoder API

2009-07-16 Thread Masami Hiramatsu
Sam Ravnborg wrote: >> diff --git a/arch/x86/include/asm/inat.h b/arch/x86/include/asm/inat.h >> new file mode 100644 >> index 000..01e079a >> --- /dev/null >> +++ b/arch/x86/include/asm/inat.h >> @@ -0,0 +1,125 @@ >> +#ifndef _ASM_INAT_INAT_H >> +#define _ASM_INAT_INAT_H > > [With reference t

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

2009-07-16 Thread Michael S. Tsirkin
On Thu, Jul 16, 2009 at 08:52:08AM -0700, Greg KH wrote: > On Thu, Jul 16, 2009 at 05:12:55PM +0200, Hans J. Koch wrote: > > On Thu, Jul 16, 2009 at 05:07:10PM +0300, Michael S. Tsirkin wrote: > > > On Wed, Jul 15, 2009 at 03:08:29PM -0700, Greg KH wrote: > > > > How about moving that documentation

Re: [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Arnd Bergmann
On Thursday 16 July 2009, Gregory Haskins wrote: > Background: The original vbus code was tightly integrated with kvm.ko. Avi > suggested that we abstract the interfaces such that it could live outside > of kvm. The code is still highly kvm-specific, you would not be able to use it with another h

Re: [PATCH -tip -v12 01/11] x86: instruction decoder API

2009-07-16 Thread Masami Hiramatsu
On 2009年07月16日 12:19, H. Peter Anvin wrote: > Masami Hiramatsu wrote: >> >> These opcode maps do NOT include most of SSE and FP opcodes, because >> those opcodes are not used in the kernel. >> > > That is not true. Ah, these opcode maps include some SSE/FP setup opcdes which are used in the kerne

Re: [PATCH -tip -v12 01/11] x86: instruction decoder API

2009-07-16 Thread Sam Ravnborg
> > diff --git a/arch/x86/include/asm/inat.h b/arch/x86/include/asm/inat.h > new file mode 100644 > index 000..01e079a > --- /dev/null > +++ b/arch/x86/include/asm/inat.h > @@ -0,0 +1,125 @@ > +#ifndef _ASM_INAT_INAT_H > +#define _ASM_INAT_INAT_H [With reference to comment on patch 2/12...] Y

Re: [PATCH -tip -v12 02/11] x86: x86 instruction decoder build-time selftest

2009-07-16 Thread Sam Ravnborg
On Thu, Jul 16, 2009 at 11:57:06AM -0400, Masami Hiramatsu wrote: > Add a user-space selftest of x86 instruction decoder at kernel build time. > When CONFIG_X86_DECODER_SELFTEST=y, Kbuild builds a test harness of x86 > instruction decoder and performs it after building vmlinux. > The test compares

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

2009-07-16 Thread Greg KH
On Thu, Jul 16, 2009 at 05:12:55PM +0200, Hans J. Koch wrote: > On Thu, Jul 16, 2009 at 05:07:10PM +0300, Michael S. Tsirkin wrote: > > On Wed, Jul 15, 2009 at 03:08:29PM -0700, Greg KH wrote: > > > How about moving that documentation into a place that people will notice > > > it, like the rest of

Re: [PATCH -tip -v12 01/11] x86: instruction decoder API

2009-07-16 Thread H. Peter Anvin
Masami Hiramatsu wrote: These opcode maps do NOT include most of SSE and FP opcodes, because those opcodes are not used in the kernel. That is not true. -hpa -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More m

Re: [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Anthony Liguori
Gregory Haskins wrote: That said, I think the assumption that was made when I was using this was that a proper ref for the page was acquired by the gfn_to_page() and dropped by the caller. This was always used in the context of a hypercall/vmexit so presumably the gpa should be considered stable

[PATCH -tip -v12 03/11] kprobes: checks probe address is instruction boudary on x86

2009-07-16 Thread Masami Hiramatsu
Ensure safeness of inserting kprobes by checking whether the specified address is at the first byte of a instruction on x86. This is done by decoding probed function from its head to the probe point. Signed-off-by: Masami Hiramatsu Acked-by: Ananth N Mavinakayanahalli Cc: Jim Keniston Cc: Ingo

[PATCH -tip -v12 08/11] tracing: add kprobe-based event tracer

2009-07-16 Thread Masami Hiramatsu
Add kprobes-based event tracer on ftrace. This tracer is similar to the events tracer which is based on Tracepoint infrastructure. Instead of Tracepoint, this tracer is based on kprobes (kprobe and kretprobe). It probes anywhere where kprobes can probe(this means, all functions body except for __

[PATCH -tip -v12 02/11] x86: x86 instruction decoder build-time selftest

2009-07-16 Thread Masami Hiramatsu
Add a user-space selftest of x86 instruction decoder at kernel build time. When CONFIG_X86_DECODER_SELFTEST=y, Kbuild builds a test harness of x86 instruction decoder and performs it after building vmlinux. The test compares the results of objdump and x86 instruction decoder code and check there ar

[PATCH -tip -v12 11/11] tracing: Add kprobes event profiling interface

2009-07-16 Thread Masami Hiramatsu
Add profiling interaces for each kprobes event. Changes from v11: - Fix a typo and remove redundant check. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Christoph Hellwig Cc: Steven Rostedt Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Tom Zanussi Cc: Li Zefan --- Do

[PATCH -tip -v12 00/11] tracing: kprobe-based event tracer and x86 instruction decoder

2009-07-16 Thread Masami Hiramatsu
Hi, Here are the v12 patches. I updated it for the latest -tip and add fix some bugs. Here are the patches of kprobe-based event tracer for x86, version 12, which allows you to probe various kernel events through ftrace interface. The tracer supports per-probe filtering which allows you to set fi

[PATCH -tip -v12 10/11] tracing: Generate names for each kprobe event automatically

2009-07-16 Thread Masami Hiramatsu
Generate names for each kprobe event based on the probe point, and remove generic k*probe event types because there is no user of those types. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Christoph Hellwig Cc: Steven Rostedt Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: T

[PATCH -tip -v12 09/11] tracing: Kprobe-tracer supports more than 6 arguments

2009-07-16 Thread Masami Hiramatsu
Support up to 128 arguments for each kprobes event. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Christoph Hellwig Cc: Steven Rostedt Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: Tom Zanussi --- Documentation/trace/kprobetrace.txt |2 +- kernel/trace/trace_kprobe.

[PATCH -tip -v12 05/11] x86: add pt_regs register and stack access APIs

2009-07-16 Thread Masami Hiramatsu
Add following APIs for accessing registers and stack entries from pt_regs. These APIs are required by kprobes-based event tracer on ftrace. Some other debugging tools might be able to use it too. - regs_query_register_offset(const char *name) Query the offset of "name" register. - regs_query_r

[PATCH -tip -v12 01/11] x86: instruction decoder API

2009-07-16 Thread Masami Hiramatsu
Add x86 instruction decoder to arch-specific libraries. This decoder can decode x86 instructions used in kernel into prefix, opcode, modrm, sib, displacement and immediates. This can also show the length of instructions. This version introduces instruction attributes for decoding instructions. The

[PATCH -tip -v12 07/11] tracing: Introduce TRACE_FIELD_ZERO() macro

2009-07-16 Thread Masami Hiramatsu
Use TRACE_FIELD_ZERO(type, item) instead of TRACE_FIELD_ZERO_CHAR(item). This also includes a fix of TRACE_ZERO_CHAR() macro. Signed-off-by: Masami Hiramatsu Cc: Steven Rostedt Cc: Ingo Molnar Cc: Tom Zanussi Cc: Frederic Weisbecker --- kernel/trace/trace_event_types.h |4 ++-- kernel/t

[PATCH -tip -v12 06/11] tracing: ftrace dynamic ftrace_event_call support

2009-07-16 Thread Masami Hiramatsu
Add dynamic ftrace_event_call support to ftrace. Trace engines can adds new ftrace_event_call to ftrace on the fly. Each operator functions of the call takes a ftrace_event_call data structure as an argument, because these functions may be shared among several ftrace_event_calls. Changes from v11:

[PATCH -tip -v12 04/11] kprobes: cleanup fix_riprel() using insn decoder on x86

2009-07-16 Thread Masami Hiramatsu
Cleanup fix_riprel() in arch/x86/kernel/kprobes.c by using x86 instruction decoder. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Jim Keniston Cc: Ingo Molnar --- arch/x86/kernel/kprobes.c | 128 - 1 files changed, 23 insertio

Re: [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Gregory Haskins
Anthony Liguori wrote: > Gregory Haskins wrote: >> +/* >> + * >> + * XINTERFACE (External Interface) >> + * - >> + */ >> + >> +static struct kvm * >> +intf_to_kvm(struct kvm_xinterface *intf) >> +{ >> +return container_of(intf, struct kvm, xinterface); >> +} >> + >> +st

Re: [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Anthony Liguori
Gregory Haskins wrote: +/* + * + * XINTERFACE (External Interface) + * - + */ + +static struct kvm * +intf_to_kvm(struct kvm_xinterface *intf) +{ + return container_of(intf, struct kvm, xinterface); +} + +static unsigned long +xinterface_gpa_to_hva(struct kvm_xinter

Re: [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Gregory Haskins
Sam Ravnborg wrote: >> diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild >> index ad8ec35..9f50cc3 100644 >> --- a/arch/x86/Kbuild >> +++ b/arch/x86/Kbuild >> @@ -1,5 +1,7 @@ >> >> -obj-$(CONFIG_KVM) += kvm/ >> +ifdef CONFIG_KVM >> +obj-y += kvm/ >> +endif >> > > What was wrong with the old ver

Re: [KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Sam Ravnborg
> diff --git a/arch/x86/Kbuild b/arch/x86/Kbuild > index ad8ec35..9f50cc3 100644 > --- a/arch/x86/Kbuild > +++ b/arch/x86/Kbuild > @@ -1,5 +1,7 @@ > > -obj-$(CONFIG_KVM) += kvm/ > +ifdef CONFIG_KVM > +obj-y += kvm/ > +endif What was wrong with the old version? If this is because xinterface.o is

Re: Fix migration issue when the destination is loaded

2009-07-16 Thread Mark McLoughlin
On Thu, 2009-07-16 at 15:00 +0300, Dor Laor wrote: > On 07/16/2009 12:39 PM, Mark McLoughlin wrote: > > Hi Dor, > > > > On Wed, 2009-07-15 at 18:03 +0300, Dor Laor wrote: > >> If the migration socket is full, we get EAGAIN for the write. > >> The set_fd_handler2 defers the write for later on. The f

[KVM PATCH] KVM: introduce "xinterface" API for external interaction with guests

2009-07-16 Thread Gregory Haskins
What: xinterface is a mechanism that allows kernel modules external to the kvm.ko proper to interface with a running guest. It accomplishes this by creating an abstracted interface which does not expose any private details of the guest or its related KVM structures, and provides a mechanism to fin

[KVM PATCH] xinterface

2009-07-16 Thread Gregory Haskins
(Applies to kvm.git/master:84a3c081) For details, please read the patch header. Background: The original vbus code was tightly integrated with kvm.ko. Avi suggested that we abstract the interfaces such that it could live outside of kvm. Part of that discussion turned into what is now irqfd/ioev

[PATCH] kvm-390: fix wait_queue handling

2009-07-16 Thread Christian Bornträger
From: Christian Borntraeger 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_s390_handle_wait was broken by using different wait_queues for add_wait queue and remove_wait_queu

Re: [Qemu-devel] [PATCH] rev5: support colon in filenames

2009-07-16 Thread Gerd Hoffmann
On 07/16/09 16:10, Anthony Liguori wrote: Why "-drive.ID.NAME VALUE", "-net.ID.NAME VALUE" and so forth, i.e. one option per object with parameters? Assuming the ID name space is flat, a single option suffices. What about "-set ID.NAME=VALUE"? Looks attractive on the surface. Feels really diffi

Re: [Qemu-devel] [PATCH] rev5: support colon in filenames

2009-07-16 Thread Gerd Hoffmann
On 07/16/09 15:43, Markus Armbruster wrote: Why "-drive.ID.NAME VALUE", "-net.ID.NAME VALUE" and so forth, i.e. one option per object with parameters? Assuming the ID name space is flat, a single option suffices. What about "-set ID.NAME=VALUE"? Hmm, I think we will have multiple namespaces.

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

2009-07-16 Thread Hans J. Koch
On Thu, Jul 16, 2009 at 05:07:10PM +0300, Michael S. Tsirkin wrote: > On Wed, Jul 15, 2009 at 03:08:29PM -0700, Greg KH wrote: > > How about moving that documentation into a place that people will notice > > it, like the rest of the UIO documentation? > > Greg, > > would it make more sense to add

init scripts for KVM guests

2009-07-16 Thread Saman Behnam
Hi there, I've wrote a script for starting and stopping the KVM guest machines either by saving and restoring or by graceful shutdown and start. My question, is there an option within "libvirt" to make the KVM guest machines get saved when the KVM host shuts down? I had problems to gracefully shu

Re: [Qemu-devel] [PATCH] rev5: support colon in filenames

2009-07-16 Thread Anthony Liguori
Markus Armbruster wrote: Anthony Liguori writes: Blue Swirl wrote: Then how about something like: -drive name=hda,if=ide,cache=off,file_is_arg -filearg foo.img -drive name=vda,if=virtio,cache=writeback,file_comes_next -patharg foo.img -drive name=sdb,if=scsi,unit=1,fnarg -fnarg b

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

2009-07-16 Thread Michael S. Tsirkin
On Wed, Jul 15, 2009 at 03:08:29PM -0700, Greg KH wrote: > How about moving that documentation into a place that people will notice > it, like the rest of the UIO documentation? Greg, would it make more sense to add this to Documentation/DocBook/uio-howto.xml, or to create Documentation/uio_pci_g

[PATCH 06/11] Move irq routing to its own locking.

2009-07-16 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- include/linux/kvm_host.h |1 + virt/kvm/irq_comm.c |5 ++--- virt/kvm/kvm_main.c |1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index b53a5b8..8ca15a0 100644 --- a/incl

[PATCH 08/11] Move IO APIC to its own lock.

2009-07-16 Thread Gleb Natapov
Introduce new function kvm_notifier_set_irq() that should be used to change irq line level from irq notifiers. When irq notifier change irq line level it calls into irq chip code recursively. The function avoids taking a lock recursively. Signed-off-by: Gleb Natapov --- arch/ia64/kvm/kvm-ia64.c

[PATCH 10/11] Change irq routing table to use gsi indexed array.

2009-07-16 Thread Gleb Natapov
Use gsi indexed array instead of scanning all entries on each interrupt injection. Also maintain back mapping from irqchip/pin to gsi to speedup interrupt acknowledgment notifications. Signed-off-by: Gleb Natapov --- include/linux/kvm_host.h | 11 +++- virt/kvm/irq_comm.c | 57 +

[PATCH 05/11] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock

2009-07-16 Thread Gleb Natapov
It is already protected by kvm->lock on device assignment path. Just take the same lock in the PIT code. Signed-off-by: Gleb Natapov --- arch/x86/kvm/i8254.c |2 ++ virt/kvm/irq_comm.c |8 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/i8254.c b/arc

[PATCH 11/11] Introduce MSI message sending interface that bypass IRQ routing.

2009-07-16 Thread Gleb Natapov
Sending of MSI using IRQ routing is an artificial concept and potentially big number of MSIs (2048 per device) make it also inefficient. This patch adds an interface to inject MSI messages from userspace to lapic logic directly. The patch also reduces the maximum number of IRQ routing entries to 12

[PATCH 09/11] Drop kvm->irq_lock lock.

2009-07-16 Thread Gleb Natapov
The only thing it protects now is interrupt injection into lapic and this can work lockless. Even now with kvm->irq_lock in place access to lapic is not entirely serialized since vcpu access doesn't take kvm->irq_lock. Signed-off-by: Gleb Natapov --- arch/ia64/kvm/kvm-ia64.c |2 -- arch/x86/

[PATCH 07/11] Move irq notifiers lists to its own locking.

2009-07-16 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- include/linux/kvm_host.h |1 + virt/kvm/irq_comm.c | 16 virt/kvm/kvm_main.c |1 + 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 8ca15a0..4eb5c85 10064

[PATCH 00/11] [RFC] make interrupt injection lockless (almost)

2009-07-16 Thread Gleb Natapov
Yeah I decided to change the name of the series. Since fine grained locking is not the main objective of the series. kvm->irq_lock protects too much stuff, but still fail to protect everything it was design to protect (see ack notifiers call in pic). I want to make IRQ injection fast path as lockl

[PATCH 01/11] Move irq routing data structure to rcu locking

2009-07-16 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- include/linux/kvm_host.h |2 +- virt/kvm/irq_comm.c | 55 +- virt/kvm/kvm_main.c |1 - 3 files changed, 26 insertions(+), 32 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_hos

[PATCH 02/11] Unregister ack notifier callback on PIT freeing.

2009-07-16 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- arch/x86/kvm/i8254.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index 137e548..472653c 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c @@ -672,6 +672,8 @@ void kvm_free_pit(str

[PATCH 04/11] Convert irq notifiers lists to RCU locking.

2009-07-16 Thread Gleb Natapov
Use RCU locking for mask/ack notifiers lists. Signed-off-by: Gleb Natapov --- virt/kvm/irq_comm.c | 20 +++- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index cce32de..6c57e46 100644 --- a/virt/kvm/irq_comm.c +++ b/v

[PATCH 03/11] Move irq ack notifier list to arch independent code.

2009-07-16 Thread Gleb Natapov
Mask irq notifier list is already there. Signed-off-by: Gleb Natapov --- arch/ia64/include/asm/kvm_host.h |1 - arch/x86/include/asm/kvm_host.h |1 - include/linux/kvm_host.h |1 + virt/kvm/irq_comm.c |4 ++-- virt/kvm/kvm_main.c |1 + 5 fil

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

2009-07-16 Thread Michael S. Tsirkin
On Thu, Jul 16, 2009 at 09:33:05PM +0800, Sheng Yang wrote: > On Thursday 16 July 2009 20:31:01 Michael S. Tsirkin wrote: > > On Wed, Jul 15, 2009 at 03:08:29PM -0700, Greg KH wrote: > > > On Wed, Jul 15, 2009 at 11:13:40PM +0300, Michael S. Tsirkin wrote: > > > > This adds a generic uio driver tha

Re: [Qemu-devel] [PATCH] rev5: support colon in filenames

2009-07-16 Thread Markus Armbruster
Anthony Liguori writes: > Blue Swirl wrote: >> Then how about something like: >> -drive name=hda,if=ide,cache=off,file_is_arg -filearg foo.img >> -drive name=vda,if=virtio,cache=writeback,file_comes_next -patharg foo.img >> -drive name=sdb,if=scsi,unit=1,fnarg -fnarg boo.img >> > > The ex

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

2009-07-16 Thread Sheng Yang
On Thursday 16 July 2009 20:31:01 Michael S. Tsirkin wrote: > On Wed, Jul 15, 2009 at 03:08:29PM -0700, Greg KH 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 virtualizati

Re: Qemu 0.10.50 CAN NOT get ip from dhcp server

2009-07-16 Thread Amit Shah
On (Thu) Jul 16 2009 [20:52:36], John Wong wrote: >> >> Any messages in the host kernel's logs? Also can you try running a >> 32-bit VM and report what /proc/cpuinfo shows? I'm assuming you're >> running on a 64 bit host. Can you confirm that? >> > Yes, i installed Debian/32-bit VM, below is "cat /

Re: Qemu 0.10.50 CAN NOT get ip from dhcp server

2009-07-16 Thread John Wong
Amit Shah 提到: On (Thu) Jul 16 2009 [19:44:42], John Wong wrote: Amit Shah 提到: On (Wed) Jul 15 2009 [16:54:15], John Wong wrote: Yes, kvm-88 fixed this problem. I also notice another problem, when i use kvm-88(qemu-system-x86_64 with kvm-kmod-2.6.30.1-rc2.tar.gz) installing

Re: [PATCH] Specify the system UUID for VM

2009-07-16 Thread Michael Goldish
I'd do this a little differently, because of the constraints imposed by the different purposes of VM.create() and VM.make_qemu_command(). - "Yolkfull Chow" wrote: > Signed-off-by: Yolkfull Chow > --- > client/tests/kvm/kvm_vm.py | 11 +++ > 1 files changed, 11 insertions(+), 0 d

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

2009-07-16 Thread Michael S. Tsirkin
On Wed, Jul 15, 2009 at 03:08:29PM -0700, Greg KH 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 OS access

Re: slow guest performance with build load, looking for ideas

2009-07-16 Thread Jes Sorensen
On 07/12/2009 10:38 AM, Avi Kivity wrote: On 07/09/2009 09:01 PM, Erik Jacobson wrote: Test runs after make clean... time (make -j12&& make -j12 modules) real 10m25.585s user 26m36.450s sys 8m14.776s 2nd trial (make clean followed by the same test again. real 9m21.626s user 26m42.144s sys 8m14

Re: Qemu 0.10.50 CAN NOT get ip from dhcp server

2009-07-16 Thread Amit Shah
On (Thu) Jul 16 2009 [19:44:42], John Wong wrote: > Amit Shah 提到: >> On (Wed) Jul 15 2009 [16:54:15], John Wong wrote: >> >>> Yes, kvm-88 fixed this problem. >>> >>> I also notice another problem, when i use kvm-88(qemu-system-x86_64 >>> with kvm-kmod-2.6.30.1-rc2.tar.gz) installing 64bit OS (

Re: Fix migration issue when the destination is loaded

2009-07-16 Thread Dor Laor
On 07/16/2009 12:39 PM, Mark McLoughlin wrote: Hi Dor, On Wed, 2009-07-15 at 18:03 +0300, Dor Laor wrote: If the migration socket is full, we get EAGAIN for the write. The set_fd_handler2 defers the write for later on. The function tries to wake up the iothread by qemu_kvm_notify_work. Since th

[PATCH] Specify the system UUID for VM

2009-07-16 Thread Yolkfull Chow
Signed-off-by: Yolkfull Chow --- client/tests/kvm/kvm_vm.py | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 503f636..5f81965 100644 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py

Re: [PATCH] Specify the system UUID for VM

2009-07-16 Thread Yolkfull Chow
On Thu, Jul 16, 2009 at 06:26:46PM +0800, Yolkfull Chow wrote: > > Signed-off-by: Yolkfull Chow > --- > client/tests/kvm/kvm_vm.py | 11 +++ > 1 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py > index 503f636..89

Re: Qemu 0.10.50 CAN NOT get ip from dhcp server

2009-07-16 Thread John Wong
Amit Shah 提到: On (Wed) Jul 15 2009 [16:54:15], John Wong wrote: Yes, kvm-88 fixed this problem. I also notice another problem, when i use kvm-88(qemu-system-x86_64 with kvm-kmod-2.6.30.1-rc2.tar.gz) installing 64bit OS (window7 & debian & netbsd), the install CD show the error message, s

Re: Qemu 0.10.50 CAN NOT get ip from dhcp server

2009-07-16 Thread Amit Shah
On (Wed) Jul 15 2009 [16:54:15], John Wong wrote: > Yes, kvm-88 fixed this problem. > > I also notice another problem, when i use kvm-88(qemu-system-x86_64 with > kvm-kmod-2.6.30.1-rc2.tar.gz) installing 64bit OS (window7 & debian & > netbsd), > the install CD show the error message, say this s

Re: [Qemu-devel] [PATCH] rev5: support colon in filenames

2009-07-16 Thread Amit Shah
On (Wed) Jul 15 2009 [10:40:37], Anthony Liguori wrote: > Blue Swirl wrote: >> Then how about something like: >> -drive name=hda,if=ide,cache=off,file_is_arg -filearg foo.img >> -drive name=vda,if=virtio,cache=writeback,file_comes_next -patharg foo.img >> -drive name=sdb,if=scsi,unit=1,fnarg -

[PATCH] Specify the system UUID for VM

2009-07-16 Thread Yolkfull Chow
Signed-off-by: Yolkfull Chow --- client/tests/kvm/kvm_vm.py | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index 503f636..895049e 100644 --- a/client/tests/kvm/kvm_vm.py +++ b/client/tests/kvm/kvm_vm.py

Re: Fix migration issue when the destination is loaded

2009-07-16 Thread Mark McLoughlin
Hi Dor, On Wed, 2009-07-15 at 18:03 +0300, Dor Laor wrote: > If the migration socket is full, we get EAGAIN for the write. > The set_fd_handler2 defers the write for later on. The function > tries to wake up the iothread by qemu_kvm_notify_work. > Since this happens in a loop, multiple times, the

failure to build kvm release against 2.6.30

2009-07-16 Thread Or Gerlitz
With kvm-88, a configure line such as (see output below) # ./configure --prefix=/path/to/intall/dir --target-list=x86_64-softmmu --kerneldir=/lib/modules/2.6.30/build yields the below build failure of the kvm kernel sources (I think that in earlier version there was a configure directive to disa

  1   2   >