Received: by 2002:ab2:78c:0:b0:1ec:b906:25e5 with SMTP id h12csp258017lqe; Fri, 23 Feb 2024 03:42:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX03AVdD3yCFiVFnhX4z/83xqsD4ZxBMVNCPKbAFa47ucvKTBQJkQaow1pHy3EuaF7EMeprv+UCPtZCq+JXk8sCg0H2Oy89sr+IyydTpA== X-Google-Smtp-Source: AGHT+IGwRyLBTZ03jM233FaCAhauB8J6jh969aGIXdun1uV1XG9jiPdDzkPpP6T+ww7Yk5Fj65s3 X-Received: by 2002:a05:6808:650c:b0:3c1:829d:8419 with SMTP id fm12-20020a056808650c00b003c1829d8419mr1658060oib.11.1708688575265; Fri, 23 Feb 2024 03:42:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708688575; cv=pass; d=google.com; s=arc-20160816; b=eXeLCv/9ltH8XhXJI+Qqbdte98boYzoOJ0E/1Wm0M8s+L8OjxRUX/CTcYgwjUj3qdC jRaK1NveDF1iQ5KRnqX40VYhW9GgtEFZp9dLTzUB87o54g6SsmcSPmkYeKVOWZS7FlfU sAWvfgpFD0BKqFzpdA8+s3xdhwk3K2XXK+df64a+Why/GsM4s/BuYoUIgwFCPfjtwWc8 Q1uUzLpz2s34dgap4JwUF86IOgduBrZpuaWKB12FlBUjLkhXTWfIlJE5RrXIRA/2KNO8 3/3xXwUvv5GnvXX8Y2aP7sa4k68RSIVGHruI2lBMnvNZKCFQm8rPDhyL3mm31UqSeI/1 R+WQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NvEaY6Xw2Dm6e9mkaP1Jzdd2tWdo28jwymeqYhshkbM=; fh=KU1pwX3zMOn+MuuV9KSyXJEkcKV5eeZ7SGZAt1z8XUo=; b=v9CyhouLeZibXZY+kerhYuuvL0kzBM1WRcL5xSr45Mnwm1UF3eTO2nxgqIuJ67+Zer YqPdpYwZpDdwenqfQ0QQ98qKZi6eLByld1w9Lrodfl88FvAXnbL8hUFQS2//Rz0zjE4K MucNmAMDIyWVMOMy1GAFRvahJaJliLBge6z5XbCUsTVoUZtv4RMlBceCq2eRbhZQ6aYK u9POIJvhHoxZjqjzL/utLuhJuQ3fWDeyMEB3Olz5K5cS08oKGeox6MkSahiN5FIZJzE+ 91xrwpaqMsHAt78ZsHUJ1feE/AKEcMPt88bLttJjOZpiL9y9Fh7j36qKEudpjBg8KJkO 5H5Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LUIqoF4d; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-78245-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78245-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k5-20020ad45be5000000b0068f51dc06f1si13676065qvc.450.2024.02.23.03.42.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 03:42:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78245-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LUIqoF4d; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-78245-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78245-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id ECEFB1C21E8C for ; Fri, 23 Feb 2024 11:42:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91B9467C72; Fri, 23 Feb 2024 11:42:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LUIqoF4d" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D4761758D for ; Fri, 23 Feb 2024 11:42:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708688568; cv=none; b=iR0WPv9N2uACfERykryniKluR5dk7E+3iglf8LwFkwJ/o2jQHBs5KU05hhKYMRWzvaMEVzE3BNe34D6D/MzL/IsHadDs+Np2bYjrojmn780J8cSnpe3ra+GZheC8mX4Xf42XAeDD88Wjr5uuINYZF/bA2FoUqpOueDtfOlJzgAk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708688568; c=relaxed/simple; bh=vdBaLCWVdyZ71ZZvVpVhOOJKh3hy3RP5Mn3l/HmMOeE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HYwL+PWaDyZu4h8R4V5gEeV3mgTs5hkRoe9VfsqMmxO2FhND4xT3C5sD03uGSzlXsoD+LWyDJBMsLqMkjJkZ/oMDCXIka0N5MkqsbEwKKFXmYzcKECJQJJ/QcYRh/AbRXdWLJoGCYLwmAbHBEBdYDyaqRJ5PS8qjRNgerTwaBFo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=LUIqoF4d; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708688567; x=1740224567; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=vdBaLCWVdyZ71ZZvVpVhOOJKh3hy3RP5Mn3l/HmMOeE=; b=LUIqoF4dTX9FpaeS5+xx0/2nesPUGNqrObi0OCggM9RqIBIHNj6jki7p EJLs9N9lDzxrxZ2A6UDFhVRt9djtntokwePQ2dwzTjwdjzX7enjCVD3cX 2CAHBQTHbqJos/S5ROugV2yl8WD3epjfo04yV1ooAl4O1YEyWm6lCk1LH 2LsfC6hDzK3riUXM5+bkl2wvq5dFVl2isCo6Gc/FnL0tISwIthcN19FyG Qt0aMGt1VuSUr5pM8qqWKIGMTQlG5SCpc1Gn13Io/gybvelsWgAsogSNJ lE8DG6BLez9NoH/OOyhg8rMxK8j5h8iAAJOjYal6eNDIDy7AM3552tNHW Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10992"; a="6784593" X-IronPort-AV: E=Sophos;i="6.06,179,1705392000"; d="scan'208";a="6784593" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 03:41:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10992"; a="937024666" X-IronPort-AV: E=Sophos;i="6.06,179,1705392000"; d="scan'208";a="937024666" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 23 Feb 2024 03:41:03 -0800 Received: by black.fi.intel.com (Postfix, from userid 1000) id A491734C; Fri, 23 Feb 2024 13:41:01 +0200 (EET) Date: Fri, 23 Feb 2024 13:41:01 +0200 From: "Kirill A. Shutemov" To: Dave Hansen Cc: linux-kernel@vger.kernel.org, pbonzini@redhat.com, tglx@linutronix.de, x86@kernel.org, bp@alien8.de Subject: Re: [RFC][PATCH 12/34] x86/cpu/intel: Actually use "address configuration" infrastructure for MKTME Message-ID: References: <20240222183926.517AFCD2@davehans-spike.ostc.intel.com> <20240222183942.601EE2E5@davehans-spike.ostc.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240222183942.601EE2E5@davehans-spike.ostc.intel.com> On Thu, Feb 22, 2024 at 10:39:42AM -0800, Dave Hansen wrote: > > From: Dave Hansen > > Now that the TME detection is only called once at boot, stop twiddling > 'boot_cpu_data' directly and move over to 'bsp_addr_config'. > > Signed-off-by: Dave Hansen > --- > > b/arch/x86/kernel/cpu/intel.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff -puN arch/x86/kernel/cpu/intel.c~intel-addr-reduce arch/x86/kernel/cpu/intel.c > --- a/arch/x86/kernel/cpu/intel.c~intel-addr-reduce 2024-02-22 10:08:54.296682462 -0800 > +++ b/arch/x86/kernel/cpu/intel.c 2024-02-22 10:08:54.296682462 -0800 > @@ -401,11 +401,8 @@ detect_keyid_bits: > mktme_status = MKTME_ENABLED; > } > > - /* > - * KeyID bits effectively lower the number of physical address > - * bits. Update cpuinfo_x86::x86_phys_bits accordingly. > - */ > - c->x86_phys_bits -= keyid_bits; > + /* KeyID bits effectively lower the number of physical address bits */ > + bsp_addr_config.phys_addr_reduction_bits = keyid_bits; Do we expect reduction_bits to stack? Like can multiple features steal physical bits? Make use "+= keyid_bits" here? -- Kiryl Shutsemau / Kirill A. Shutemov