On 03.03.2022 11:45, Andrew Cooper wrote:
> On 03/03/2022 10:30, Roger Pau Monne wrote:
>> --- a/xen/arch/x86/hvm/hypercall.c
>> +++ b/xen/arch/x86/hvm/hypercall.c
>> @@ -87,6 +87,13 @@ static long hvm_physdev_op(int cmd, 
>> XEN_GUEST_HANDLE_PARAM(void) arg)
>>      {
>>      case PHYSDEVOP_map_pirq:
>>      case PHYSDEVOP_unmap_pirq:
>> +        /*
>> +         * Control domain (and domains controlling others) need to use
>> +         * PHYSDEVOP_{un,}map_pirq in order to setup interrupts for 
>> passthrough
>> +         * devices on behalf of other guests.
>> +         */
>> +        if ( is_control_domain(currd) || currd->target )
>> +            break;
> 
> Hmm.  In a split control/hardware domain model, then qemu is in the
> hardware domain rather than the control domain.

Interesting. I would have expected it to be the other way around, with
qemu for domains with pass-through devices living in a stubdom.

Jan

>  I suspect this wants
> extending with || is_hardware_domain(currd).
> 
> Also, the sentence about later safety checks really ought to be in this
> source comment too.
> 
> ~Andrew


Reply via email to