Re: KVM-88 fails to build with esd or pulseaudio

2009-07-14 Thread Frederic Bezies
On 13/07/2009 11:18, Avi Kivity wrote: On 07/13/2009 10:47 AM, Pelle van der Heide wrote: Hi, When running '$ ./configure --audio-drv-list=oss,alsa,sdl,esd,pa&& make -j2' the build fails, with both esdaudio.o and paaudio.o complaining about undefined references to audio_pt_* functions. The comp

Re: KVM-88 fails to build with esd or pulseaudio

2009-07-14 Thread Daniel Gollub
On Tuesday 14 July 2009 10:31:25 am Frederic Bezies wrote: [...] > Same problem for me, under archlinux 64 bits. Try this patch/commit: commit c6a5a71a3a1886afad5eeb214eb6e8785f4e0319 Author: Anthony Liguori Date: Wed Jul 1 10:07:16 2009 -0500 Fix build for ESD audio Signed-off-b

Re: KVM-88 fails to build with esd or pulseaudio

2009-07-14 Thread Frederic Bezies
On 14/07/2009 11:46, Daniel Gollub wrote: On Tuesday 14 July 2009 10:31:25 am Frederic Bezies wrote: [...] Same problem for me, under archlinux 64 bits. Try this patch/commit: commit c6a5a71a3a1886afad5eeb214eb6e8785f4e0319 Author: Anthony Liguori Date: Wed Jul 1 10:07:16 2009 -0500 F

Kernel oops for virtio_blk: [] __bounce_end_io_read+0x88/0xf8

2009-07-14 Thread SAL
Hello, one of my server has multiple oopses for virtio_blk devices. Is this a bug of virtio_blk driver, or something else? Can it be fixed? These virtual machines hangs aprox. once per day, mostly at midnight. Here is one oops: BUG: unable to handle kernel paging request at fff82000 IP: [] _

Re: [PATCH 4/4] Convert irq notifiers lists to RCU locking.

2009-07-14 Thread Paul E. McKenney
On Tue, Jul 14, 2009 at 08:46:12AM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 12:31:39PM -0700, Paul E. McKenney wrote: > > On Mon, Jul 13, 2009 at 04:40:59PM +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 13, 2009 at 04:32:34PM +0300, Gleb Natapov wrote: > > > > Yeah I understand tha

Re: [PATCH 4/4] Convert irq notifiers lists to RCU locking.

2009-07-14 Thread Gleb Natapov
On Tue, Jul 14, 2009 at 05:03:09AM -0700, Paul E. McKenney wrote: > On Tue, Jul 14, 2009 at 08:46:12AM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 12:31:39PM -0700, Paul E. McKenney wrote: > > > On Mon, Jul 13, 2009 at 04:40:59PM +0300, Michael S. Tsirkin wrote: > > > > On Mon, Jul 13, 2

Problem compiling kvm-88

2009-07-14 Thread Jorge Lucángeli Obes
Hi folks, I'm getting the following error when compiling kvm-88 against a custom 2.6.31-rc2 kernel on Xubuntu 9.04 64 bits. I've tried enabling and disabling tracing in the kernel configuration to no avail. kvm-88 compiles well on an older 2.6.29.1 (also custom) kernel, and kvm-87 also does _not_

Re: Kernel oops for virtio_blk: [] __bounce_end_io_read+0x88/0xf8

2009-07-14 Thread Christoph Hellwig
On Tue, Jul 14, 2009 at 01:02:54PM +0200, J??n ONDREJ (SAL) wrote: > Hello, > > one of my server has multiple oopses for virtio_blk devices. Is this a bug > of virtio_blk driver, or something else? Can it be fixed? > These virtual machines hangs aprox. once per day, mostly at midnight. > > He

Re: [PATCH 1/2] KVM test: Do a better job at handling kvm module failures

2009-07-14 Thread Lucas Meneghel Rodrigues
On Mon, 2009-07-13 at 16:26 -0300, Lucas Meneghel Rodrigues wrote: > Developers might want to use the KVM test to verify changes > only on their own local qemu source directory and will use the > 'localsrc' install mode on the KVM test control file, and > provide 'load_modules': 'no' option on the

Re: [PATCH 2/2] KVM test: Make better documentation of the KVM install test params

2009-07-14 Thread Lucas Meneghel Rodrigues
On Mon, 2009-07-13 at 16:26 -0300, Lucas Meneghel Rodrigues wrote: > In order to improve understanding of the KVM test control, made > comments on the kvm_install params dictionary, with all modes > supported and examples of usage. Also, commented out parameters > that are not going to be used by t

Re: [Autotest] [AUTOTEST] [PATCH 5/5] view ltp_results.html under kvm guests' results.html

2009-07-14 Thread Lucas Meneghel Rodrigues
On Mon, Jul 13, 2009 at 3:10 AM, sudhir kumar wrote: > This patch creates a link to the results html file generated by the test > under autotest. This is specific to the kvm part only. The assumption made is > that the file name is _results.html and it is located under > /results/ directory. This h

[PATCH 0/10] [RFC] more fine grained locking for IRQ injection

2009-07-14 Thread Gleb Natapov
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 logic use more fine grained locking. This patch series split kvm->irq_lock mutex to smaller spinlocks each one protects only one thing.

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

2009-07-14 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 03/10] Move irq ack notifier list to arch independent code.

2009-07-14 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

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

2009-07-14 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 02/10] Unregister ack notifier callback on PIT freeing.

2009-07-14 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 07/10] Move irq notifiers lists to its own locking.

2009-07-14 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 08/10] Move IO APIC to its own lock.

2009-07-14 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- arch/ia64/kvm/kvm-ia64.c | 27 ++-- arch/x86/kvm/lapic.c |5 +--- arch/x86/kvm/x86.c | 30 ++- virt/kvm/ioapic.c| 50 - virt/kvm/ioapic.h|

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

2009-07-14 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 | 62 ++

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

2009-07-14 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 09/10] Drop kvm->irq_lock lock.

2009-07-14 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 05/10] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock

2009-07-14 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

Re: [Autotest] [autotest] [PATCH 6/6] add-disktest-stress-ebizzy-entry-in-kvm-sample-config

2009-07-14 Thread Lucas Meneghel Rodrigues
On Wed, Jul 8, 2009 at 5:36 AM, sudhir kumar wrote: > This patch adds the test entries in the sample config file for kvm > test execution. Looks good. Applied. > Signed-off-by: Sudhir Kumar > > Index: autotest/client/tests/kvm/kvm_tests.cfg.sample > ==

[PATCH v3 2/8] Do not compile qemu-kvm.c and qemu-kvm-x86.c

2009-07-14 Thread Glauber Costa
Instead, include them from upstream files Signed-off-by: Glauber Costa --- Makefile.target |5 ++--- kvm-all.c |2 ++ target-i386/kvm.c |2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile.target b/Makefile.target index e0edd27..df1f32b 100644 ---

[PATCH v3 3/8] replace malloc with qemu_malloc

2009-07-14 Thread Glauber Costa
This patch replaces both malloc and malloc+memset sequences with qemu_malloc and qemu_mallocz. Target is upstream integration Signed-off-by: Glauber Costa --- qemu-kvm-x86.c | 31 --- qemu-kvm.c | 26 +- 2 files changed, 13 insertions(+

[PATCH v3 1/8] replace USE_KVM with CONFIG_KVM

2009-07-14 Thread Glauber Costa
Make things less confuse, and we have KVM_UPSTREAM to differentiate between the two versions anyway. kvm-all.c and kvm.c gets compiled now, but protected with KVM_UPSTREAM too, so no function in there gets visible in the final binary Signed-off-by: Glauber Costa --- Makefile.target | 20

[PATCH v3 0/8] Move closer to upstream

2009-07-14 Thread Glauber Costa
Same thing that was already sent, but rebased for today's tree. Avi suggested me to just keep the include for libkvm-all.h and he would fold it manually. Note that I'm _not_ doing this here, because marcelo, who is less bright than avi, seem to prefer me to do this way. If applied on top of today

[PATCH v3 6/8] provide env->kvm_fd

2009-07-14 Thread Glauber Costa
qemu upstream puts kvm information on env. Do that too, since it will allow us to use CPUState in cpu-specific functions, instead of kvm-specific types. Signed-off-by: Glauber Costa --- qemu-kvm.c |9 +++-- qemu-kvm.h |2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --gi

[PATCH v3 5/8] duplicate KVMState

2009-07-14 Thread Glauber Costa
In this patch, we duplicate most of KVMState in our files. This should be removed later, when they are 100 % equal. Meanwhile, we fold our kvm_context_t structure inside it. To make transition smooth, we still keep a global variable kvm_context pointing to its position inside the global KVMState.

[PATCH v3 7/8] use kvm_upstream sw_breakpoints structure

2009-07-14 Thread Glauber Costa
Signed-off-by: Glauber Costa --- qemu-kvm-x86.c |4 ++-- qemu-kvm.c | 27 ++- qemu-kvm.h |9 ++--- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index b531ca4..3bbb9d2 100644 --- a/qemu-kvm-x86.c +++

[PATCH v3 8/8] reuse upstream breakpoint code

2009-07-14 Thread Glauber Costa
Drop KVM_UPSTREAM around functions we intend to reuse. This allow us to share code in kvm-all.c, that is equal in qemu-kvm.c Signed-off-by: Glauber Costa CC: Jan Kiszka --- kvm-all.c |5 ++- kvm.h |1 + qemu-kvm.c | 140 +---

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

2009-07-14 Thread Chris Wright
* Michael S. Tsirkin (m...@redhat.com) wrote: > - remove irqcontrol: user can enable interrupts by > writing command register directly Sorry if I gave you the impression that removing was needed. I actually think the irqcontrol was useful since it's atomic. > + gdev->info.name = "uio_pci_ge

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

2009-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2009 at 11:03:38AM -0700, Chris Wright wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > - remove irqcontrol: user can enable interrupts by > > writing command register directly > > Sorry if I gave you the impression that removing was needed. > I actually think the irqco

Re: [PATCH v3 8/8] reuse upstream breakpoint code

2009-07-14 Thread Jan Kiszka
Glauber Costa wrote: > Drop KVM_UPSTREAM around functions we intend to reuse. > This allow us to share code in kvm-all.c, that is equal in qemu-kvm.c > > Signed-off-by: Glauber Costa > CC: Jan Kiszka Looks good (and demonstrates nicely how we can merge things in the ideal case). Jan signatu

Re: [PATCH v3 8/8] reuse upstream breakpoint code

2009-07-14 Thread Glauber Costa
On Tue, Jul 14, 2009 at 10:45:22PM +0200, Jan Kiszka wrote: > Glauber Costa wrote: > > Drop KVM_UPSTREAM around functions we intend to reuse. > > This allow us to share code in kvm-all.c, that is equal in qemu-kvm.c > > > > Signed-off-by: Glauber Costa > > CC: Jan Kiszka > > Looks good (and dem

Re: [PATCH v3 8/8] reuse upstream breakpoint code

2009-07-14 Thread Marcelo Tosatti
On Tue, Jul 14, 2009 at 06:01:48PM -0300, Glauber Costa wrote: > On Tue, Jul 14, 2009 at 10:45:22PM +0200, Jan Kiszka wrote: > > Glauber Costa wrote: > > > Drop KVM_UPSTREAM around functions we intend to reuse. > > > This allow us to share code in kvm-all.c, that is equal in qemu-kvm.c > > > > > >

[PATCH] Support shared memory device PCI device

2009-07-14 Thread Cam Macdonell
This patch is an updated version of a previous one (http://patchwork.kernel.org/patch/22363/) that supports adding a shared memory PCI device. To be clear, there is no new functionality in this patch, just a fix for changes to the master branch. The device's memory is mappable into user-level

Re: [PATCH] qemu-kvm: x86: fix memleak if ioctl fails

2009-07-14 Thread Marcelo Tosatti
On Mon, Jul 13, 2009 at 02:18:50PM +0530, Amit Shah wrote: > Fix a memleak when the KVM_SET_CPUID2 ioctl fails. Free the > memory that we allocate to store cpuids. > > Reported-by: Mark McLoughlin > Signed-off-by: Amit Shah > --- > qemu-kvm-x86.c |2 +- > 1 files changed, 1 insertions(+), 1

Re: [PATCH v3 0/8] Move closer to upstream

2009-07-14 Thread Marcelo Tosatti
On Tue, Jul 14, 2009 at 11:35:10AM -0400, Glauber Costa wrote: > Same thing that was already sent, but rebased for today's tree. > Avi suggested me to just keep the include for libkvm-all.h and he > would fold it manually. > > Note that I'm _not_ doing this here, because marcelo, who is less > bri

Re: [PATCH] silence kernel messages that can be triggered by a guest

2009-07-14 Thread Marcelo Tosatti
On Wed, Jul 08, 2009 at 11:26:54AM +0300, Gleb Natapov wrote: > Some Linux versions (f8) try to read EOI register that is write only. > > Signed-off-by: Gleb Natapov > diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c > index ccafe0d..6b5dad4 100644 > --- a/arch/x86/kvm/lapic.c > +++ b/arc

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

2009-07-14 Thread Chris Wright
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Tue, Jul 14, 2009 at 11:03:38AM -0700, Chris Wright wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > - remove irqcontrol: user can enable interrupts by > > > writing command register directly > > > > Sorry if I gave you the impress

Re: [Autotest] [PATCH] Add a subtest pci_hotplug in kvm test

2009-07-14 Thread Yolkfull Chow
On 07/08/2009 09:51 AM, Lucas Meneghel Rodrigues wrote: I've spent some time doing a second review and test of the code. During my tests: * I found some problems with PCI hotplug itself and would like help to figure out why things are not working as expected. * Made suggestions regarding the

[PATCH] Add a kvm subtest -- pci_hotplug, which supports both Windows OS and Linux OS.

2009-07-14 Thread Yolkfull Chow
This is a subtest in kvm. It will verify newly added pci block device now. For Windows support,it needs to use_telnet since 'wmic' which is used to check disk info could only be executed in telnet session not ssh. Just ran it on guest Fedora-11.32 and Windows2008.32, both passed: # ./scan_resul

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

2009-07-14 Thread Michael S. Tsirkin
On Tue, Jul 14, 2009 at 04:25:07PM -0700, Chris Wright wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Tue, Jul 14, 2009 at 11:03:38AM -0700, Chris Wright wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > - remove irqcontrol: user can enable interrupts by > > > > wr