From nobody Tue Nov 4 11:09:20 2025 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; 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=fail(p=quarantine dis=quarantine) header.from=epam.com ARC-Seal: i=1; a=rsa-sha256; t=1728034457; cv=none; d=zohomail.com; s=zohoarc; b=ZYAIZ2OcNxfi8oM4cUFUWfokQ/s4sV5aiSryjga3+QabvCE7B4RjOELMPGinwDyfMeFAx9NxfXYJQr9Zj0Xj6B+HF+v4tCm2MXsjL8aA7nZQgsotTixCsQJG2QAN1qwVAduPF57YOOW4L7sSWgoLs+C9QwE8r82j3rSfHVYEZcA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728034457; h=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=iFp9K5MGCW7+gkI5DtCOpQKX7h2U+MWfWZWlhRdQB44=; b=YpHlvUY3HY8eoH6nf6mwLI/JFS0tOUArDonUOBu8tYqyHiwqgNagL7l5TBzVdRQ6yCVuQlQ0EFbnBYGCvXPIMWzPyCwMmzmz45piSPalZPltmTBW5cwgIwn3tdjkrPjgec21paHf6fBbUPN2p4qKTHOrLmn6BeZ2L9TlYzo96ls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=fail header.from= (p=quarantine dis=quarantine) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1728034457581131.2300896531899; Fri, 4 Oct 2024 02:34:17 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.810228.1222917 (Exim 4.92) (envelope-from ) id 1swehF-0000yN-UL; Fri, 04 Oct 2024 09:34:01 +0000 Received: by outflank-mailman (output) from mailman id 810228.1222917; Fri, 04 Oct 2024 09:34:01 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1swehF-0000yG-Ra; Fri, 04 Oct 2024 09:34:01 +0000 Received: by outflank-mailman (input) for mailman id 810228; Fri, 04 Oct 2024 09:34:00 +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 1swehE-0000y7-5D for xen-devel@lists.xenproject.org; Fri, 04 Oct 2024 09:34:00 +0000 Received: from fforwardh-a2-smtp.messagingengine.com (fforwardh-a2-smtp.messagingengine.com [103.168.172.197]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c756b6c1-8233-11ef-99a2-01e77a169b0f; Fri, 04 Oct 2024 11:33:58 +0200 (CEST) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfforwardh.phl.internal (Postfix) with ESMTP id E23262920276; Fri, 4 Oct 2024 05:33:56 -0400 (EDT) Received: from phl-frontend-02 ([10.202.2.161]) by phl-compute-10.internal (MEProxy); Fri, 04 Oct 2024 05:33:56 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 4 Oct 2024 05:33:55 -0400 (EDT) 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: c756b6c1-8233-11ef-99a2-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pobox.com; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1728034436; x= 1728120836; bh=iFp9K5MGCW7+gkI5DtCOpQKX7h2U+MWfWZWlhRdQB44=; b=n KEsaJTTjAU/zd9TokIbxzlxPPIJMSxKo0t0Q1YNkWr6pzL4kPlT8HiANDGm3WKC3 q8QwluM4Kgdxjg1pRUm3QbZQpM7d75I+TJuqQew7q+yXJfgaQB0+eFfKk5Lqm1m3 KV2npdLpqnGc9zqL5mK7hPBZksgddLjXsadzdnwvrLBx1TVJsaQssLMJoAHsXAA3 t3DIqc827DGM4Xi12zNm85oU73u9ChOgr/LplrmsyEcvd7gtsVubvPCuEntGlA9u fISZPWNEZPrEeJty/SQda043X5xjVZ8Cx0d13Ro2cNj9Dr3+GX+2tBOqvKd4LnvC VwxLnO1smGhWZW6y2WVwQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1728034436; x= 1728120836; bh=iFp9K5MGCW7+gkI5DtCOpQKX7h2U+MWfWZWlhRdQB44=; b=c dHQ3cgTaP3OLIQ7SEV6AwBQhdHQd5xNbqCUSrm7dW+tm9MYMo26Rc4N/i99vdwBz RKCpGijqKyqx+iHVhCpbcHJT+PuQIsuWc8L1LTUMYUxfopJA/cgoO2TsP52GoSTq C0N0dVKz/Pa1rSptUEfIhLD0yc00RU6LEIRE6C+/iEBHdcnW2j65OVB+bnlifYzd p7JervRypS0x0zzltbmKFHpzUEUcfMMKVfeKPDPowC6T9AKlpknemIlUYNtW2/6o IH73j0VVbjXZ+iwU87ztxiCorzLEG09aXBSsxLpwrNsHnGCfcECgL0ZEDkxk2dev oonfl46Sf9r8YHc1G+qtQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddvfedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfestdekredtredttden ucfhrhhomhepufgvrhhgihihucfmihgsrhhikhcuoefuvghrghhihigpmfhisghrihhkse gvphgrmhdrtghomheqnecuggftrfgrthhtvghrnheptdejgeegvdffkeekleefueevgfdu heevkedvhfdvkeeludehleegheeivedugfejnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepshgrkhhisgesuggrrhhkshhtrghrrdhsihhtvgdp nhgspghrtghpthhtohepiedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepgigvnh dquggvvhgvlheslhhishhtshdrgigvnhhprhhojhgvtghtrdhorhhgpdhrtghpthhtohep shgvrhhgihihpghkihgsrhhikhesvghprghmrdgtohhmpdhrtghpthhtoheprghnughrvg ifrdgtohhophgvrhefsegtihhtrhhigidrtghomhdprhgtphhtthhopehrohhgvghrrdhp rghusegtihhtrhhigidrtghomhdprhgtphhtthhopehsshhtrggsvghllhhinhhisehkvg hrnhgvlhdrohhrghdprhgtphhtthhopehjsggvuhhlihgthhesshhushgvrdgtohhm X-ME-Proxy: Feedback-ID: i5d7f6ead:Fastmail From: Sergiy Kibrik To: xen-devel@lists.xenproject.org Cc: Sergiy Kibrik , Andrew Cooper , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini , Jan Beulich Subject: [XEN PATCH v1 2/3] x86/hvm: introduce config option for stdvga emulation Date: Fri, 4 Oct 2024 12:33:53 +0300 Message-Id: <05a027b7021ce6deb5b48078034e560a38ca8d23.1728032664.git.Sergiy_Kibrik@epam.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @pobox.com) X-ZM-MESSAGEID: 1728034459953116600 Content-Type: text/plain; charset="utf-8" Introduce config option X86_STDVGA so that stdvga emulation driver can late= r be made configurable and be disabled on systems that don't need it. As a first step the option is hidden from user. No functional changes inten= ded. Signed-off-by: Sergiy Kibrik CC: Jan Beulich --- xen/arch/x86/Kconfig | 3 +++ xen/arch/x86/hvm/Makefile | 2 +- xen/arch/x86/include/asm/domain.h | 3 ++- xen/arch/x86/include/asm/hvm/io.h | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 95275dc17e..89c42ff6da 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -147,6 +147,9 @@ config INTEL_VMX config X86_PMTIMER def_bool HVM =20 +config X86_STDVGA + def_bool HVM + config XEN_SHSTK bool "Supervisor Shadow Stacks" depends on HAS_AS_CET_SS diff --git a/xen/arch/x86/hvm/Makefile b/xen/arch/x86/hvm/Makefile index 321241f0bf..b7741b0f60 100644 --- a/xen/arch/x86/hvm/Makefile +++ b/xen/arch/x86/hvm/Makefile @@ -22,7 +22,7 @@ obj-$(CONFIG_X86_PMTIMER) +=3D pmtimer.o obj-y +=3D quirks.o obj-y +=3D rtc.o obj-y +=3D save.o -obj-y +=3D stdvga.o +obj-$(CONFIG_X86_STDVGA) +=3D stdvga.o obj-y +=3D vioapic.o obj-y +=3D vlapic.o obj-y +=3D vm_event.o diff --git a/xen/arch/x86/include/asm/domain.h b/xen/arch/x86/include/asm/d= omain.h index 3f65bfd190..675a13d917 100644 --- a/xen/arch/x86/include/asm/domain.h +++ b/xen/arch/x86/include/asm/domain.h @@ -501,7 +501,8 @@ struct arch_domain #define has_vrtc(d) (!!((d)->arch.emulation_flags & X86_EMU_RTC)) #define has_vioapic(d) (!!((d)->arch.emulation_flags & X86_EMU_IOAPIC)) #define has_vpic(d) (!!((d)->arch.emulation_flags & X86_EMU_PIC)) -#define has_vvga(d) (!!((d)->arch.emulation_flags & X86_EMU_VGA)) +#define has_vvga(d) (IS_ENABLED(CONFIG_X86_STDVGA) && \ + !!((d)->arch.emulation_flags & X86_EMU_VGA)) #define has_viommu(d) (!!((d)->arch.emulation_flags & X86_EMU_IOMMU)) #define has_vpit(d) (!!((d)->arch.emulation_flags & X86_EMU_PIT)) #define has_pirq(d) (!!((d)->arch.emulation_flags & X86_EMU_USE_PIR= Q)) diff --git a/xen/arch/x86/include/asm/hvm/io.h b/xen/arch/x86/include/asm/h= vm/io.h index f2b8431fac..32a2490fbc 100644 --- a/xen/arch/x86/include/asm/hvm/io.h +++ b/xen/arch/x86/include/asm/hvm/io.h @@ -108,7 +108,11 @@ struct vpci_arch_msix_entry { int pirq; }; =20 +#ifdef CONFIG_X86_STDVGA void stdvga_init(struct domain *d); +#else +static inline void stdvga_init(struct domain *d) {} +#endif =20 extern void hvm_dpci_msi_eoi(struct domain *d, int vector); =20 --=20 2.25.1