Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4734092pxk; Wed, 30 Sep 2020 10:15:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvv4/X+pE5fg54VpcaSWFydIpU12HwCUp9DY7HD8LmTHkoDtMEG4GvYCoeJCCGn24lr3tA X-Received: by 2002:a17:906:3a0e:: with SMTP id z14mr3799864eje.192.1601486133067; Wed, 30 Sep 2020 10:15:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601486133; cv=none; d=google.com; s=arc-20160816; b=aaaiCZUCBjF9JGNlZl28IYHOBpZpBNpHkkN2VyF84Grobvvvs50HiCOeG5SYK52Jna xrsq7AhJ++mJbvh+n+NwFA3rCABAR6ljjj0LMpuT8LBlf7iWK55RIGqkmc5i073iWV16 NZYFxoc5y68NRnz/H3Ly189DskSOsf/GhU86pSMxrH2fiGtu9wvxgeRolGaMx7BQn3Sj ySgzVYlF0ncks1PBiWIp9oLR7QuFqHtBNRhfHQmz8joceGgX7D/NAt8GNn13FFSODkjk WHvUP0z9CtzcN8v/FIN0Hi2blvb25czxfg3HSXzMOdJ57bLP1nZEtZecUN6mQA38GrE1 z1yQ== 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=jHJKA7hRgaPNpuVo+JQEXlbcePRjLmXaQK6+uYVPf5U=; b=hf36a/um0qcsScD9KovNrMBF9WwoqOgIOKk5/GdZulXU+tzAIzbWUILUz+8p50g4Or EyD50eYV7k92TM9Ax1GgwS2i5Sz8hQgaZfIIAR3Xq07ogkMcFTqS+eLC6Dqs75K9F/3m gdIz9ggVdMdhRwfN+XP8k9EW1Z5Pl9UcGmrLryfRmLF7YhOEBlDv+20ywPoBegUnFjWt /sucrdJvs+TwiWOX+ECsMxF3BpRtnizBgv/Ax4ltPQmTV8gipI0GPNEOeAvzVTzWQUel 50VOy55QWCnLxST7HkzMmiB+ol0XS9VeLhwsc4H/5X2s+keHXsu62+6UgbcLDwX8vvDO iTiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=xUv1tuP0; 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 ce7si1633650ejb.249.2020.09.30.10.15.09; Wed, 30 Sep 2020 10:15:33 -0700 (PDT) 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=xUv1tuP0; 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 S1728232AbgI3ROC (ORCPT + 99 others); Wed, 30 Sep 2020 13:14:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726540AbgI3ROC (ORCPT ); Wed, 30 Sep 2020 13:14:02 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40749C061755 for ; Wed, 30 Sep 2020 10:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=jHJKA7hRgaPNpuVo+JQEXlbcePRjLmXaQK6+uYVPf5U=; b=xUv1tuP0GJfvVAp8Hu1FBevrZ1 wVjQl9bChDFftl9Mvl98meYy7quCy+XLCzzyZZPkxXgXbOQL/BXiGfAZSaNDMPywr2MFc71nYoJ+8 81F8aEu1BiPr9fWZ2IboibRUbVTlwE6lai0tR9A3XRSVOyEW4Zmq89GcSHk4NGc3DUsTsJgAcB3xU w8aBp4gBPlYOemJmqSbaTvnZS9tHXVeOenogaJ4C7G7fUorMCreyqNrQv5CpiHbuF1v8/zRAtXFFW s5gFiKBj5e3iKAbu1SjLoIeQpOpJ+unhjtZICX25qeix6NcaGjdYVM+t7MgOfUvoB9aY3tfGrxCBI 5RHUhG1A==; 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 1kNffo-0004i1-Ef; Wed, 30 Sep 2020 17:13:48 +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 CBD783003D8; Wed, 30 Sep 2020 19:13:46 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B2DA120419079; Wed, 30 Sep 2020 19:13:46 +0200 (CEST) Date: Wed, 30 Sep 2020 19:13:46 +0200 From: Peter Zijlstra To: Segher Boessenkool Cc: Dave Hansen , Greg Kroah-Hartman , shuo.a.liu@intel.com, linux-kernel@vger.kernel.org, x86@kernel.org, "H . Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Sean Christopherson , Yu Wang , Reinette Chatre , Yakui Zhao , Dan Williams , Fengwei Yin , Zhi Wang , Zhenyu Wang , ndesaulniers@google.com Subject: Re: [PATCH v4 04/17] x86/acrn: Introduce hypercall interfaces Message-ID: <20200930171346.GC2628@hirez.programming.kicks-ass.net> References: <20200922114311.38804-1-shuo.a.liu@intel.com> <20200922114311.38804-5-shuo.a.liu@intel.com> <20200927105152.GG88650@kroah.com> <6f9a2b83-6904-2290-6c4f-526672390beb@intel.com> <20200930111612.GZ2628@hirez.programming.kicks-ass.net> <20200930161036.GY28786@gate.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200930161036.GY28786@gate.crashing.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 30, 2020 at 11:10:36AM -0500, Segher Boessenkool wrote: > Since this variable is a local register asm, on entry to the asm the > compiler guarantees that the value lives in the assigned register (the > "r8" hardware register in this case). This all works completely fine. > This is the only guaranteed behaviour for local register asm (well, > together with analogous behaviour for outputs). Right, that's what they're trying to achieve. The hypervisor calling convention needs that variable in %r8 (which is somewhat unfortunate). AFAIK this is the first such use in the kernel, but at least the gcc-4.9 (our oldest supported version) claims to support this. So now we need to know if clang will actually do this too..