Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2392471rda; Wed, 25 Oct 2023 01:03:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHigBz1eYl7xK35AahfGabUzJW/qWhgYqBWSA0gseQofjpyaaVtMBcORYQ6+wrR/Vus/Wxq X-Received: by 2002:a25:c057:0:b0:d9a:ea20:7eb6 with SMTP id c84-20020a25c057000000b00d9aea207eb6mr12714281ybf.38.1698220986547; Wed, 25 Oct 2023 01:03:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698220986; cv=none; d=google.com; s=arc-20160816; b=u70QTd+SOAVxX+YSbgLGzgB6uR6nygONTaJL+IBfiiKR/YEFd7slmkJXzennzXz+gg WBnwFxeOg+fopSYlpWaRyA641f0vGFORAseJ8cRyvesQEeCjlEoZxprMW4xvU2AURvOC 9Z5wV7Qxdew952SD0kObEq053cIGKeV704JJNEcCw8QeHYBIu9hx4ug14f8VmO+yKq26 ypFdxYAKI4Z4nQVNNFfbQHWvht7sZXR7xJKpE4336mFeEeUZNBiGG/3uYFJbrXIQAyKE FQxPdrFKKeDUdKfYE2LR4yalOZWkEXJiTILnrGLBesBYoVaCw05e79BbvsLK4i8G8ZkX cOBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bWZHBY0qveKBPw5XOi4+cbTA2/t5IHaThFqzSpaE5Tw=; fh=xuVFiCge2xT2TwpRHczQWkaCGPkF8JVzy1XTa7/FKOw=; b=N3ZF6PjO+42mFQmDxA4tcxHeToBZYG8IM78Tu4ehb2kATA1rcwacPBxhcNW2U+S0H3 yxf/QSmN4ql6WhAr2RgvVLmQcBTvVImRj7qvtMejt8n/ucyjr0Mm/07bnWvGfWuNYJql 3Sg+Rihq+xxx8qOW5s/uUV/J6iKx00487vbyYO2VTF8GpMoPft3maSlPT03mwqhLHzd3 YENrry37byU/UGoCj1n0UbvsQttzyycjjOiom+1Lpd7nV4P2jtlyLGXJ7d/lWU7ZiR2Y dUZ5dzrMTBTZ3w6s0PRQgGHK4cVpr71OwKBfHW9iD31dUka5fY6Qz/hjMMj36Ar1HEI5 05hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=UfvCywBm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id o7-20020a056902110700b00d9a48006b3asi13048965ybu.202.2023.10.25.01.03.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 01:03:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=UfvCywBm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id D3B108020F83; Wed, 25 Oct 2023 01:03:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234223AbjJYICt (ORCPT + 99 others); Wed, 25 Oct 2023 04:02:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233065AbjJYICs (ORCPT ); Wed, 25 Oct 2023 04:02:48 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 437DFB0; Wed, 25 Oct 2023 01:02:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=bWZHBY0qveKBPw5XOi4+cbTA2/t5IHaThFqzSpaE5Tw=; b=UfvCywBmjAti4OdilR/Rwo4i99 igUDFtD+Y+ABTD/Hi6zS7leerHPG2AjtuIUIE8kQyJ4cwA16JsXv80Y49lXEvo7tRbxyzsFcg64PT VyooRo+HI16LGRAeZqU9tYlYWRB3qeVrdL2zzO53mFz617JXqIvaEsQkrsjkft+LJqkbul693JNeu hpSUxy64iSwqSSskcMXWtqrEpDRt/WpGFiArea8eaiUBgsUkCX4h78ylsUGiF8E6O1IGcFQ7Z0YCB HIgtifIV1npaDVcBNbR8yfGBsqbUSEbYA9+LYcS9QBtR+uZqVl1avKUw52H6XeHUwktwzCB51D3TH dgOU5wfg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1qvYqE-007ZnC-1S; Wed, 25 Oct 2023 08:02:14 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 9E49230047C; Wed, 25 Oct 2023 10:02:13 +0200 (CEST) Date: Wed, 25 Oct 2023 10:02:13 +0200 From: Peter Zijlstra To: Andrew Cooper Cc: Pawan Gupta , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Josh Poimboeuf , Andy Lutomirski , Jonathan Corbet , Sean Christopherson , Paolo Bonzini , tony.luck@intel.com, ak@linux.intel.com, tim.c.chen@linux.intel.com, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, Alyssa Milburn , Daniel Sneddon , antonio.gomez.iglesias@linux.intel.com, Alyssa Milburn Subject: Re: [RESEND][PATCH 1/6] x86/bugs: Add asm helpers for executing VERW Message-ID: <20231025080213.GC37471@noisy.programming.kicks-ass.net> References: <20231020-delay-verw-v1-0-cff54096326d@linux.intel.com> <20231020-delay-verw-v1-1-cff54096326d@linux.intel.com> <20231025062818.7kaerqklaut7dg5r@desk> <20231025072255.GA37471@noisy.programming.kicks-ass.net> <654468cf-1563-4c1c-8c7c-076bc6dfbabf@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <654468cf-1563-4c1c-8c7c-076bc6dfbabf@citrix.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 25 Oct 2023 01:03:04 -0700 (PDT) On Wed, Oct 25, 2023 at 08:52:50AM +0100, Andrew Cooper wrote: > > +.pushsection .entry.text, "ax" > > + > > +.align 64 > > +SYM_CODE_START_NOALIGN(mds_verw_sel) > > + UNWIND_HINT_UNDEFINED > > + ANNOTATE_NOENDBR > > +1: > > + .word __KERNEL_DS > > + .skip 64 - (. - 1b), 0xcc > > The 1 label aliases mds_verw_sel and this must remain like this for the > construct to work. > > So instead of .skip, why not simply .align 64, 0xcc and get rid of the > 1: label? Because I forgot you can add a filler byte to .align :/ Yes, that's much saner. > Do we have a suitably named constant cacheline size, rather than > opencoding 64? L1_CACHE_BYTES probably. > > > +SYM_CODE_END(mds_verw_sel); > > Given that KVM needs it, this probably needs an EXPORT_SYMBOL_GPL() on it. localyesconfig ftw ;-) /me runs