Skip to contentSkip to conversation

x86/PVH: permit more physdevop-s to be used by Dom0

PATCH In review Jan Beulich 2 participants 2 messages Dec 3, 2021 – Dec 14, 2021

lore
Share & tools
lore
#0 lore raw

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

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.

---
v5: For now leave out PHYSDEVOP_{prepare,release}_msix and
PHYSDEVOP_restore_msi_ext. Drop has_vpci() part of the conditional.
v3: New.

xen/arch/x86/hvm/hypercall.c +4 -1
@@ -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;
 
Reviewed-by on v5 1/1
#1 lore raw
Quoted 8 lines · Jan Beulich

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.

Thanks, Roger.