Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp169175lqo; Thu, 9 May 2024 16:42:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX4tAKtBk/IaCSvmG8zVCP14OKTyEbTdqogbwGdcslyq0NBmJFF1zySOTLH8jRDyq8rhoCZ+boTEDw9gxwK3TBN0AbsRIQwPoDYIg1BwQ== X-Google-Smtp-Source: AGHT+IEFsgaLV65nFhhJYYYt8YZuW50S0xxurXn9OhoE+MEDiEhlxNcBbIWw2cf3GIvOOU5W5iu4 X-Received: by 2002:a05:6a20:daa2:b0:1af:9edd:9cb3 with SMTP id adf61e73a8af0-1afde0cb50fmr1578434637.17.1715298136658; Thu, 09 May 2024 16:42:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715298136; cv=pass; d=google.com; s=arc-20160816; b=AoKMG+4lYdiB52Cu6eK3bFWgZAvMK1vlpLofb/8E8Zfpcpp6l7BrkA5nehdHzy37Cw dXc7O7/Pehklc0xzsNsCMx2FWJ726wtfm8OkXFjB6bjzVnYTczSlaZFtoVfByVT+qFkb xg40yvB1Pu76hWcqOr8Zye0pB6BiUC2vqEG/bc6bqEeXZ1nGENlvnSsbn4VLeMlCfOxE OerLxKrG6UisKUm3Bd43Oj/Q5T7HczAASH6cgPHzKr2tcY9Zo3rb5smIYkQvQnoOus4b Gx9EhPcwnYLAaWm14FFV7iIoyYkBCAPmPf1vQ96W76I0OTJEv6OuLVJwCODL/Gvf7wfU OshA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=qcQ+E1QA8l+ah/ENXdvarlO1w5eDBmEI+kx8d052/jY=; fh=XMc46FkIdUEVBV/N5gnMLrXaf5AxbJquTq3Xw1HF5LY=; b=WHys+vYomEJ/3zLuiST7cWzYb05RKPDd7Oo9v35JN2YpwJcsJaEjDv6KUNnWMyf+7J o2uGFwIuscewgqwiwOxYMTDE9D5nJD/BFzPn+AjkI0oerCndh+aes3rpdSLyFgV5hjdC qe1T0P/8JXQVO8/fvu51CPFsSViPskkeEr/wrXc/c2mECrjSBZ3F/JEbus6BWD6NK7dO eMNmjNSfvkIUvKVT+YFwJgPhHjCPXsm/xU8cz8nPkwpVrG1VY4VUZecgGJ/Ff4hlOH3x qgY7OZ2+qJWup1p4Qq9VGeqJB5q2kMVOWhYVQ2/7Gf/QYoNKqz/G92lMGAwX+gDsOewN b5FA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=aiL8EzfA; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-175078-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175078-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b628ea7945si4426164a91.119.2024.05.09.16.42.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 16:42:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175078-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=aiL8EzfA; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-175078-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175078-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 336DE284443 for ; Thu, 9 May 2024 23:42:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DCC3130E33; Thu, 9 May 2024 23:42:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="aiL8EzfA" Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C04C986245 for ; Thu, 9 May 2024 23:42:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715298126; cv=none; b=BCz+afW7ao2OaxNGUS/J5SkNfIod4ZFp+lExP8vMiC5YVfK8JxvHw2u2JK9s8ML0zsP1iCGP+LwiftGDbB7JxNytBDFuLdKnqD1a8AyStVYlaqpoEd8zRoc+ZuUlkVzxBbBiFOzBsESMDeWHBZX2iJKm8wKH5OJXT4/KmRuR3y4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715298126; c=relaxed/simple; bh=liAIFAR0glyuJJFMxq3gQatxiT2/acVSfwl2Gt6U1ns=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bBgxhHBVjmjTyy3iIKObJRWQ1PKW9FCF3dfBcK7NWQ3irupPi42Eqbm5gzpXN7MgVCM9Q1DGmmoVEi4DFDtDx1wIr6eld8C3MzeuI13Dmm2KxxR/qA262iaiLUDVPE6wMJn90Jg5ArGp2yFQY4zdQNKs9oJTH1h6tIPVgfFPnYA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=aiL8EzfA; arc=none smtp.client-ip=209.85.214.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1ec92e355bfso12947285ad.3 for ; Thu, 09 May 2024 16:42:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1715298124; x=1715902924; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=qcQ+E1QA8l+ah/ENXdvarlO1w5eDBmEI+kx8d052/jY=; b=aiL8EzfARiwhzt5jd76ck4lSqjuQxAELokIUMzzOQJ+U/b7OshlpHDLelxppKsTwIA qeG3m6RQbnsKI3HjQAmkfe1RIah0nD3EM17vvFGhbHnan1AhqlGfwD8q/Rlgs/HBls39 A7OKWwpGeS/oYJVDJQ6fmnpFl4e14MJNTyp9U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715298124; x=1715902924; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qcQ+E1QA8l+ah/ENXdvarlO1w5eDBmEI+kx8d052/jY=; b=VA3UjnkP9aDoHM6FF5TyLyeLroI6zxSUKmc4yd0yHEhs8GbvX008TbADq2szhd5zgj IjxNB+UFJ7tHAQI8OEvXWgDNd91Q8wyzLKkRKVZAcmtlPn3pxzfsAn+3b7cazvxTu1jK EL0eeFWgF1/nXPz5csz2ASZJWfTr7lKOj+mj6rq9KuWJyJyysSTKeGKlGpSMRtWKNcpU ctX2tinJ4SFLKXWufJrhGe4wo/rvY/a812UEOYFGaC0MVOcoNDesSZGHVghuJz4yQbCP 27Kfynwx+D5jmJ9fR8iX/MHw9AP2YC/0muO/yN9hMe4clIDb+fs5BKMl22wbvQK1l8gX 3UIA== X-Gm-Message-State: AOJu0Yy0NP7XRpJpjO64r03Quf2QcUatg7pqI4Ky7GDiIPByxjrJvLQA 6g3UR1n+4rmHVV4CJJAXGpNckB5M/kUH646/iyzZZiOyGtm3yWLEYyxDnpawtQ== X-Received: by 2002:a17:903:120e:b0:1e4:6519:816d with SMTP id d9443c01a7336-1ef43f51feamr13083235ad.48.1715298124022; Thu, 09 May 2024 16:42:04 -0700 (PDT) Received: from [10.62.14.240] ([128.177.82.146]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1ef0b9d176fsm19965805ad.58.2024.05.09.16.42.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 May 2024 16:42:03 -0700 (PDT) Message-ID: Date: Thu, 9 May 2024 16:42:00 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 3/8] x86/vmware: Introduce VMware hypercall API To: Borislav Petkov Cc: linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, hpa@zytor.com, dave.hansen@linux.intel.com, mingo@redhat.com, tglx@linutronix.de, x86@kernel.org, netdev@vger.kernel.org, richardcochran@gmail.com, linux-input@vger.kernel.org, dmitry.torokhov@gmail.com, zackr@vmware.com, linux-graphics-maintainer@vmware.com, pv-drivers@vmware.com, timothym@vmware.com, akaher@vmware.com, dri-devel@lists.freedesktop.org, daniel@ffwll.ch, airlied@gmail.com, tzimmermann@suse.de, mripard@kernel.org, maarten.lankhorst@linux.intel.com, horms@kernel.org, kirill.shutemov@linux.intel.com, Nadav Amit , Jeff Sipek References: <20240505182829.GBZjfPzeEijTsBUth5@fat_crate.local> <20240506215305.30756-1-alexey.makhalov@broadcom.com> <20240506215305.30756-4-alexey.makhalov@broadcom.com> <20240507095852.GVZjn7XM0VMXzBfKsd@fat_crate.local> Content-Language: en-US From: Alexey Makhalov Autocrypt: addr=alexey.makhalov@broadcom.com; keydata= xsFNBGVo9lkBEACeouRIm6Q3QTvjcnPczfBqgLffURstVJz5nqjnrNR4T+8dwNrZB8PTgOWA QdGV4bIyqtNG7UHQuZ7sVKr2tx0gYJyQ5uZgncEHB5YIuhQ/CyAHrVmO+5/0/xWCLI0g44rF ZJqsYw2JQ2+vayTWbR65rkOiKL8GOVFNZanDg80BRh6qCmCEMXd/tymxvgnvWpHtxMgukexk 4vV9nV4XhxRVYdpLk8mBxsh+AEbHE+nbWgIuJDrmrZDGI2Dha7JFoB0Mi6hbbYd9BdkcHKQ7 6c+S1xOrZL3jX7OIFhb4NNnEOhh8/+BDlyby478p6YsimNa7TgAUbrygGyfVG8usrZy8SvO+ vUbVQwqjcJaCK1xazK12dfuZm2kSMJUrJqa9ng6OMjkE2/WrtnK8ruFNSCdytzbuheT0nYUJ Uwy84cU4p2K/N2C4vYjcn+IT+l1BFr5FViKYruoRLVH6zK/WOoZjA+Fc6tdM5nC1pgSB9c7h XLQqDSzYPzk3nqeHWG1qJ0Hu7pscIrjxyNTIZ5le0TlpblJdoRcL5maDNw22yle8m4D18ERF VrqNoqwW8fObMCHbd6C3m75lzerq1HhrSvLyU4UfprEyAcjOI1C0319SXfYlXDjKXRQyaDZP wxln8uShSitSSnx0AsSAjcUa8Cc7km81+G2WSK3S2wVIAN11awARAQABzS5BbGV4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/nizqWCv7xUBxQwmhRPZRW+37vS2OLpyrTtBj3/tEM9 m9GMmTZqaJFeK7WCpprJV4jNHpWZuNAsQrdK1MrceIxb0/6wYe0xK79lScxms+zs9pGTrO4U 5RoS4gXK65ECcBH8/mumV6oBmLrNxKUrzTczdo9PnkmRyZcAa6AndbjmQDznwxvTZu2LjMPC EuY0 In-Reply-To: <20240507095852.GVZjn7XM0VMXzBfKsd@fat_crate.local> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/7/24 2:58 AM, Borislav Petkov wrote: > On Mon, May 06, 2024 at 02:53:00PM -0700, Alexey Makhalov wrote: >> +#define VMWARE_HYPERCALL \ >> + ALTERNATIVE_3("cmpb $" \ >> + __stringify(CPUID_VMWARE_FEATURES_ECX_VMMCALL) \ >> + ", %[mode]\n\t" \ >> + "jg 2f\n\t" \ >> + "je 1f\n\t" \ >> + "movw %[port], %%dx\n\t" \ >> + "inl (%%dx), %%eax\n\t" \ >> + "jmp 3f\n\t" \ >> + "1: vmmcall\n\t" \ >> + "jmp 3f\n\t" \ >> + "2: vmcall\n\t" \ >> + "3:\n\t", \ >> + "movw %[port], %%dx\n\t" \ >> + "inl (%%dx), %%eax", X86_FEATURE_HYPERVISOR, \ > > That's a bunch of insns and their size would inadvertently go into the final > image. > > What you should try to do is something like this: > > ALTERNATIVE_3("jmp .Lend_legacy_call", "", X86_FEATURE_HYPERVISOR, > "vmcall; jmp .Lend_legacy_call", X86_FEATURE_VMCALL, > "vmmcall; jmp .Lend_legacy_call", X86_FEATURE_VMW_VMMCALL) > > /* bunch of conditional branches and INs and V*MCALLs, etc go here */ > > .Lend_legacy_call: > > so that you don't have these 26 bytes, as you say, of alternatives to patch but > only the JMPs and the VM*CALLs. > > See for an example the macros in arch/x86/entry/calling.h which simply jump > over the code when not needed. Good idea! > > Also, you could restructure the alternative differently so that that bunch of > insns call is completely out-of-line because all current machines support > VM*CALL so you won't even need to patch. You only get to patch when running on > some old rust and there you can just as well go completely out-of-line. > Alternatives patching has not been performed at platform detection time. And platform detection hypercalls should work on all machines. That is the reason we have IN as a default hypercall behavior. > Something along those lines, anyway. > >> - * The high bandwidth in call. The low word of edx is presumed to have the >> - * HB bit set. >> + * High bandwidth calls are not supported on encrypted memory guests. >> + * The caller should check cc_platform_has(CC_ATTR_MEM_ENCRYPT) and use >> + * low bandwidth hypercall it memory encryption is set. > > s/it/if/ Acked. > >> -#define VMWARE_PORT(cmd, eax, ebx, ecx, edx) \ >> - __asm__("inl (%%dx), %%eax" : \ >> - "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : \ >> - "a"(VMWARE_HYPERVISOR_MAGIC), \ >> - "c"(VMWARE_CMD_##cmd), \ >> - "d"(VMWARE_HYPERVISOR_PORT), "b"(UINT_MAX) : \ >> - "memory") >> - >> -#define VMWARE_VMCALL(cmd, eax, ebx, ecx, edx) \ >> - __asm__("vmcall" : \ >> - "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : \ >> - "a"(VMWARE_HYPERVISOR_MAGIC), \ >> - "c"(VMWARE_CMD_##cmd), \ >> - "d"(0), "b"(UINT_MAX) : \ >> - "memory") >> - >> -#define VMWARE_VMMCALL(cmd, eax, ebx, ecx, edx) \ >> - __asm__("vmmcall" : \ >> - "=a"(eax), "=c"(ecx), "=d"(edx), "=b"(ebx) : \ >> - "a"(VMWARE_HYPERVISOR_MAGIC), \ >> - "c"(VMWARE_CMD_##cmd), \ >> - "d"(0), "b"(UINT_MAX) : \ >> - "memory") >> - >> -#define VMWARE_CMD(cmd, eax, ebx, ecx, edx) do { \ >> - switch (vmware_hypercall_mode) { \ >> - case CPUID_VMWARE_FEATURES_ECX_VMCALL: \ >> - VMWARE_VMCALL(cmd, eax, ebx, ecx, edx); \ >> - break; \ >> - case CPUID_VMWARE_FEATURES_ECX_VMMCALL: \ >> - VMWARE_VMMCALL(cmd, eax, ebx, ecx, edx); \ >> - break; \ >> - default: \ >> - VMWARE_PORT(cmd, eax, ebx, ecx, edx); \ >> - break; \ >> - } \ >> - } while (0) > > You're kidding, right? > > You went to all that trouble in patch 1 to move those to the header only to > *remove* them here? > > You do realize that that is a unnecessary churn for no good reason, right? > > So that set needs to be restructured differently. > > * first patch introduces those new API calls. > > * follow-on patches convert the callers to the new API > > * last patch removes the old API. > > Ok? My intention was to have a implementation transformation from locals macro through common macros to common API. What you are suggesting will eliminate unnecessary patches. It makes sense. Will perform this restructuring in v10. > > And when you redo them, make sure you drop all Reviewed-by tags because the new > versions are not reviewed anymore. Noted. Thanks again, --Alexey