Skip to contentSkip to conversation

SWDEV-187506: [Gibraltar][v320]VM-destroy3 (case 29) failed 5/5

PATCH New Jesse Zhang 1 participant 1 message Jul 10, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SWDEV-187506: [Gibraltar][v320]VM-destroy3 (case 29) failed 5/5

Issue: On host P520 with S03J3226A SBIOS platform, passthrough both gfx and audio device to VM, the first time start VM after host bootup, driver woule load fail.

Root cause: Passthrough both devices allows VFIO to do hot reset on bridge, this reset clears register BIOS_SCRATCH_7 which is used for judging if VBIOS has been post. Since in the first time driver does not do BACO reset when loading, VBIOS would be post twice.

Solution: When running in passthrough mode, force enable BACO reset in every time loading driver.

Notice: This is a workaround for SWDEV-187506 issue, passthrough two devices to VM is required.

---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/soc15.c +4 -3
index 9d33ba4..790099d 100644
@@ -738,15 +738,16 @@ static bool soc15_need_reset_on_init(struct amdgpu_device *adev)
 {
 	u32 sol_reg;
 
-	if (!amdgpu_passthrough(adev))
-		return false;
-
 	if (adev->flags & AMD_IS_APU)
 		return false;
 
 	/* Check sOS sign of life register to confirm sys driver and sOS
 	 * are already been loaded.
 	 */
+
+	if (amdgpu_passthrough(adev))
+		return true;
+
 	sol_reg = RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_81);
 	if (sol_reg)
 		return true;
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx