Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp169212lqb; Tue, 28 May 2024 11:54:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUwksBqq6hDfe7+0fu1CuULRl6EtCc8/9IJ93BF2+GeFsQenkxGcTyzfvSM4Kr0jMIHquFxb3nIXkDC68n61ioJlAf+m/hXHTfO6XIx1Q== X-Google-Smtp-Source: AGHT+IGR7NrbylNR6ZrWxqoWb1JCsPG3KFLkGCGylHBY06QmZbt0bu6GppEzYSOZKcSP0t7zceVp X-Received: by 2002:a05:6358:5e08:b0:18f:81c1:a94f with SMTP id e5c5f4694b2df-197e50c3c51mr1679376355d.7.1716922474134; Tue, 28 May 2024 11:54:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716922474; cv=pass; d=google.com; s=arc-20160816; b=0fc+JZ+XcHk/QbHXqt1Ru1CIGUeO6ZpU74L6XGLU3UDkgO5QzlKBl4VvuRC9ILnh0n fPwDIL8IyATeB2A0SBuNKmJ/zl5upXjcnWgudWfUvnrnpx/01k3x0oDyjIjbWB1nyCXn v2/Pb6icRvnpjNpCa1AwIYheVyjA3kztc+wv6Be7bKxUnu0A7LUcpPfNuV7tZsEEZUzO SajRhX+vFqihNDPxlte1nhEE7GOVvhAcaSzQTTxk7zvqQRXcxA+xgdTuAYlHpEbaUNzf AZhZklFcxqCPulQ09qIsdehuvsiPxQ75WRgbDhqNbzPeQghDO/8cRVkWRY7wCxD63Dnq OAiA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=vF5iO2/CLnl6BCwM18Rm/a6cGRlrHRV+x/d0GOpSVW4=; fh=88lQv9j7BAJNe14kScS9Ld0d+XrLFt+S0a/i6+A/YW0=; b=cIZX3XwBXLFLvbV+dKk6XNm6U/XEidXPy2wADpeGp9eB0P+0vdkqmA3Jr/3XZS1cOh evATJwvq5n3OK/zcJGyrxAvKCCpqmI1O5OLNR/n7EiUSdjp8zYWSF8mvHcw+OMd3cL9i K5Sz01EAg55hcR5cI7znCYVbhQe1CydAy4okaymgxJQBwtXC00z32nnHopn6VhylJhIH f4PhwARWrJk+89m9izddzCCtmkTxZj3ZewtBFk0NZEQ9w/nj2tUjOJxtIah2/ucFaFal DVs76DczJZ7aB8ngL9c/V0dbYpIimtFES0VYw01mwD/mrg0W5cXkNs0YvRKNKaUrduzy EHIg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=uRbUt9YL; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-192887-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192887-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-683f087eba6si7955643a12.853.2024.05.28.11.54.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 11:54:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-192887-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=@google.com header.s=20230601 header.b=uRbUt9YL; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-192887-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-192887-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 BCB4628603D for ; Tue, 28 May 2024 18:54:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 151D317165D; Tue, 28 May 2024 18:54:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="uRbUt9YL" Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) (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 EBB3739FFB for ; Tue, 28 May 2024 18:54:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716922465; cv=none; b=CBhTG4Z3xyd0CmkpiTGDRRkRA/eRFpicjFLVJ4V+VloGw4/p2dBmhkxUJVEGlpUmHHEJ0kiKYSJEuVChPpmfrvo0BpU1fSdwnDvPSZX6ARs40UTmmpz58VC10bjm3HKq4Qf0s467qreRMdN9b0onZFjf3/lOm3hkP7qDl7HloK8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716922465; c=relaxed/simple; bh=XjKB9lMK3weOkRqQznxEfeDYvHTiHYFA26fDuZyRHLU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Qv29BCIttS3YqKaYnFYRbGIkTkbed54eML1CFG+nquySZ2XASUMJTaRn5UCewCLMX/RnmeRlcl4etj/+Yt2EZ42NbO84HKKliT7NQYOa9btPqOBuXdRDZWtxK10kWlbjbOzn9mumXeuDxf+XmdiypvQS61XHC894Z2VfdX0axiY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=uRbUt9YL; arc=none smtp.client-ip=209.85.215.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-6819fd023b9so1291166a12.3 for ; Tue, 28 May 2024 11:54:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1716922463; x=1717527263; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=vF5iO2/CLnl6BCwM18Rm/a6cGRlrHRV+x/d0GOpSVW4=; b=uRbUt9YLagloMhdkm6dV0Vo6AtTRPxZf1nnGH5X/3zaoB24JeN81XVTFgLsiosh/Qk oaW0RwTL/V5gqimd7kyZCzU8OkpMtWvrjGXJ5kZ/SuYYRsDIkrSG+1y2rwlJyYgLt/8j hbBpH6ZO51eDqhvmu6x1/WWTywgr6Wnow+fXKxDWr3xU+CxwSeT4Q7NuOV1arE1XJpAO Nq+HwwTdSwt6aTZSp6w6WwY7bsc95Q9FhunT81zxiI7LBqLhD16BtKbnnuhBTbXJZADO UliZHn33A64tqZcLht6EfoIAeYjjE4b+iLizaW3IvpkOY7MLRwz7Iws23dxJIaLWS2nR 1MfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716922463; x=1717527263; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vF5iO2/CLnl6BCwM18Rm/a6cGRlrHRV+x/d0GOpSVW4=; b=rraRdqHEwLv6XcqOpufPRiJJuFI3QYS+DFGXv2k9Zpg9csLuKz8e2u4+cUAxLKGDRw dwMhNDIf+qRrFG/4mt4QdemR+Xp9nRIdCOQnrF04o5kn880emJv7Jc3+0WAr/C+NBNGM 6Eb+C+zS1yomAo2eUQCa9PGOmJ0UYhHMjNhmBj8OAzuZIAndXoZjp1b9Ntb9tc48+Wh7 HtqkHE7EDGgvWk0Dtpj/LwqrWXp5bTUxNG8cfTmZIVJpZmoerSXVnVG+sF7Ub43TwTVX lVKTpBzTObi1zYa0H2/Bz8yBGXCwegNiVz15V+lmZwavkI11ot8Ko/An/fCtxtRuMq6b PtuQ== X-Forwarded-Encrypted: i=1; AJvYcCUgo6Si3c5eXbw2EWFB2GJahbJCX8Nr7BI76EVj4fKIl7vdtJ4W9WYViPnS0f6kKBcp2cvbXka5zhk7HeCpTnsCGm37teBuwby43MXO X-Gm-Message-State: AOJu0Yz1KwwDM54M4bpn+9oJ2+MsW6LeLILehFqN8ubywjLMqGpYN9Fp NjcO1QM9ezX24AmXQhwHmyR/ZUNXwy1j8FTZIVrInShb7JHXR0TKKlPZSUiwH8qHJHRKkCRICxi u4A== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a63:778c:0:b0:65c:2c22:111 with SMTP id 41be03b00d2f7-681ad64b81dmr36484a12.8.1716922463270; Tue, 28 May 2024 11:54:23 -0700 (PDT) Date: Tue, 28 May 2024 11:54:21 -0700 In-Reply-To: <7ed7f3b7-4970-4723-8969-6452aed41b01@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240517173926.965351-1-seanjc@google.com> <20240517173926.965351-21-seanjc@google.com> <7ed7f3b7-4970-4723-8969-6452aed41b01@linux.intel.com> Message-ID: Subject: Re: [PATCH v2 20/49] KVM: x86: Rename kvm_cpu_cap_mask() to kvm_cpu_cap_init() From: Sean Christopherson To: Binbin Wu Cc: Paolo Bonzini , Vitaly Kuznetsov , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Hou Wenlong , Kechen Lu , Oliver Upton , Maxim Levitsky , Yang Weijiang , Robert Hoo Content-Type: text/plain; charset="us-ascii" On Wed, May 22, 2024, Binbin Wu wrote: > On 5/18/2024 1:38 AM, Sean Christopherson wrote: > > Rename kvm_cpu_cap_mask() to kvm_cpu_cap_init() in anticipation of merging > > it with kvm_cpu_cap_init_kvm_defined(), and in anticipation of _setting_ > > bits in the helper (a future commit will play macro games to set emulated > > feature flags via kvm_cpu_cap_init()). > > > > No functional change intended. > > > > Signed-off-by: Sean Christopherson > > --- > > arch/x86/kvm/cpuid.c | 36 ++++++++++++++++++------------------ > > 1 file changed, 18 insertions(+), 18 deletions(-) > > > > diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c > > index a802c09b50ab..5a4d6138c4f1 100644 > > --- a/arch/x86/kvm/cpuid.c > > +++ b/arch/x86/kvm/cpuid.c > > @@ -74,7 +74,7 @@ u32 xstate_required_size(u64 xstate_bv, bool compacted) > > * Raw Feature - For features that KVM supports based purely on raw host CPUID, > > * i.e. that KVM virtualizes even if the host kernel doesn't use the feature. > > * Simply force set the feature in KVM's capabilities, raw CPUID support will > > - * be factored in by kvm_cpu_cap_mask(). > > + * be factored in by __kvm_cpu_cap_mask(). > > kvm_cpu_cap_init()? Drat, yes. IIRC, I tried to get clever to avoid having to update this comment a second time, but then I ended up removing __kvm_cpu_cap_mask() entirely.