[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 3/5] drm/amdgpu: set passthrough mode for xen pvh/hvm
- To: Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>
- From: Huang Rui <ray.huang@xxxxxxx>
- Date: Sun, 12 Mar 2023 20:01:55 +0800
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Nl4vhpfQhIyJx89i8nuCn4wVTGTo+7VCGWnMBqDbzaw=; b=BRh70aDNm5LizLpiaS4q+pKZUoUoDovjr6+WV4iazEi162g6dYUwOSEAje9qIQNjy3etxIgajuylvD2CZnW6pv8AmjepcFKQIAoy+4oa4nUthCSDtaDFT9L7ppDbLoyYdJIHIqSBBWM8M/11JSc5S7qm/PnAK9FgFBSI5kMPiqSRuNU4+5bf+G3R54j6jViNHqRVB4+Z5uWQ5WThgP6roByQRjgGjqSUco+1pjSgE3NyCDa710Vs2CcSy3oEQ0NoXn5uuhn64as1jK1pHIJeCsWTjJknstZz6IxnxwjPERVwwThjRUcjOYGRBpqlCzGrBIUFwUVsr/MzilMdyY+1Sg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JPWLjHGRRZOOY3FtpCDJ7fduAUB5g0PjaehN+d1IJ3uFzU3T4y+TS2+IJlu9MBBPIdMBP0gGDdG0TE6SREPNH3xxASSIJTE0h2omb2UPi3R91vyNbw1Ngj16Cwyf339e+TZIgI+KYQRQFTNTOniG9roU9MxIlD3hc+coLCMs4oqyI9vuzAq+fvTdZq9mwOhEup7Bi8hOSuhANXIsw3OT60fNM1T6ubg7Comq7l3FmL/g1gTx9GalXgHWY/miOBsUPKN7TDsO0Xq0r6+qJex+ijFcuAMc+9BMDKQVRLmtr4AIPocY62mPcxFAoN0wWW/P/ClTEZHGAK824dDS8cAukA==
- Cc: Alex Deucher <alexander.deucher@xxxxxxx>, Christian König <christian.koenig@xxxxxxx>, "Stewart Hildebrand" <Stewart.Hildebrand@xxxxxxx>, Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, Honglei Huang <honglei1.huang@xxxxxxx>, Julia Zhang <julia.zhang@xxxxxxx>, Chen Jiqian <Jiqian.Chen@xxxxxxx>, Huang Rui <ray.huang@xxxxxxx>
- Delivery-date: Sun, 12 Mar 2023 12:02:43 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
There is an second stage translation between the guest machine address
and host machine address in Xen PVH/HVM. The PCI bar address in the xen
guest kernel are not translated at the second stage on Xen PVH/HVM, so
it's not the real physical address that hardware would like to know, so
we need to set passthrough mode for Xen PVH/HVM as well.
Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index f2e2cbaa7fde..7b4369eba19d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -743,7 +743,8 @@ void amdgpu_detect_virtualization(struct amdgpu_device
*adev)
if (!reg) {
/* passthrough mode exclus sriov mod */
- if (is_virtual_machine() && !xen_initial_domain())
+ if (is_virtual_machine() &&
+ !(xen_initial_domain() && xen_pv_domain()))
adev->virt.caps |= AMDGPU_PASSTHROUGH_MODE;
}
--
2.25.1
|