RE: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-09 Thread Zhang, Yang Z
Marcelo Tosatti wrote on 2013-01-09: > On Wed, Jan 09, 2013 at 08:07:31AM +, Zhang, Yang Z wrote: if(check_request(KVM_REQ_, )) { ioapic_lock(); (*) update local EOI exit bitmap from IOAPIC >> In my patch, it traverses IOAPIC entry once and o

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-09 Thread Marcelo Tosatti
On Wed, Jan 09, 2013 at 08:07:31AM +, Zhang, Yang Z wrote: > >>if(check_request(KVM_REQ_, )) { > >>ioapic_lock(); (*) > >>update local EOI exit bitmap from IOAPIC > In my patch, it traverses IOAPIC entry once and only updates target vcpus's > eoi exit b

RE: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-09 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-08: > On Tue, Jan 08, 2013 at 11:57:59AM -0200, Marcelo Tosatti wrote: >> On Tue, Jan 08, 2013 at 12:57:42PM +, Zhang, Yang Z wrote: >>> Gleb Natapov wrote on 2013-01-08: On Mon, Jan 07, 2013 at 07:32:39PM -0200, Marcelo Tosatti wrote: > On Mon, Jan 07, 20

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-08 Thread Gleb Natapov
On Tue, Jan 08, 2013 at 11:57:59AM -0200, Marcelo Tosatti wrote: > On Tue, Jan 08, 2013 at 12:57:42PM +, Zhang, Yang Z wrote: > > Gleb Natapov wrote on 2013-01-08: > > > On Mon, Jan 07, 2013 at 07:32:39PM -0200, Marcelo Tosatti wrote: > > >> On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapo

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-08 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 12:57:42PM +, Zhang, Yang Z wrote: > Gleb Natapov wrote on 2013-01-08: > > On Mon, Jan 07, 2013 at 07:32:39PM -0200, Marcelo Tosatti wrote: > >> On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: > ioapic_write (or any other ioapic update) > lock() >

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-08 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 12:03:32PM +0200, Gleb Natapov wrote: > On Mon, Jan 07, 2013 at 07:32:39PM -0200, Marcelo Tosatti wrote: > > On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: > > > > ioapic_write (or any other ioapic update) > > > > lock() > > > > perform update > > > > make_all

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-08 Thread Marcelo Tosatti
On Tue, Jan 08, 2013 at 12:43:22AM +, Zhang, Yang Z wrote: > Marcelo Tosatti wrote on 2013-01-08: > > On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: > >>> ioapic_write (or any other ioapic update) > >>> lock() > >>> perform update > >>> make_all_vcpus_request(KVM_REQ_UPDATE_EOI_B

RE: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-08 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-08: > On Mon, Jan 07, 2013 at 07:32:39PM -0200, Marcelo Tosatti wrote: >> On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: ioapic_write (or any other ioapic update) lock() perform update make_all_vcpus_request(KVM_REQ_UPDATE_EOI_BITMAP)

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-08 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 07:32:39PM -0200, Marcelo Tosatti wrote: > On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: > > > ioapic_write (or any other ioapic update) > > > lock() > > > perform update > > > make_all_vcpus_request(KVM_REQ_UPDATE_EOI_BITMAP) (*) > > > unlock() > > > > > >

RE: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-07 Thread Zhang, Yang Z
Marcelo Tosatti wrote on 2013-01-08: > On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: >>> ioapic_write (or any other ioapic update) >>> lock() >>> perform update >>> make_all_vcpus_request(KVM_REQ_UPDATE_EOI_BITMAP) (*) >>> unlock() >>> >>> (*) Similarly to TLB flush. >>> >>> The a

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-07 Thread Marcelo Tosatti
On Mon, Jan 07, 2013 at 07:48:43PM +0200, Gleb Natapov wrote: > > ioapic_write (or any other ioapic update) > > lock() > > perform update > > make_all_vcpus_request(KVM_REQ_UPDATE_EOI_BITMAP) (*) > > unlock() > > > > (*) Similarly to TLB flush. > > > > The advantage is that all work becomes vcpu

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-07 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 11:52:21AM -0200, Marcelo Tosatti wrote: > On Mon, Jan 07, 2013 at 10:02:36AM +0800, Yang Zhang wrote: > > From: Yang Zhang > > > > Virtual interrupt delivery avoids KVM to inject vAPIC interrupts > > manually, which is fully taken care of by the hardware. This needs > > s

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-07 Thread Marcelo Tosatti
On Mon, Jan 07, 2013 at 10:02:36AM +0800, Yang Zhang wrote: > From: Yang Zhang > > Virtual interrupt delivery avoids KVM to inject vAPIC interrupts > manually, which is fully taken care of by the hardware. This needs > some special awareness into existing interrupr injection path: > > - for pend

RE: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-07 Thread Zhang, Yang Z
Gleb Natapov wrote on 2013-01-07: > On Mon, Jan 07, 2013 at 10:02:36AM +0800, Yang Zhang wrote: >> From: Yang Zhang >> >> Virtual interrupt delivery avoids KVM to inject vAPIC interrupts >> manually, which is fully taken care of by the hardware. This needs >> some special awareness into existing

Re: [PATCH v8 2/3] x86, apicv: add virtual interrupt delivery support

2013-01-06 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 10:02:36AM +0800, Yang Zhang wrote: > From: Yang Zhang > > Virtual interrupt delivery avoids KVM to inject vAPIC interrupts > manually, which is fully taken care of by the hardware. This needs > some special awareness into existing interrupr injection path: > > - for pend