Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CEBCAC56205 for ; Thu, 6 Aug 2026 01:05:43 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1384041.1627152 (Exim 4.92) (envelope-from ) id 1wrmY3-00057n-Ms; Thu, 06 Aug 2026 01:05:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1384041.1627152; Thu, 06 Aug 2026 01:05:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wrmY3-00057d-FH; Thu, 06 Aug 2026 01:05:27 +0000 Received: by outflank-mailman (input) for mailman id 1384041; Thu, 06 Aug 2026 01:05:25 +0000 Received: from mx.expurgate.net ([195.190.135.10]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1wrmY1-0004gH-FC for xen-devel@lists.xenproject.org; Thu, 06 Aug 2026 01:05:25 +0000 Received: from mx.expurgate.net (helo=localhost) by mx.expurgate.net with esmtp id 1wrmY0-00Dmq5-SR for xen-devel@lists.xenproject.org; Thu, 06 Aug 2026 03:05:24 +0200 Received: from [10.42.69.4] (helo=localhost) by localhost with ESMTP (eXpurgate MTA 0.9.1) (envelope-from ) id 6a73ddb4-e002-0a2a0a5209dd-0a2a4504b9fe-22 for ; Thu, 06 Aug 2026 03:05:24 +0200 Received: from [66.163.188.206] (helo=sonic311-25.consmr.mail.ne1.yahoo.com) by tlsNG-ebf023.mxtls.expurgate.net with ESMTPS (eXpurgate 4.57.1) (envelope-from ) id 6a73ddd3-b57f-0a2a45040019-42a3bcce86d4-3 for ; Thu, 06 Aug 2026 03:05:24 +0200 Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Thu, 6 Aug 2026 01:05:22 +0000 Received: by hermes--production-bf1-54b5569bdc-xjdx5 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 734f0c8329adecc00a98ec91cc943adb; Thu, 06 Aug 2026 01:05:16 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Authentication-Results: eu.smtp.expurgate.cloud; dkim=pass header.s=a2048 header.d=aol.com header.i="@aol.com" header.h="From:To:Cc:Subject:Date:In-Reply-To:References" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1785978322; bh=G3VmkipyMhZjj38uG/j4xipQ/TGQEWVZ1kywsdVeHas=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=sYh2bdc5USWGn/sFhSPBJe1EnhxZwUUrqvj6+oB/+JhLjRbMnVh3ubZYOYS5WoeKzb47Ne6IdsUr+VjRfAq1jQOMuqLmQDN5nDLtrS3DO/eKwtYyXyibDTdDvisZ0WRb8Xyyv7mON2D3Li4ATYkY5IfbFjubGkG5Q8wRdJ43aS7qp5mSvnjFRY+KskoQomSsIri5FNhgQghUnIYROeMM2Mp+/ugQzt/TlGlBgsHiTQW0emGg6+aqLt3B6JbGnfgVGTkmju/re4cvJSWOpM0gHj0RWDutE1O6iyiKsebTnLghagbWhAl7QvVLmwTJvQ9v7VbPNlDQAw5kkJhscqLP2w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1785978323; bh=DZ9DSj/zpZJ3CsUxLDF6vIBJyRg0So43YHTPMQfuJzl=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=TAKI7iHY46DjDMy++WItmCEFlDeyjl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vd jImYKbY2z3bPvVD3ZzHG5sj.616szDR88RkZ2jTgt_mtuCSu8mg07WC1gXAYIZARQvCpwbknHhUS MKMLYBKKDJU0U5zEoKPoOxtGF_dGkQD4gAF_5CjAp8K8Ptqhlnb4YTdsX.lxxHigF1LUD3p8L07R r6E6R_iUr5NBpacyKSJzYKXkoeeLfKbyMpCw4OJ0_4Fy.v3R1ADimO4uKo1ilUhtUTOcZ.WkRJV7 e4xuC9RwBAevbyvJM_8sESWSDgN4lRqcxBRwA3jjmqzUuod1onTzjLMlyh73OKpUJcSsYd8FiVMd yACclYtGNxBqeZWcHaMs80lwpWaE2QPMLnwEw4GhR.Rj_aKyatY2CLiyL.kpGePTCcT4yO8YGG0m 34C17PuwEmDDyXCxekBzXUchFB_QTyam7SK68sYCbjOmeoqJ2ZDwJg7aJmHV5 X-Sonic-MF: X-Sonic-ID: af215a46-7fce-4258-a2a7-e4fc20b5d1e5 From: Chuck Zmudzinski To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, xen-devel@lists.xenproject.org, Stefano Stabellini , Anthony PERARD , "Edgar E . Iglesias" , Jan Beulich , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Teddy Astie , Tomita Moeko Subject: [PATCH v5 4/6] xen/igd: enable guest creation when ROM read fails Date: Wed, 5 Aug 2026 21:04:54 -0400 Message-ID: <20260806010506.492490-5-brchuckz@aol.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260806010506.492490-1-brchuckz@aol.com> References: <20260806010506.492490-1-brchuckz@aol.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-purgate-ID: tlsNG-ebf023/1785978324-C04DBB50-D6FC651B/0/0 X-purgate-type: clean X-purgate-size: 4998 For newer IGD devices, the host option ROM is not readable from sysfs and this results in a call to error_fail() that causes Qemu to exit(1) so guest creation fails with the current implementation for many newer IGD devices. But this read failure need not be a fatal error causing guest creation to fail because the guest does not need the option ROM to successfully boot and run. The guest only needs the option ROM for getting graphics output from the guest during early boot before the guest OS loads the Intel IGD graphics drivers. To fix this, allow guest creation to continue by avoiding setting errp if the attempt to read the host ROM file from sysfs fails. In this case, the memory for the guest option ROM has been allocated so free that memory by calling object_unparent(OBJECT(&s->dev.rom)) before continuing. Replace the error_report() and error_printf() messages for this case when the option ROM cannot be read via sysfs with a suitable info_report() message. In the case when the host option ROM cannot be read via the sysfs interface, xen_pt_register_regions() will attempt to setup the option ROM for the guest the same way it would for any other Xen passthrough PCI device that has an option ROM. Signed-off-by: Chuck Zmudzinski --- Changes in v4: - v4 is the first version of the series that has this patch Changes in v5: - Shorten info_report message to resolve checkpatch line length warning This patch provides initial support for many newer Intel IGD devices so, at least, guest creation will not fail if such newer Intel IGD devices are passed through to a Xen HVM guest. But this patch alone is not sufficient for proper operation of the Intel IGD for many, if not all, of the newer Intel IGD devices when passed through to a Xen HVM guest. There are two main problems with more recent, modern devices: 1. The newer divices might require patches to the Intel OpRegion and also an extended video bios table (VBT). Without support for these aspects of the newer devices, the experience will not be great and in many cases the Intel IGD still will not function properly in the guest. 2. The newer devices only work with UEFI AFAICT, and the Ovmf* platforms provided by the upsream edk2 project do not provide support for the Intel IGD. It appears the problem is that the ekd2 project deems the fact that the hardware manufacturer does not provide the necessary firmware, the EFI graphics output protocol (GOP) driver, in the ordinary way by making the EFI GOP driver accessible in virtual environments via the option ROM of the real PCI device, to be a reason to reject patches that add support for the Intel IGD. This, however, is not a fatal problem since it only affects the guest during early boot when OVMF or the bootloader is running and the guest OS graphics drivers have not yet been loaded. Lack of support for the Intel IGD in OVMF does not seem to affect the experience negatively once the guest OS graphics drivers have been loaded. So efforts to address this problem are only important in cases when it is necessary to get graphics output from OVMF and/or the guest bootloader. The next two patches in this patchset address these two problems. Of those two patches, the first one is more necessary, and the second of those two patches is only needed to provide graphics output from the guest during early boot. hw/xen/xen_pt_graphics.c | 7 +++++++ hw/xen/xen_pt_load_rom.c | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/xen/xen_pt_graphics.c b/hw/xen/xen_pt_graphics.c index 0ae95cc..a124233 100644 --- a/hw/xen/xen_pt_graphics.c +++ b/hw/xen/xen_pt_graphics.c @@ -187,6 +187,13 @@ void xen_pt_setup_vga(XenPCIPassthroughState *s, XenHostPCIDevice *dev, return; } + /* Case when the host ROM file from sysfs could not be read */ + if (!bios_size) { + object_unparent(OBJECT(&s->dev.rom)); + bios = NULL; + return; + } + if (bios_size < sizeof(struct rom_header)) { error_setg(errp, "VGA: VBIOS image corrupt (too small)"); return; diff --git a/hw/xen/xen_pt_load_rom.c b/hw/xen/xen_pt_load_rom.c index 407b630..eaf0ae1 100644 --- a/hw/xen/xen_pt_load_rom.c +++ b/hw/xen/xen_pt_load_rom.c @@ -77,10 +77,7 @@ void *pci_assign_dev_load_option_rom(PCIDevice *dev, memset(ptr, 0xff, dev->romsize); if (!fread(ptr, 1, st.st_size, fp)) { - error_report("pci-assign: Cannot read from host %s", rom_file); - error_printf("Device option ROM contents are probably invalid " - "(check dmesg).\nSkip option ROM probe with rombar=0, " - "or load from file with romfile=\n"); + info_report("pci-assign: Can't read Option ROM %s from host", rom_file); goto close_rom; } -- 2.52.0