Received: by 2002:a05:693c:2909:b0:17e:9665:bf4c with SMTP id rk9csp943746dyc; Thu, 3 Jul 2025 20:04:16 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUQN9kFEjL8jSIoV7SElYKRHYA8ZIIN47w4uzoA+7djH3KMeyezQvOReVIlkfUIb9rm7gFkVTdNYZaYqQ==@linaro.org X-Google-Smtp-Source: AGHT+IEINsj58IEtJ7qIxZfFkHBxRg0s57SXoZhr1pFL+ehuHORQtuAPN9RvGFNxqJW4pwfiROnJ X-Received: by 2002:a05:620a:4249:b0:7d0:a096:cf80 with SMTP id af79cd13be357-7d5df13a677mr34169085a.31.1751598256430; Thu, 03 Jul 2025 20:04:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1751598256; cv=none; d=google.com; s=arc-20240605; b=KSl7FlDmTWR88t7HTXJR8FgbbLQHO9jzJDLt5ccO+XgbuByJEEJkAT071JlhYM0imH LddkOrVGNlv7KX7AWKRg4jQbC7R5p8A1ZBqvQGWvG6brP44YdzHBz7ynDJQuQG6+wml+ O5yoXjY87S6NMmgk6MbuwAJfcKzq4mBIuXnDuCmdZahDmy22HHbT9zC8y1QoklYH5ayT EqqjiuBMVN8PPhLcH4/5uYT/eUEA0WNG6kfbmcEGSmSbvU0wzthOlM+gy7XKDHPjc3rC Sr+Ei11CHShcdiNP4Bxw7JNuDCnd0a2AcqmzxwHs63TsYtlOBE90lcxrrpIe7m7KjnX8 oHgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=NVMNEkUnJS1Lqv6z+fsFMQTJRL0njiNuQQ7DDRAuZxU=; fh=S4kaJRkCmjxquCyjsTCOPwd/S4H9YgKOzdkx269myl4=; b=l1akWFtV5fHMA91OEl1atIm3fQvRLHXu/+V92vMAwkV9rnNA4+FAg7BiE4oO0sze2W GVFQyCZlpO1+PmVn5zfS1I+jsAFQ8DEvtB/Q5OJavsQrDUF3uJ6rmzIv+3GjgKwfNQ1F HID/U3N/rs5HKK3Wrv5Z+ZbfAuVCbYc/T117nIUMsKQS3f078+Kr2VxZmg33wy2vCHhp N1UvY97yqp4DRSa/j1Ft5S4DbpQHbPjo2SgwFcjK6rJdYFFfzub1hY4aPfI9tgn/Mg44 EH65QUTeYcK5m9nPmZkIobsH5zjozpbTB61pV5K0ukGw5y/3tyfIdWufbBu7EOKFXeFB DcZA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WkorHcIa; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7d5dbdcaebfsi134987085a.62.2025.07.03.20.04.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Jul 2025 20:04:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WkorHcIa; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uXWiF-0008EV-Lr; Thu, 03 Jul 2025 23:03:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uXWiC-0008C0-Hh for qemu-devel@nongnu.org; Thu, 03 Jul 2025 23:03:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uXWi5-0003By-A5 for qemu-devel@nongnu.org; Thu, 03 Jul 2025 23:03:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1751598207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=NVMNEkUnJS1Lqv6z+fsFMQTJRL0njiNuQQ7DDRAuZxU=; b=WkorHcIaMINgvVRZP1SEQCnPLedYrRDoQEk2Ufku4BGLDr1u0zz3dBFl16/qh5h7jMiAMi w/Qmqeih84N2c86OLk5HCAig7zwwpFfkXxgFVFPqf/vY3B2CSvdT+uJGDrUtERx4divja+ /rWawokR63H3tCvxbypFJPlhHD++1ec= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-125-lJmjgLhJOwiUUgFEiS59Vw-1; Thu, 03 Jul 2025 23:03:24 -0400 X-MC-Unique: lJmjgLhJOwiUUgFEiS59Vw-1 X-Mimecast-MFC-AGG-ID: lJmjgLhJOwiUUgFEiS59Vw_1751598203 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A81AB1956086; Fri, 4 Jul 2025 03:03:22 +0000 (UTC) Received: from virt-mtcollins-01.lab.eng.rdu2.redhat.com (virt-mtcollins-01.lab.eng.rdu2.redhat.com [10.8.1.196]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C694E1808882; Fri, 4 Jul 2025 03:03:18 +0000 (UTC) From: Shaoqin Huang To: qemu-arm@nongnu.org, =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Peter Maydell , Gerd Hoffmann , Eric Auger , Paolo Bonzini Cc: Zhao Liu , Shaoqin Huang , Alex Williamson , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Eduardo Habkost , Marcel Apfelbaum , "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, Richard Henderson , Sergio Lopez , Yanan Wang Subject: [PATCH v9 0/2] ramfb: Add property to control if load the romfile Date: Thu, 3 Jul 2025 23:03:13 -0400 Message-Id: <20250704030315.2181235-1-shahuang@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Received-SPF: pass client-ip=170.10.129.124; envelope-from=shahuang@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 15 X-Spam_score: 1.5 X-Spam_bar: + X-Spam_report: (1.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.237, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: Wwj78nZpG1H0 Currently the ramfb device loads the vgabios-ramfb.bin unconditionally, but only the x86 need the vgabios-ramfb.bin, this can cause that when use the release package on arm64 it can't find the vgabios-ramfb.bin. Because only seabios will use the vgabios-ramfb.bin, load the rom logic is x86-specific. For other !x86 platforms, the edk2 ships an EFI driver for ramfb, so they don't need to load the romfile. So add a new property use-legacy-x86-rom in both ramfb and vfio_pci device, because the vfio display also use the ramfb_setup() to load the vgabios-ramfb.bin file. After have this property, the machine type can set the compatibility to not load the vgabios-ramfb.bin if the arch doesn't need it. Then I set the use_legacy_x86_rom property to false by default, and only set it to true on x86 since only x86 will need it. At the same time, set the "use-legacy-x86-rom" property to true on those historical versioned machine types in order to avoid the memory layout being changed. Changelog: --------- v8 -> v9: - Improve the commit message. v7 -> v8: - Set the property in microvm machine type. v6 -> v7: - Set the property into hw_compat_10_0 instead of hw_compat_9_2. v5 -> v6: - Set the property to true on those historical versioned machine types. v4 -> v5: - Fix some typo error. - Set the property in piix machine type. v3 -> v4: - Set the new property to false by default, only set it to true on x86. v2 -> v3: - Fix the underscore error. - Add a new patch to set the property in arm compatibility. v1 -> v2: - Change the property name. v7: https://lore.kernel.org/all/20250702085616.2172722-1-shahuang@redhat.com/ v6: https://lore.kernel.org/all/20250701030549.2153331-1-shahuang@redhat.com/ v5: https://lore.kernel.org/all/20250626034526.2136585-1-shahuang@redhat.com/ v4: https://lore.kernel.org/all/20250617030521.2109305-1-shahuang@redhat.com/ v3: https://lore.kernel.org/all/20250609073408.2083831-1-shahuang@redhat.com/ v2: https://lore.kernel.org/all/20250606070234.2063451-1-shahuang@redhat.com/ v1: https://lore.kernel.org/all/20250605030351.2056571-1-shahuang@redhat.com/ Shaoqin Huang (2): ramfb: Add property to control if load the romfile hw/i386: Add the ramfb romfile compatibility hw/core/machine.c | 2 ++ hw/display/ramfb-standalone.c | 4 +++- hw/display/ramfb-stubs.c | 2 +- hw/display/ramfb.c | 6 ++++-- hw/i386/microvm.c | 3 +++ hw/i386/pc_piix.c | 10 ++++++++++ hw/i386/pc_q35.c | 3 +++ hw/vfio/display.c | 4 ++-- hw/vfio/pci.c | 1 + hw/vfio/pci.h | 1 + include/hw/display/ramfb.h | 2 +- 11 files changed, 31 insertions(+), 7 deletions(-) -- 2.40.1