From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A210DE784A4 for ; Mon, 2 Oct 2023 11:51:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.611454.951015 (Exim 4.92) (envelope-from ) id 1qnHRu-0007mE-N1; Mon, 02 Oct 2023 11:50:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 611454.951015; Mon, 02 Oct 2023 11:50:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qnHRu-0007m7-KO; Mon, 02 Oct 2023 11:50:54 +0000 Received: by outflank-mailman (input) for mailman id 611454; Mon, 02 Oct 2023 11:50:52 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qnHRs-0007lk-L5 for xen-devel@lists.xenproject.org; Mon, 02 Oct 2023 11:50:52 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id ee8e6456-6119-11ee-878e-cb3800f73035; Mon, 02 Oct 2023 13:50:51 +0200 (CEST) Received: from mail-dm6nam10lp2103.outbound.protection.outlook.com (HELO NAM10-DM6-obe.outbound.protection.outlook.com) ([104.47.58.103]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 02 Oct 2023 07:50:48 -0400 Received: from MW4PR03MB6428.namprd03.prod.outlook.com (2603:10b6:303:123::8) by BY5PR03MB5217.namprd03.prod.outlook.com (2603:10b6:a03:226::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.27; Mon, 2 Oct 2023 11:50:46 +0000 Received: from MW4PR03MB6428.namprd03.prod.outlook.com ([fe80::ddbc:172e:c4a3:ec6f]) by MW4PR03MB6428.namprd03.prod.outlook.com ([fe80::ddbc:172e:c4a3:ec6f%4]) with mapi id 15.20.6813.035; Mon, 2 Oct 2023 11:50:46 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ee8e6456-6119-11ee-878e-cb3800f73035 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1696247451; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=199Hz0Y2ZQEVr0T0it05GfSFQ/vnGwugxAeOm8Rz8AY=; b=FpFiTlTotTH6Hq55LMRciW8ti9eR6+u9psxL9NQaMJPrXrv+ql5vU6Mf KWjYYZfLV/47TrJtiC5d5HGE5UsV7XCiVZ89NO4w/ExHqCD81vAVDE4+9 mvuIFduxjseEfDYuhzcP9ilLtWFlQxVtCw0HS0SejPCklTp9HA/ABjJ6B g=; X-CSE-ConnectionGUID: fC+S5btNTa+jAJRvEe/4Rw== X-CSE-MsgGUID: n2d1DxinRc+NROyeS1fg1Q== X-IronPort-RemoteIP: 104.47.58.103 X-IronPort-MID: 124379247 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED X-ThreatScanner-Verdict: Negative IronPort-Data: A9a23:bp70cqNMxbc1TfHvrR2clsFynXyQoLVcMsEvi/4bfWQNrUp31GAHy 2QZUGnTaPuJZjb8L913ad+1p0pU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Sophos;i="6.03,194,1694750400"; d="scan'208";a="124379247" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kQDU1lx+5u2cqgTIqTWYRPeABl6XG7qiAl3wiI4ar3Us2GlURfzWW+z7nmzflzL5+In7kkOft3FEJ+CvRf7XM7X0+I6jBOrxXWbn0FQzRnqLkv464gwbnt4S1SrIkmplmqmm8hvru3xeYZ/xUc5Eq2cOBdJVCknlQl68daYJEO2M+KuO+0Eeb6sWSZAiUz1TIhaKjrJFXfUj05C+H9ryK7ROnfJkUrF5BBE1b2ai1cn4JQ11ysiqvi0VdCTpxicunZtq4iKky4MZ0Ec6VzmJj3smQn3RRJiZ5xCoC/hHA67eJN8kINzuDKlCw73fy5skpOhEMzH0ePBzNHcNUBf0OA== 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=UPIzqLrYIrscWB1q/iSJKkzlk5ksBnVAmhJpJAC7fno=; b=bc6k7X0GT1i6pY4eELQ3bJefjVr97qn3Cfwr+GBUe73nfrB2XlOeOIKbci4O5L+fhLiK7zJXbD7bCTEKT8og7tFkDCzKdE50tbVc6/harhCFNZIDHly2nPJ5p4VgbQgX1+f+upFIsqU60LaASE675JS5Y43IQlZU99pti7+BKC9wHiMoAIU1ZAaM1Tg8VKUGzMAmf1508EsV+Qc/og5fpPC+dM/HpHnPRWbIR9aDlKlnTqvIn9qtEr9UegRgMneWPLWq2WHZu3RNLgtaJ2r4B3ZbdAsalPlNFWYITvkXK7ZI9LrGjg/LQ3oPCuTzhXFjiQh06fhYklWTELCVmwd8fQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UPIzqLrYIrscWB1q/iSJKkzlk5ksBnVAmhJpJAC7fno=; b=NO7LFDq7bo0ikRrR0HYi6EyANwNtDyv33RDKYf4YQsnHe+NhMnDlfOil2IvL54hSe87+6OT5FDiFWiM8FRkP51U2hJRnWevXKusgSfK6Ag5GLk6o0gysug7yKA4740eDiPPI0NgvjE/RxrscpYMRNu/s+vWhnxrt7gnYNRuoHzE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; Date: Mon, 2 Oct 2023 13:49:25 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Stewart Hildebrand Cc: Volodymyr Babchuk , "xen-devel@lists.xenproject.org" Subject: Re: [PATCH v9 15/16] xen/arm: vpci: check guest range Message-ID: References: <20230829231912.4091958-1-volodymyr_babchuk@epam.com> <20230829231912.4091958-16-volodymyr_babchuk@epam.com> <0a1bc845-28b7-4af8-d6d9-cd5fc7bb4d74@amd.com> <8a300dad-29d5-2017-70ad-09abc2c62368@amd.com> <0d4b7115-8cc6-3b11-9a46-0f222bcb864a@amd.com> <168709e2-0a1d-a474-a9a4-c3c086b7f134@amd.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <168709e2-0a1d-a474-a9a4-c3c086b7f134@amd.com> X-ClientProxiedBy: LO4P265CA0297.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:38f::6) To MW4PR03MB6428.namprd03.prod.outlook.com (2603:10b6:303:123::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW4PR03MB6428:EE_|BY5PR03MB5217:EE_ X-MS-Office365-Filtering-Correlation-Id: e072c405-261f-4b05-908e-08dbc33dd086 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PoDl4cowZIHvvp5JvrgDGvU2gxSu4o+s6WCLooawc/+wFxp49D7zKzxDn1dhiel24JPrq5iWF7tYyqXErJNfMoj0z2e/lBzyjwp+VhIACW4e6/v9BpQRjdfM1jR83cSPA0jcneN6Q26aGw6IWBPMEsTuFEnaOk/B/hwZKPS5mjkHb5tTvHmmKQt3lQ9myZfERHLewarKmA5wcZfUincckocYYFSFXIhuNf51qiLqXRLTA/6xA0B8SjV/pseszOhqPhgjGDE1tYMH4AUKyIw8RMA4kNdwrpu5VQ2puECrHVUXyXJQZI5+ubFeMxpHwvPNCi35r5kAg7TTyTqU3n+cVLoaT4PrFuDdhIl7ScmZUM3Vq7ldBENjEfNNqKpzGohHxUSfDvojTPaDffCDZ9sqnL3EA6NoVcuEg8OxR3+rPcN7kFZAYOxVc6BaGX/wlbkd8StGRKHjY3FVfnWLuVmV8G9KUsU1bpZoMKy3G6tm/P/hq77qUwS/Lt5uJuqDTqTN2BVN3K2af6q6Hh33q2b+eC+m6rpCs9iw/GQahtLehL6fVzvprhNFrFFxoNsDqzBG X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR03MB6428.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(7916004)(396003)(366004)(136003)(39860400002)(346002)(376002)(230922051799003)(64100799003)(1800799009)(451199024)(186009)(6666004)(6506007)(53546011)(478600001)(6486002)(38100700002)(86362001)(82960400001)(2906002)(41300700001)(33716001)(83380400001)(9686003)(6512007)(26005)(85182001)(66476007)(54906003)(5660300002)(316002)(66946007)(6916009)(66556008)(8676002)(4326008)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SHF3bWdp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CvE/vXyODaRneyYcL0fL1Ib0q0fUgJ+t9TlhwYQfBe6H8HwCGibcvUyLjs9UBh4XzB4bR470AXqqujrIDJauXNi3Ei5wXE6d3+uXBEdUdFDh9uB1hzOCEaKrNcdp9EUixQeIRQ3PhpgzxpWatrRD7clkNeWS7eXXQq83Gsw0wZuMwyoGXEx8Vy5ltN6206BJ4qVpI685Ar31bL6ymYUVMkgZPMWw6aFH9MRe3hENrsH97fqIBDQhCF+u0e2csA5ZDXqUEoUg1dsngw5mOCGOYctTDjdhsQ== X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: e072c405-261f-4b05-908e-08dbc33dd086 X-MS-Exchange-CrossTenant-AuthSource: MW4PR03MB6428.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2023 11:50:46.4653 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: QoK2BxZochoU70+uI9O95WWAO+hf4U1ESeUv2I/CJDJf5fMbRtfhdwQd0HrCZPnV0/yns0jhNGQcyqNQw0TZWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR03MB5217 On Thu, Sep 28, 2023 at 02:28:11PM -0400, Stewart Hildebrand wrote: > > > On 9/28/23 04:28, Roger Pau Monné wrote: > > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > > > > On Wed, Sep 27, 2023 at 02:03:30PM -0400, Stewart Hildebrand wrote: > >> On 9/26/23 11:48, Roger Pau Monné wrote: > >>> On Tue, Sep 26, 2023 at 11:27:48AM -0400, Stewart Hildebrand wrote: > >>>> On 9/26/23 04:07, Roger Pau Monné wrote: > >>>>> On Mon, Sep 25, 2023 at 05:49:00PM -0400, Stewart Hildebrand wrote: > >>>>>> On 9/22/23 04:44, Roger Pau Monné wrote: > >>>>>>> On Tue, Aug 29, 2023 at 11:19:47PM +0000, Volodymyr Babchuk wrote: > >>>>>>>> From: Stewart Hildebrand > >>>>>>>> > >>>>>>>> Skip mapping the BAR if it is not in a valid range. > >>>>>>>> > >>>>>>>> Signed-off-by: Stewart Hildebrand > >>>>>>>> --- > >>>>>>>> xen/drivers/vpci/header.c | 9 +++++++++ > >>>>>>>> 1 file changed, 9 insertions(+) > >>>>>>>> > >>>>>>>> diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c > >>>>>>>> index 1d243eeaf9..dbabdcbed2 100644 > >>>>>>>> --- a/xen/drivers/vpci/header.c > >>>>>>>> +++ b/xen/drivers/vpci/header.c > >>>>>>>> @@ -345,6 +345,15 @@ static int modify_bars(const struct pci_dev *pdev, uint16_t cmd, bool rom_only) > >>>>>>>> bar->enabled == !!(cmd & PCI_COMMAND_MEMORY) ) > >>>>>>>> continue; > >>>>>>>> > >>>>>>>> +#ifdef CONFIG_ARM > >>>>>>>> + if ( !is_hardware_domain(pdev->domain) ) > >>>>>>>> + { > >>>>>>>> + if ( (start_guest < PFN_DOWN(GUEST_VPCI_MEM_ADDR)) || > >>>>>>>> + (end_guest >= PFN_DOWN(GUEST_VPCI_MEM_ADDR + GUEST_VPCI_MEM_SIZE)) ) > >>>>>>>> + continue; > >>>>>>>> + } > >>>>>>>> +#endif > >>>>>>> > >>>>>>> Hm, I think this should be in a hook similar to pci_check_bar() that > >>>>>>> can be implemented per-arch. > >>>>>>> > >>>>>>> IIRC at least on x86 we allow the guest to place the BARs whenever it > >>>>>>> wants, would such placement cause issues to the hypervisor on Arm? > >>>>>> > >>>>>> Hm. I wrote this patch in a hurry to make v9 of this series work on ARM. In my haste I also forgot about the prefetchable range starting at GUEST_VPCI_PREFETCH_MEM_ADDR, but that won't matter as we can probably throw this patch out. > >>>>>> > >>>>>> Now that I've had some more time to investigate, I believe the check in this patch is more or less redundant to the existing check in map_range() added in baa6ea700386 ("vpci: add permission checks to map_range()"). > >>>>>> > >>>>>> The issue is that during initialization bar->guest_addr is zeroed, and this initial value of bar->guest_addr will fail the permissions check in map_range() and crash the domain. When the guest writes a new valid BAR, the old invalid address remains in the rangeset to be mapped. If we simply remove the old invalid BAR from the rangeset, that seems to fix the issue. So something like this: > >>>>> > >>>>> It does seem to me we are missing a proper cleanup of the rangeset > >>>>> contents in some paths then. In the above paragraph you mention "the > >>>>> old invalid address remains in the rangeset to be mapped", how does it > >>>>> get in there in the first place, and why is the rangeset not emptied > >>>>> if the mapping failed? > >>>> > >>>> Back in ("vpci/header: handle p2m range sets per BAR") I added a v->domain == pdev->domain check near the top of vpci_process_pending() as you appropriately suggested. > >>>> > >>>> + if ( v->domain != pdev->domain ) > >>>> + { > >>>> + read_unlock(&v->domain->pci_lock); > >>>> + return false; > >>>> + } > >>>> > >>>> I have also reverted this patch ("xen/arm: vpci: check guest range"). > >>>> > >>>> The sequence of events leading to the old value remaining in the rangeset are: > >>>> > >>>> # xl pci-assignable-add 01:00.0 > >>>> drivers/vpci/vpci.c:vpci_deassign_device() > >>>> deassign 0000:01:00.0 from d0 > >>>> # grep pci domu.cfg > >>>> pci = [ "01:00.0" ] > >>>> # xl create domu.cfg > >>>> drivers/vpci/vpci.c:vpci_deassign_device() > >>>> deassign 0000:01:00.0 from d[IO] > >>>> drivers/vpci/vpci.c:vpci_assign_device() > >>>> assign 0000:01:00.0 to d1 > >>>> bar->guest_addr is initialized to zero because of the line: pdev->vpci = xzalloc(struct vpci); > >>>> drivers/vpci/header.c:init_bars() > >>>> drivers/vpci/header.c:modify_bars() > >>> > >>> I think I've commented this on another patch, but why is the device > >>> added with memory decoding enabled? I would expect the FLR performed > >>> before assigning would leave the device with memory decoding disabled? > >> > >> It seems the device is indeed being assigned to the domU with memory decoding enabled, but I'm not entirely sure why. The device I'm testing with doesn't support FLR, but it does support pm bus reset: > >> # cat /sys/bus/pci/devices/0000\:01\:00.0/reset_method > >> pm bus > >> > >> As I understand it, libxl__device_pci_reset() should still be able to issue a reset in this case. > > > > Maybe pciback is somehow restoring part of the previous state? I > > have no insight in what state we expect the device to be handled by > > pciback, but this needs investigation in order to know what to expect. > > Yep, during "xl pci-assignable-add ..." pciback resets the device and restores the state, including whether memory decoding is enabled. > > drivers/xen/xen-pciback/pci_stub.c:pcistub_init_device(): > > /* We need the device active to save the state. */ > dev_dbg(&dev->dev, "save state of device\n"); > pci_save_state(dev); > dev_data->pci_saved_state = pci_store_saved_state(dev); > if (!dev_data->pci_saved_state) > dev_err(&dev->dev, "Could not store PCI conf saved state!\n"); > else { > dev_dbg(&dev->dev, "resetting (FLR, D3, etc) the device\n"); > __pci_reset_function_locked(dev); > pci_restore_state(dev); > } > /* Now disable the device (this also ensures some private device > * data is setup before we export) > */ > dev_dbg(&dev->dev, "reset device\n"); > xen_pcibk_reset_device(dev); > > That last function, xen_pcibk_reset_device(), clears the bus master enable bit in the command register for devices with PCI_HEADER_TYPE_NORMAL (not a reset contrary to the function name). > > xl create should reset the device again, but, similarly, this also seems to restore the state. > > > Can you paste the full contents of the command register for this > > device? > Start of day (PCIe controller and bridge initialized, no device BARs or anything have been programmed yet): 0x0000 > After dom0 boot, device is in use: 0x0006 > After pci-assignable-add: 0x0002 > After echo 1 > /sys/bus/pci/devices/0000\:01\:00.0/reset: 0x0002 > After xl create, domU booted: 0x0006 > > Should mapping bars should be conditional on PCI_COMMAND_MASTER, not PCI_COMMAND_MEMORY? E.g.: NO, I don't think so, as then Xen state would get out of sync with the hardware state. I think just disabling memory and IO decoding at init_bars() for devices assigned to domUs should be fine for the time being. Thanks, Roger.