On Thu, Apr 19, 2012 at 12:53:12PM +0300, Avi Kivity wrote: > On 04/19/2012 12:33 PM, Gleb Natapov wrote: > > The patch introduces a bitmap that will hold reasons apic should be > > checked during vmexit. This is in a preparation for vp eoi patch > > that will add one more check on vmexit. With the bitmap we can do > > if(apic_attention) to check everything simultaneously which will > > add zero overhead on the fast path. > > > > Good idea. > > > > > +#define KVM_APIC_CHECK_VAPIC 0 > > Comment above relating this to apic_attention. > OK. > > vcpu->arch.apic->vapic_addr = vapic_addr; > > + if (vapic_addr) > > + __set_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention); > > + else > > + __clear_bit(KVM_APIC_CHECK_VAPIC, &vcpu->arch.apic_attention); > > } > > > > Unrelated: this pattern is probably common. Would be nice to have a > __deposit_bit() function. > What semantics should it have? Set bit A in bitmap B if value C is non-zero? -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html