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 4ACCAC4332F for ; Wed, 23 Nov 2022 16:04:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236514AbiKWQEs (ORCPT ); Wed, 23 Nov 2022 11:04:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237748AbiKWQEr (ORCPT ); Wed, 23 Nov 2022 11:04:47 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84E175CD3D; Wed, 23 Nov 2022 08:04:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669219486; x=1700755486; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=d55MEzSITgAIwoLWl00J4QxRdqUnar9DyNE6a8QVJQ0=; b=Znm53c6MWiPwzYHOy1TpIp8EjH1JKaOxL556w0UdtP89P+qeneVclkTd 58sBTKvP7CQfW6R/LEdedNlt4x4k7B6DgM+TL2CpJLAcrjUEeRLamk1Zj gWzGfIDyZVjWYvIT/g2+79Uf97ipWXdzq+vDvLub3BmRY7G8o/fCLClDs ky8jx7YxzR1mTmgVKMR0h8OZJlpNuBWv5AbkaSM6KE4T6OZOc3L6hETZg 9Jtnt7YAxwmJtQYvDvHojawuSMHxoabAroDyHe3hJva+Q3E+mZG+tXLI5 WSRLnAruqbaDSwgGvEDu4j2YkHVdwNy/gEh4xxVzGHfbQ/w+ysLxx7ZAL g==; X-IronPort-AV: E=McAfee;i="6500,9779,10540"; a="297458549" X-IronPort-AV: E=Sophos;i="5.96,187,1665471600"; d="scan'208";a="297458549" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2022 08:04:46 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10540"; a="619665323" X-IronPort-AV: E=Sophos;i="5.96,187,1665471600"; d="scan'208";a="619665323" Received: from vcbudden-mobl3.amr.corp.intel.com (HELO [10.212.129.67]) ([10.212.129.67]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2022 08:04:44 -0800 Message-ID: <7601f686-ed35-5329-a54d-0c5c38dbd518@intel.com> Date: Wed, 23 Nov 2022 08:04:44 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH 1/6] x86/tdx: Support hypercalls for TDX guests on Hyper-V Content-Language: en-US To: Dexuan Cui , "'ak@linux.intel.com'" , "'arnd@arndb.de'" , "'bp@alien8.de'" , "'brijesh.singh@amd.com'" , "Williams, Dan J" , "'dave.hansen@linux.intel.com'" , Haiyang Zhang , "'hpa@zytor.com'" , "'jane.chu@oracle.com'" , "'kirill.shutemov@linux.intel.com'" , KY Srinivasan , "'linux-arch@vger.kernel.org'" , "'linux-hyperv@vger.kernel.org'" , "'luto@kernel.org'" , "'mingo@redhat.com'" , "'peterz@infradead.org'" , "'rostedt@goodmis.org'" , "'sathyanarayanan.kuppuswamy@linux.intel.com'" , "'seanjc@google.com'" , "'tglx@linutronix.de'" , "'tony.luck@intel.com'" , "'wei.liu@kernel.org'" , "'x86@kernel.org'" Cc: "'linux-kernel@vger.kernel.org'" References: <20221121195151.21812-1-decui@microsoft.com> <20221121195151.21812-2-decui@microsoft.com> <18323d11-146f-c418-e8f0-addb2b8adb19@intel.com> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-hyperv@vger.kernel.org On 11/22/22 17:56, Dexuan Cui wrote: >> From: Dexuan Cui >> [...] >> The existing asm code for __tdx_hypercall() passes through R10~R15 >> (see TDVMCALL_EXPOSE_REGS_MASK) to the (KVM) hypervisor. >> >> Unluckily, for Hyper-V, we need to pass through RDX, R8, R10 and R11 >> to Hyper-V, so I don't think I can use the existing __tdx_hypercall() ? > I'm checking with the Hyper-V team to see if it's possible for them > to not use RDX and R8, and use R12 and R13 instead. Will keep the > thread updated. That would be nice. But, to be honest, I don't expect them to change the ABI for one OS. It's not a big deal to just make the function a bit more flexible.