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

Re: [PATCH v1 4/4] xen/pci: solve compilation error when memory paging is not enabled.


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Wed, 28 Oct 2020 15:13:46 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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-SenderADCheck; bh=JN7GV8+obqNoRFpwaosnR0yQ0WMiGYzgwL+NGN0JVCE=; b=YC2leGcRVcGeBL20RN29xRaqHCXSASgqUzWbPvhRT1fc7QEXNPSz07VYMmhdi+eR1INtW96SExvREg5Do7yuxWDSSiG4vuELLiclC37B+v6Du4rWRWoOKhc+0ijl7ASbFjoz0yEYyXOZcfcnC42B0bNLxk8kKHgp4r2GAuxjoeOI1ZXf44lHc7+en3+lmC8OaTvveRd3l244Gn7hpXDKyeck48635xc21Vv9lRbFiVnGFpjB9MqD6GlZOFxN6uI0M87IHm5J3Fp960Srhzl92jFnfWIw5NeYsDOvNUcR5fWSUIjYy5Lf12wrZCnjnIMBs1Yw839YoUCk+S/ip/4y8A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MMS5/WWg6swfl0pzkmRA4F6qBFIDiopfBZEDXM0bkKg7aNLqJcd+oD5KalFIl9lqCidXJzXXnHJdYGfQ89FGyr0zQsBJ+QLPYkqCGztixp/cXZBy3o/Jmmcl42XykEDy74Ku93YD5Q/F0hZHwMsK3jdHEB4pP6MoQwL3Qs003gFdTDb8vcU6tC+RJ3hJVI+tNsZLsss+AQurm1K20McB5jDj8zTT+SKXyXPF8usH2fHKniq0Y5AsRyoy7Kh99s6GABhQO0ADi4qpdFc25DdEpSb6HX8h/mbBJncEGrJ9DIv3tPdmjcxpVeTr8WCxEEC7/OHRLTiH1xM37mq/s0YGCA==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 28 Oct 2020 15:14:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWq7wn1E1TPrUt3EyifJVqFrVmIams60gAgAA3GIA=
  • Thread-topic: [PATCH v1 4/4] xen/pci: solve compilation error when memory paging is not enabled.

Hello Jan,

> On 28 Oct 2020, at 11:56 am, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 26.10.2020 18:17, Rahul Singh wrote:
>> --- a/xen/drivers/passthrough/pci.c
>> +++ b/xen/drivers/passthrough/pci.c
>> @@ -1419,13 +1419,15 @@ static int assign_device(struct domain *d, u16 seg, 
>> u8 bus, u8 devfn, u32 flag)
>>     if ( !is_iommu_enabled(d) )
>>         return 0;
>> 
>> -    /* Prevent device assign if mem paging or mem sharing have been 
>> +#if defined(CONFIG_HAS_MEM_PAGING) || defined(CONFIG_MEM_SHARING)
>> +    /* Prevent device assign if mem paging or mem sharing have been
>>      * enabled for this domain */
>>     if ( d != dom_io &&
>>          unlikely(mem_sharing_enabled(d) ||
>>                   vm_event_check_ring(d->vm_event_paging) ||
>>                   p2m_get_hostp2m(d)->global_logdirty) )
>>         return -EXDEV;
>> +#endif
> 
> Besides this also disabling mem-sharing and log-dirty related
> logic, I don't think the change is correct: Each item being
> checked needs individually disabling depending on its associated
> CONFIG_*. For this, perhaps you want to introduce something
> like mem_paging_enabled(d), to avoid the need for #ifdef here?
> 

Ok I will fix that in next version. 

> Jan

Regards,
Rahul




 


Rackspace

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