Unverified Commit be0a5121 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5262 [OLK-6.6]HYGON: Support Hygon DCU passthrough to VMs

Merge Pull Request from: @hanliyang 
 
Support Hygon DCU passthrough to VMs

issue:
https://gitee.com/open_euler/dashboard?issue_id=I98WRI

Hygon DCU doesn't support to control to reset. When using the vfio-pci driver for PCI device passthru, the vfio-pci driver code will initialize the device, including the reset device process, but if the passthru device is a Hygon DCU, the VMM will not work properly. In order to solve this problem, the hydcu-fixup-header driver is introduced, the PCI_DEV_FLAGS_NO_BUS_RESET flag will be set to the Hygon DCU to indicate that the device is not resettable. 
 
Link:https://gitee.com/openeuler/kernel/pulls/5262

 

Reviewed-by: default avatarLiu Chao <liuchao173@huawei.com>
Signed-off-by: default avatarZhang Peng <zhangpeng362@huawei.com>
parents d7f142ee bafe7735
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
.. SPDX-License-Identifier: GPL-2.0-only

=========================
 drm/hygon/hydcu-fixup-header hydcu-fixup-header driver
=========================

The  drm/hygon/hydcu-fixup-header driver supports all HYGON DCUs.

General description
======================

The drm/hygon/hydcu-fixup-header driver adds flags NO_BUS_RESET to hydcu
device to disable vfio pci reset, as dcu is not support now.
+1 −0
Original line number Diff line number Diff line
@@ -5666,6 +5666,7 @@ CONFIG_DRM_CIRRUS_QEMU=m
# CONFIG_DRM_LEGACY is not set
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
CONFIG_DRM_PRIVACY_SCREEN=y
CONFIG_HYDCU_FIXUP_HEADER=y

#
# Frame buffer Devices
+8 −0
Original line number Diff line number Diff line
@@ -438,3 +438,11 @@ config DRM_LIB_RANDOM
config DRM_PRIVACY_SCREEN
	bool
	default n

config HYDCU_FIXUP_HEADER
	tristate "Enable fixup header support for HYDCU"
	default y
	depends on X86_64
	help
	  Choose this option if you want to use pci passthrough with HYDCU
	  HYDCU cannot support pci reset, so enable this module to disable pci reset
+1 −0
Original line number Diff line number Diff line
@@ -199,3 +199,4 @@ obj-y += solomon/
obj-$(CONFIG_DRM_SPRD) += sprd/
obj-$(CONFIG_DRM_LOONGSON) += loongson/
obj-$(CONFIG_DRM_PHYTIUM) += phytium/
obj-$(CONFIG_HYDCU_FIXUP_HEADER) += hygon/hydcu-fixup-header/
+3 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only

obj-$(CONFIG_HYDCU_FIXUP_HEADER) += hydcu_pci_fixup_header.o
 No newline at end of file
Loading