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

Re: [RFC XEN PATCH 3/6] x86/pvh: shouldn't check pirq flag when map pirq in PVH


  • To: Huang Rui <ray.huang@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 14 Mar 2023 17:27:23 +0100
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Mv6JBrm4n+jwHmZLbRILtinlqYosKCYMAH49dE9ybxI=; b=j9oKr6RROnZ9f+2JeSoQV9pdgO46X8ZnpiIH+vCsjcbdMCSEZYMzQDnPH7MHRVErvwoPovQwz07Pmrj9P9Sv/AS+yQ5rF/BQwLKZEaIqxdMuSEX36oZr8Wbl/q5pqvpRqY8rj8K4+5mxtUSS+AcH7AVPMH7r15FbRYkZHvE814lL4ROu8s7BinOlp/hoRL47wl+FpsO9lt4KMjIEpjXCoeHxh++b3I73Y8r/wcNTLdwSGvscyMkvVYkxoY1NdLaaCti7PGDismuhZloBUvm5UwJayoXteAdKfH05GjQoXwBf5v9lh3W7/Qfe94AHden6qWAHfcXyRYCrQUae3slCcQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QSKsEsBnlETQ3L0B4aq7/RXzUyxgI1+bsRujWQA66pH4lpmMp6Nqibj1ygl/ihLpFPWRrpYaxlupueVDH58vuLxIlv+BA20UQf2DPiMkHgDYqQNJItPX4mBOZdEyDTt4bQdHt4xntqUFvVBESVKDKzdjN291LZ+nCJnuEvSOwH3x7t6rbPrB7Ml+gQLZTUzI5pG2CqZRrU3VEFlVJnr0ZNN0U8pmwqrOzuPr20tjywnMoVAFu7VIJXKGnyrm4KnNZTRV7ntFUSyzDdNf3MsG3NERAk5dH+eJmzyG3L1sf/vV/2ZLj3xIvBjC9IgkPWaHrkrMHgef2re6CCdV+b6mlg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Alex Deucher <alexander.deucher@xxxxxxx>, Christian König <christian.koenig@xxxxxxx>, Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx>, Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, Honglei Huang <honglei1.huang@xxxxxxx>, Julia Zhang <julia.zhang@xxxxxxx>, Chen Jiqian <Jiqian.Chen@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 14 Mar 2023 16:27:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12.03.2023 08:54, Huang Rui wrote:
> From: Chen Jiqian <Jiqian.Chen@xxxxxxx>
> 
> PVH is also hvm type domain, but PVH hasn't X86_EMU_USE_PIRQ
> flag. So, when dom0 is PVH and call PHYSDEVOP_map_pirq, it
> will fail at check has_pirq();
> 
> Signed-off-by: Chen Jiqian <Jiqian.Chen@xxxxxxx>
> Signed-off-by: Huang Rui <ray.huang@xxxxxxx>

Please see b96b50004804 ("x86: remove XENFEAT_hvm_pirqs for PVHv2 guests"),
which clearly says that these sub-ops shouldn't be used by PVH domains.
Plus if you're after just one sub-op (assuming that indeed needs making
available for a yet to be supplied reason), why ...

> --- a/xen/arch/x86/hvm/hypercall.c
> +++ b/xen/arch/x86/hvm/hypercall.c
> @@ -89,8 +89,6 @@ long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) 
> arg)
>      case PHYSDEVOP_eoi:
>      case PHYSDEVOP_irq_status_query:
>      case PHYSDEVOP_get_free_pirq:
> -        if ( !has_pirq(currd) )
> -            return -ENOSYS;
>          break;

... do you enable several more by simply dropping code altogether?

Jan



 


Rackspace

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