Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7222733rdb; Wed, 3 Jan 2024 08:24:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKMnUyF/X6ZilgpeeQLrv/4gaaj7rRAtQOeqsj6x46LV+l8ap3qX9Q3noACE3ljEll/6yt X-Received: by 2002:a17:90b:358b:b0:28c:c56b:f198 with SMTP id mm11-20020a17090b358b00b0028cc56bf198mr2085344pjb.52.1704299073447; Wed, 03 Jan 2024 08:24:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704299073; cv=none; d=google.com; s=arc-20160816; b=y+sGyk86upJW0xZA+sqJPDKzJRz/braz85auosx8hRdfKArnSw83c6uhwJ6DbDuNRI puWt4+eEJtuvCnbVpO7QvUIUtmJJw4mc+qGp7xOnY0Bhp2+wLoEbmngc0f7XKpUAVWut TDy5qERHkOM5oGQFZFN7IGvDX4VM1fuHrfDw8MbVRrK01ktEU2ZtsQVjDAMhQQ49aN8n 8E0qNSOnhUcX460OvHRrKF7hqRPvIAFKhoT+Kl5S00xt20bC94U7DsYUoHBxfNqaPk1x 5IDqe1cDTU8TTw91iuxn7TMppMiUQS4VC4Ly/zYPYSSLp1eku2UwMnIeFB8rhNR1LXe9 Jonw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=N7GrojpuKVldz8ggF+wfnjloiZc7olb6XQAWvnRLEBo=; fh=mxVGYnZD5z4oztwE2YRoVPmM2ov0ZX621mFruD2VoPU=; b=0GGkt4hGvyEAozoVcOLpC5DEA6gtnad3EA1dZyCGX/Cuoz1w8jkaCj5PHT80a+l4zf f0kECvBvrpEhbnfeR5T2EHQYavNnzZex4nL4u72u7BqjITOQ809s+W2kiBAS5V8btAF+ ObiCrxW3BJ/QKVD9H1DavRWdD7RWq69yNa8t1kPsppIszdusGPC1L5NncuLZjl4NqYM4 O6rfAiR6UBrkS3GTrQcwYKb1EjPgOx3FsbkXciZts/7sjcIbi0kc10usQwPcMDuisDYO s716JVkKl3qKQR/hbeAq+g9Q2qi1kNCmxchu1isTrPN4vkIBUv/3ozVMENgsoJZ7evBe GUnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NKpfvShb; spf=pass (google.com: domain of linux-kernel+bounces-15742-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s7-20020a17090b070700b0028bfce45881si1426112pjz.101.2024.01.03.08.24.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 08:24:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15742-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=@kernel.org header.s=k20201202 header.b=NKpfvShb; spf=pass (google.com: domain of linux-kernel+bounces-15742-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 13D44285F06 for ; Wed, 3 Jan 2024 16:24:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 81C7A1C288; Wed, 3 Jan 2024 16:24:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NKpfvShb" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F3C21BDC4; Wed, 3 Jan 2024 16:24:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9D1FC433C7; Wed, 3 Jan 2024 16:24:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704299050; bh=oDxUJ0csC6lWNRIuyYFs6Gg2tiCMbVHu/gNkuWzoWzM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NKpfvShb6tkMIJpN0xEoI1S0zR4aLeaRArZwkobSudX3RkKpGjhNHy7iR044qE4HK zvd6GWk3J7PgtL/GHT0G+bH7zAu57/uWcaWQpl5nx7+3IBolmGkmWRh77k32S1xFb9 xvQV48hg5VbrUz/0abaminyQw6+uu42GfcWgX792V6X4CooopX/mcrkaLa9KuEQK7a OCwGZ8d3eQJGe7BxWsFYgxw5etLbuRKscIsP8BJuXk6bD4qyHF2joQcWgyl9H5PftA syayVLlMizbNxE4C5uOh4kdVTMjdA5sia4spSl9GLJz4Mi8zT7Fg2MATiYcCUxvmij enitnIElliOow== Date: Wed, 3 Jan 2024 16:24:02 +0000 From: Simon Horman To: Alexey Makhalov 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, namit@vmware.com, timothym@vmware.com, akaher@vmware.com, jsipek@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 Subject: Re: [PATCH v4 2/6] x86/vmware: Introduce VMware hypercall API Message-ID: <20240103162402.GA31813@kernel.org> References: <20231228192421.29894-1-alexey.makhalov@broadcom.com> <20231228192421.29894-3-alexey.makhalov@broadcom.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231228192421.29894-3-alexey.makhalov@broadcom.com> On Thu, Dec 28, 2023 at 11:24:17AM -0800, Alexey Makhalov wrote: > From: Alexey Makhalov > > Introduce vmware_hypercall family of functions. It is a common > implementation to be used by the VMware guest code and virtual > device drivers in architecture independent manner. > > The API consists of vmware_hypercallX and vmware_hypercall_hb_{out,in} > set of functions by analogy with KVM hypercall API. Architecture > specific implementation is hidden inside. > > It will simplify future enhancements in VMware hypercalls such > as SEV-ES and TDX related changes without needs to modify a > caller in device drivers code. > > Current implementation extends an idea from commit bac7b4e84323 > ("x86/vmware: Update platform detection code for VMCALL/VMMCALL > hypercalls") to have a slow, but safe path in VMWARE_HYPERCALL > earlier during the boot when alternatives are not yet applied. > This logic was inherited from VMWARE_CMD from the commit mentioned > above. Default alternative code was optimized by size to reduce > excessive nop alignment once alternatives are applied. Total > default code size is 26 bytes, in worse case (3 bytes alternative) > remaining 23 bytes will be aligned by only 3 long NOP instructions. > > Signed-off-by: Alexey Makhalov > Reviewed-by: Nadav Amit > Reviewed-by: Jeff Sipek Hi Alexey, I'd like to flag that this breaks gcc-13 x86_64 allmodconfig builds of the following files. And although this is resolved by the subsequent 3 patches in this series, it does still break bisection. drivers/gpu/drm/vmwgfx/vmwgfx_msg.c drivers/input/mouse/vmmouse.c drivers/ptp/ptp_vmw.c ...