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

Re: [PATCH 1/2] ns16550: reject IRQ above nr_irqs


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Thu, 10 Mar 2022 17:12:51 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ubPUDdE1tqwSZQ4RBqrQwbEHk0YQGJqF57J4SOVISPc=; b=fjPxginXncGUhRGe45CwNi800mlOmmZbLJtk7pV8LRhxp0VGE/QPMLqKVcTCgXxNfZeZY3oEuBkzYBPCzjwCmyiuw6dUT1mESzf4HIJ6ObkqIA8lZExFrFSU8jtVIaGuUeYV9xt63zyiljDUzw1/lZcNh5WiP0v/Aqkdbfwv5EmkkzqGQIh2oTXZ3YbLRAY6UT8UwuH8cFFVwEobhryzk6dXq8ay2VVOzjsrBTaaVOH+tCgzcRm5jToJhirOpjywf7RCSOEPOtMtDseir1209Q7PWZPR672RwqjoUdu5uawdh++4Ub6PMJVtiDn/LH7KkqW75VHOhQaUGK83/mOt7Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DoD/6ngbl98lgbyYtsqhNyQBXs81y0OZL2Y/pySM3LXfsp4oc0wblt2RrQpXeIld8T8N8vKdtIyfWq0qP3hknxuOBcIh2oW6VTKio9d/ccq6OIWP1Siiek3uKC1FYJex0PbHVe3fvkUuUGV9WHrigUlitGwwmundPAaHmRrGKIZtILg4ZcbFf7BJkFvAqLnmO2bw1d4L5QhKpm0QfdUdXqQ3wpN4vOa+gSLPwRzXbydxyVGILdzMCZBt/w6fJVJAwt9BnEhlXSWFvIiuWeE3VYEQLXmx9ZaJrTbvAl2gPByVrT49Oyge6lV2+oGAsnTNomgJO4pt6sovjA6NbhKRDg==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 10 Mar 2022 16:13:05 +0000
  • Ironport-data: A9a23:ZdkzGq4OLBqG4nh8UDy08QxRtOHHchMFZxGqfqrLsTDasY5as4F+v mEZDG/QOvbbMTPyet13aIuy9UgPuMXTz4NgSgY+/ngyHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yE6j8lkf5KkYAL+EnkZqTRMFWFw0XqPp8Zj2tQy2YPgW1vX0 T/Pi5a31GGNimYc3l08s8pvmDs31BglkGpF1rCWTakjUG72zxH5PrpGTU2CByKQrr1vNvy7X 47+IISRpQs1yfuP5uSNyd4XemVSKlLb0JPnZnB+A8BOiTAazsA+PzpS2FPxpi67hh3Q9+2dx umhurToR113IoDwnd8NVgRfECZ6F65Bw6T+dC3XXcy7lyUqclPpyvRqSko3IZcZ6qB8BmQmG f4wcW5XKErZ3qTvnez9GrIEascLdaEHOKsFvX5t13fBBOsOSpHfWaTao9Rf2V/cg+gQTayON 5pCMVKDajyRYQxvCmwQJqkhkf+QmnnnWQdqmH+s8P9fD2/7k1UqjemF3MDuUseRWcxfk0Kcp 2TH12f0GBcXMJqY0zXt2m2orv/Cm2X8Qo16PK218LtmjUOewkQXCQYKTh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yaR3C8Xctu9l6ze Ziw3+Zn4A/N2KOoA3No/zzEz16nEu9pnQv1cQJiWZEbIcYYLhN6aQC4UJuFosaFi6S0vFqLA BXNrCc2B9qSyLbU5iA1VMfg+BEH05DUytue3Jy9PB8iFNt7TJEJ0hx/r1qop5PzuN5d3B+3Z W2Dk1ZrsA/ciYoV9MOOA4ge7rANoWfe2OEDIqtSW6XYZ3vfUi976LK3A==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Thu, Mar 10, 2022 at 05:08:07PM +0100, Jan Beulich wrote:
> On 10.03.2022 16:47, Roger Pau Monné wrote:
> > On Thu, Mar 10, 2022 at 04:23:00PM +0100, Jan Beulich wrote:
> >> On 10.03.2022 15:34, Marek Marczykowski-Górecki wrote:
> >>> --- a/xen/drivers/char/ns16550.c
> >>> +++ b/xen/drivers/char/ns16550.c
> >>> @@ -1221,6 +1221,9 @@ pci_uart_config(struct ns16550 *uart, bool_t 
> >>> skip_amt, unsigned int idx)
> >>>                              pci_conf_read8(PCI_SBDF(0, b, d, f),
> >>>                                             PCI_INTERRUPT_LINE) : 0;
> >>>  
> >>> +                if (uart->irq >= nr_irqs)
> >>> +                    uart->irq = 0;
> >>
> >> Don't you mean nr_irqs_gsi here? Also (nit) please add the missing blanks
> >> immediately inside the parentheses.
> > 
> > If we use nr_irqs_gsi we will need to make the check x86 only AFAICT.
> 
> Down the road (when Arm wants to select HAS_PCI) - yes. Not necessarily
> right away. After all Arm wants to have an equivalent check here then,
> not merely checking against nr_irqs instead. So putting a conditional
> here right away would hide the need for putting in place an Arm-specific
> alternative.

Oh, I always forget Arm doesn't have CONFIG_HAS_PCI enabled just yet.

Roger.



 


Rackspace

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