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

RE: [PATCH for-4.17 v3 1/2] pci: do not disable memory decoding for devices


  • 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:12 +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=6UEgP8UdKuw1heNoBAVkzU29+rag/Yv31sWuP0bWZ/M=; b=KyofLWc5S5/D3yeITiTqZsDARU58hMQowFcyEqAT8PId0PDhNJPrZKJl4079g+4XmXPDklTyWhX4YOVwEXv8tdu1yEmowVc1Nv7LOoLTZoKqVSTdJRuQNUOU2h/flYo20Jlw1OxUV7viF1TFUzGsnOHI6JO41iI/fXhI8mRMQIrGtRk/nApi7Yg2gM52bOAp/gYNUc6l9JDQAgu7k2pEbDKwweI9UiFBn10lD81Savi4eeX2R8MVGbHclgiQFY45WJylJKGET+SGCo92pUBkRM5qZA2/xlVx6PuyqUb7QGVJfXeCvY4JUd+CjctQkHPAZfAgBg6B/ts3EjBjZor20w==
  • 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=6UEgP8UdKuw1heNoBAVkzU29+rag/Yv31sWuP0bWZ/M=; b=ZcVX0MSGWFxClHFHXZCNxEg9REPGXI/ZaTYWkWi8hgR1rUfHnFOFT6CptIgPoFyW1H7fpJhWnGkt//KeMOny0yIrESgLc4njWD3kGEAjv8uy/tH/ZMN+iWCwyq+cLY8LpIZYQ/eCR0EOoFZqOSqqi6IBG7KStQ+cxPVa4NHScEvHa/ZJmUOv3pLjVK2SbO9BV2cddiT3kQfNatWB8ioh3SeT06K1DZgdhet8ItaO+1iYNnnheXMo65Y1C1LpxfgwTi0jFhE4KVI1XcMPYyB7uyfttoDIML/w6YJ8nmJItGn9/f2yRFT6KAQ44MhTimdrWy1bMIfP7V8G5S15AwnSgA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=e+24LfDAy1mzvoxuQYtHstEtdOKFZlGyO1Y4hcpxXjcDe5e/oXkhiaWZRjgHgo/KTJ0j6m+MnE22H3++csbW7NMP9TbkRy8QpOKJ7hRYlb4NxTex4IL9Uha3KrB68DogHWO7VWDmAeXWvFdWvoMeuuo+ZCvOebxpU5vMJ5b9fjk9FlYxN4n2RF3tNYk2QGOnjGYZrODG+8j6ek/+mqk4p7jfC77idw3rVjSBwf9VQ+E6AmSNyrOL3y0K7MtY1CKY1G2z3Wi8bEf+eAJeFq/QqPeb24qttnF/4WvxJszG6kNPvLVBDZIau5FcgTLmBSwwkqo3nx7cBoEQPQpUA8G0sA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IC7JwZet8HcBpZUe43H+v+aYF34+RPeAQIZTX+uhC5bXQ0vocBgKU2cG9M1dJuNYppoglJNIqme7+zl1YfnOSVtFy55JOwJUzP6w6uyw5KIjnRKHT2MB5BDtWwQustfTKDqsSdPBCzBnq6+Rv1pZZZz5nBSsnzAMtIsfj7OFVyzhP9KdMRLHbutZB1j/ANCIjtP4ZZC5diJPBiU6p/O6KVqpCUaxUyAY75YJW873K356oRKYwjqPxKMW0RIfgotADOL/Dm+aAw/oPQlFz3YssvBvv5s/XlbQ7FN7L6vB9xHIqIfSSYi1rO5CaJNVrzqDQCUW+LNy31kVbJm+e4fx6Q==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • 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: AQHY6gdfXU3AcwAAuU+ikCtUluaIt64jHX+g
  • Thread-topic: [PATCH for-4.17 v3 1/2] pci: do not disable memory decoding for devices

Hi Roger,

> -----Original Message-----
> From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
> Subject: [PATCH for-4.17 v3 1/2] pci: do not disable memory decoding for
> devices
> 
> Commit 75cc460a1b added checks to ensure the position of the BARs from
> PCI devices don't overlap with regions defined on the memory map.
> When there's a collision memory decoding is left disabled for the
> device, assuming that dom0 will reposition the BAR if necessary and
> enable memory decoding.
> 
> While this would be the case for devices being used by dom0, devices
> being used by the firmware itself that have no driver would usually be
> left with memory decoding disabled by dom0 if that's the state dom0
> found them in, and thus firmware trying to make use of them will not
> function correctly.
> 
> The initial intent of 75cc460a1b was to prevent vPCI from creating
> MMIO mappings on the dom0 p2m over regions that would otherwise
> already have mappings established.  It's my view now that we likely
> went too far with 75cc460a1b, and Xen disabling memory decoding of
> devices (as buggy as they might be) is harmful, and reduces the set of
> hardware on which Xen works.
> 
> This commits reverts most of 75cc460a1b, and instead adds checks to
> vPCI in order to prevent misplaced BARs from being added to the
> hardware domain p2m.  Signaling on whether BARs are mapped is tracked
> in the vpci structure, so that misplaced BARs are not mapped, and thus
> Xen won't attempt to unmap them when memory decoding is disabled.
> 
> This restores the behavior of Xen for PV dom0 to the state it was
> previous to 75cc460a1b, while also introducing a more contained fix
> for the vPCI BAR mapping issues.
> 
> Fixes: 75cc460a1b ('xen/pci: detect when BARs are not suitably positioned')
> 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®.