From nobody Mon Mar 23 21:24:11 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=1773419735; cv=none; d=zohomail.com; s=zohoarc; b=gdQO4ilJ73GMlVa4BKLirtvsN28ylraD8pYeLMij6JPkO4rJAPYefLwJDxQez+VY7MwgYDlhfelwAebM9iOhs1gNRWNEHWJtLLkXfTB1MDf/BFj59heSH1xtBN12uKzJ22PD5aU99Inh+W/SJZyTD/aBPD+OFn+cOS2KdwR0XAI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773419735; 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=peVzH/RSknOHNSKTQdaYXevRTD3ymuxiEuHEUoR9BgM=; b=Bn13N7WeWWkwIaLuHPzFZH4erjxG+gTaQ7Ir39+e/EdInnlAuHPJe7TCnCmp0yR9NMxm1sQQyv1YPqsty3OLtwr6v+heKxSLO4CncKxfJpB8GL7OZ05DFlXyf1qO8fsUGlq9Bk+zdjrS6KDS4fcqd1ff0pTw4N6dROeAcpH77jo= 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 177341973584764.89818124896658; Fri, 13 Mar 2026 09:35:35 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1253919.1549958 (Exim 4.92) (envelope-from ) id 1w15Tp-0000VB-AP; Fri, 13 Mar 2026 16:35:17 +0000 Received: by outflank-mailman (output) from mailman id 1253919.1549958; Fri, 13 Mar 2026 16:35:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w15Tp-0000TO-2B; Fri, 13 Mar 2026 16:35:17 +0000 Received: by outflank-mailman (input) for mailman id 1253919; Fri, 13 Mar 2026 16:35:14 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w15Tm-0006Ek-Nl for xen-devel@lists.xenproject.org; Fri, 13 Mar 2026 16:35:14 +0000 Received: from mail179-36.suw41.mandrillapp.com (mail179-36.suw41.mandrillapp.com [198.2.179.36]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 98d2f523-1efa-11f1-9ccf-f158ae23cfc8; Fri, 13 Mar 2026 17:35:08 +0100 (CET) Received: from pmta12.mandrill.prod.suw01.rsglab.com (localhost [127.0.0.1]) by mail179-36.suw41.mandrillapp.com (Mailchimp) with ESMTP id 4fXVT53gDVzlfjbT for ; Fri, 13 Mar 2026 16:35:05 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id 27f9226dc476489280796f4f05794d27; Fri, 13 Mar 2026 16:35:05 +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: 98d2f523-1efa-11f1-9ccf-f158ae23cfc8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1773419705; x=1773689705; bh=peVzH/RSknOHNSKTQdaYXevRTD3ymuxiEuHEUoR9BgM=; 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=E4iTtJ8OJ+U52Jcmqe6F4/4D2tExf3Njg8tyNOGH/opfEnDxh4V3DdqBHFlkE2BkT LNYjx8uVG2RpsNDlUdo6RktLw3fuNAZlP7nkOPh2vnMIJFJo3BoLlkI271XT+iovI4 oCP8cbVbTTVMNS68tAfUPjPjkZh8/3NWoJj+bGnfGOsrBnXalIyP7RucDl18QeCpf6 JQ5dMlNeIVaxbWXBrK5Dqjl/8xEfXab206rcNjXzuv82YpKAFBgkktTNEAdB+KAq9V KLLpSnwv+mMAFWIAyjV0J7lRFp0KidcGh0+B/F1mLIM0HBp94ZoSNzDBizIQNOZdLT zpD/7qWCutmZQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1773419705; x=1773680205; i=thierry.escande@vates.tech; bh=peVzH/RSknOHNSKTQdaYXevRTD3ymuxiEuHEUoR9BgM=; 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=IAG8VVPYvK2e73qkhrFw4a55QbxAeF4tgwa1P3vkuEuENpJbMTUKozO2PM2rHpPWe NtNq6i8c/u1K4AvnIrMwYrlM5IeZCfkw+I5plnttlBYUfwPzs9UJ5/vonOUBG9/Hbn 84tP8B+6d/sz7oPhyTK1yR0cypIQ8M4pfuKl719qIhIEuQAIihJlB6IDMQI5pTte8q ayILS8tgVK9exOEJ9E5vc0m2vqOeVHSDpkjaTp2uBzankU3oqKN9smZ+yS17x0cNcX Pyl6zjDo8lB1hwBs4wtKmPHaoTItPAP55A/gMmQMAccVlyxVPHCeHud6AgBG09O6zS JFF3QHCCPpK5w== From: "Thierry Escande" Subject: =?utf-8?Q?[PATCH=2004/17]=20hvmloader:=20add=20ACPI=20enabling=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: 1773419701560 To: xen-devel@lists.xenproject.org Cc: "Thierry Escande" , "Jan Beulich" , "Andrew Cooper" , "=?utf-8?Q?Roger=20Pau=20Monn=C3=A9?=" , "Anthony PERARD" , "Alexey Gerasimenko" Message-Id: <20260313163455.790692-5-thierry.escande@vates.tech> In-Reply-To: <20260313163455.790692-1-thierry.escande@vates.tech> References: <20260313163455.790692-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.27f9226dc476489280796f4f05794d27?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20260313:md Date: Fri, 13 Mar 2026 16:35:05 +0000 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @mandrillapp.com) (identity thierry.escande@vates.tech) X-ZM-MESSAGEID: 1773419736092158500 Content-Type: text/plain; charset="utf-8" In order to turn on ACPI for OS, we need to write a chipset-specific value to SMI_CMD register (sort of imitation of the APM->ACPI switch on real systems). Modify acpi_enable_sci() function to support both i440 and Q35 emulation. Signed-off-by: Alexey Gerasimenko Signed-off-by: Thierry Escande --- tools/firmware/hvmloader/hvmloader.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tools/firmware/hvmloader/hvmloader.c b/tools/firmware/hvmloade= r/hvmloader.c index 626cc53649..f6cc3fa4b9 100644 --- a/tools/firmware/hvmloader/hvmloader.c +++ b/tools/firmware/hvmloader/hvmloader.c @@ -258,9 +258,24 @@ static const struct bios_config *detect_bios(void) static void acpi_enable_sci(void) { uint8_t pm1a_cnt_val; + uint8_t acpi_enable_val; =20 -#define PIIX4_SMI_CMD_IOPORT 0xb2 +#define SMI_CMD_IOPORT 0xb2 #define PIIX4_ACPI_ENABLE 0xf1 +#define ICH9_ACPI_ENABLE 0x02 + + switch ( machine_type ) + { + case MACHINE_TYPE_Q35: + acpi_enable_val =3D ICH9_ACPI_ENABLE; + break; + case MACHINE_TYPE_I440: + acpi_enable_val =3D PIIX4_ACPI_ENABLE; + break; + default: + /* Not likely to happen */ + BUG(); + } =20 /* * PIIX4 emulation in QEMU has SCI_EN=3D0 by default. We have no legacy @@ -268,7 +283,7 @@ static void acpi_enable_sci(void) */ pm1a_cnt_val =3D inb(ACPI_PM1A_CNT_BLK_ADDRESS_V1); if ( !(pm1a_cnt_val & ACPI_PM1C_SCI_EN) ) - outb(PIIX4_SMI_CMD_IOPORT, PIIX4_ACPI_ENABLE); + outb(SMI_CMD_IOPORT, acpi_enable_val); =20 pm1a_cnt_val =3D inb(ACPI_PM1A_CNT_BLK_ADDRESS_V1); BUG_ON(!(pm1a_cnt_val & ACPI_PM1C_SCI_EN)); --=20 2.51.0 -- Thierry Escande | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech