From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (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 99F6B212D70 for ; Tue, 14 Jan 2025 01:35:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=96.67.55.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736818558; cv=none; b=nfRbcNV/HIY+ZXd8CFdnE6OQfw0rv+9YhFZ8GNwW9SAN31KAkAtqk1cVTSTB8eTeH072zHueSg/SoSVFJX/o+HpslDoJ6+bE/5NXdVEsBzP4JSiBZ+vdCwAC0mBNgixfTQt80566jVJqyCHYWwgfuZoXs2qVhACUvQe0CrqHCoE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736818558; c=relaxed/simple; bh=RQGMVtyvWZ3vVh/wIEmY5Sxm378bLlakCbrQz8eqOzI=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=KoCeZgKVTb+V9oDGLWSr8C6m7ZdumUt0I/1YfRCtBY40Rckd739jPZE2XBQS4XZAKteJkx2wIbxnbpfdjJfy9mAA+hr7jH3Ld6AsMHB0P74RBx5A64PWlj/jSiNzvd5vGrtAG3Pqgn5GU5r/1MaRjXJyjl4PNaXVI6J5cW6rUrg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com; spf=pass smtp.mailfrom=shelob.surriel.com; arc=none smtp.client-ip=96.67.55.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=surriel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shelob.surriel.com Received: from fangorn.home.surriel.com ([10.0.13.7]) by shelob.surriel.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1tXVnn-000000003rI-3gpg; Mon, 13 Jan 2025 20:33:07 -0500 Message-ID: <12ab86daa5c9fde4be692410fd477e97970a3688.camel@surriel.com> Subject: Re: [PATCH v4 05/12] x86/mm: add INVLPGB support code From: Rik van Riel To: Jann Horn Cc: x86@kernel.org, linux-kernel@vger.kernel.org, bp@alien8.de, peterz@infradead.org, dave.hansen@linux.intel.com, zhengqi.arch@bytedance.com, nadav.amit@gmail.com, thomas.lendacky@amd.com, kernel-team@meta.com, linux-mm@kvack.org, akpm@linux-foundation.org Date: Mon, 13 Jan 2025 20:33:07 -0500 In-Reply-To: References: <20250112155453.1104139-1-riel@surriel.com> <20250112155453.1104139-6-riel@surriel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.1 (3.54.1-1.fc41) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Sender: riel@surriel.com On Mon, 2025-01-13 at 18:24 +0100, Jann Horn wrote: > On Sun, Jan 12, 2025 at 4:55=E2=80=AFPM Rik van Riel > wrote: > > +/* Wait for INVLPGB originated by this CPU to complete. */ > > +static inline void tlbsync(void) > > +{ > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 asm volatile("tlbsync"); > > +} >=20 > If possible, it might be a good idea to add a cant_migrate() > assertion > in here, though I'm not sure if that works in terms of include > hierarchy. >=20 Nice idea. It just builds without any compiler issues, so I've included that for the next version. --=20 All Rights Reversed.