Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3416161pxx; Mon, 2 Nov 2020 08:18:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyA1W2Kyg89A2T8rZ4LyNKVxq1GOsgF3b+eDklGaKFNbg2DCvwh4uPQzxt0F+M/CdKLMIAd X-Received: by 2002:a17:906:6545:: with SMTP id u5mr15976500ejn.346.1604333909258; Mon, 02 Nov 2020 08:18:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604333909; cv=none; d=google.com; s=arc-20160816; b=ioQ/v8vu7Z9KTzs/JhNGltYVfXuW62Jc6okXQ1kDkOqKSeI+E/y5RN/mvYkVQ0QoBQ YAWdqdY9jba1qBnlpHYTdnD0DTKwEgaIuo+IK2/HGtC6b9SM8AOYcucsU7NvWWBBTFt/ BLiFCilfNVPGngGvLkAphrjDI+4P3vW7yJGc2PbFDp/25cvv8VEDEzgazWE4FdIcE9Z+ AoxHrkKpG6NOD9n1nHkYKqX0EmZxWOD6SmgQHKRPoh+ZxDuo+fS7R+1wL592H9XG2Ret YZx2nGmKJ7t9m06Cpoj+aWiGrIohQ/vJmvHLhHgkwNdAjCWhwNK/r8FGlKC+pKSvJQw4 WqVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=6esQByIdbCtb4IrsRfDNTgdt6Cv9mAFfQtak/+6rsrY=; b=SHvofr/Vb9T1TwSMkl/v92hQ4Zk/t9uwApF8lZoUKmN9HPLifxyjunzmolyJd2Hdgp V9h8zgeTNjHavoIxe3C8ML2ctu3wALHz6NF/8fY/Ua6xfEuEkK0kp/VCTMV2GCC4KUAt rRT5VHJKl9iQL66jiEDnZl5PrTYqLvU9v4CetGcoumOvlYLIZjnc+lGWj/6uHiQVubk3 FchsjTTY3dMmiIMn45xvL3WzEa0OrZcZe2dwzNTFVTFYqnRo5qnclWiigLCJ6dq7Sz7g +qS108H0E6EqEmHD9p9Qo92ZDrGs42KaSvHi/cpCsV7vVF5AMA2c4Ibm17dyFihbnnYp XkBw== ARC-Authentication-Results: i=1; mx.google.com; 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 m25si4839393edp.176.2020.11.02.08.18.06; Mon, 02 Nov 2020 08:18: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; 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 S1726881AbgKBQPt (ORCPT + 99 others); Mon, 2 Nov 2020 11:15:49 -0500 Received: from gate.crashing.org ([63.228.1.57]:40305 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726473AbgKBQPt (ORCPT ); Mon, 2 Nov 2020 11:15:49 -0500 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 0A2G928B025286; Mon, 2 Nov 2020 10:09:02 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 0A2G918Z025285; Mon, 2 Nov 2020 10:09:01 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 2 Nov 2020 10:09:01 -0600 From: Segher Boessenkool To: Borislav Petkov Cc: shuo.a.liu@intel.com, linux-kernel@vger.kernel.org, x86@kernel.org, Greg Kroah-Hartman , "H . Peter Anvin" , Thomas Gleixner , Ingo Molnar , Sean Christopherson , Yu Wang , Reinette Chatre , Yakui Zhao , Dave Hansen , Dan Williams , Fengwei Yin , Zhi Wang , Zhenyu Wang , Arvind Sankar , Peter Zijlstra , Nick Desaulniers Subject: Re: [PATCH v5 04/17] x86/acrn: Introduce hypercall interfaces Message-ID: <20201102160901.GU2672@gate.crashing.org> References: <20201019061803.13298-1-shuo.a.liu@intel.com> <20201019061803.13298-5-shuo.a.liu@intel.com> <20201102145657.GD15392@zn.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201102145657.GD15392@zn.tnic> User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 02, 2020 at 03:56:57PM +0100, Borislav Petkov wrote: > On Mon, Oct 19, 2020 at 02:17:50PM +0800, shuo.a.liu@intel.com wrote: > > +static inline long acrn_hypercall0(unsigned long hcall_id) > > +{ > > + long result; > > + > > + asm volatile("movl %1, %%r8d\n\t" > > + "vmcall\n\t" > > + : "=a" (result) > > + : "ir" (hcall_id) > ^^ > > Not "irm"? Or simply "g" in that case? I think that will work for x86_64. But it won't matter much, most of the time you give an immediate number. It is a tiny bit neater of course (if anyone still remembers what "g" is, you cannot use it much these days). Segher