Re: [PATCH] always report x2apic as supported feature

2009-07-16 Thread Gleb Natapov
On Thu, Jul 16, 2009 at 09:46:21AM +0800, Sheng Yang wrote: On Thursday 16 July 2009 07:01:30 Marcelo Tosatti wrote: On Sun, Jul 12, 2009 at 04:10:55PM +0300, Gleb Natapov wrote: We emulate x2apic in software, so host support is not required. Signed-off-by: Gleb Natapov g...@redhat.com

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

2009-07-16 Thread Gleb Natapov
On Wed, Jul 15, 2009 at 06:42:05PM -0300, Marcelo Tosatti wrote: On Wed, Jul 15, 2009 at 11:52:24PM +0300, Gleb Natapov wrote: On Wed, Jul 15, 2009 at 03:18:00PM -0300, Marcelo Tosatti wrote: On Tue, Jul 14, 2009 at 05:30:45PM +0300, Gleb Natapov wrote: Use gsi indexed array instead of

Re: [PATCH] always report x2apic as supported feature

2009-07-16 Thread Sheng Yang
On Thursday 16 July 2009 14:00:15 Gleb Natapov wrote: On Thu, Jul 16, 2009 at 09:46:21AM +0800, Sheng Yang wrote: On Thursday 16 July 2009 07:01:30 Marcelo Tosatti wrote: On Sun, Jul 12, 2009 at 04:10:55PM +0300, Gleb Natapov wrote: We emulate x2apic in software, so host support is not

Re: [PATCH] always report x2apic as supported feature

2009-07-16 Thread Gleb Natapov
On Thu, Jul 16, 2009 at 02:09:09PM +0800, Sheng Yang wrote: On Thursday 16 July 2009 14:00:15 Gleb Natapov wrote: On Thu, Jul 16, 2009 at 09:46:21AM +0800, Sheng Yang wrote: On Thursday 16 July 2009 07:01:30 Marcelo Tosatti wrote: On Sun, Jul 12, 2009 at 04:10:55PM +0300, Gleb Natapov

Re: guest gettimeofday behavior

2009-07-16 Thread Eran Rom
Eran Rom eranr at il.ibm.com writes: When Host and Guest ran 2.6.27 with kvm-87 (both qemu-kvm and kvm-kmod), the problem persisted. Thus, I am looking for a kernel fix that is not part of KVM, any lead? Am confined to use 2.6.27 Marcelo Tosatti mtosa...@redhat.com wrote on 16/07/2009

Re: KVM crashes when using certain USB device

2009-07-16 Thread Jim Paris
Hi G, I've continued my attempts to get the HASP dongle working, but with no success: ... Good idea. The results from three test runs after that change are in the attached files. The third was done while also dumping the USB bus, and the output from that dump is also attached. The gdb

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

2009-07-16 Thread Jan Kiszka
Anthony Liguori wrote: Jan Kiszka wrote: We would still have to deal with the fact that so far '\' had no special meaning on Windows - except that is was the well-known path separator. So redefining its meaning would break a bit... That's the problem. You will break existing Windows

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

2009-07-16 Thread Jan Kiszka
Anthony Liguori wrote: Jamie Lokier wrote: So instead of consistency, you like the idea of using different quoting rules for the monitor than for command line arguments? Your proposal breaks Windows in a catastrophic way. It's almost certain that all existing front-ends/scripts will

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

2009-07-16 Thread Ram Pai
On Wed, 2009-07-15 at 18:04 +0300, Blue Swirl wrote: On 7/15/09, Ram Pai linux...@us.ibm.com wrote: Problem: It is impossible to feed filenames with the character colon because qemu interprets such names as a protocol. For example filename scsi:0, is interpreted as a protocol by name

Re: qcow2 relative paths

2009-07-16 Thread Kevin Wolf
Ram Pai schrieb: On Wed, 2009-07-15 at 22:04 +0100, Jamie Lokier wrote: What an unhelpful error message... There isn't even a way to find out the backing file path which the tool is looking for. Ok. i have introduced a message towards the effect, in the next revision of the patch. Hope

[PATCH] rev6: support colon in filenames

2009-07-16 Thread Ram Pai
Problem: It is impossible to feed filenames with the character colon because qemu interprets such names as a protocol. For example filename scsi:0, is interpreted as a protocol by name scsi. This patch allows user to espace colon characters. For example the above filename can now be expressed

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

2009-07-16 Thread Kevin Wolf
Ram Pai schrieb: On Wed, 2009-07-15 at 18:04 +0300, Blue Swirl wrote: On 7/15/09, Ram Pai linux...@us.ibm.com wrote: Problem: It is impossible to feed filenames with the character colon because qemu interprets such names as a protocol. For example filename scsi:0, is interpreted as a

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

2009-07-16 Thread Gleb Natapov
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-kvm, KVM_IRQCHIP_IOAPIC, i); +

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

2009-07-16 Thread Kevin Wolf
Jamie Lokier schrieb: Kevin Wolf wrote: Can we at least allow \, instead of ,, in parameter parsing, so that the backslash has the practical benefit of being a single universal escape character? Is there a good reason why we cannot simply use \char to escape _any_ character, in every

Re: [Autotest] [PATCH] Assign an UUID for each VM in kvm command line

2009-07-16 Thread Michael Goldish
- sudhir kumar smalik...@gmail.com wrote: On Thu, Jul 16, 2009 at 8:12 AM, Yolkfull Chowyz...@redhat.com wrote: On 07/15/2009 09:36 PM, Dor Laor wrote: On 07/15/2009 12:12 PM, Yolkfull Chow wrote: Would submit this patch which is from our internal kvm-autotest patches submitted by

Re: [Autotest] [RFC] KVM-Autotest: remote shell utility for Windows guests

2009-07-16 Thread Michael Goldish
- sudhir kumar smalik...@gmail.com wrote: Thats great Michael !! On Wed, Jul 15, 2009 at 8:56 PM, Michael Goldishmgold...@redhat.com wrote: - Lucas Meneghel Rodrigues l...@redhat.com wrote: On Wed, Jul 8, 2009 at 4:46 AM, Michael Goldishmgold...@redhat.com wrote: I'm

Re: [PATCH] Fix non-KVM build

2009-07-16 Thread Jan Kiszka
Michael S. Tsirkin wrote: On Wed, Jun 24, 2009 at 01:13:46PM -0500, Anthony Liguori wrote: This introduces some #ifdefs in pcspk to fix the build when KVM isn't enabled. Signed-off-by: Anthony Liguori aligu...@us.ibm.com --- hw/pcspk.c | 15 +-- 1 files changed, 9

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

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

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 -fnarg

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 system

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,

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 yz...@redhat.com --- 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

[PATCH] Specify the system UUID for VM

2009-07-16 Thread Yolkfull Chow
Signed-off-by: Yolkfull Chow yz...@redhat.com --- 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 +++

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

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 (window7

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

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 to the

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 yz...@redhat.com wrote: Signed-off-by: Yolkfull Chow yz...@redhat.com --- client/tests/kvm/kvm_vm.py | 11 +++ 1 files

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)

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: [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 virtualization where

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

2009-07-16 Thread Markus Armbruster
Anthony Liguori aligu...@us.ibm.com 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

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 that can

[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 g...@redhat.com --- 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

[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 g...@redhat.com --- 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 ---

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

2009-07-16 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- 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

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

2009-07-16 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- 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

[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

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

2009-07-16 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- 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

[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 g...@redhat.com --- arch/ia64/kvm/kvm-ia64.c |2

[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

[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 g...@redhat.com --- arch/x86/kvm/i8254.c |2 ++ virt/kvm/irq_comm.c |8 2 files changed, 6 insertions(+), 4 deletions(-) diff --git

[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 g...@redhat.com --- include/linux/kvm_host.h | 11 +++- virt/kvm/irq_comm.c

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

2009-07-16 Thread Gleb Natapov
Signed-off-by: Gleb Natapov g...@redhat.com --- 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

[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 g...@redhat.com ---

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

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

2009-07-16 Thread Anthony Liguori
Markus Armbruster wrote: Anthony Liguori aligu...@us.ibm.com 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

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

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 this to

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. At

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 difficult

[PATCH] kvm-390: fix wait_queue handling

2009-07-16 Thread Christian Bornträger
From: Christian Borntraeger borntrae...@de.ibm.com There are two waitqueues in kvm for wait handling: vcpu-wq for virt/kvm/kvm_main.c and vpcu-arch.local_int.wq for the s390 specific wait code. the wait handling in kvm_s390_handle_wait was broken by using different wait_queues for add_wait queue

[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

[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

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 function

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 version? If this is

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

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); +} + +static unsigned long

[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 mhira...@redhat.com Cc: Ananth N Mavinakayanahalli ana...@in.ibm.com Cc: Jim Keniston jkeni...@us.ibm.com Cc: Ingo Molnar mi...@elte.hu --- arch/x86/kernel/kprobes.c | 128

[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

[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 mhira...@redhat.com Cc: Steven Rostedt rost...@goodmis.org Cc: Ingo Molnar mi...@elte.hu Cc: Tom Zanussi tzanu...@gmail.com Cc: Frederic

[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. -

[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 mhira...@redhat.com Cc: Ananth N Mavinakayanahalli ana...@in.ibm.com Cc: Christoph Hellwig h...@infradead.org Cc: Steven Rostedt rost...@goodmis.org Cc: Ingo Molnar mi...@elte.hu Cc: Frederic Weisbecker

[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 mhira...@redhat.com Cc: Ananth N Mavinakayanahalli ana...@in.ibm.com Cc: Christoph Hellwig h...@infradead.org Cc: Steven

[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

[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 mhira...@redhat.com Cc: Ananth N Mavinakayanahalli ana...@in.ibm.com Cc: Christoph Hellwig h...@infradead.org Cc: Steven Rostedt rost...@goodmis.org Cc:

[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

[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 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 mhira...@redhat.com Acked-by: Ananth N Mavinakayanahalli

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

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

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 the UIO

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 the

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...] You

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 kernel. I've

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

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 into a

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 to comment on

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 vmlinux.

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 Yangsh...@linux.intel.com 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 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

[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

[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

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-kvm,

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-0xfffbcfff

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: [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

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 would not

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 is to

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 -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 on the

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 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 mirrors

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 specifically, it can

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 allyesconfig

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 @@ +#ifndef

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

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 - you broke an

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 @@ -0,0 +1,125 @@

  1   2   >