Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp148692lqb; Thu, 23 May 2024 13:36:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWsGHDvC/u+tYEmqtJkbUupSQANDOxMB1M2EdIwodlofcekl6eLeWlEtQOiaxYF0kwDUYnKBthEeM8Yiouu3Y0KzHn0BZAnbeK/uXlhvA== X-Google-Smtp-Source: AGHT+IFE1+FcLVFukazWF8OH/8sI5pcERc36HC4LaWsI6A6FzGsS2CJ8mu2Ho3ZU0pm6G/uYx6Yl X-Received: by 2002:a17:903:8cc:b0:1f3:26c0:f3a2 with SMTP id d9443c01a7336-1f4489402f9mr5857185ad.38.1716496567166; Thu, 23 May 2024 13:36:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716496567; cv=pass; d=google.com; s=arc-20160816; b=xu/hR5cy7PfemnwPaRqrw7lhVO5CLqgIW1sFMkdOcZnTvNfYvBPory9yhFF0kFftKr lZvV+Z60Rg7a0SXRZvV6xxpdjQu48yeVZZUAUqyDhzBzOc+Ate7B8zpyjCAfYD56X5o9 4911Flsqf0YiBuZeXhzqSVDN0GuswJSHc46aVIOOSeRX2xTjzMdFAQNDR4sAN0vRk433 0KHJf4wdVnvm8q6x8JymHKQ8BxA6jd2QVbQ5+Izj5DyxUNZva224hOIjCveUtsnavAD/ WLkK+sFjmAxJWkf1ba1mFI5Wfn1sr9440pH+CpZDyA4l/hesYr1eennCOA2A1MD4Z/2w +p8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=KZPMIYqCPOQ9lUONW9JG6SX+420+rT4m9cGMXu5m3VI=; fh=CqxT77qf7v0cyxcEfKNOSCPmdYyfEe8xwwY3GXvpCv4=; b=QPvZb38H+wjbJtlr8nO8NVyd0XSu+N0XaxBu9pasvdzqMHL0tJAb1qkJSLzdRPngcu yMjigimk9gRGPBZleEGD5qox0BwqODJU38Eo89dr0Dg55c2FiJk92OG1cgApmvKX8gB1 f4WlT8rny+GDwS8mIMMpQq67YBl0B8yXjtap5u1qOrUWudRbP7k7TJ1wRK3KGS2fqSH8 Y99Lh16kprMHX9x8k3DUTIXvnTyXgrqe6CYwUYR+MSQV3Szvbt05YhbQVt5CdvxPATpj +qKwxhh6V3/lAsDsacN4YRjR1JirfbREiXKwynbDr13BqldJOkAS8b/wvHImBFQjSYyx 0N9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=c4eA4mnd; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-187918-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187918-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c9bb746si28625ad.473.2024.05.23.13.36.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 13:36:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-187918-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=c4eA4mnd; arc=pass (i=1 dkim=pass dkdomain=broadcom.com dmarc=pass fromdomain=broadcom.com); spf=pass (google.com: domain of linux-kernel+bounces-187918-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-187918-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 D2617284E1E for ; Thu, 23 May 2024 19:17:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B28867494; Thu, 23 May 2024 19:15:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="c4eA4mnd" Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 688D884FDA for ; Thu, 23 May 2024 19:15:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716491740; cv=none; b=h7Qheo2OxNR4f/5+65PXnmch8zEHhAmuN2UhmLahnZa4S2MXgoowBQNxYLAYt+aiv7EgWrlHIBV3KMoBS1SbcA5vbgDrrdJ7HYpaDfzDAQrTFES3Mws5+qXaNod8B3EMETAiCxEnxoihbpJ0PFpYNeFGqwf2S24tEdgUcgP91v4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716491740; c=relaxed/simple; bh=cwPi0cwLaudKiJrBxIwug/LIGv5XW3nEwzrdc3S5Ovs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=F8Cq3PgPcyfQz2E0NsXjoSxr/4xG75bnkmnGWeVItpbR89vE846B+9CpfYAhQEiaYz1P20mSS67dt/RknKGohqAQ89JnWePxZCR35TRVsR3y8HZr9KEaKZCdOgwnxPOxo7CFyDlwT8zuecvkq1wbkrQ6+sh3BtF39aSDtmlkwps= 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=c4eA4mnd; arc=none smtp.client-ip=209.85.222.169 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-qk1-f169.google.com with SMTP id af79cd13be357-7949747a23fso190958185a.0 for ; Thu, 23 May 2024 12:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1716491738; x=1717096538; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=KZPMIYqCPOQ9lUONW9JG6SX+420+rT4m9cGMXu5m3VI=; b=c4eA4mndxPWiqDouHwPB4iuYfxv67n2nXdO7PRYwrY/GgNXMFIWo2TfIYxjMx7fHaq GlHHxxyMOp0hxHHIvooOf/yN8utRGd/XwHdzUA7UvnS+Auh8wmW4xJ89A46Zwtm/IcOH aPLXH1PVnq7TTbJJN36SRowxi0I4Knlwsw9LM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716491738; x=1717096538; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KZPMIYqCPOQ9lUONW9JG6SX+420+rT4m9cGMXu5m3VI=; b=Q61kQjS8Vow9LEdG7KpZx8FSDNLYVy283n3Tj0l5+tENK23EINo+mIu4Q2e2HcI3hR j5jNGv446Af7+jWg/J8vHm9P6+jpqb2rdRLJAPJ2vfA//9Vtu5eagx/BVwHzYDwkeiYe 5oCMO9vFKO7hpV3Grmd7rJaY2bBXxLc9NaUNQe8k+1bmZO69E9nOP8MuaSxxCPkbuLuZ wKMejzvLdaHjUWm7G8h0lN0UndvU+yda8iE7PZrNZnLDe88/kEZF2rxlPSRpkqDKX/t2 PkPLIr4cVV4HczZRT4NwgnhJUbkFWOHpMadYlscUgBCZnRmP1VTXoExn53MLcw52JZsh opFA== X-Gm-Message-State: AOJu0YxCT1VctKUUzeTPZtLUi43Tlfm9YFrL40dTZWod2cEXWwUI7z5m 4I+DY8fNgbtIkiJhr7WOlDSQxdQoHLM6Io2RNfOhX77eJTYwmqt+R7CGDkjS8Ax6q/xVA6wqJgk a9Xjql/YyKrm17wGJ9Wp86qJ5Vjb0/knX5Mcf/0raGJsTlwYEaomwOQDlJr11QS9+mDfpLfj6mU 7jqCuwBrDZN/1SoYK23O2wTr9drBZrzvnJmpkNUqFCNMhdKXUCj1lP X-Received: by 2002:a05:620a:5608:b0:792:9d32:d37f with SMTP id af79cd13be357-794aaf8eeccmr19545485a.0.1716491737788; Thu, 23 May 2024 12:15:37 -0700 (PDT) Received: from amakhalov-build-vm.eng.vmware.com ([192.19.161.250]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-43e4a89b61dsm21219821cf.45.2024.05.23.12.15.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 12:15:37 -0700 (PDT) From: Alexey Makhalov To: 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 Cc: 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, Alexey Makhalov Subject: [PATCH v10 6/8] x86/vmware: Correct macro names Date: Thu, 23 May 2024 12:14:44 -0700 Message-Id: <20240523191446.54695-7-alexey.makhalov@broadcom.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20240523191446.54695-1-alexey.makhalov@broadcom.com> References: <20240523191446.54695-1-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-Transfer-Encoding: 8bit VCPU_RESERVED and LEGACY_X2APIC are not VMware hypercall commands. These are bits in return value of VMWARE_CMD_GETVCPU_INFO command. Change VMWARE_CMD_ prefix to GETVCPU_INFO_ one. And move bit-shift operation to the macro body. Signed-off-by: Alexey Makhalov --- arch/x86/kernel/cpu/vmware.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kernel/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c index 6796425eaaa1..58442c2581e7 100644 --- a/arch/x86/kernel/cpu/vmware.c +++ b/arch/x86/kernel/cpu/vmware.c @@ -42,8 +42,8 @@ #define CPUID_VMWARE_INFO_LEAF 0x40000000 #define CPUID_VMWARE_FEATURES_LEAF 0x40000010 -#define VMWARE_CMD_LEGACY_X2APIC 3 -#define VMWARE_CMD_VCPU_RESERVED 31 +#define GETVCPU_INFO_LEGACY_X2APIC BIT(3) +#define GETVCPU_INFO_VCPU_RESERVED BIT(31) #define STEALCLOCK_NOT_AVAILABLE (-1) #define STEALCLOCK_DISABLED 0 @@ -424,8 +424,8 @@ static bool __init vmware_legacy_x2apic_available(void) u32 eax; eax = vmware_hypercall1(VMWARE_CMD_GETVCPU_INFO, 0); - return !(eax & BIT(VMWARE_CMD_VCPU_RESERVED)) && - (eax & BIT(VMWARE_CMD_LEGACY_X2APIC)); + return !(eax & GETVCPU_INFO_VCPU_RESERVED) && + (eax & GETVCPU_INFO_LEGACY_X2APIC); } #ifdef CONFIG_AMD_MEM_ENCRYPT -- 2.39.0