[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: Rahul Singh <rahul.singh@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Thu, 30 Sep 2021 17:00:08 +0200
- 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; bh=Daebu7f1lPHNMtBuyqaM6U+dABWfR56uw/7u819YTzI=; b=XVh2xZLiGYAr7pttPJXQ01ASAHzHMsKi2qngs8yxQ84ZKLBV40DEHm76xTR2XoyolJEegiSMxkjlOzok+JZwl8oAMBiu1k7X1QxLyxzgc7SoeRiO4Pil/UrVMXCeG2WNC34KIODe5+qA459BYcq54lPcVCR3B926cE3/mWC6Z9ws1nlcjQxmn3Zz+/K/AGIY+QxaIKJWu7FptJoDAYLgzvM02OGJAywsQDH+0FuI3oiBcaftp6ZyvZ+wY/WScxgvQGAg+ZWQWCOdXK7oAiXZmwgpLAiV6Zq81wrFE5CdsEyMwFFGgdmv2S7s7XYeNxTQrrl8Rx9MhbzL9CVg+e/Ffg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q1C191YB2oUUzayy8aN88Ww275t/hl+vldKdITU0K3+8q8fYaNql6Rb5/u5MZALZg7qvSO8hJpfYmPoHzirj/yYhP61ntJf/z6bU0/LAi9xUXAaRQpUipKr3ioCxraUkDsvB18QNftkkB1cGkAFJosY+F+2IagPIoLs47dKfN6mvwNKSpqtezXoB6NTLfnz6yzU/HasGwLgT7ffHQf0+ZQkyeySaDDEHPpofsmZOyptKx87HOnl1469RlYeAmQabWL7D36XLPiejWfmtv9tRUISq7OwQAQoq+aScrIp008xfmVXdLX4MQhVnDMiR0+Ywo+Qg5Jrs1i0l1QMHp2Lizw==
- Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
- Cc: bertrand.marquis@xxxxxxx, 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
- Delivery-date: Thu, 30 Sep 2021 15:00:23 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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.
> +bool __read_mostly pci_passthrough_enabled = false;
Nit: Unnecessary initializer.
> --- 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.
> --- 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.
Jan
|