diff mbox series

[v5,for-4.19?,2/2] cmdline: "extra_guest_irqs" is inapplicable to PVH

Message ID de22beee-bd51-4169-b84d-88f4b452473a@suse.com (mailing list archive)
State New
Headers show
Series new extra_guest_irqs adjustment | expand

Commit Message

Jan Beulich July 3, 2024, 8:45 a.m. UTC
PVH in particular has no (externally visible) notion of pIRQ-s. Mention
that in the description of the respective command line option and have
arch_hwdom_irqs() also reflect this (thus suppressing the log message
there as well, as being pretty meaningless in this case anyway).

Suggested-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v5: Remove has_pirq() check; update comment accordingly.
v4: New.

Comments

Roger Pau Monné July 3, 2024, 9:23 a.m. UTC | #1
On Wed, Jul 03, 2024 at 10:45:41AM +0200, Jan Beulich wrote:
> PVH in particular has no (externally visible) notion of pIRQ-s. Mention
> that in the description of the respective command line option and have
> arch_hwdom_irqs() also reflect this (thus suppressing the log message
> there as well, as being pretty meaningless in this case anyway).
> 
> Suggested-by: Roger Pau Monné <roger.pau@citrix.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.
diff mbox series

Patch

--- a/docs/misc/xen-command-line.pandoc
+++ b/docs/misc/xen-command-line.pandoc
@@ -1183,7 +1183,8 @@  versa.  For example to change dom0 witho
 hardware domain is architecture dependent.  The upper limit for both values on
 x86 is such that the resulting total number of IRQs can't be higher than 32768.
 Note that specifying zero as domU value means zero, while for dom0 it means
-to use the default.
+to use the default.  Note further that the Dom0 setting has no useful meaning
+for the PVH case; use of the option may have an adverse effect there, though.
 
 ### ext_regions (Arm)
 > `= <boolean>`
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -2670,6 +2670,10 @@  unsigned int __hwdom_init arch_hwdom_irq
     if ( is_system_domain(d) )
         return max_irqs;
 
+    /* PVH (generally: HVM) can't use PHYSDEVOP_pirq_eoi_gmfn_v{1,2}. */
+    if ( is_hvm_domain(d) )
+        return nr_irqs;
+
     if ( !d->domain_id )
         n = min(n, dom0_max_vcpus());
     n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, max_irqs);