[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 3/8] x86/irq: rename NR_HVM_IRQS and break it's dependency on VIOAPIC_NUM_PINS



>>> On 29.03.17 at 16:47, <roger.pau@xxxxxxxxxx> wrote:
> Rename it to NR_HVM_DOMU_IRQS, and get it's value from the size of the DomU 
> vIO
> APIC redirection table.

The line wrapping here is slightly puzzling...

> --- a/xen/include/xen/hvm/irq.h
> +++ b/xen/include/xen/hvm/irq.h
> @@ -76,13 +76,13 @@ struct hvm_girq_dpci_mapping {
>  #define NR_ISAIRQS  16
>  #define NR_LINK     4
>  #if defined(CONFIG_X86)
> -# define NR_HVM_IRQS VIOAPIC_NUM_PINS
> +# define NR_HVM_DOMU_IRQS ARRAY_SIZE(((struct hvm_hw_vioapic *)0)->redirtbl)

An abuse of NULL pointers like this is not the end of the world, but
did you consider avoiding this by expressing things starting from
current (which ought to be always in scope)? Or did you event try
doing so, and it didn't work out for some reason (possibly header
dependencies getting in the way)?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.