Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3728252pxb; Mon, 27 Sep 2021 00:53:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzG0VOtq86wkVGXr9tTuqoltDXQrwAQVyxWhKchgsWvqcjCELRGCHJ2lBuqknh9N9dKD0Jz X-Received: by 2002:a17:906:25d7:: with SMTP id n23mr26279031ejb.322.1632729203133; Mon, 27 Sep 2021 00:53:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1632729203; cv=pass; d=google.com; s=arc-20160816; b=SmZe03tnLDYBQE5pJUuzrpNrqbehiV7r8No2BTAIw89bH+TlhR1RF2gQO7cJOB0678 5O0yj9mGOvKvHZIPtckoQjIItO0PiOcCDPspBkxjLGrj8Cq4TNNJgOSxHk7eISKAfrH7 e17KRlZIVu2OzUnsqNvPS8xHFplaou8nEzWBLCXvYMhpMnDmB50bEq4Go6a0gZVMaaWu ahu+0RMW129X9z3adlCPTpMmqiANgIoXA4m7UWQg2G70vGHK+Bl/bD4y9EZd/ne4oNQ/ KgCXyZwwLtxobmyGW7LBSHoXpbb9tTug6lfLvULAVmyjaKIcOsq1r+afMk9mwUwIYo67 yQqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=4rwhkrQJ9kLkgjnOKQPT+JHOelIXQyjB/Af+cIBoY/g=; b=Inzdxe2iHWgZe5rhwXVeIHsWYB8nZOew49CXGtbmy8IHyR3VP7K49Y0V8QP2Oa5avO yAX+s2v85rR7EnpYWr1HCwAUp8nPazrc3DsKKEMZdOg1cH/WCfZOgxeELDMAtXzCvCh9 QGofdLaFGf3432rCRxdYApbx61JwqeUBw/D2kKaVj6JCRE7hPY5Dk5T/gKA0NJKICF+S Cnx8sxcQbkKooLkM5biDaESkA5KLKj2eqfTh+B6bZmlNFNdAgWQpuGBx1f1dx/ZqGCmq 5e6N/o680g3ig0q8+smlCzHUKs0IAJNWujt1wX8EdrWqU5KQ8j7lhubnVY1PwLjBfAsg TxGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b=ShR6AMct; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 9si16126082ejy.65.2021.09.27.00.52.59; Mon, 27 Sep 2021 00:53:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b=ShR6AMct; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233300AbhI0Huq (ORCPT + 99 others); Mon, 27 Sep 2021 03:50:46 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:24223 "EHLO de-smtp-delivery-102.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233349AbhI0Huf (ORCPT ); Mon, 27 Sep 2021 03:50:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1632728937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4rwhkrQJ9kLkgjnOKQPT+JHOelIXQyjB/Af+cIBoY/g=; b=ShR6AMct/APX/jPoBSwYpkF5v29tUMphPLWFtXfX/e92OSXJM/GiggA7U58Dl50A4L7fAm yTrRvEBHou6Aae9B/oc1zpvhbaxU72p606E3fNkpmkzKxuhgVPtJ3dS0rlrnLpphC7dZi/ /sd2u50bz2xS/zrRAWm9tRDL1I9dbvM= Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-he1eur02lp2055.outbound.protection.outlook.com [104.47.5.55]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-25-kKUSX5cKN3mZZjaxpD4jzA-2; Mon, 27 Sep 2021 09:48:56 +0200 X-MC-Unique: kKUSX5cKN3mZZjaxpD4jzA-2 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kHi0XFL68jt+EhgIJVb+oysbP6DiqEkr59EOnu7SnCO48cWiGGoDqrGp5yXhr6ORc3Zgpf4DxSjDO+is6tnXbeUuM7+Wb8zMlTeEzKmDajF/Ss3KY30bgkwopQSjQXJiBa9UeHuFOX/J1YeLvaxronfDjfkwdLtlrR+TsU+fTL9/Cw4e23VFxpUoew9pqUROPAPdRm7DByKSD/LQPc9nxeR87ZDKrwUuDaZsj08hNaKw2HAQkKhw2Zf6jcnt9YQ3znMofxFP3VNJCYHjpukGanvnESkbQ5h8vTDV2R+SW/cLdOn56GxV54rSIxyfdtjjBMgLNSENvHmvUBKSpBJWnw== 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=4rwhkrQJ9kLkgjnOKQPT+JHOelIXQyjB/Af+cIBoY/g=; b=Ui9Mpp6RIXpW81lQegAykOes9pw0Iiqz51xWzponhwScX49iPEN8C/1H9+q/JzHowXYG16X7+pXEX2MnsAxuhI6KTy6ekbVQVEmf7FSg87lDTHEmFitCorW9973C2T3SIFGZxHwEHnzUZGSWVtoJ4PDQPrRtq95w4g8Vx49uBMQOSSEUcuY8YSekKRiuMGMyRWSTqhMb2uV9mfMoUmNht/R2S1ksQIxfZriMI2FEFWW/tikIqAbtjIYZEJ5OhGdJsRZHITSnDx2mBuJJS+BMsC1P3VVsS62gJGh4x7N0SbpwZZAhw1qDyW1iHKWgVNE2xJSvChvyAI5jqoxmihulBA== 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 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=suse.com; Received: from VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) by VI1PR04MB7024.eurprd04.prod.outlook.com (2603:10a6:800:124::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.15; Mon, 27 Sep 2021 07:48:52 +0000 Received: from VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b]) by VI1PR04MB5600.eurprd04.prod.outlook.com ([fe80::4d37:ec64:4e90:b16b%7]) with mapi id 15.20.4544.021; Mon, 27 Sep 2021 07:48:52 +0000 Subject: Re: [PATCH v4 1/2] xen-pciback: prepare for the split for stub and PV To: Oleksandr Andrushchenko , Oleksandr Andrushchenko Cc: "boris.ostrovsky@oracle.com" , "jgross@suse.com" , "julien@xen.org" , "sstabellini@kernel.org" , "xen-devel@lists.xenproject.org" , "linux-kernel@vger.kernel.org" References: <20210927065822.350973-1-andr2000@gmail.com> From: Jan Beulich Message-ID: <750b9449-c986-025d-9b68-dd0f6967b083@suse.com> Date: Mon, 27 Sep 2021 09:48:53 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0075.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::10) To VI1PR04MB5600.eurprd04.prod.outlook.com (2603:10a6:803:e7::16) MIME-Version: 1.0 Received: from [10.156.60.236] (37.24.206.209) by FR0P281CA0075.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1e::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.10 via Frontend Transport; Mon, 27 Sep 2021 07:48:51 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9c2da389-15c7-47f3-0484-08d9818b3fe9 X-MS-TrafficTypeDiagnostic: VI1PR04MB7024: X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: orU9aeimQKbvP0ORGrN6x4BJ6DTvZlYYG2R3E+Uht1UAXYYeZKik08+kjapYQ/BUQ0D1EEzLws//aqmpK/cbDnHL30h7h65Mh8GmihE50J7twetG8m3U0r6D1vkYKYPXXTcfwhRfvmcgv353abf4NJvugQHmE7AkCjQhn9mEaQNfZ1BQYwPpcvN+yJsD9c1MSuP5KrTyicLaeZ+s13SqxWAuyjfrqTRrGtJAGGsKn2lf/yJ0L8pC6jaJKO9BFjV/g28/6D5M1J1RkNA4QM+QSeRgOTrC+yvJyJ+86cERJMAf32zcQKHgs+iYDPbPYr73AkcI+rOaYaxi0pKOd3LM1vuafObymshJbWj4/dmz9iZ1JWBxxn6UQmo2mel/5g0FQw/Ay5AH2XWLWqmeUkexSVOSeov3rgkB6t0TNkkNlpnn1yj48AED8a+/FP4OkmzJYhTrSEKg9+yPhXT2WwVD/nWNzxbSb6FoNTVXZKWcIoB5XofSWIBSFcGQwQ7DMsxbu6XhwzhHnpsEpNZpGQyAjgqlbkPH3k0+SKFqT2Bh9i8DQAH9ExsV3j5QesqSHTJhL0meOtw8LoBubKDsV7c4CPa01eSPtamvCOQafzXv/gdaxj7unuVngVRup4iyGeSCWSG3udJMSyV4JTqQwSjCUMNeT32mxSIGYa7FI0Joz1cK0mmPn3gq4p+75/SCSlIHkJbvAg1j8QEOrz+e9yTIC4pfjNFVzVyh2ALm/w4Xwy4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5600.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(36756003)(508600001)(316002)(16576012)(956004)(26005)(2616005)(86362001)(6486002)(186003)(66556008)(66476007)(8676002)(4326008)(31696002)(66946007)(53546011)(31686004)(2906002)(8936002)(83380400001)(5660300002)(54906003)(38100700002)(110136005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?czVoMkpiM0NUTlVqODRjWHBhOXpRN3MycENwMU9ZeFBra25BcC9pU1FOSnl1?= =?utf-8?B?QXNQeDZHbUxScFQwTmZHcGJrZFRuaEVSZmZvVFg2N256cTVHVncrMlhhd29p?= =?utf-8?B?cmh2bGRxaHdQcWJ1UTA0QmVNMHZkUW5EaHBBU0ZTdmpYc0RZa2lRV21YRUhG?= =?utf-8?B?Q2JmcVVFaDAvSzQ5L2JRRkthcWM5bENEWkt0bmczdGxiZGFsenlXTStEZUZy?= =?utf-8?B?cE1BZzJrb0xmR1YzRmxMQ0k2RklGWGxpSVR2dU9QWGQwMytiV1REc3JGUzNo?= =?utf-8?B?d3VsTkt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8?B?VzhVdHEwRUhabGVhUW5PSEJGYXp3bkgzRmd5L1htdUdKTThtSzR4UWlKVWJZ?= =?utf-8?B?aUk0YjFhZEZsRnF5ZkV6UWs2R1NTejlmejlKWkN4NmhlRzBDZ2FOMGVkVWxo?= =?utf-8?B?TGJNMlR3dzBKdkx3TnBXY3FWVS9LY3c5WEFMS3gyWWYwNnJTSWxnVWwzNDdo?= =?utf-8?B?c3dxSXdwRk1abXNYbUczMXdkM2FDK3lMa0U2QVRyUjEyTktnTWdPRzZReWNV?= =?utf-8?B?a1VnWWdLeG9KSDBSd29aTHFNaVk0b2tmMTUzenBpNkx4OVZMdlBOSEZuTzNP?= =?utf-8?B?bndTWnMwS00zbnFOWjcvNW14UVJsSHhUTC81RWxrc0l0M21CK0cwZS81OElh?= =?utf-8?B?dVdnci8zTDlGVzJka1pMOCtXb0NkS0pVTjY5aTl6T3Q1a0JWY0ZiV2huek5m?= =?utf-8?B?Z00zMDRvQ0NPeXMxT2ZOVERpZUFsSzdnRGV3YSsxY1lic0JZWkVVYWpoOEFT?= =?utf-8?B?bS9hUUZPSHp4OWJ3dW5ENEp5V2ZNVEhSQ3N3R05jWWNGWUx4T1FsdjZnSlow?= =?utf-8?Q?EKWNPoY/xEJEs/k5iHplfnSdXoNG/d/UX6Ux6b0?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c2da389-15c7-47f3-0484-08d9818b3fe9 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5600.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2021 07:48:52.3338 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HuPWozKGCjYH1uF+sFOYQCrcCyvu3rNSEKI9cIt+99T+ZGtl4v7dPPnrFFMhkPXqYGb2cFuY3mDZe4RSzQ7MPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB7024 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27.09.2021 09:35, Oleksandr Andrushchenko wrote: > > On 27.09.21 10:26, Jan Beulich wrote: >> On 27.09.2021 08:58, Oleksandr Andrushchenko wrote: >>> From: Oleksandr Andrushchenko >>> >>> Currently PCI backend implements multiple functionalities at a time. >>> To name a few: >>> 1. It is used as a database for assignable PCI devices, e.g. xl >>> pci-assignable-{add|remove|list} manipulates that list. So, whenever >>> the toolstack needs to know which PCI devices can be passed through >>> it reads that from the relevant sysfs entries of the pciback. >>> 2. It is used to hold the unbound PCI devices list, e.g. when passing >>> through a PCI device it needs to be unbound from the relevant device >>> driver and bound to pciback (strictly speaking it is not required >>> that the device is bound to pciback, but pciback is again used as a >>> database of the passed through PCI devices, so we can re-bind the >>> devices back to their original drivers when guest domain shuts down) >>> 3. Device reset for the devices being passed through >>> 4. Para-virtualised use-cases support >>> >>> The para-virtualised part of the driver is not always needed as some >>> architectures, e.g. Arm or x86 PVH Dom0, are not using backend-frontend >>> model for PCI device passthrough. For such use-cases make the very >>> first step in splitting the xen-pciback driver into two parts: Xen >>> PCI stub and PCI PV backend drivers. >>> >>> Signed-off-by: Oleksandr Andrushchenko >>> >>> --- >>> Changes since v3: >>> - Move CONFIG_XEN_PCIDEV_STUB to the second patch >> I'm afraid this wasn't fully done: >> >>> --- a/drivers/xen/xen-pciback/Makefile >>> +++ b/drivers/xen/xen-pciback/Makefile >>> @@ -1,5 +1,6 @@ >>> # SPDX-License-Identifier: GPL-2.0 >>> obj-$(CONFIG_XEN_PCIDEV_BACKEND) += xen-pciback.o >>> +obj-$(CONFIG_XEN_PCIDEV_STUB) += xen-pciback.o >> While benign when added here, this addition still doesn't seem to >> belong here. > > My bad. So, it seems without CONFIG_XEN_PCIDEV_STUB the change seems > > to be non-functional. With CONFIG_XEN_PCIDEV_STUB we fail to build on 32-bit > > architectures... > > What would be the preference here? Stefano suggested that we still define > > CONFIG_XEN_PCIDEV_STUB, but in disabled state, e.g. we add tristate to it > > in the second patch > > Another option is just to squash the two patches. I'd suggest to do so, but I'm not the maintainer of this code. Jan