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

Marcelo Tosatti
2013-01-09T15:21:23Z

On Wed, Jan 09, 2013 at 08:07:31AM +0000, 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 bitmap. Then make request for all vcpus.
> With your suggestion , all vcpus will traverse all IOAPIC entries. Though ioapic entry write is rare, it's still not reasonable.

It should be fast, and very rare (as in once during system
initialization, or device hotplug).

Is there a particular case that makes it necessary to optimize scanning?

>
> >> ioapic_unlock();
> >> }
> >>
> > Fine by me. Looks simpler.
> >
> >>
> >>
> >> (*) plus any other lock that paths that update the map take
> >>
> >>
> >>
> >>
> >>
> >>>
> >>> Best regards,
> >>> Yang
> >
> > --
> > Gleb.
>
>
> Best regards,
> Yang