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

Re: [PATCH] tools/libxc: use uint32_t for pirq in xc_domain_irq_permission

  • To: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 7 Jul 2021 09:46:43 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-SenderADCheck; bh=mIRrQE298L27KOZQuDhUlhq3lDEV4n3IGRDKDKfwLc4=; b=Vs0KRFDrShnzm4yS6oHgwd14KU7/0TnWX4TWbtUtFJk4u6R/5jlNz8xzZErAf39onfrPIA+N9OEDJUAtL986J3DzhrXfpnGvlHqiTkwSqPFeiH7UIR31r/ehgMfsqRD/UnIat50FGgiPpnop3z3w6Zxt09uxe6Mqdx7jbsQv1tgg62j4KG63gikicEtfXxD2l+RgUv4sSEYoqPn1h91T75l0SmP40bEHlMSugtsox5pkkXSoVpYZfZhuaC9Nx7wob5pfOAcr7yjtLw7rQilDqfrS8+t+dCTk+CuGc3rrZUF898h5WtGKGh5O20Eea4SKsUSrZe/FzAHFtpKof/oUQQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jVwOxHKkKFPfj8R1F0zIQEcyp3863vGzFSqNTVskHrM6jN4929IE8P4APzy7BWj5UzbyVpgFIGjlZq8fiCIKKRNDAms4sTcuXUjRlTKnorD/EEwyP4QiNbkMpnbBTCawZvFFvizZcWQ/thBgICTm8ptrshG1AKHkHnQ/+stGNbs9C/vBafDoPyMOaaS4TB8odmqM2Ohu4PHqkgK2oFkPtFOxR0Adsctd6pXslGnR6jm16HPOwCUZAbJOfUq/Te+MYWn/TE5bPSQQGpVLQ1jnCYyDCK8LhBsOCkP71G6O7S+smLGbdgYzEQOrV4++XzUWuecQMP1tgD9nGBM/SkrjNA==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: iwj@xxxxxxxxxxxxxx, wl@xxxxxxx, andrew.cooper3@xxxxxxxxxx, george.dunlap@xxxxxxxxxx, julien@xxxxxxx, sstabellini@xxxxxxxxxx, jgross@xxxxxxxx, christian.lindig@xxxxxxxxxx, dave@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 07 Jul 2021 07:46:52 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.07.2021 03:02, Igor Druzhinin wrote:
> Current unit8_t for pirq argument in this interface is too restrictive
> causing failures on modern hardware with lots of GSIs. That extends down to
> XEN_DOMCTL_irq_permission ABI structure where it needs to be fixed up
> as well. Internal Xen structures appear to be fine. Existing users of
> the interface in tree (libxl, ocaml and python bindings) are already using
> int for pirq representation that should be wide enough.
> Domctl interface version is needed to be bumped with this change but that
> was already done by 918b8842a8 ("arm64: Change type of hsr, cpsr, spsr_el1
> to uint64_t") in this release cycle.

Let's hope it's not going to get reverted for having broken the tools
build in multiple ways.

> --- a/tools/include/xenctrl.h
> +++ b/tools/include/xenctrl.h
> @@ -1385,7 +1385,7 @@ int xc_domain_ioport_permission(xc_interface *xch,
>  int xc_domain_irq_permission(xc_interface *xch,
>                               uint32_t domid,
> -                             uint8_t pirq,
> +                             uint32_t pirq,
>                               uint8_t allow_access);

Take the opportunity and also change "allow_access" to bool? Or is
use of bool prohibited in external interfaces?

> --- a/xen/include/public/domctl.h
> +++ b/xen/include/public/domctl.h
> @@ -441,7 +441,7 @@ struct xen_domctl_setdebugging {
>  /* XEN_DOMCTL_irq_permission */
>  struct xen_domctl_irq_permission {
> -    uint8_t pirq;
> +    uint32_t pirq;
>      uint8_t allow_access;    /* flag to specify enable/disable of IRQ access 
> */
>  };

Please can you make the now added padding explicit, like we strive
to do with any new additions / extensions? With at least this aspect
taken care of
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>




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