From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) (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 D68C6407CCF for ; Tue, 21 Jul 2026 18:52:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784659933; cv=none; b=niZBzkLoVfQZZ59fcV8/yQxQrsZ+OzitrItttHNKmmyU3ojIx37QtgeFEPuYTZ/a6VgOG81w23uXUEUnnEkZPvyhg5puU07S6TBnviVD71rFHU5X79NItfd25FI/z09ITxnTQwdxngkVO8ocfLu4n7WfgnmJ2T4ehTyNZecfXwg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784659933; c=relaxed/simple; bh=L0qB3IFmnDfyTis92ihHfuGUKra0om9ZS5RHMRyKwo8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=dRTXge2cx1gFJoeQ5w80l3du/d1yTg+AyPEsTa09yEEfpgQsIQ+9jIIBBXuZmu8G0XopcTgxWOkVIhGo5pmq9m0OyWkVtZvTSpFDoQmz4AxLnsTwkVTSXhNLbuVeSlVHuC4SeouIL3tiujNrLg0+KFIrs95aS1co4Io0RQbJC4U= 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=S8FvNfNy; arc=none smtp.client-ip=209.85.215.198 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="S8FvNfNy" Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-c892143db7fso7207710a12.1 for ; Tue, 21 Jul 2026 11:52:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1784659931; x=1785264731; darn=vger.kernel.org; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date:from:to:cc :subject:date:message-id:reply-to:content-type; bh=hf5aaU24ifgPTG58w53ijqOW3Lbc06evOzBclrAYeGo=; b=S8FvNfNycrnF4tFt0Ulj/fXeUxfmm8JorBhcOT0Tk2CC4d38fQopdNaIHxQZJ2Mw9z Mc7AyyY49eFHIw6xw+dTiD5fJn7PnhiioSp0O41Nga7N7JGVb8aYAPtO0TwZdPqjpK1N VVEyhbFjxloVbqJuqdmUBkkvBz6YpCdWfgFpS2SuPUduQtOmGP+kfmbBbExaMrFWCTuT T3+G6senRSExHVoyEzsvoZzO6NutGm4Lp2fEmUp2zeryOC0zoLsUitnFtsLtcfwqLpMG CB6I6WrZmxZUsmad3I8VP/2F5bNx5mYn0vZFPt32Be9qXQKXqpHnsMdWv2Cw50Vwr3rv 0z5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784659931; x=1785264731; h=content-transfer-encoding:content-type: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 :content-type; bh=hf5aaU24ifgPTG58w53ijqOW3Lbc06evOzBclrAYeGo=; b=QtrrgMy+/FSjfYlQ7VYulHkvIfDcl4fh+nomuruycFTEGZjWlROCkeTAAPQdS2ihZb z/RKq27RbxEpT2pVY3u8ne33aNIGHXX2fDVmaHl6UKR1fzXBaGvk8VGosPz6wmgzBj5S M5OUvtv6NI29qKmkDlS7dHcsEVkHVpexxdYHP2/fE6m0emTbcUylI5aF60jCCksPHLUA R2lO3sPjleq/MvVwr5qYcV9Yq6kwD1KaCNIJmQ69xlGxvB8BPrdUoVyf10hRqJOsHRsj wrQOokeH3Bs6BD4mK5tPaG6T5ztyG/HiSzqaF04OliGIqPQNP3fBTj55qNCEDYQieblv Ih6A== X-Forwarded-Encrypted: i=1; AHgh+RqN54flIkvuFItkDR3g1xUCHmtCt6xjuBvAqHJ4KwPSVWNwtWdDpvi7Z4UgBm6LRN0kSxiocL2e8JFW+JA=@vger.kernel.org X-Gm-Message-State: AOJu0YxSqrjTWIJkEmBtK6xTo+RXkWeG5U5MXA7hIw/sfWbBysa32bT9 72L44TIbXaPsLjK0v1AmqJqOzpf7VHpMWY07VjxoxTLGpEM0SQY++FFMh0lfNvHeX7R4DC1A32U MxqVg5A== X-Received: from pfbml22.prod.google.com ([2002:a05:6a00:3d96:b0:84c:2e88:693d]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:84a:b0:848:53c7:b927 with SMTP id d2e1a72fcca58-84c294d0c5fmr20734642b3a.76.1784659930711; Tue, 21 Jul 2026 11:52:10 -0700 (PDT) Date: Tue, 21 Jul 2026 11:52:10 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251120050720.931449-1-zhao1.liu@intel.com> <20251120050720.931449-3-zhao1.liu@intel.com> Message-ID: Subject: Re: [PATCH 2/4] KVM: x86: Advertise AMX CPUIDs in subleaf 0x1E.0x1 to userspace From: Sean Christopherson To: Jim Mattson Cc: Zhao Liu , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H . Peter Anvin" , Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Chao Gao , Xudong Hao Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Wed, Jul 15, 2026, Jim Mattson wrote: > On Sat, Jan 24, 2026 at 11:25=E2=80=AFPM Zhao Liu w= rote: > > > > > Unless someone feels *very* strongly about the "mirror" terminology, = I'm going to > > > use ALIAS instead of MIRROR when applying, to match KVM's existing te= rminology for > > > the 8000_0001.EDX =3D> 1.EDX aliases. > > > > > > /* > > > * Intel-defined sub-features, CPUID level 0x0000001E:1 (EAX). Note,= several > > > * of the bits are aliases to features of the same name that are enum= erated via > > > * various CPUID.0x7 sub-leafs. > > > */ > > > #define X86_FEATURE_AMX_INT8_ALIAS KVM_X86_FEATURE(CPUID_1E_1_EAX,= 0) > > > #define X86_FEATURE_AMX_BF16_ALIAS KVM_X86_FEATURE(CPUID_1E_1_EAX,= 1) > > > #define X86_FEATURE_AMX_COMPLEX_ALIAS KVM_X86_FEATURE(CPUID_1E_1_EAX,= 2) > > > #define X86_FEATURE_AMX_FP16_ALIAS KVM_X86_FEATURE(CPUID_1E_1_EAX,= 3) > > > > LGTM, yes, ALIAS sounds better than MIRROR. >=20 > Our friendly AI reviewer asks: given that these are aliases, shouldn't > they be hidden from the guest if the features they alias to are hidden > (e.g. clearcpuid=3Damx_int8). Eh, clearcpuid taints the kernel and is quite firmly "experts only" functio= nality. And practically speaking, clearing things like amx_int8 can't work because = it won't hide the feature from host userspace doing raw CPUID.