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

Re: [PATCH v2 14/17] xen/arm: Enable the existing x86 virtual PCI support for ARM.


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Tue, 28 Sep 2021 16:32:53 +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; bh=w/JEL8gsVihe+EMjYMhR2HrrRVt3HBZQnGRkx6R/jyw=; b=HLzOp3FMsX+FCoqblQKb3D+eKU6CZmdPKrtYIiSHDj2PKErd08QTTR8isEyePLyghouBCHKN7r/PtL2Htcuht0au6x5d5NAy9R4QjYz6NY8aVgWTppjxADj164YRNSFEKDS6+uthGtz4BdeiEEtNKyFDs42MgR0ZxOsZT+2pODl/EvUeP3JwB0gL42Zz3nASAGaQ6N/VAV/b4mqyGxaOUdAdzY6iTji4/1WOWzwedYw4hzCqrKYbYBznMlzJ/feG5iWk/+WFb25Bw5RJn72yhB09YHKjtyfJSReNO0R2PkVncadIzLIeF7Jwe27Kw00sRV5zRE577m6hMkzVzx85PQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KbQeAfIrhQBfq1gRMUAQdEkfn1AGJrOWh+sW2bF/1NC/qT3VheoviUMz+18Xi/FuRf+m2HqKJMTLITd8U7zDWMsqTkFeHSr9cMESxzsX79iSQXm2eLAwVBN5AD9RdWVM8l0ZdxSi4L3/2vKbvJQ1PngVbi3r7E+JJsI0OkDjENPx9qcpz2QPsr8H+nnv1TyPCEq1RjBLtWUWma2Hj3bg1RZd7KXYm7TPQI27jQEF+NGVMFI3jFP4QVlf14KjWIh0c+1QlzmttsdWsTw8IqXWOHThhw7EwD/9yDbThNTh3dGoNnRuHv7dxrxhp+khtNpyWJVav0ZNo9FDSrlrcreUAw==
  • 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>, Andre Przywara <Andre.Przywara@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 28 Sep 2021 16:37:08 +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: AQHXr6at03qE3GlVrUSsAw4u98X5EKuy0MOAgAbc5gA=
  • Thread-topic: [PATCH v2 14/17] xen/arm: Enable the existing x86 virtual PCI support for ARM.

Hi Jan

> On 24 Sep 2021, at 8:44 am, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 22.09.2021 13:35, Rahul Singh wrote:
>> @@ -623,7 +624,7 @@ int arch_sanitise_domain_config(struct 
>> xen_domctl_createdomain *config)
>>     unsigned int max_vcpus;
>> 
>>     /* HVM and HAP must be set. IOMMU may or may not be */
>> -    if ( (config->flags & ~XEN_DOMCTL_CDF_iommu) !=
>> +    if ( (config->flags & ~XEN_DOMCTL_CDF_iommu & ~XEN_DOMCTL_CDF_vpci) !=
>>          (XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap) )
>>     {
>>         dprintk(XENLOG_INFO, "Unsupported configuration %#x\n",
> 
> While you accept the new flag here and ...
> 
>> --- a/xen/common/domain.c
>> +++ b/xen/common/domain.c
>> @@ -483,7 +483,7 @@ static int sanitise_domain_config(struct 
>> xen_domctl_createdomain *config)
>>          ~(XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap |
>>            XEN_DOMCTL_CDF_s3_integrity | XEN_DOMCTL_CDF_oos_off |
>>            XEN_DOMCTL_CDF_xs_domain | XEN_DOMCTL_CDF_iommu |
>> -           XEN_DOMCTL_CDF_nested_virt) )
>> +           XEN_DOMCTL_CDF_nested_virt | XEN_DOMCTL_CDF_vpci) )
>>     {
>>         dprintk(XENLOG_INFO, "Unknown CDF flags %#x\n", config->flags);
>>         return -EINVAL;
> 
> ... here, you need to somehow reject it on x86, until DomU support
> there gets added (unless I have misunderstood things and you're
> aiming at enabing that support for x86 here at the same time). I
> cannot spot existing code which would take care of such a newly
> added flag.

Ok. I will reject the flag in x86 arch_sanitise_domain_config().
> 
> 
>> --- a/xen/include/asm-x86/pci.h
>> +++ b/xen/include/asm-x86/pci.h
>> @@ -6,8 +6,6 @@
>> #define CF8_ADDR_HI(cf8) (  ((cf8) & 0x0f000000) >> 16)
>> #define CF8_ENABLED(cf8) (!!((cf8) & 0x80000000))
>> 
>> -#define MMCFG_BDF(addr)  ( ((addr) & 0x0ffff000) >> 12)
> 
> While there was a reason for the padding blank after the first
> opening parentheses here, ...
> 
>> --- a/xen/include/xen/pci.h
>> +++ b/xen/include/xen/pci.h
>> @@ -41,6 +41,8 @@
>> #define PCI_SBDF3(s,b,df) \
>>     ((pci_sbdf_t){ .sbdf = (((s) & 0xffff) << 16) | PCI_BDF2(b, df) })
>> 
>> +#define MMCFG_BDF(addr)  ( ((addr) & 0x0ffff000) >> 12)
> 
> ... that blank ends up bogus here.
Ack . I will remove the extra blank in next version.

Regards,
Rahul
> 
> Jan
> 




 


Rackspace

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