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

Re: [PATCH 3/3] hvm/pirq: allow control domains usage of PHYSDEVOP_{un,}map_pirq


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 3 Mar 2022 11:59:02 +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=Y1SV8yK9o9QiN0FlhArskaKNPMQh6eQ+kGmJnF2ekOs=; b=KQWLHrErhc2vWwVVASJNcMkHjoRsVWR5D8P+NMDp7kFblzxQLlA8ZNPnXr2pGw14hQuOX23UqmnBn2svHWAAH/ieeeH5D1PCma2J0SpR7OMkQhLvL49AKdsNMBBCH5jtaIMFB5D0lV+t1831bRgvDiPW7dLjqWK+YaC2nlZWAtceUvSwkia4P9aDDzi7fg3x5HqMWXzuKVuDi3cLqYnkJiYulV9jt1nsRfcvvlV757jJQCF7Z0jk68iiZwBKW637j7nHT8sCSnWJClr9lcOnLNzLER4qoBMxDGvOwZgNAt8sXiSht8A619mlDIX1ZY/NcXMcy6PGTldOvUqW1l1h2A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZAbboif4A5vGbcNCC7+dF06L0/YXx4S1r4gIg38EWIeWcmnA6ym8082bueQDby1G0KNKfoGdT7trBRwjmKRmopsLL9bXpLNPwPyReQ/8+oiJi06FkANauvTx8Gxe0jLPHKNYAPik1xu4IR9TXJOwpYSujFLveSYCXxNu5vy0WU8GUD4c0ZBOQXXc8kkKrjPB28GkQ368gw2uaOKsQHG6FKrBpCSOSM3dppcugt3iNQ6g6niwWxK2PjXrKjrw5rrCHSW87hGSJck1oIQjEOwDh/KLlVoAjldwXn40xnbUBV1TwT8fTpnEdmlNun97ZFi7/177fmg9FmpVP476h6PPKA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Alex Olson <this.is.a0lson@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 03 Mar 2022 10:59:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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




 


Rackspace

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