Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp666642lqp; Wed, 22 May 2024 16:40:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUahJpHXhmAv8ESSx8ix1JHXqZd53pdhgGxN0s08wrTCNJFJm713HSWUMmBQkAgFHtek73MLPmsu9BlywGsJmBAzhU+Tps51nydKemSVg== X-Google-Smtp-Source: AGHT+IHkxuZlQuIB4kv3cAOKPq57TuGUt33fX9W5o/8gpBP5dfHW+3HZN42B57stQh6/YYCqr8qG X-Received: by 2002:a05:6000:d44:b0:34a:572b:3e15 with SMTP id ffacd0b85a97d-354d8caa274mr2399867f8f.25.1716421218217; Wed, 22 May 2024 16:40:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716421218; cv=pass; d=google.com; s=arc-20160816; b=pavNf0QIt10ZGtJCWZeKv0XZpTZBL20hkqlgWRGbu7R5aYD2yheJscjvSuVAx68ifH QZWoTCPzFprCuiwROFE8EKmut+R+61gpnTMbYJhNnIfYpLuXwvtwydBjN92AYLHRw1vJ Y7jEu5rQ04ZYW3f1zRkafPkrXJJpF/DH4XPIX/QSW6ERnbTuWKxDfUJgswz3M8+Y+K4j AuRUTXUmOp5pBcupByU2NIgb1njr74vMWwFQZd0ZUSks5h9TymhSUS8iBlNaTjSsEJ/u TyGVQant0k2y93bIV0DJHg+F7MaLKQkR3ZGRbhvD6YbpU3EGcHVTnxUBKdrU8sCgW0RY 9aYg== 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=CCeXqO694HgEAFqSHQXqbvYxJUxtExpMbdEe7ZIdETA=; fh=L4hc1Ub3U/+o4oyBMxY/4Ma5QDO061tyLDcgJ5RTZqw=; b=o6ZhjV/ldvyAOP4IEadqPBmDkoRZehefF720RlvZ5Crk8Ik7GWblUMJfbsV95kc1Xm 3leZz7wLTG+JK8SnrQlLdfLfFu6Ru7L9lTIfhhpUR64/R1CqgybYGnCpbSdoh3Y2Ea4U T5iOM21XYWwN2xlWjzJvaAt5M393n793YTZ+Pm03W6FK9PtL/SiLjy/0v4sGNjw4wlsX fCwKTWG2/brqu1pLH60wjQuMkXICBzRQOb9NfsBaJFCm+aQRCMe0sf63+qOyqTV1/s3p MaCWrHCV2zjjD2ijEQnaPY2V9Nsx3l2z3c9LNb2rJfYfD9Vq9UVF734jAwf5Ke4E61eK rQtg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="bt/C4/nf"; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-186829-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186829-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17be688fsi1568497166b.787.2024.05.22.16.40.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 16:40:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186829-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="bt/C4/nf"; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-186829-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186829-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B143C1F22518 for ; Wed, 22 May 2024 23:40:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB65F14C5BD; Wed, 22 May 2024 23:40:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="bt/C4/nf" Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) (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 6D7E2142E6E for ; Wed, 22 May 2024 23:40:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716421207; cv=none; b=EwMhI4vM/MEBmJ1EFnHhJyCht2rsMn3609ykOIsvQooyOVyEGlmLnlR3KQMy1wgnmSAlkrSeSTtrlpA0BzIBy3kEbD0EwUZhDnrav6MjgXlN2/cOw9SfyUZfSzpw1vLBB0E8Jdi5btUD9QYTuxpMdp5qkEuC+vRgrUZgaKb+3tI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716421207; c=relaxed/simple; bh=mGlmVg+uwz/HtNBT80xzjZ9KnSF2ROtraD+iGdk3u30=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FRM+gBPen+wJ9R68SIuguPfcKENkXd0XxEfch47zOdpkK5KaJIFL41NJ+q5Nfc/4vo3IqTjCTwOOvHP/Dc15KPCEpemI/CkswDDH9o6o4NXBXMmJBWeF5SRYkSJ6IMuCTgtKcPrV/R76P2UCGFlXPyF79BWCri7vxsvyTT3JWhY= 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=bt/C4/nf; arc=none smtp.client-ip=209.85.219.173 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-yb1-f173.google.com with SMTP id 3f1490d57ef6-df4dce67becso1736313276.2 for ; Wed, 22 May 2024 16:40:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1716421205; x=1717026005; 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=CCeXqO694HgEAFqSHQXqbvYxJUxtExpMbdEe7ZIdETA=; b=bt/C4/nfWmBO5PAB90tV8lm9lqb7s8wgprxPZ1vQ/sq9tFLaNlBS7302frmjfnWvY9 Eh/dVxuG34fL2o2CJMwjVJfObV6CeGXmfGNOXDEX0tY+qWW1Ikvgb4QJVadkUjM7KrSB gQA5EpTSUmwd5jvKc77woPiwA0LTA1vBmN8Rg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716421205; x=1717026005; 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=CCeXqO694HgEAFqSHQXqbvYxJUxtExpMbdEe7ZIdETA=; b=HsMZVONO7vpkR7DGpfrkkgIw6uAG3xo7dYnTT1hDPpxv08B35QqAjoRnSHv0gNMPWp t++fTlKwrihSgvCusEh4KJaFTlvnmshmwsZ3WvteEKLoMcidfp4+8sf83dFHDHX2Jhdv U+iTBHzE4Hd1pAv2bYV6JySfGnX2jXv4TmdrNEcU74Y6AqkFKTn6UBv4baSN4erPTHz9 039UrOqaywiuH5m7kp5S5CByg18K8gV5rMeqx4eXjbhYPQZv+cEyjkOiO+VfQiD6STtn Kc1TMqRkPssgBaGhw0Cu9/TcQTLp3XKh9P2q8cJacoxJxDjjngoaezjqPeemtqdLfNSe zmMw== X-Gm-Message-State: AOJu0YwX2EdTgIjETHoPPMDeLvleaW28a85hATo5Ri6mHjY8cKCR1jK5 8cA8/qe32zP3ejMoSEMmJ97cV7izUbzA0En2xG9d5gGPRsdOv7R0himdXtBueA== X-Received: by 2002:a05:6902:2182:b0:dc6:e4f8:7e22 with SMTP id 3f1490d57ef6-df4e0e81210mr4151332276.62.1716421205384; Wed, 22 May 2024 16:40:05 -0700 (PDT) Received: from [10.66.192.68] ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6a15f18543fsm137498156d6.34.2024.05.22.16.40.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 May 2024 16:40:04 -0700 (PDT) Message-ID: <683225e0-1cd3-4dea-bb68-086d46b233e8@broadcom.com> Date: Wed, 22 May 2024 16:39:57 -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: Simon Horman Cc: linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, bp@alien8.de, 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, 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> <20240511150225.GK2347895@kernel.org> 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+G2WSK3S2wVIAN11awARAQABzS5BbGV4ZXk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WCv7xUBxQwmhRPZRW+37vS2OLpyrTtBj3/tEM9 m9GMmTZqaJFeK7WCpprJV4jNHpWZuNAsQrdK1MrceIxb0/6wYe0xK79lScxms+zs9pGTrO4U 5RoS4gXK65ECcBH8/mumV6oBmLrNxKUrzTczdo9PnkmRyZcAa6AndbjmQDznwxvTZu2LjMPC EuY0 In-Reply-To: <20240511150225.GK2347895@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Simon, apologize for long delay On 5/11/24 8:02 AM, Simon Horman wrote: >> diff --git a/arch/x86/include/asm/vmware.h b/arch/x86/include/asm/vmware.h > > ... > >> +static inline >> +unsigned long vmware_hypercall3(unsigned long cmd, unsigned long in1, >> + uint32_t *out1, uint32_t *out2) > > nit: u32 is preferred over uint32_t. > Likewise elsewhere in this patch-set. Good to know. Can you please shed a light on the reason? I still see bunch of stdint style uint32_t in arch/x86. > ... > >> /* >> - * 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. >> + * This assumption simplifies HB hypercall impementation to just I/O port > > nit: implementation > > checkpatch.pl --codespell is your friend Thanks, that is useful! > >> + * based approach without alternative patching. >> */ > > ...