Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp152282pxb; Wed, 18 Nov 2020 00:26:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJwVRn8Jyz8XNHkRcXGmGEtxgB13sdNUQxtarA5f2yXHaqr1/+PKLFGROPIErZno1CLjsgg4 X-Received: by 2002:a50:fb13:: with SMTP id d19mr2326046edq.133.1605687989768; Wed, 18 Nov 2020 00:26:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605687989; cv=none; d=google.com; s=arc-20160816; b=gKI8NnPH7kKcuWNBVXUM6fbc7sCBS//myzr0+p7jQcoV20Rc8ct2MLdI3q+aEKTa3w ag+Gbos3uKWgux+tTTUvvw47RVG8FTDIrkxsUOarpy22smoB3m93XLCTN3GPpHjcO69R SW0WhM2d803LAtCyeWlg/tzrK6II6MdHLbGuFnWL5eO5BckU2g0iaYfnJ5PBnxQtLeTt vrQ5YjaFhcv+EiROk/PF/NOIXx3YXsZvdCeNvKnAUJJhZxyYYeBeApnrJStN5WGEzL0e Qeu/BeFHyarmkH16vqm1MLw3qv/BTQWIAuW7uBGswCwGNdawuVe943UBuGRwPLuMEeSg xdzw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vUnXFIJZqzZmzNV0LWSeeHYXP66FIk+CkNnUB9dnKCU=; b=ejx14L3VuwNQX4Te88+nxWj8t2tgWCWNVMxnAwLOVOKcr9SobgSufSzxL+eD3A0AQ8 zVVgTlbvWifz8+z0gmrcuLpp22tr4/55y8rbAKQFiOhJRJUccEluDRXibVsgk8Zg1n5e yiBdeuNI8y881kfKqwcUDVw+gHMkMF1nqTHXwVUNqUKGi9z4ERuNMqX/MDmLZp2cWxak XC45G+TSIdcaQGNHrbo+9m6RQtNp0DaVmB2K+dgEHC1xJMFJLIamOoQMrpsbfYyH56rb qHWp+zlfJD2CLM1Xeii5tJdlsXF72cdez3UsGcuMIKKP1lycmdIs7LJTvMlKlcGcDjNE 8NmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=G+IerEHE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si16374438edq.466.2020.11.18.00.26.07; Wed, 18 Nov 2020 00:26:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=G+IerEHE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726791AbgKRIXF (ORCPT + 99 others); Wed, 18 Nov 2020 03:23:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726200AbgKRIXD (ORCPT ); Wed, 18 Nov 2020 03:23:03 -0500 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1085EC0613D4 for ; Wed, 18 Nov 2020 00:23:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=vUnXFIJZqzZmzNV0LWSeeHYXP66FIk+CkNnUB9dnKCU=; b=G+IerEHERnznmyiYJon9vagogl KUqxAiX3uYlGGgqhN44pkFOs4WfCJThCRqXJ4FDo1TthjsfzrJsUUykNpPS65nWZdrK3rlIY1MPl0 Xc/G0JUiwrWpB9j3kEAFZjvFuG+5MbGZSNGrcUQu/Y0S/lCwoAHxe6D8WwWuDheFUHRcDH3wjhvBh bFIjmdOolrfqpBKDeMebImeVz+wghtLetV5dzggQJtRpU1lUxbWc18qxiGtPxUQ9hTLsT16PHtxAQ /5GKdAHQ7+ze9YZCVwFG+46+TARGxnYDTl4UR2+5ooMbsCo4WmDg9ZZ6GANb3+4wwLLNTFyY9Blwz YSVV1lMQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kfIjv-0008Fr-SM; Wed, 18 Nov 2020 08:22:56 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 321D7301959; Wed, 18 Nov 2020 09:22:54 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 11A472BBF0492; Wed, 18 Nov 2020 09:22:54 +0100 (CET) Date: Wed, 18 Nov 2020 09:22:54 +0100 From: Peter Zijlstra To: =?iso-8859-1?Q?J=FCrgen_Gro=DF?= Cc: Andy Lutomirski , Andrew Cooper , Josh Poimboeuf , Shinichiro Kawasaki , "linux-kernel@vger.kernel.org" , Nicholas Piggin , Damien Le Moal , X86 ML Subject: Re: WARNING: can't access registers at asm_common_interrupt Message-ID: <20201118082254.GH3121378@hirez.programming.kicks-ass.net> References: <33843b7f-ed8a-8fcb-19bc-c76cf00f453d@citrix.com> <20201111194206.GK2628@hirez.programming.kicks-ass.net> <20201111195900.2x7kfce2ejkmrzi3@treble> <20201111200730.GM2628@hirez.programming.kicks-ass.net> <20201111201506.bftpmx4svxn376tn@treble> <61b2538f-7be6-8f4a-9395-03071b5cc6f0@citrix.com> <20201116130413.GC3121392@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 18, 2020 at 07:47:36AM +0100, J=FCrgen Gro=DF wrote: > On 16.11.20 14:04, Peter Zijlstra wrote: > > On Mon, Nov 16, 2020 at 12:56:32PM +0100, J=FCrgen Gro=DF wrote: > > > > > > > > > static inline notrace unsigned long arch_local_save_flags= (void) > > > > > > > > > { > > > > > > > > > PVOP_CALL_ARGS; > > > > > > > > > PVOP_TEST_NULL(irq.save_fl); > > > > > > > > > asm_inline volatile(ALTERNATIVE(paravirt_alt(PARAVIR= T_CALL), > > > > > > > > > "PUSHF; POP _ASM_AX", > > > > > > > > > X86_FEATURE_NATIVE) > > >=20 > > > I am wondering whether we really want a new feature (basically "not > > > XENPV). We could use ~X86_FEATURE_XENPV and teach apply_alternatives() > > > to understand negated features (yes, this limits the number of featur= es > > > to 32767, but I don't think this is a real problem for quite some tim= e). > > >=20 > > > Thoughts? > >=20 > > I went with the simple thing for now... If we ever want/need another > > negative alternative I suppose we can do as you suggest... > >=20 > > I was still poking at objtool to actually dtrt though.. >=20 > I'd like to include this part in my series (with a different solution > for the restore_fl part, as suggested by Andy before). >=20 > Peter, are you fine with me taking your patch and adding your SoB? Sure, note that I only compile tested it, as it was my test-bed for playing with objtool (which I still haven't managed to get back to and finish :/). So if it actually _works_ feel free to take it, otherwise you can have whatever bits and pieces remain after you've butchered it to do as you want.