From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f202.google.com (mail-pf1-f202.google.com [209.85.210.202]) (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 A939E1B4224 for ; Fri, 23 Jan 2026 17:53:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769190809; cv=none; b=qRdg9yXee4WF8P41Y3Bn14bNA1+9e5YyyXk5xPncrOz/Q59e+w61D0mQMflQZvIr6QMNFUfIXCClYkamkFG7+wyXfhzCkLRfMo5Jcl+ob7K91zzUAIb0C7qjd1R4XgCuW6ChwJX4co8nsrUktHlqwq3Wz5hPxuxR9Hk66hnG/lk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769190809; c=relaxed/simple; bh=RsglnV7wKfIPQfs8hfy8yvlxh5i+YSsKAcsQmH2tLF4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=DcGe07abrjrac8dKQQQjMMQTwpOLkGqzfsuNQX3RBjlONhBa05hP63ofcrpZZXs5A9dEZ4+Wl3ySOqGQlDnXrqltEjCYKcrCvZOYA59YWooMC5DLrPf+TA1OCZMiAh4RThaG97lw+QKf6S1a+FAATo5uPFyeEetBj8fGjEmkzK0= 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=CmR/2ahm; arc=none smtp.client-ip=209.85.210.202 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="CmR/2ahm" Received: by mail-pf1-f202.google.com with SMTP id d2e1a72fcca58-81ecb6279d9so2197746b3a.3 for ; Fri, 23 Jan 2026 09:53:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1769190808; x=1769795608; 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=YS7tf5uaWQzE/6a6Wt+0CLrn6r8A0gKK4bGIYWAh4do=; b=CmR/2ahmkqckqQL34cI7ndO+NpLcE0Rrsdf91/zmDYZ5MflyXBkjrFnufMf46zt8FZ 4wwpWP7eXS9JAEpUJQQdXxl/EhRTZh8QBGoVRYuOhZRfwZcohOV9W3zEWl/g/4QLhY9R TXTJqC6oc1DrDPBT0hyxbM33EjBv0tcyYz3I6QwJ5N3Nu4DfbIFVdidQKZSzp288lq+o Mx/1GlmIHTOjaCRFwvsnLrbC3YtkViA8JccLVFl0Pr5ODE1FykFT76FGZwpxCxrQgIkf Rcp9UXNyxTrcaFdd8TNQUojosOI4Mdvt+5wh6okD70i7ZeTFwiWM4OGquQWHfvBodP3S u33Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769190808; x=1769795608; 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=YS7tf5uaWQzE/6a6Wt+0CLrn6r8A0gKK4bGIYWAh4do=; b=oZPJUIEI2+6ZQlqR8SuanLYgORDU0PSHLU36Du1oJ53AEoO4O9YhoKNM4ZrkIRmYvt q6cguKVqjjuiPGD6164UBj25y6/P+LNU2/6GHMv7NVb8y8I/S9OTEvEWjcY/OQzEANvP E7lvKX7tE5ottxukw214p/WW7tyZn9w2M/jyHczzU7dbZxmWVVIEhWGxZPlBwRUoR9BH DehwcL6B1RaOionGHKrUO9sSmt/JBQE5S27PIx2tQR9URfkPlkV1f5sUCukjmDgrXISd ceDDjTcz2lOI5rmycvFbbrVP0bGjkLYgQRoiL7+06fCSwO0U4eY52jv15uNNz3YVMski gphA== X-Forwarded-Encrypted: i=1; AJvYcCW7SqqiJ6b4E2xT8z7NmqJdvIEfQaYbTUpLX5P3/JNyBH5FLa9HTcvqzw4d3Cn4MFkpdOwsDTjjeTnaF0M=@vger.kernel.org X-Gm-Message-State: AOJu0YwxspztbvvWs12hOC+FqpI9kkIc+Q6KF7YeLMx6cK2RNyP+hOXN aRVzo1Ts5/vekpjmDQ7hH4CUtM4UkM7gGOcJEjGLPQzLa1OihBFajPmo006KhfXXbVG/quBbDvu I7s3MUQ== X-Received: from pfoi24.prod.google.com ([2002:aa7:87d8:0:b0:799:398b:a4a]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:3694:b0:81f:3d32:fe58 with SMTP id d2e1a72fcca58-82317e00a13mr2635564b3a.35.1769190807803; Fri, 23 Jan 2026 09:53:27 -0800 (PST) Date: Fri, 23 Jan 2026 09:53:26 -0800 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: Xiaoyao Li 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="us-ascii" On Fri, Jan 23, 2026, Xiaoyao Li wrote: > On 11/20/2025 1:07 PM, Zhao Liu wrote: > > In addition to the new features, CPUID 0x1E.0x1.EAX[bits 0-3] are > > mirrored positions of existing AMX feature bits distributed across the > > 0x7 leaves. To avoid duplicate feature names, name these mirror bits > > with a *_MIRROR suffix, and define them in reverse_cpuid.h as KVM-only > > features as well. > > It looks that KVM can emulate the mirroring CPUIDs regardless of whether > hardware supports subleaf 1. However, given such emulation provides no real > benefit but complicates KVM implementation, this patch looks good to me. Yeah, and it would run the risk of guest software doing stupid things like assuming a certain CPU generation if the leaf is supported.