From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C4E8BC27C75 for ; Thu, 13 Jun 2024 12:51:23 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.739946.1146907 (Exim 4.92) (envelope-from ) id 1sHjv6-0002X5-BT; Thu, 13 Jun 2024 12:51:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 739946.1146907; Thu, 13 Jun 2024 12:51:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sHjv6-0002Wy-8q; Thu, 13 Jun 2024 12:51:12 +0000 Received: by outflank-mailman (input) for mailman id 739946; Thu, 13 Jun 2024 12:51:11 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sHjv5-0002Wp-Np for xen-devel@lists.xenproject.org; Thu, 13 Jun 2024 12:51:11 +0000 Received: from mail187-11.suw11.mandrillapp.com (mail187-11.suw11.mandrillapp.com [198.2.187.11]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 99c18921-2983-11ef-b4bb-af5377834399; Thu, 13 Jun 2024 14:51:07 +0200 (CEST) Received: from pmta09.mandrill.prod.suw01.rsglab.com (localhost [127.0.0.1]) by mail187-11.suw11.mandrillapp.com (Mailchimp) with ESMTP id 4W0Mj537XGzLfMRBF for ; Thu, 13 Jun 2024 12:51:05 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id c2b85fac760e4aaf95af6a4eaa84fc63; Thu, 13 Jun 2024 12:51:05 +0000 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: 99c18921-2983-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1718283065; x=1718543565; bh=H4iqKVTD7LURL26EcQvbtrjH8XxZS+TosojtxE4Ee48=; h=From:Subject:To:Cc:Message-Id:References:In-Reply-To:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=c08wS/AKcz57wazOW4VwyD1EncMNtY8sgZOsJqRbVDore7HbhEyB57ZEFllCiwjyf 8pn9XGXZLMnvBJlbJK7CKPwawMqEEMUQi7UFkrCwAHVhnhWqN7uvSb6dtuGk3G6jb/ afnX9g/Behp9Hd9Ndmu6fg9zn4dEsTm03WgiD5Niupynsiw65hMFhdfZyiHtxRPkor 0UbQowr8j7/a/5yTG31pEZhcE9OI2NYb4fiyZ+KwFXAviK/kUbE/WNhe7VDLGrg4k1 9V1MMXY7kRDDbafeePHBRsQn85kHybT7Yf7qYHIerxwEbUzqI2SnglJLuz5ELbyxzq rWWisp75PW/AA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1718283065; x=1718543565; i=anthony.perard@vates.tech; bh=H4iqKVTD7LURL26EcQvbtrjH8XxZS+TosojtxE4Ee48=; h=From:Subject:To:Cc:Message-Id:References:In-Reply-To:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=RhXGyfq95LXceV67VjE3+2f+QTWRJokQf3eow1su+AZajJd7OsW2NdlFSII+c6ytz PVFhsaiOIE+TyMiLlaOGGMK4MuGZ0IaBAJ1DwcXbz8sY6M93deivd2q2au9WaoSoqM TFGDrmjGsE1c2Fx4UXNuzv75h5z38mo0l4z79OKDhpjbq5+UEt3MOxJueclDUvDLlb LsyZqM8Z+yaD5CN/fCDJ95anDG3gyBQpkJiwKCJgCaDGrzR9sBtn6KTN0W3NcqmE6I oAzkmIihS2fbIkCjXHG7log23VZuLOJ1K7XnXAPWwdkwduQrXYqmzIrQDlT9AT8v1f 7L6SaYPmUaqXQ== From: Anthony PERARD Subject: =?utf-8?Q?Re:=20[RFC=20XEN=20PATCH=20v9=205/5]=20domctl:=20Add=20XEN=5FDOMCTL=5Fgsi=5Fpermission=20to=20grant=20gsi?= X-Bm-Disclaimer: Yes X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1718283062766 To: "Chen, Jiqian" Cc: Jan Beulich , Andrew Cooper , =?utf-8?Q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , George Dunlap , Julien Grall , Stefano Stabellini , Juergen Gross , "Hildebrand, Stewart" , "Huang, Ray" , xen-devel@lists.xenproject.org, "Daniel P . Smith" Message-Id: References: <20240607081127.126593-1-Jiqian.Chen@amd.com> <20240607081127.126593-6-Jiqian.Chen@amd.com> <987f5d21-bbb5-4cdb-975b-91949e802921@suse.com> In-Reply-To: X-Native-Encoded: 1 X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.c2b85fac760e4aaf95af6a4eaa84fc63?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20240613:md Date: Thu, 13 Jun 2024 12:51:05 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On Wed, Jun 12, 2024 at 10:55:14AM +0000, Chen, Jiqian wrote: > On 2024/6/12 18:34, Jan Beulich wrote: > > On 12.06.2024 12:12, Chen, Jiqian wrote: > >> On 2024/6/11 22:39, Jan Beulich wrote: > >>> On 07.06.2024 10:11, Jiqian Chen wrote: > >>>> + r = xc_domain_gsi_permission(ctx->xch, domid, gsi, map); > >>> > >>> Looking at the hypervisor side, this will fail for PV Dom0. In which case imo > >>> you better would avoid making the call in the first place. > >> Yes, for PV dom0, the errno is EOPNOTSUPP, then it will do below xc_domain_irq_permission. > > > > Hence why call xc_domain_gsi_permission() at all on a PV Dom0? > Is there a function to distinguish that current dom0 is PV or PVH dom0 in tools/libs? That might have never been needed before, so probably not. There's libxl__domain_type() but if that works with dom0 it might return "HVM" for PVH dom0. So if xc_domain_getinfo_single() works and give the right info about dom0, libxl__domain_type() could be extended to deal with dom0 I guess. I don't know if there's a good way to find out which flavor of dom0 is running. Cheers, -- Anthony Perard | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech