From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E9DEC19F2A for ; Thu, 4 Aug 2022 18:41:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240034AbiHDSli (ORCPT ); Thu, 4 Aug 2022 14:41:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232592AbiHDSlh (ORCPT ); Thu, 4 Aug 2022 14:41:37 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D18CD61DB9 for ; Thu, 4 Aug 2022 11:41:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659638496; x=1691174496; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=9Rtb34Y8ymUuSf9K//6BaeaY14gW3/LRcO+rXWYrbGc=; b=FQkZQHWEPX2yWIJl2+kDsK9Wd6XIdxSUOxYUeev7a41muJC93eaK6/fZ ikPYAIYs5MI44Nc5QB0DP4fNQFKFa+N/qmtcL8m46HB83ueIdYXwMbGKp cG7y9Sg+wkhl7QMzfDSL7s0w8prrfJGYCxM+Mnr2scZJ4L5z34If+3jZ6 kX+lg5jV9/ivW/9uR670354QP79Huuhsz2khp3Kr8pMG+W9kvVG/mg3Rw bvXCFT2EApF+cxPUx089HparrNOItXvDncBP0OnDFV2N0Bf+2BOg6wfm6 dUqaup5/+zyT64rpx7qo+MyJknR5v5daMbUJWVPQBYD5eO7E/mtVAW8Z0 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10429"; a="315897670" X-IronPort-AV: E=Sophos;i="5.93,216,1654585200"; d="scan'208";a="315897670" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2022 11:41:36 -0700 X-IronPort-AV: E=Sophos;i="5.93,216,1654585200"; d="scan'208";a="631701158" Received: from lnavery-mobl1.amr.corp.intel.com (HELO [10.255.228.146]) ([10.255.228.146]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2022 11:41:35 -0700 Message-ID: <91ccae0b-6135-6163-f59b-4e99624090a5@intel.com> Date: Thu, 4 Aug 2022 11:41:36 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] x86/acrn: Improve ACRN hypercalls Content-Language: en-US To: Uros Bizjak , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" References: <20220804180358.32944-1-ubizjak@gmail.com> From: Dave Hansen In-Reply-To: <20220804180358.32944-1-ubizjak@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/4/22 11:03, Uros Bizjak wrote: > As explained in section 6.47.5.2, "Specifying Registers for Local Variables" > of the GCC info documentation, the correct way to specify register for > input operands when calling Extended 'asm' is to define a local register > variable and associate it with a specified register: > > register unsigned long r8 asm ("r8") = hcall_id; IIRC, that's what the ACRN folks proposed first. But, it's more fragile because you can't, for instance, put a printk() in that function between the variable definition and assebly.