From nobody Wed May 8 09:16:32 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1625619795; cv=none; d=zohomail.com; s=zohoarc; b=JnG4+UF7vxeUPf7kZ6ieNtSLqLByheggxPBUfHw6HGTo9QWCtcSZyk2mDwK4zpZlzi3mxkHQ6X8BsbAlxjQXpoxgielfsb+HiNOl+ElPaOBCi4WLAu838AiV/ZpRjOKQ1jbojHovow8ETyRWe0ei4VK9wH9oXppb+vKt/Ql3Igk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1625619795; h=Content-Type:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=qb6CC/17UrsaWE5zvvKcH528WooLJ3P5sLkEx0eDHo0=; b=XUZmxN8rUksC9OjViOOXvuOq+DX3i9fdy8KPFy69IKuoNXHm3o+GTCnjwRv+HqVJLiJgR3Mu3ZAWAYlc7//mRoNUaft/xanlSCvdDWc26xAVc3j61INtwJZPpjH5xxk3MzBy8qDXKEDRKzNixdopzAVPuVxwbDHZ9qVGq7I/NHA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1625619795270114.4606145716532; Tue, 6 Jul 2021 18:03:15 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.151786.280439 (Exim 4.92) (envelope-from ) id 1m0vxp-0000NG-5p; Wed, 07 Jul 2021 01:02:57 +0000 Received: by outflank-mailman (output) from mailman id 151786.280439; Wed, 07 Jul 2021 01:02:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m0vxp-0000N9-2s; Wed, 07 Jul 2021 01:02:57 +0000 Received: by outflank-mailman (input) for mailman id 151786; Wed, 07 Jul 2021 01:02:55 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1m0vxn-0000N3-L7 for xen-devel@lists.xenproject.org; Wed, 07 Jul 2021 01:02:55 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 0f3ba340-debf-11eb-84d2-12813bfff9fa; Wed, 07 Jul 2021 01:02:54 +0000 (UTC) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 0f3ba340-debf-11eb-84d2-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1625619774; h=from:to:cc:subject:date:message-id:mime-version; bh=svGxtjeWU2QEtWezfIyOjtpwm4dPoekGlQ1IL+Wj9bU=; b=BPii4c7hqGnV3j/NSCXXieZydnFNX130GIYvfarPVAwycXdd3sUBc4p9 k5UNJdp9rHPmqQBWR2PsZ2vtW5DxTkjvDFNx2PQHuw6QaLY6ZBdT4/qCj IYNal86tKlIY44FB1lLRv/I5Gg3Lm7dJ7R9HFcsfYE7IfNp/IfkQ8GYvA E=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: tMcjHEATz6LTqHmgq2WktRSk6PUNfBONgubEEnisX/+O10CWhChYsR+KAYpYhUboQgQFU/KWhj hLS+fWbd1wcAV62jOpNB1vQ7BzNQo2wVH/a+3Ok4+rAfHCzdeQ0ONr428NAdTMytAYWP9DGBZt 6KQmjeVczy4qRp+jiapcxILmHFwKbufxNjKT/OXfaq4f9YLNZapG9c5Xa2xGqVK2/qC7I9dTVr IFwWh6sG4Lb8uvFILNi+FqdsTn+eu4mVE17UhOoeZEDFrFGADZBm5vkN2+mJTm+uz4Yev50P9G I2s= X-SBRS: 5.1 X-MesageID: 47700246 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-HdrOrdr: A9a23:7QK7yqNrDgS9K8BcTtejsMiBIKoaSvp037Eqv3oedfU1SL3+qy nAppQmPHPP5Ar5O0tQ/exoWpPwIk80nKQdieJ6UItKNDOW3VdAR7sC0WKN+VLd8lXFh4xg6Z s= X-IronPort-AV: E=Sophos;i="5.83,330,1616472000"; d="scan'208";a="47700246" From: Igor Druzhinin To: CC: , , , , , , , , , , Igor Druzhinin Subject: [PATCH] tools/libxc: use uint32_t for pirq in xc_domain_irq_permission Date: Wed, 7 Jul 2021 02:02:44 +0100 Message-ID: <1625619764-23537-1-git-send-email-igor.druzhinin@citrix.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1625619797743100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Igor Druzhinin Acked-by: Christian Lindig > Reviewed-by: Jan Beulich --- tools/include/xenctrl.h | 2 +- tools/libs/ctrl/xc_domain.c | 2 +- tools/ocaml/libs/xc/xenctrl_stubs.c | 2 +- xen/include/public/domctl.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/include/xenctrl.h b/tools/include/xenctrl.h index 2a7c836..8974747 100644 --- a/tools/include/xenctrl.h +++ b/tools/include/xenctrl.h @@ -1385,7 +1385,7 @@ int xc_domain_ioport_permission(xc_interface *xch, =20 int xc_domain_irq_permission(xc_interface *xch, uint32_t domid, - uint8_t pirq, + uint32_t pirq, uint8_t allow_access); =20 int xc_domain_iomem_permission(xc_interface *xch, diff --git a/tools/libs/ctrl/xc_domain.c b/tools/libs/ctrl/xc_domain.c index 7d11884..8e4ffd0 100644 --- a/tools/libs/ctrl/xc_domain.c +++ b/tools/libs/ctrl/xc_domain.c @@ -1384,7 +1384,7 @@ int xc_vcpu_setcontext(xc_interface *xch, =20 int xc_domain_irq_permission(xc_interface *xch, uint32_t domid, - uint8_t pirq, + uint32_t pirq, uint8_t allow_access) { DECLARE_DOMCTL; diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenc= trl_stubs.c index 6e4bc56..e5837e6 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -1077,7 +1077,7 @@ CAMLprim value stub_xc_domain_irq_permission(value xc= h, value domid, value pirq, value allow) { CAMLparam4(xch, domid, pirq, allow); - uint8_t c_pirq; + uint32_t c_pirq; uint8_t c_allow; int ret; =20 diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index 4dbf107..277478e 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -441,7 +441,7 @@ struct xen_domctl_setdebugging { =20 /* 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 acce= ss */ }; =20 --=20 2.7.4