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

Re: [PATCH v3 10/17] xen/arm: Add cmdline boot option "pci-passthrough = <boolean>"


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Fri, 1 Oct 2021 10:55:59 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PMC8C8S3srz1acfz0PVOTwhW7CYkqeFUHKm0A5iBjyc=; b=cMJ/4X+j/fTewmAOQtXoqVQIBnH2oCl7Tmp8fQrD1P0CIXaDMuy6KG4jzb2URcf9ICDj3TcQ2AZdrwaCLkE8jL4AlMs8OWSEnrxtsOzDqyPnPKortw4m7Gmmbint8aMsbQCh30viUCURByccpAzDRxjkn5g+tLrlPyI/JM2GnISUv6/K+njHQO2LbV8azTINtBH6hsIS3jyVkSmNqqGPbgJFb7GRuRoL91Q252VNqLh22Qj0ggOiE9lfRl6CNXhXcS2/Ru74vZ3n0rUWLYjc5T2v2Ym0ICsI5FEeZEp9zKNvtczwrVcABlakzDqG+Ex22vDJEaER1Nwej+HmUCiW0g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cVJARB+lxiIQ+ucnvTjhWzY3HCrpGH4mApLN1sw0v4x8/VWuKtZKuq5bmXV5euWehgyd1b/mpGsU0Gcy+n8JCHt+o/7AoW+kbrNQ3KO4zBG1acZyhsxFDfgcLlT3N0vFg1w5T3k5FBTlGwlPirEkJNKyQI/uNVvwB1SinVmjaQ3O3QOPcE/P7LXod4oWIHJXLQfI3Sbk1GuQ8KrHwNEt/X0szYIjq9oabffjvbuekbGlsZYLMv98UISFc7UpjKUuhj9piqjBLVS/fDZ2PfgqFN+lUvu3gBYdwlOpgGc2+tw+aC5IccRO6VpzHEKvYUaQuUIyKBpvRT7kzadbyYqG0A==
  • 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>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 01 Oct 2021 10:56:38 +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: AQHXtJXG2o5Yt51spkWvVbiV4Q7GQKu8rowAgAFOHAA=
  • Thread-topic: [PATCH v3 10/17] xen/arm: Add cmdline boot option "pci-passthrough = <boolean>"

Hi Jan,

> On 30 Sep 2021, at 4:00 pm, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 28.09.2021 20:18, Rahul Singh wrote:
>> @@ -62,8 +63,21 @@ static int __init acpi_pci_init(void)
>> }
>> #endif
>> 
>> +/*
>> + * By default pci passthrough is disabled
>> + */
> 
> Nit: This is a single line comment.
Ack.
> 
>> +bool __read_mostly pci_passthrough_enabled = false;
> 
> Nit: Unnecessary initializer.

Ack. 
> 
>> --- a/xen/common/physdev.c
>> +++ b/xen/common/physdev.c
>> @@ -19,6 +19,9 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) 
>> arg)
>>         struct pci_dev_info pdev_info;
>>         nodeid_t node;
>> 
>> +        if ( !is_pci_passthrough_enabled() )
>> +            return -ENOSYS;
> 
> Here and ...
> 
>> @@ -54,6 +57,9 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) 
>> arg)
>>     case PHYSDEVOP_pci_device_remove: {
>>         struct physdev_pci_device dev;
>> 
>> +        if ( !is_pci_passthrough_enabled() )
>> +            return -ENOSYS;
> 
> ... here -EOPNOTSUPP (or any other suitable value, which -ENOSYS is not
> from all I can tell) please.

I checked all the possible errors and came to the conclusion that
 -EOPNOTSUPP is the right choice here.

> 
>> --- a/xen/include/asm-x86/pci.h
>> +++ b/xen/include/asm-x86/pci.h
>> @@ -32,4 +32,12 @@ bool_t pci_ro_mmcfg_decode(unsigned long mfn, unsigned 
>> int *seg,
>> extern int pci_mmcfg_config_num;
>> extern struct acpi_mcfg_allocation *pci_mmcfg_config;
>> 
>> +/*
>> + * Unlike ARM, PCI passthrough is always enabled for x86.
>> + */
> 
> Nit: This again is a single line comment.

Ack.

Regards,
Rahul
> 
> Jan
> 




 


Rackspace

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