[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/hvm: implement save/restore for posted interrupts
>>> On 03.07.14 at 17:09, <olaf@xxxxxxxxx> wrote: > --- a/xen/arch/x86/hvm/vmx/vmx.c > +++ b/xen/arch/x86/hvm/vmx/vmx.c > @@ -1654,6 +1654,18 @@ static void vmx_sync_pir_to_irr(struct vcpu *v) > vlapic_set_vector(i, &vlapic->regs->data[APIC_IRR]); > } > > +static void vmx_sync_irr_to_pir(struct vcpu *v) > +{ > + struct vlapic *vlapic = vcpu_vlapic(v); > + unsigned int vector; > + > + for ( vector = 0; vector < NR_VECTORS; vector++ ) { Coding style. > + if ( vlapic_test_vector(vector, &vlapic->regs->data[APIC_IRR]) ) > + vlapic_set_irq(vlapic, vector, > + vlapic_test_vector(vector, > &vlapic->regs->data[APIC_TMR])); You would get away with using vlapic_test_and_clear_vector() (i.e. without introducing vlapic_test_vector()), since vlapic_set_irq() will set the flag again if it was found set here. And still the question remains whether to really use vlapic_set_irq() here, or rather open code the pieces of it that we actually need (at once allowing to eliminate two indirect function calls). Let's see what the VMX maintainers have to say. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |