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

[PATCH v5] x86/PVH: permit more physdevop-s to be used by Dom0


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 3 Dec 2021 11:28:39 +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=zQPfrq5PnLPIcrr5GCqLB0gNS8JjF4R/bwJtL4gdSxc=; b=Vjc0dcz3HyuKbGmu/tlby0RuLXfDVMO6kRqRhfIhigxJbTbkOTwAXhY5sawN74mZj8zdeTTN0Ct0ksPkOICCdNWsyCHQ7bhBkwl0CVphr2Xx4pd93tpzvBjeHUvpG1XzLyvaufScNSqYIV70hKQQ6Kaz4y0to3ndAdk8I7BsCj87j9JxTmJj67zhqWRXV7AKvKYaqwZD502N6fmCpVciLlAzBkT9ND1xFxPfcc+1Odr5+0m/oKhfR/vEzE9zNz6lNUCqNV/yE5aUlJpo+0dcb+IDeh7PG0OB4ABV+ciUlRo6rrqlLtNfh7liGprnsC/JxtWiEQ5t9sfdFJ6lJIER7g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gE9jq2vvdl7F6GK5ulA56fuPSNxAuVbqdu/jP7NHQ173fH/5GWZQUf2pCd0zYa2TowfBlMNpEUiDvn/USv/zDIqGow3ppDtKw5lukpltDCYK7zi4M4yVvD8uPSV5V6oethEO1OstPBxr0f62awO4AbYvQeWx1z0pwSCkHOdAStjvwxaX+3/4O/ddUU2d9pvGdhqSyILB1L3/1OJ8FPM0GtSYN8ZgZsnJ4SHn3lQEi6YkPcmCKBmf1jt3usvWi+12SyZZ/ZG+vOjcexMXq3Gr6QWxIGGbxgokf784fMFDjQHj9fbWhQLx5KmSl9wyu708yBzX785dbkChJ9gRG/LM+Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 03 Dec 2021 10:28:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Certain notifications of Dom0 to Xen are independent of the mode Dom0 is
running in. Permit further PCI related ones (only their modern forms).
Also include the USB2 debug port operation at this occasion. While
largely relevant for the latter, drop the has_vpci() part of the
conditional as redundant with is_hardware_domain(): There's no PVH Dom0
without vPCI.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v5: For now leave out PHYSDEVOP_{prepare,release}_msix and
    PHYSDEVOP_restore_msi_ext. Drop has_vpci() part of the conditional.
v3: New.

--- a/xen/arch/x86/hvm/hypercall.c
+++ b/xen/arch/x86/hvm/hypercall.c
@@ -94,7 +94,10 @@ static long hvm_physdev_op(int cmd, XEN_
         break;
 
     case PHYSDEVOP_pci_mmcfg_reserved:
-        if ( !has_vpci(currd) || !is_hardware_domain(currd) )
+    case PHYSDEVOP_pci_device_add:
+    case PHYSDEVOP_pci_device_remove:
+    case PHYSDEVOP_dbgp_op:
+        if ( !is_hardware_domain(currd) )
             return -ENOSYS;
         break;
 




 


Rackspace

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