From nobody Mon Mar 23 21:23:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass header.i=thierry.escande@vates.tech; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=vates.tech ARC-Seal: i=1; a=rsa-sha256; t=1773420446; cv=none; d=zohomail.com; s=zohoarc; b=GcoffWSL7jp3tdMEMfvFGAlQYLu0QeK7BVny2ytEtTrcUO9kr2aWE2Gy7Ay8X7O3BjXFrjurSSerHCQqTnXMIsm1NMn3o/9niDEUy0WpoGKBiiVuhlmZMlnzDMho3lpOneWFVfC0nDjzg6jZfRV2mOyaHWjtgmeNojt0hPNp7r0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773420446; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=DC1CKIcFBppLbjt/OuTdGZjS7i/aioQOlGzfj9vAJWw=; b=IOc5VYS4T7lF8o8bR7qX+WcBSCj6sAawN7Hil3DNOgYALXTGIHQecbm9xOunc0gjX+py2JIkhZCHYQraNezBsYDR+5Xjby9SHNe83c3vDxow2Qx+pSlNjqqlaDApDzDsbuWZmULJRNOcUywwCrmfHzJ5ffGsyxjSiX8hliBXoTA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=thierry.escande@vates.tech; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1773420446609379.5686399389408; Fri, 13 Mar 2026 09:47:26 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1254162.1550153 (Exim 4.92) (envelope-from ) id 1w15fP-0007DB-5n; Fri, 13 Mar 2026 16:47:15 +0000 Received: by outflank-mailman (output) from mailman id 1254162.1550153; Fri, 13 Mar 2026 16:47:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w15fP-0007D4-2L; Fri, 13 Mar 2026 16:47:15 +0000 Received: by outflank-mailman (input) for mailman id 1254162; Fri, 13 Mar 2026 16:47:13 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w15fN-0006fv-Ps for xen-devel@lists.xenproject.org; Fri, 13 Mar 2026 16:47:13 +0000 Received: from mail134-15.atl141.mandrillapp.com (mail134-15.atl141.mandrillapp.com [198.2.134.15]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 488de31f-1efc-11f1-b164-2bf370ae4941; Fri, 13 Mar 2026 17:47:13 +0100 (CET) Received: from pmta10.mandrill.prod.atl01.rsglab.com (localhost [127.0.0.1]) by mail134-15.atl141.mandrillapp.com (Mailchimp) with ESMTP id 4fXVl36qcFzPm0PrJ for ; Fri, 13 Mar 2026 16:47:11 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id 9da3346c299f433282428ef7ed5b675a; Fri, 13 Mar 2026 16:47:11 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version 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" X-Inumbo-ID: 488de31f-1efc-11f1-b164-2bf370ae4941 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1773420432; x=1773690432; bh=DC1CKIcFBppLbjt/OuTdGZjS7i/aioQOlGzfj9vAJWw=; h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=DHcafeb2jsW8ePN6TSPuXt+3/Zsn94Zbs2W3vE1NYyL+A/vszksw6iM5iCeaK70l+ QIZJ3C+2fMFnMa4AkMWXe7YLJkpYNMMArD2ItuPscpDYtnIqulIbSb05M64CZkcQZK 1ZZM1ecUZ/s+8hHtzW1njm0BF/rKN65DCe3LnO3YWeo8fUvnjc1P2n+nrQqtD1Liev mCaDr20y/nihr7AwI9H8U8KCffbz7zmexTJe8iPAEwqftIA+Ke45MUIU0eUZX7MhwT svBdfUF6CYFbKr47+R/dk0gN9lxhu8oaCXJmy6ONnUk1zZmXlggE0hWgxmIjyjeGK+ RQfAanWIrs+1g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1773420432; x=1773680932; i=thierry.escande@vates.tech; bh=DC1CKIcFBppLbjt/OuTdGZjS7i/aioQOlGzfj9vAJWw=; h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=jCgcUw+5Z/HD50i3W59KgMwRQe20btR+deRevV1za7jt5holRqhr/vydfmN9rMGS+ L+yaCLidmV6FL8EqZdhZLRlsHvW+DRj6XhucEeq9BYAyqTJxXxbiuTxsxAinxTtith Eqwb4K//tLKZzxoDpafNzvmbT0/HeTBieITPZTuC/XAabj7S6rDbsjN/jTKfgINYlR Jy4pEwoScH4zW/PIfy6qQKK0pLPiQdUqR6a8yXvspeNDapp9rGrPaRofB5isxGE+Jw iTylEKcMQNgVr4ndCXGipfzLLNMvK0atfjvYGusva9b/hvYGH9U+OTFjfHTINVXLxR uDC71unpe+dag== From: "Thierry Escande" Subject: =?utf-8?Q?[PATCH=202/4]=20q35/xen:=20Add=20Xen=20support=20for=20Q35?= X-Mailer: git-send-email 2.51.0 X-Bm-Disclaimer: Yes X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1773420431033 To: qemu-devel@nongnu.org Cc: "Thierry Escande" , "Paolo Bonzini" , "Richard Henderson" , "Michael S. Tsirkin" , "Eduardo Habkost" , "Anthony PERARD" , xen-devel@lists.xenproject.org Message-Id: <20260313164649.794591-3-thierry.escande@vates.tech> In-Reply-To: <20260313164649.794591-1-thierry.escande@vates.tech> References: <20260313164649.794591-1-thierry.escande@vates.tech> X-Native-Encoded: 1 X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.9da3346c299f433282428ef7ed5b675a?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20260313:md Date: Fri, 13 Mar 2026 16:47:11 +0000 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity thierry.escande@vates.tech) (identity @mandrillapp.com) X-ZM-MESSAGEID: 1773420448141158500 Content-Type: text/plain; charset="utf-8" This patch intializes HVM pc machine in pc_q35_init() if Xen support is enabled. As done for i440 machine, this also cleanups unrealized flash devices. See commit dd29b5c30c (xen: cleanup unrealized flash devices). Signed-off-by: Thierry Escande --- hw/i386/pc_q35.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index cb23322f5a..89dd736d95 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -35,8 +35,10 @@ #include "hw/core/loader.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/rtc/mc146818rtc.h" +#include "hw/xen/xen-x86.h" #include "system/tcg.h" #include "system/kvm.h" +#include "system/xen.h" #include "hw/i386/kvm/clock.h" #include "hw/pci-host/q35.h" #include "hw/pci/pcie_port.h" @@ -190,6 +192,10 @@ static void pc_q35_init(MachineState *machine) x86ms->below_4g_mem_size =3D machine->ram_size; } =20 + if (xen_enabled()) { + xen_hvm_init_pc(pcms, &machine->ram); + } + pc_machine_init_sgx_epc(pcms); x86_cpus_init(x86ms, pcmc->default_cpu_version); =20 @@ -206,7 +212,11 @@ static void pc_q35_init(MachineState *machine) =20 /* allocate ram and load rom/bios */ memory_region_init(pci_memory, NULL, "pci", UINT64_MAX); - pc_memory_init(pcms, system_memory, pci_memory, pci_hole64_size); + if (!xen_enabled()) { + pc_memory_init(pcms, system_memory, pci_memory, pci_hole64_size); + } else { + pc_system_flash_cleanup_unused(pcms); + } =20 object_property_add_child(OBJECT(machine), "q35", phb); object_property_set_link(phb, PCI_HOST_PROP_RAM_MEM, --=20 2.51.0 -- Thierry Escande | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech