From patchwork Tue Nov 26 23:22:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denis Mukhin via B4 Relay X-Patchwork-Id: 13886399 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 6D389D66BA1 for ; Tue, 26 Nov 2024 23:23:30 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.844055.1259633 (Exim 4.92) (envelope-from ) id 1tG4tn-000115-S7; Tue, 26 Nov 2024 23:23:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 844055.1259633; Tue, 26 Nov 2024 23:23: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 1tG4tn-0000za-Ft; Tue, 26 Nov 2024 23:23:15 +0000 Received: by outflank-mailman (input) for mailman id 844055; Tue, 26 Nov 2024 23:22:04 +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 1tG4se-0000Ao-LM for xen-devel@lists.xenproject.org; Tue, 26 Nov 2024 23:22:04 +0000 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 3d68389e-ac4d-11ef-a0cd-8be0dac302b0; Wed, 27 Nov 2024 00:22:02 +0100 (CET) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id EB2D95C5CB9; Tue, 26 Nov 2024 23:21:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 24EECC4CED7; Tue, 26 Nov 2024 23:21:56 +0000 (UTC) Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19CF7D66B93; Tue, 26 Nov 2024 23:21:56 +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" X-Inumbo-ID: 3d68389e-ac4d-11ef-a0cd-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjEzOS4xNzguODQuMjE3IiwiaGVsbyI6ImRmdy5zb3VyY2Uua2VybmVsLm9yZyJ9 X-Custom-Transaction: eyJpZCI6IjNkNjgzODllLWFjNGQtMTFlZi1hMGNkLThiZTBkYWMzMDJiMCIsInRzIjoxNzMyNjYzMzIyLjY5OTU3NCwic2VuZGVyIjoiZGV2bnVsbCtkbXVraGluLmZvcmQuY29tQGtlcm5lbC5vcmciLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732663316; bh=2WgWqZsNDflVD6JmnKTRAOPbRC5jJUlqppnLV6LXXy4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=HZNZNKqgwaqz1KQn2n9Opxrj6816OOMoiXpti9Bn7hSOYnvixMKkCUmFKaBaEhzph Sz4VMsj81Hzs/PfkGBnwl+f6KCl5xiQLGLDzNWqr8ekYWoNKoRBzyJ19KXkwGRV06T SVNWyam3s87wCS4a5DrxYg/BcE+CSbW1svyvCFr+BJc+j4gRVp5K3vmm2m6UZBqzer wAj9QvBnHSCX1Jd4Ykhaegh7WQW7FHSjcsXPWEIrdhe0ICveHsM8mu0T26TwWCNvdN AF/WG6mmmxKyYjwQJZ/ouij7VbTQLjifFUNfgm639nZYsmAb/BWxxzS+N+0kXpA7Ez NszparVX9JDtA== From: Denis Mukhin via B4 Relay Date: Tue, 26 Nov 2024 15:22:02 -0800 Subject: [PATCH 12/36] x86/domain: print emulation_flags MIME-Version: 1.0 Message-Id: <20241126-vuart-ns8250-v1-v1-12-87b9a8375b7a@ford.com> References: <20241126-vuart-ns8250-v1-v1-0-87b9a8375b7a@ford.com> In-Reply-To: <20241126-vuart-ns8250-v1-v1-0-87b9a8375b7a@ford.com> To: Jan Beulich , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , "Daniel P. Smith" , Stefano Stabellini , Julien Grall , Bertrand Marquis , Michal Orzel , Rahul Singh , Volodymyr Babchuk , Alistair Francis , Bob Eshleman , Connor Davis , Oleksii Kurochko , Shawn Anastasio , Anthony PERARD , Juergen Gross , Christian Lindig , David Scott , =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= Cc: xen-devel@lists.xenproject.org, Denis Mukhin X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1732663312; l=1263; i=dmukhin@ford.com; s=20241125; h=from:subject:message-id; bh=732gIMLcaCgGTFTHv9vAjNIT6ES/ZZttjeIUCT3F6PI=; b=2D1GntxceEk8CMvCOGVcGx8ZV/nfrqT6w+jxAmtSvt6YKGse6dADcw0/VXr3voTosV5dqLTi0 bWeqzqNK8CfARQ2L2mPeU6iFTzP8vSKt5Jjr+TxraPvuDidph2v/E57 X-Developer-Key: i=dmukhin@ford.com; a=ed25519; pk=SsDZ9p39s0fqcpUKQuqKqrbn0rq6EtEAClvpOpzx6+U= X-Endpoint-Received: by B4 Relay for dmukhin@ford.com/20241125 with auth_id=287 X-Original-From: Denis Mukhin Reply-To: dmukhin@ford.com From: Denis Mukhin Print d->arch.emulation_flags on the console for better traceability while debugging in-hypervisor hardware emulators. Signed-off-by: Denis Mukhin --- xen/arch/x86/domain.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 78a13e6812c9120901d0a70fb3bc1bd6a8b6917d..c88d422a64544531c1e1058fa484364bb4277d1e 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -818,11 +818,15 @@ int arch_domain_create(struct domain *d, if ( !emulation_flags_ok(d, emflags) ) { - printk(XENLOG_G_ERR "d%d: Xen does not allow %s domain creation " + printk(XENLOG_G_ERR "d%d: Xen does not allow %s %sdomain creation " "with the current selection of emulators: %#x\n", - d->domain_id, is_hvm_domain(d) ? "HVM" : "PV", emflags); + d->domain_id, + is_hvm_domain(d) ? "HVM" : "PV", + is_hardware_domain(d) ? "(hardware) " : "", + emflags); return -EOPNOTSUPP; } + printk(XENLOG_G_INFO "d%d: emulation_flags %#x\n", d->domain_id, emflags); d->arch.emulation_flags = emflags; #ifdef CONFIG_PV32