>>> On 29.03.17 at 16:47, <roger....@citrix.com> 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@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to