On 12.03.2023 08:54, Huang Rui wrote:
> From: Chen Jiqian <jiqian.c...@amd.com>
> 
> 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.c...@amd.com>
> Signed-off-by: Huang Rui <ray.hu...@amd.com>

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

Reply via email to