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

RE: [PATCH for-4.17 v3 2/2] vpci: refuse BAR writes only if the BAR is mapped


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Fri, 28 Oct 2022 02:56:35 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • 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=2; 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=49Yd57NvxfUThgErfcmRemkq9fQUMEBKdQumhm4wPjI=; b=deBqM6jSX5DUSeMJmGkZ6eW9awSjeRqSxTUnei2tig5vz4zcMuLwL0R3aLPDPPWKDcX8b3ARQ0qprjEOIJi6tRP4FSNsORGCxBPwJ/UIR9fgnQt+Qklj6hv5csq+Blos50AggTOwlTRjqfzU7OnFYJc0n557SXykbNxsXwj3QU+vYUCnzco01klfDiat0uuRAfjP4+kJgng9AkMm7gCzQODfpVQ8tp//j4wiybsWowvVL7IMDj+9HSZDTS3ePchU7elz3cLHlbryfrztObphT1saGis9TouU/TtuS3VLHv+3tX/LRWmWh5NKGeYcZFqqP6zmfLRe0V/zE/PMl9pxNw==
  • 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=49Yd57NvxfUThgErfcmRemkq9fQUMEBKdQumhm4wPjI=; b=IBCOLglb6z6RBLICijGdu9dYZoWiT6wwKeBzv4LWSwpfZmfP555IlwT/e5xig6VmkcfFVg+YRSfCUXQ6jTAAINyPU/zMVFW0T9/cfqwVsUpUoL98hLn6t3dZi0PQWXh5rOGcvbMOzRvqYfQYCd+j2msO3lPLNEcG52ZhzBIvZgXgUANT54NxfZ07Pv9kzZfOzy/ONz1BCFnxkPbIqLGP4gGmm/u5LhT3B2oE6NJiZ0Uc2eT7Bstx/WtPC7juVp23d2qDbyLO23YIeUDsL00eWD6bKb2PGd04mWxgH2rghjaeeOV79nR4uuxyK+HnCPcqbYn+0xgRCiOA9ayxbN8Uwg==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Rqloq1PJzEKfnb/jInNuDZDCiD37L+IzFKwstL1qzt/4f2AT3GMW1rk96Nh7mP7/sE3ABmuNgV0yZ2x26oHcYBB2OL2Og9NEOryZDce+8mmMT+aUKCmmcff58SnKUIiGv+HdHZXc5fJjECni6a6UCzaf5MgUxx/xmrJ0XuqXriN6KzEei9HJ6A/MaLeRVlzfGf87p9IcaqfqllH4XhZWP09Iipl54GN9zZTRSK3Nk1j/bBnTEylaYvwzNZxw98Gppfcri+Aher1l9bVSq75km/XVXq8GXcOOISs0wPEL6sIoeulDvFfrZ2c4wo/id/vtEo0Hyc6oIIrGijgpUf3BRw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lLHeBA0QCvDHnyMYfZHAL4yUhQRzjYmSuF/iSkhR61HSYVqDBQ/bS7EWDsk8TQxFAh87uCutjGDJm4C0dGeIam+hl52HM+Gx/g+zpssUm0KhBRx+EMzi41O40nYgwvZZDIMYOPncBvXrTaDnjVVkki3U5bH/EJYElPz8ieFmw8CbyFSLjHP9brkyidNYri5WzBZw/shqKH+hJHZYT3EYxpgP9ZB9CjSrWR57X2e6/ZnHTB2MWyjgKMIoyYl2FJIRgMP7jOtlMG6zI0ZVx7V8reFrJqGklZDpnMfecAy6zzIQfkkAvmPFbGdRX62e7UrdMABeVmNz1C4W+GZiQwoJPQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Delivery-date: Fri, 28 Oct 2022 02:56:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHY6gdlgL3IkW26406wHogcEOJe0K4jHZ7w
  • Thread-topic: [PATCH for-4.17 v3 2/2] vpci: refuse BAR writes only if the BAR is mapped

Hi Roger,

> -----Original Message-----
> From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
> Subject: [PATCH for-4.17 v3 2/2] vpci: refuse BAR writes only if the BAR is
> mapped
> 
> Writes to the BARs are ignored if memory decoding is enabled for the
> device, and the same happen with ROM BARs if the write is an attempt
> to change the position of the BAR without disabling it first.
> 
> The reason of ignoring such writes is a limitation in Xen, as it would
> need to unmap the BAR, change the address, and remap the BAR at the
> new position, which the current logic doesn't support.
> 
> Some devices however seem to (wrongly) have the memory decoding bit
> hardcoded to enabled, and attempts to disable it don't get reflected
> on the command register.
> 
> This causes issues for well behaved domains that disable memory
> decoding and then try to size the BARs, as vPCI will think memory
> decoding is still enabled and ignore the write.
> 
> Since vPCI doesn't explicitly care about whether the memory decoding
> bit is disabled as long as the BAR is not mapped in the domain p2m use
> the information in the vpci_bar to check whether the BAR is mapped,
> and refuse writes only based on that information.  This workarounds
> the issue, and allows domains to size and reposition the BARs properly.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Release-acked-by: Henry Wang <Henry.Wang@xxxxxxx>

Kind regards,
Henry

 


Rackspace

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