From 6c02a8d5ed97b248202775244313ec6f53e97293 Mon Sep 17 00:00:00 2001 From: Zhao Yakui Date: Wed, 29 Apr 2020 16:56:23 +0800 Subject: [PATCH] ACRN/DM: Initialize the igd_lpc bridge to ISA_BRIDGE to make Linux guest happy Currently the class type of igd_lpc bridge PCI device is not initialized. In such case the guest driver doesn't detect the platform correctly when it is in GVT-d mode. Then the linux i915 driver can't work. Tracked-On: #4745 Signed-off-by: Zhao Yakui Reviewed-by: Binbin Wu --- devicemodel/hw/pci/lpc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devicemodel/hw/pci/lpc.c b/devicemodel/hw/pci/lpc.c index ca7cac9ef..bbd5afe86 100644 --- a/devicemodel/hw/pci/lpc.c +++ b/devicemodel/hw/pci/lpc.c @@ -501,6 +501,8 @@ pci_igd_lpc_init(struct vmctx *ctx, struct pci_vdev *pi, char *opts) pci_set_cfgdata16(pi, PCIR_SUBVEND_0, *(uint16_t *)(host_config + PCIR_SUBVEND_0)); pci_set_cfgdata16(pi, PCIR_SUBDEV_0, *(uint16_t *)(host_config + PCIR_SUBDEV_0)); + pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_BRIDGE); + pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_BRIDGE_ISA); return 0; }