From nobody Mon Feb 9 07:26:27 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1655265272; cv=none; d=zohomail.com; s=zohoarc; b=EdlRA2lvPP7z8Zho4galRijWKwKbJhK1uWrCC/vzkEEt5JGcRBmHrngdDfWhZWLeKv4W9xxLVyrcJpCdhGVuHJZ8h3g1JEHZczgn5HT/ki1Su4MtqQhlCbKcMdbvteImUTCxXUOItgktj5N4zEXg5iPWfGGcBJ8vSdXQ6Azj1pM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655265272; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=/VLkMAQzQKp1wER/MRztLSCVJDhGOGAOAJRQkvKI5BA=; b=AQ/V4RjNMFs43pbbWfDbMiBkNcMIQv93+uO/yRntzYlpwQNctGEGY7R+Vh+d/2AFNDXb/dmKdhi/CrpQ01iVFF7RP1ElGfTuXn8c8c9IIurLzQRC82gwSpPrQe0rbefMhZkOofeMQ2w0GLwWgiQEf0/NB1kBBVwFoZYghbDgH/Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=@intel.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1655265271202795.4705196128966; Tue, 14 Jun 2022 20:54:31 -0700 (PDT) Received: from localhost ([::1]:49726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o1K6v-0002x3-Nm for importer@patchew.org; Tue, 14 Jun 2022 23:54:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1K4d-0002Ff-8a for qemu-devel@nongnu.org; Tue, 14 Jun 2022 23:52:07 -0400 Received: from mga09.intel.com ([134.134.136.24]:55414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o1K4Z-0001xg-C3 for qemu-devel@nongnu.org; Tue, 14 Jun 2022 23:52:06 -0400 Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2022 20:51:55 -0700 Received: from duan-server-s2600bt.bj.intel.com ([10.240.192.123]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2022 20:51:53 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655265123; x=1686801123; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=FspUsQIrx6b0MyOb0TO3s5vfVl71UDr4jFWg9dAe8Yw=; b=V4AkTR/pDeEBAdnq/lUf/Qlx/QkgTWPbnNNvEWcLcBRw0WbD08LQbpj8 yDLPNvPL/lwnnCzDSDoxJq1wL0gF7KA65i+iSqY+0oLl/VRy4njd4rNWl tlQ5fS9Sbx1KCni4mBANGPX9jAUDsOhZAQQ92ZH5oWp07eeiq7jdAnApZ b7y1oM6k7r+m/wOBnm65Ps+ElqnoPeB+43yrpjQzXfA6KwOGgzRWOlfMp okIHkvSmPxCUiSi5IGRH+8TjgcZVi8rHjaC9EZeFg/S3n5KmtzGgJl0BP 6Pwm3dgWdlyyu9ex9FsQraYb3lKuOYnIP8PEuxg0MuIF2yCoQcQc6qE+c w==; X-IronPort-AV: E=McAfee;i="6400,9594,10378"; a="279542037" X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="279542037" X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="640757100" From: Zhenzhong Duan To: qemu-devel@nongnu.org Cc: mst@redhat.com, marcel.apfelbaum@gmail.com, lersek@redhat.com, imammedo@redhat.com, kraxel@redhat.com Subject: [PATCH] =?UTF-8?q?q35=EF=BC=9AEnable=20TSEG=20only=20when=20G=5FS?= =?UTF-8?q?MRAME=20and=20TSEG=5FEN=20both=20enabled?= Date: Wed, 15 Jun 2022 11:45:01 +0800 Message-Id: <20220615034501.2733802-1-zhenzhong.duan@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=134.134.136.24; envelope-from=zhenzhong.duan@intel.com; helo=mga09.intel.com X-Spam_score_int: -44 X-Spam_score: -4.5 X-Spam_bar: ---- X-Spam_report: (-4.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @intel.com) X-ZM-MESSAGEID: 1655265273198100001 Content-Type: text/plain; charset="utf-8" According to spec: "TSEG Enable (T_EN): Enabling of SMRAM memory for Extended SMRAM space only. When G_SMRAME =3D 1 and TSEG_EN =3D 1, the TSEG is enabled to appear in the appropriate physical address space. Note that once D_LCK is set, this bit becomes read only." Changed to match the spec description. Signed-off-by: Zhenzhong Duan Reviewed-by: Gerd Hoffmann --- hw/pci-host/q35.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index ab5a47aff560..20da1213747c 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -379,7 +379,8 @@ static void mch_update_smram(MCHPCIState *mch) memory_region_set_enabled(&mch->high_smram, false); } =20 - if (pd->config[MCH_HOST_BRIDGE_ESMRAMC] & MCH_HOST_BRIDGE_ESMRAMC_T_EN= ) { + if ((pd->config[MCH_HOST_BRIDGE_ESMRAMC] & MCH_HOST_BRIDGE_ESMRAMC_T_E= N) && + (pd->config[MCH_HOST_BRIDGE_SMRAM] & SMRAM_G_SMRAME)) { switch (pd->config[MCH_HOST_BRIDGE_ESMRAMC] & MCH_HOST_BRIDGE_ESMRAMC_TSEG_SZ_MASK) { case MCH_HOST_BRIDGE_ESMRAMC_TSEG_SZ_1MB: --=20 2.25.1