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

2009-07-13 Thread Gleb Natapov
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 that other RCU read section may introduce delays too. > > > The question

RE: PCI device passthrough for FreeDOS guests

2009-07-13 Thread Han, Weidong
Carl-Daniel Hailfinger wrote: > Hi, > > I want to trace the PCI device accesses (config space, I/O ports, > memory BARs) of a DOS application (EEPROM flasher) and it seems KVM > can help with this. > The current plan is to install KVM, use FreeDOS as a guest, activate > passthrough for the PCI dev

Re: kvm-87: qemu-img creates raw file with wrong size

2009-07-13 Thread Lynn Kerby
On Jul 13, 2009, at 2:48 PM, Randall Smith wrote: On Mon, Jul 13, 2009 at 3:40 PM, Anthony Liguori wrote: Randy Smith wrote: Greetings, Running `qemu-img create -f raw file.raw 1000` creates a 512 byte file rather than the 1000K file the docs imply. From the help message: " 'size' is t

Re: kvm-87: qemu-img creates raw file with wrong size

2009-07-13 Thread Randall Smith
On Mon, Jul 13, 2009 at 3:40 PM, Anthony Liguori wrote: > Randy Smith wrote: >> >> Greetings, >> >> Running `qemu-img create -f raw file.raw 1000` creates a 512 byte file >> rather than the 1000K file the docs imply. >> >> From the help message: >> " >> 'size' is the disk image size in kilobytes. O

Re: kvm-87: qemu-img creates raw file with wrong size

2009-07-13 Thread Anthony Liguori
Randy Smith wrote: Greetings, Running `qemu-img create -f raw file.raw 1000` creates a 512 byte file rather than the 1000K file the docs imply. From the help message: " 'size' is the disk image size in kilobytes. Optional suffixes 'M' (megabyte, 1024 * 1024) and 'G' (gigabyte, 1024 * 1024 * 102

kvm-87: qemu-img creates raw file with wrong size

2009-07-13 Thread Randy Smith
Greetings, Running `qemu-img create -f raw file.raw 1000` creates a 512 byte file rather than the 1000K file the docs imply. From the help message: " 'size' is the disk image size in kilobytes. Optional suffixes 'M' (megabyte, 1024 * 1024) and 'G' (gigabyte, 1024 * 1024 * 1024) are supported any

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

2009-07-13 Thread Paul E. McKenney
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 that other RCU read section may introduce delays too. > > The question is how big the delay may be. > > I recall seeing the number "at least 3 j

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

2009-07-13 Thread Lucas Meneghel Rodrigues
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 the default set on that file (KVM install using release tarball). Signed-of

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

2009-07-13 Thread Lucas Meneghel Rodrigues
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 params dict inside the kvm control file. However, that option is not docume

Re: [autotest] [PATCH 1/6] add ebizzy in autotest

2009-07-13 Thread Martin Bligh
On Sun, Jul 12, 2009 at 8:20 PM, Lucas Meneghel Rodrigues wrote: > On Sun, Jul 12, 2009 at 7:08 AM, sudhir kumar wrote: >> On Sat, Jul 11, 2009 at 6:05 AM, Martin Bligh wrote: >>> On Fri, Jul 10, 2009 at 4:29 AM, sudhir kumar wrote: So is there any plan for adding this patch set in the patch

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 01:45:07PM -0300, Marcelo Tosatti wrote: > On Mon, Jul 13, 2009 at 07:44:38PM +0300, Gleb Natapov wrote: > > > > I don't get it. The point for RCU is to get rid of reader's lock. If > > > > I'll have to take slot_lock on each EOI I achieved nothing. > > > > > > You already

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Marcelo Tosatti
On Mon, Jul 13, 2009 at 07:44:38PM +0300, Gleb Natapov wrote: > > > I don't get it. The point for RCU is to get rid of reader's lock. If > > > I'll have to take slot_lock on each EOI I achieved nothing. > > > > You already take slots_lock for read on every exit. > > > We should fix that, not add

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 01:42:13PM -0300, Marcelo Tosatti wrote: > On Mon, Jul 13, 2009 at 07:33:30PM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 01:27:38PM -0300, Marcelo Tosatti wrote: > > > On Mon, Jul 13, 2009 at 07:24:53PM +0300, Gleb Natapov wrote: > > > > On Mon, Jul 13, 2009 at 1

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Marcelo Tosatti
On Mon, Jul 13, 2009 at 07:35:41PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 01:31:06PM -0300, Marcelo Tosatti wrote: > > > slots_lock is just a bad name now. See slots_lock is taken for read on > > > every exit. So taking slots_lock for write means all guests are stopped > >

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Marcelo Tosatti
On Mon, Jul 13, 2009 at 07:33:30PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 01:27:38PM -0300, Marcelo Tosatti wrote: > > On Mon, Jul 13, 2009 at 07:24:53PM +0300, Gleb Natapov wrote: > > > On Mon, Jul 13, 2009 at 12:55:31PM -0300, Marcelo Tosatti wrote: > > > > On Mon, Jul 13, 2009 at 0

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 01:31:06PM -0300, Marcelo Tosatti wrote: > > slots_lock is just a bad name now. See slots_lock is taken for read on > > every exit. So taking slots_lock for write means all guests are stopped > ^^ > > all vcpus > That i

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 01:27:38PM -0300, Marcelo Tosatti wrote: > On Mon, Jul 13, 2009 at 07:24:53PM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 12:55:31PM -0300, Marcelo Tosatti wrote: > > > On Mon, Jul 13, 2009 at 04:15:34PM +0300, Gleb Natapov wrote: > > > > On Mon, Jul 13, 2009 at 0

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Marcelo Tosatti
On Mon, Jul 13, 2009 at 01:23:38PM -0300, Marcelo Tosatti wrote: > On Mon, Jul 13, 2009 at 05:37:50PM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 05:23:20PM +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 13, 2009 at 02:48:44PM +0300, Gleb Natapov wrote: > > > > On Mon, Jul 13, 2009 a

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Marcelo Tosatti
On Mon, Jul 13, 2009 at 07:24:53PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 12:55:31PM -0300, Marcelo Tosatti wrote: > > On Mon, Jul 13, 2009 at 04:15:34PM +0300, Gleb Natapov wrote: > > > On Mon, Jul 13, 2009 at 09:01:33AM -0400, Gregory Haskins wrote: > > > > Gleb Natapov wrote: > > >

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 06:40:07PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 06:23:11PM +0300, Gleb Natapov wrote: > > > So, to summarize: this patch does not help speed irq injection up, the > > > only reason to change locking here is cosmetical. Is this a fair > > > summary? > >

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Marcelo Tosatti
On Mon, Jul 13, 2009 at 05:37:50PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 05:23:20PM +0300, Michael S. Tsirkin wrote: > > On Mon, Jul 13, 2009 at 02:48:44PM +0300, Gleb Natapov wrote: > > > On Mon, Jul 13, 2009 at 02:45:51PM +0300, Michael S. Tsirkin wrote: > > > > On Mon, Jul 13, 200

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 12:55:31PM -0300, Marcelo Tosatti wrote: > On Mon, Jul 13, 2009 at 04:15:34PM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 09:01:33AM -0400, Gregory Haskins wrote: > > > Gleb Natapov wrote: > > > > Signed-off-by: Gleb Natapov > > > > --- > > > > include/linux/kvm

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

2009-07-13 Thread Michael S. Tsirkin
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 device. Interrupts are handled using the Interrupt Disable bit in the PCI command register and Interrupt Status bit in the PCI stat

PCI device passthrough for FreeDOS guests

2009-07-13 Thread Carl-Daniel Hailfinger
Hi, I want to trace the PCI device accesses (config space, I/O ports, memory BARs) of a DOS application (EEPROM flasher) and it seems KVM can help with this. The current plan is to install KVM, use FreeDOS as a guest, activate passthrough for the PCI device I'm interested in and log the accesses s

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Marcelo Tosatti
On Mon, Jul 13, 2009 at 04:15:34PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 09:01:33AM -0400, Gregory Haskins wrote: > > Gleb Natapov wrote: > > > Signed-off-by: Gleb Natapov > > > --- > > > include/linux/kvm_host.h |2 +- > > > virt/kvm/irq_comm.c | 55 > > > +

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 06:23:11PM +0300, Gleb Natapov wrote: > > So, to summarize: this patch does not help speed irq injection up, the > > only reason to change locking here is cosmetical. Is this a fair > > summary? > > > The whole series helps to speed irq injection up. This patch is one step

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Gregory Haskins
Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 05:49:20PM +0300, Michael S. Tsirkin wrote: > >> On Mon, Jul 13, 2009 at 05:37:50PM +0300, Gleb Natapov wrote: >> >>> On Mon, Jul 13, 2009 at 05:23:20PM +0300, Michael S. Tsirkin wrote: >>> On Mon, Jul 13, 2009 at 02:48:44PM +0300, G

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 05:49:20PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 05:37:50PM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 05:23:20PM +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 13, 2009 at 02:48:44PM +0300, Gleb Natapov wrote: > > > > On Mon, Jul 13, 200

Re: [PATCH 0/5][RFC] more fine grained locking for IRQ injection

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 05:43:15PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 05:33:12PM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 05:21:48PM +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 13, 2009 at 04:58:58PM +0300, Gleb Natapov wrote: > > > > On Mon, Jul 13, 200

Re: [PATCH 1/5] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 11:03:56AM -0400, Gregory Haskins wrote: > Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 10:29:02AM -0400, Gregory Haskins wrote: > > > >> Gleb Natapov wrote: > >> > >>> diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c > >>> index 6c57e46..ce8fcd3 100644 > >>

Re: [PATCH 1/5] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock

2009-07-13 Thread Gregory Haskins
Gregory Haskins wrote: > Gleb Natapov wrote: > >> On Mon, Jul 13, 2009 at 10:29:02AM -0400, Gregory Haskins wrote: >> >> >>> Gleb Natapov wrote: >>> >>> diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c index 6c57e46..ce8fcd3 100644 --- a/virt/kvm/irq_comm

Re: [PATCH 1/5] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock

2009-07-13 Thread Gregory Haskins
Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 10:29:02AM -0400, Gregory Haskins wrote: > >> Gleb Natapov wrote: >> >>> diff --git a/virt/kvm/irq_comm.c b/virt/kvm/irq_comm.c >>> index 6c57e46..ce8fcd3 100644 >>> --- a/virt/kvm/irq_comm.c >>> +++ b/virt/kvm/irq_comm.c >>> @@ -210,7 +210,8 @@

Re: [PATCH 1/5] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 05:55:09PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 05:39:41PM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 10:29:02AM -0400, Gregory Haskins wrote: > > > Gleb Natapov wrote: > > > > It is already protected by kvm->lock on device assignment path.

Re: [ANNOUNCE] kvm-88 release

2009-07-13 Thread Anthony Liguori
Erik Rull wrote: Hi Avi, Avi Kivity wrote: Note -usbdevice tablet is only eating your cpu. It is not. Unless I don't understand something. With -usbdevice tablet mouse cursor/position is kept syncronized without a need to grab mouse/keyboard. This is very handy and easy. Right, I forgot

Re: Page allocation failures in guest

2009-07-13 Thread Minchan Kim
On Mon, Jul 13, 2009 at 6:51 PM, Pierre Ossman wrote: > I upgraded my Fedora 10 host to 2.6.29 a few days ago and since then > one of the guests keeps getting page allocation failures after a few > hours. I've upgraded the kernel in the guest from 2.6.27 to 2.6.29 > without any change. There are al

Re: [PATCH 1/5] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 05:39:41PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 10:29:02AM -0400, Gregory Haskins wrote: > > Gleb Natapov wrote: > > > It is already protected by kvm->lock on device assignment path. Just > > > take the same lock in the PIT code. > > > > > > Signed-off-by: Gl

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 05:37:50PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 05:23:20PM +0300, Michael S. Tsirkin wrote: > > On Mon, Jul 13, 2009 at 02:48:44PM +0300, Gleb Natapov wrote: > > > On Mon, Jul 13, 2009 at 02:45:51PM +0300, Michael S. Tsirkin wrote: > > > > On Mon, Jul 13, 200

Re: [PATCH 0/5][RFC] more fine grained locking for IRQ injection

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 05:33:12PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 05:21:48PM +0300, Michael S. Tsirkin wrote: > > On Mon, Jul 13, 2009 at 04:58:58PM +0300, Gleb Natapov wrote: > > > On Mon, Jul 13, 2009 at 04:53:15PM +0300, Michael S. Tsirkin wrote: > > > > On Mon, Jul 13, 200

Re: [PATCH 1/5] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 10:29:02AM -0400, Gregory Haskins wrote: > Gleb Natapov wrote: > > 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_

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 05:23:20PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 02:48:44PM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 02:45:51PM +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 13, 2009 at 12:12:33PM +0300, Gleb Natapov wrote: > > > > > > > > Signed-off

Re: [PATCH 0/5][RFC] more fine grained locking for IRQ injection

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 05:21:48PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 04:58:58PM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 04:53:15PM +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 13, 2009 at 04:28:09PM +0300, Gleb Natapov wrote: > > > > On Mon, Jul 13, 200

Re: [PATCH 1/5] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock

2009-07-13 Thread Gregory Haskins
Gleb Natapov wrote: > 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(-) > > d

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 02:48:44PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 02:45:51PM +0300, Michael S. Tsirkin wrote: > > On Mon, Jul 13, 2009 at 12:12:33PM +0300, Gleb Natapov wrote: > > > > > > Signed-off-by: Gleb Natapov > > > > This one is probably better off left as is, > What

Re: [PATCH 0/5][RFC] more fine grained locking for IRQ injection

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 04:58:58PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 04:53:15PM +0300, Michael S. Tsirkin wrote: > > On Mon, Jul 13, 2009 at 04:28:09PM +0300, Gleb Natapov wrote: > > > On Mon, Jul 13, 2009 at 04:23:36PM +0300, Michael S. Tsirkin wrote: > > > > On Mon, Jul 13, 200

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

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 10:02:13AM -0400, Gregory Haskins wrote: > Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 09:40:01AM -0400, Gregory Haskins wrote: > > > >> Gleb Natapov wrote: > >> > >>> On Mon, Jul 13, 2009 at 09:26:21AM -0400, Gregory Haskins wrote: > >>> > >>> > G

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

2009-07-13 Thread Gregory Haskins
Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 09:40:01AM -0400, Gregory Haskins wrote: > >> Gleb Natapov wrote: >> >>> On Mon, Jul 13, 2009 at 09:26:21AM -0400, Gregory Haskins wrote: >>> >>> Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 04:02:56PM

Re: [PATCH 0/5][RFC] more fine grained locking for IRQ injection

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 04:53:15PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 04:28:09PM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 04:23:36PM +0300, Michael S. Tsirkin wrote: > > > On Mon, Jul 13, 2009 at 12:12:30PM +0300, Gleb Natapov wrote: > > > > kvm->irq_lock prote

Re: [PATCH 0/5][RFC] more fine grained locking for IRQ injection

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 04:28:09PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 04:23:36PM +0300, Michael S. Tsirkin wrote: > > On Mon, Jul 13, 2009 at 12:12:30PM +0300, Gleb Natapov wrote: > > > kvm->irq_lock protects too much stuff, but still fail to protect > > > everything it was design

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

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 09:40:01AM -0400, Gregory Haskins wrote: > Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 09:26:21AM -0400, Gregory Haskins wrote: > > > >> Gleb Natapov wrote: > >> > >>> On Mon, Jul 13, 2009 at 04:02:56PM +0300, Michael S. Tsirkin wrote: > >>> > >>> > >>>

Re: [PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load()

2009-07-13 Thread Marcelo Tosatti
On Mon, Jul 13, 2009 at 07:42:56PM +0800, Sheng Yang wrote: > On Thursday 09 July 2009 17:00:42 Sheng Yang wrote: > > set_cr3() should already cover the TLB flushing. > > > Comments? Looks good. > > -- > regards > Yang, Sheng > > > Signed-off-by: Sheng Yang > > --- > > arch/x86/kvm/mmu.c |

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

2009-07-13 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Sun, Jul 12, 2009 at 03:03:53PM +0300, Gleb Natapov wrote: > >> 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(-) >> >> d

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

2009-07-13 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 04:32:34PM +0300, Gleb Natapov wrote: > >> Yeah I understand that other RCU read section may introduce delays too. >> The question is how big the delay may be. >> > > I recall seeing the number "at least 3 jiffies" somewhere, but that > mi

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

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 04:32:34PM +0300, Gleb Natapov wrote: > Yeah I understand that other RCU read section may introduce delays too. > The question is how big the delay may be. I recall seeing the number "at least 3 jiffies" somewhere, but that might have changed since. > I don't think multipl

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

2009-07-13 Thread Gregory Haskins
Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 09:26:21AM -0400, Gregory Haskins wrote: > >> Gleb Natapov wrote: >> >>> On Mon, Jul 13, 2009 at 04:02:56PM +0300, Michael S. Tsirkin wrote: >>> >>> On Sun, Jul 12, 2009 at 03:03:53PM +0300, Gleb Natapov wrote:

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Gregory Haskins
Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 09:16:47AM -0400, Gregory Haskins wrote: > >> Gleb Natapov wrote: >> >>> On Mon, Jul 13, 2009 at 09:01:33AM -0400, Gregory Haskins wrote: >>> >>> Gleb Natapov wrote: > Signed-off-by: Gleb Natapov >

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 04:23:49PM +0300, Gleb Natapov wrote: > > resource. Maybe it's a good idea to use an array instead of a list. All > > I'm saying, RCU does not force you to do this. > > > It doesn't, but list shouldn't be used here in the first place. OK, but I think the change and the rea

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

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 09:26:21AM -0400, Gregory Haskins wrote: > Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 04:02:56PM +0300, Michael S. Tsirkin wrote: > > > >> On Sun, Jul 12, 2009 at 03:03:53PM +0300, Gleb Natapov wrote: > >> > >>> Use RCU locking for mask/ack notifiers lists. > >>

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

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 04:05:58PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 03:56:40PM +0300, Michael S. Tsirkin wrote: > > On Sun, Jul 12, 2009 at 03:03:53PM +0300, Gleb Natapov wrote: > > > Use RCU locking for mask/ack notifiers lists. > > > > > > Signed-off-by: Gleb Natapov > > > -

Re: [PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load()

2009-07-13 Thread Sheng Yang
On Monday 13 July 2009 20:23:58 Avi Kivity wrote: > On 07/09/2009 12:00 PM, Sheng Yang wrote: > > set_cr3() should already cover the TLB flushing. > > > > Signed-off-by: Sheng Yang > > --- > > arch/x86/kvm/mmu.c |2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a

Re: [PATCH 0/5][RFC] more fine grained locking for IRQ injection

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 04:23:36PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 12:12:30PM +0300, Gleb Natapov wrote: > > 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 in

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

2009-07-13 Thread Gregory Haskins
Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 04:02:56PM +0300, Michael S. Tsirkin wrote: > >> On Sun, Jul 12, 2009 at 03:03:53PM +0300, Gleb Natapov wrote: >> >>> Use RCU locking for mask/ack notifiers lists. >>> >>> Signed-off-by: Gleb Natapov >>> --- >>> virt/kvm/irq_comm.c | 20

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 09:16:47AM -0400, Gregory Haskins wrote: > Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 09:01:33AM -0400, Gregory Haskins wrote: > > > >> Gleb Natapov wrote: > >> > >>> Signed-off-by: Gleb Natapov > >>> --- > >>> include/linux/kvm_host.h |2 +- > >>> virt/kv

Re: [PATCH 0/5][RFC] more fine grained locking for IRQ injection

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 12:12:30PM +0300, Gleb Natapov wrote: > 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. At least irq routing changes a

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 04:15:30PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 04:03:10PM +0300, Gleb Natapov wrote: > > On Mon, Jul 13, 2009 at 03:55:07PM +0300, Michael S. Tsirkin wrote: > > > On Sun, Jul 12, 2009 at 03:03:50PM +0300, Gleb Natapov wrote: > > > > > > > > Signed-off

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Gregory Haskins
Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 09:01:33AM -0400, Gregory Haskins wrote: > >> Gleb Natapov wrote: >> >>> Signed-off-by: Gleb Natapov >>> --- >>> include/linux/kvm_host.h |2 +- >>> virt/kvm/irq_comm.c | 55 >>> +- >>> v

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 04:03:10PM +0300, Gleb Natapov wrote: > On Mon, Jul 13, 2009 at 03:55:07PM +0300, Michael S. Tsirkin wrote: > > On Sun, Jul 12, 2009 at 03:03:50PM +0300, Gleb Natapov wrote: > > > > > > Signed-off-by: Gleb Natapov > > > --- > > > include/linux/kvm_host.h |2 +- > > >

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 09:01:33AM -0400, Gregory Haskins wrote: > Gleb Natapov wrote: > > Signed-off-by: Gleb Natapov > > --- > > include/linux/kvm_host.h |2 +- > > virt/kvm/irq_comm.c | 55 > > +- > > virt/kvm/kvm_main.c |1 - > >

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

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 04:02:56PM +0300, Michael S. Tsirkin wrote: > On Sun, Jul 12, 2009 at 03:03:53PM +0300, Gleb Natapov wrote: > > Use RCU locking for mask/ack notifiers lists. > > > > Signed-off-by: Gleb Natapov > > --- > > virt/kvm/irq_comm.c | 20 +++- > > 1 files chang

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 03:55:07PM +0300, Michael S. Tsirkin wrote: > On Sun, Jul 12, 2009 at 03:03:50PM +0300, Gleb Natapov wrote: > > > > Signed-off-by: Gleb Natapov > > --- > > include/linux/kvm_host.h |2 +- > > virt/kvm/irq_comm.c | 55 > > +--

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

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 03:56:40PM +0300, Michael S. Tsirkin wrote: > On Sun, Jul 12, 2009 at 03:03:53PM +0300, Gleb Natapov wrote: > > Use RCU locking for mask/ack notifiers lists. > > > > Signed-off-by: Gleb Natapov > > --- > > virt/kvm/irq_comm.c | 20 +++- > > 1 files chang

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

2009-07-13 Thread Michael S. Tsirkin
On Sun, Jul 12, 2009 at 03:03:53PM +0300, Gleb Natapov wrote: > 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/

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Gregory Haskins
Gleb Natapov wrote: > 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/lin

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

2009-07-13 Thread Michael S. Tsirkin
On Sun, Jul 12, 2009 at 03:03:53PM +0300, Gleb Natapov wrote: > 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/

Re: [PATCH 1/4] Move irq routing data structure to rcu locking

2009-07-13 Thread Michael S. Tsirkin
On Sun, Jul 12, 2009 at 03:03:50PM +0300, Gleb Natapov wrote: > > 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(+),

Re: [PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load()

2009-07-13 Thread Avi Kivity
On 07/09/2009 12:00 PM, Sheng Yang wrote: set_cr3() should already cover the TLB flushing. Signed-off-by: Sheng Yang --- arch/x86/kvm/mmu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 231d880..501c11e 100644 --- a/arc

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Gleb Natapov
On Mon, Jul 13, 2009 at 02:45:51PM +0300, Michael S. Tsirkin wrote: > On Mon, Jul 13, 2009 at 12:12:33PM +0300, Gleb Natapov wrote: > > > > Signed-off-by: Gleb Natapov > > This one is probably better off left as is, What do you mean "as is"? > with RCU in place list modifications are slow anywa

Re: [PATCH 3/5] Move irq notifiers lists to its own locking.

2009-07-13 Thread Michael S. Tsirkin
On Mon, Jul 13, 2009 at 12:12:33PM +0300, Gleb Natapov wrote: > > Signed-off-by: Gleb Natapov This one is probably better off left as is, with RCU in place list modifications are slow anyway. > --- > include/linux/kvm_host.h |1 + > virt/kvm/irq_comm.c | 16 > virt/

Re: [PATCH] KVM: Discard unnecessary kvm_mmu_flush_tlb() in kvm_mmu_load()

2009-07-13 Thread Sheng Yang
On Thursday 09 July 2009 17:00:42 Sheng Yang wrote: > set_cr3() should already cover the TLB flushing. > Comments? -- regards Yang, Sheng > Signed-off-by: Sheng Yang > --- > arch/x86/kvm/mmu.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/kvm/mmu.c b/a

Re: [ANNOUNCE] kvm-88 release

2009-07-13 Thread John Rousseau
On 07/13/2009 04:32 AM, Avi Kivity wrote: On 07/12/2009 09:43 PM, John Rousseau wrote: Losing -vga std allowed the guest to boot. Attached patch fixes it for me. It does as well for me. Acked-by: John Rousseau Thanks much! -John -- To unsubscribe from this list: send the line "unsubscribe

Re: [ANNOUNCE] kvm-88 release

2009-07-13 Thread Avi Kivity
On 07/13/2009 01:01 PM, Erik Rull wrote: Could you give me a hint how to manage the auto-grab of mouse and keyboard maybe with a patch? A pointer to the code where the grabbing occurs within -usbdevice tablet) would be fine - I would try to add a patch on that and also test it. Maybe it could b

SLES 10 SP1 guest install fails with SCSI

2009-07-13 Thread Pradeep K Surisetty
I tried to install SLES 10 SP1 Guest using qemu. Install halts in the early stages of installation with the SCSi. But with IDE installation is successful. seems to be SCSI emulation issue.. Host OS Info : CPU Model : Dual-Core AMD Opteron(tm) Processor 2218 Host OS: fedora11 rawhide

Broken Finnish keymap

2009-07-13 Thread Anssi Kolehmainen
Hi, When I run kvm-88 with -vnc and -k fi and try to press "'" (apostrophe) in vnc window I get "b" in the guest. Strange enough, in SDL window everything seems to work just fine. Anyhow, the fix is to remove second apostrophe line from pc-bios/keymaps/fi. Also there are few other "wrong" keys s

Re: [ANNOUNCE] kvm-88 release

2009-07-13 Thread Erik Rull
Hi Avi, Avi Kivity wrote: Note -usbdevice tablet is only eating your cpu. It is not. Unless I don't understand something. With -usbdevice tablet mouse cursor/position is kept syncronized without a need to grab mouse/keyboard. This is very handy and easy. Right, I forgot that bit. I only

Page allocation failures in guest

2009-07-13 Thread Pierre Ossman
I upgraded my Fedora 10 host to 2.6.29 a few days ago and since then one of the guests keeps getting page allocation failures after a few hours. I've upgraded the kernel in the guest from 2.6.27 to 2.6.29 without any change. There are also a few other guests running on the machine that aren't havin

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

2009-07-13 Thread Avi Kivity
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 complete build output is attached. Tr

[PATCH 5/5] Drop kvm->irq_lock lock.

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

2009-07-13 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 3f2a4fc..12f4ee2 10064

[PATCH 4/5] Move IO APIC to its own lock.

2009-07-13 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 1/5] Protect irq_sources_bitmap by kvm->lock instead of kvm->irq_lock

2009-07-13 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 0/5][RFC] more fine grained locking for IRQ injection

2009-07-13 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 2/5] Move irq routing to its own locking.

2009-07-13 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 f795f25..3f2a4fc 100644 --- a/incl

[ kvm-Bugs-2506814 ] TAP network lockup after some traffic

2009-07-13 Thread SourceForge.net
Bugs item #2506814, was opened at 2009-01-14 11:38 Message generated for change (Comment added) made by danny1 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2506814&group_id=180599 Please note that this message will contain a full copy of the comment th

Re: [ANNOUNCE] kvm-88 release

2009-07-13 Thread Avi Kivity
On 07/13/2009 11:40 AM, Michael Tokarev wrote: Avi Kivity wrote: [] # /usr/local/bin/qemu-system-x86_64 -hda /home/jrr/vista-x86_64.img -m 1536M -net nic,vlan=0,macaddr=52:54:00:12:32:00 -net tap,vlan=0,ifname=tap1 -vga std -full-screen -smp 2 -usb -usbdevice tablet Can you try without -full

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

2009-07-13 Thread Amit Shah
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 deletions(-) diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index daf60b6..

Re: [PATCH] libkvm: x86: fix memleak if ioctl fails

2009-07-13 Thread Amit Shah
On (Mon) Jul 13 2009 [11:38:18], Avi Kivity wrote: > On 07/13/2009 11:27 AM, Amit Shah wrote: >> Fix a memleak for when the KVM_SET_CPUID2 ioctl fails. Free the >> memory that we allocate to store cpuids. >> >> > > Applied, thanks. Note that this libkvm is practically unused (the test > suit

Re: [ANNOUNCE] kvm-88 release

2009-07-13 Thread Michael Tokarev
Avi Kivity wrote: [] # /usr/local/bin/qemu-system-x86_64 -hda /home/jrr/vista-x86_64.img -m 1536M -net nic,vlan=0,macaddr=52:54:00:12:32:00 -net tap,vlan=0,ifname=tap1 -vga std -full-screen -smp 2 -usb -usbdevice tablet Can you try without -full-screen? Without -vga std? Note -usbdevice tab

Re: [PATCH] libkvm: x86: fix memleak if ioctl fails

2009-07-13 Thread Avi Kivity
On 07/13/2009 11:27 AM, Amit Shah wrote: Fix a memleak for when the KVM_SET_CPUID2 ioctl fails. Free the memory that we allocate to store cpuids. Applied, thanks. Note that this libkvm is practically unused (the test suite uses it but I want to move that to qemu -kernel). -- error comp

Re: [ANNOUNCE] kvm-88 release

2009-07-13 Thread Avi Kivity
On 07/12/2009 09:43 PM, John Rousseau wrote: Losing -vga std allowed the guest to boot. Attached patch fixes it for me. -- error compiling committee.c: too many arguments to function diff --git a/hw/vga_int.h b/hw/vga_int.h index d715f30..1aaf5c5 100644 --- a/hw/vga_int.h +++ b/hw/vga_int.h @

[PATCH] libkvm: x86: fix memleak if ioctl fails

2009-07-13 Thread Amit Shah
Fix a memleak for when the KVM_SET_CPUID2 ioctl fails. Free the memory that we allocate to store cpuids. Signed-off-by: Amit Shah --- kvm/libkvm/libkvm-x86.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kvm/libkvm/libkvm-x86.c b/kvm/libkvm/libkvm-x86.c index 9ca77d5.

Re: guest gettimeofday behavior

2009-07-13 Thread Eran Rom
Glauber Costa redhat.com> writes: > > > This was happening with kvmclock back then when it did not handle > > cpu frequency changes. What are the details of the host hw? > > > > Glauber, any clues? > maybe it is exactly that. 2.6.27 is a little bit old, and probably does not > have the fixes. >

  1   2   >