@@ -2031,12 +2031,16 @@ void xen_pt_config_init(XenPCIPassthroughState *s, Error **errp)
}
}
- /*
- * By default we will trap up to 0x40 in the cfg space.
- * If an intel device is pass through we need to trap 0xfc,
- * therefore the size should be 0xff.
- */
if (xen_pt_emu_reg_grps[i].grp_id == XEN_PCI_INTEL_OPREGION) {
+ if (!is_igd_vga_passthrough(&s->real_device) ||
+ s->real_device.vendor_id != PCI_VENDOR_ID_INTEL) {
+ continue;
+ }
+ /*
+ * By default we will trap up to 0x40 in the cfg space.
+ * If an intel device is pass through we need to trap 0xfc,
+ * therefore the size should be 0xff.
+ */
reg_grp_offset = XEN_PCI_INTEL_OPREGION;
}