From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.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 79C4821CC59 for ; Wed, 11 Feb 2026 13:51:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770817864; cv=none; b=h4cKuG7llz0VxQvWN858uFa8EjdXMj4MzJ3mEeBUJzh0TpyanfTWs9UIlgsAKj4wCqUId1RDa+Qq6q2FH2rql2v7uiAWuku9L7PU6xwNq8Q04YzlBpC6XIxFed1a7uRDI+/upn3Vxxe6YzMBZzqtbUM6MqSj29QFISrHmvWOtpI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770817864; c=relaxed/simple; bh=9INrHUmwFywTGvbap0c3DEfTJO34ic60JVJc/xXUDLI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=PKrzV+8h6+S0Q+0fGqgoZzqBd7d79bIksftOHNJaC8ikUUxAsTOTbKQoOFl2EEduGegUnjF6xVlwK5WuAdVZd5/hX2t2UTfPE+uy32pKet0YYvFcEitH9EmXb++QcVo0mk96Hp8XnOmfz+zDSq7dKQt7kO1l2igZJvz4EcyvFCc= 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=AbEVoJr3; arc=none smtp.client-ip=209.85.210.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="AbEVoJr3" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-824a2df507eso739843b3a.2 for ; Wed, 11 Feb 2026 05:51:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1770817863; x=1771422663; 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=c32JYHbBWshajyptgX79a7MBzw3VfpoWrQuDdYKV4eM=; b=AbEVoJr3k/8fQ9AdIXvExQRlF6iUs8j0xraCgDYp/47haoJWCctsXGyOnpTkfesw25 bHrlqYxnq9IYsPYsBtcSr6A8AgmT++kPJeSMjg7mv/+QTRkuRrDtFxbLUp2FLwQeLAJp 5zmhmDIFTR7BG9aP38+5OK4Op03NCJgBHcXHLpGQaGo32HADuUUJw6qvxkJj3DoGKUfk tu/Oly+qqV4torLXsHMhn3KhIusqO/JBANYn9PZP3dJ4ys/B+ZXnier+RuXYOAZmPeBn 16i4G22V6rO43YELhi5iqRQpTee1s9+Ce1VjftaYe1KLQQRByw0t8aO9po4d9WTEnHFD lAtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770817863; x=1771422663; 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=c32JYHbBWshajyptgX79a7MBzw3VfpoWrQuDdYKV4eM=; b=ek1kIDpAIQUzErN0QFH5X0+SwcvAgIzu9KoFc3u+L8nRwEGw2Id4C6cwg7XokLXrEo uJAQskSkK1Bm9lE5TyF1z4FxunSNqaqkpWjyG1MKpQML6o2jduTLmVutYiCS61/Rlmul Eah8x1IatR3j0VxNCdFRVdOfo6sr4cmdJqd3yOVbmQeJXH4lFby8FUbceLUO+FQDvBMf 4BvorlF8u598Zm3FZH7fxyv9K3+lSMQPCo3iZ/TDpJMmjyQy6W/83UUubrOQRHGB0jDC g1Ss8h8+kqSu8Gpwek9DzLJfHvtYzz2WfmPwtrSD5DUgfzpRKHADYk2S6TRaOyCC7ZUO 0quQ== X-Forwarded-Encrypted: i=1; AJvYcCUr+Ux5vkaZnfK1AUYx2Hmi/iR42pI5iW9bW7+ypV3ivL+i4dG9C4MLi1Mt63ZENTQ8gBP7+mAegE0FBLM=@vger.kernel.org X-Gm-Message-State: AOJu0Yw4Q9+UF/IxLQYWZZn+beY5mEwKZuAK79uJ2c8ElZ1Yy5hBiO9o lC9NbutB9jwQdZPZ6glOF0JwqUaSmvehpQZafltVZazKqHc+0SFHcHgbJOY1QFhj3ywNDkhGD30 cZvM1Yw== X-Received: from pfbfj4.prod.google.com ([2002:a05:6a00:3a04:b0:824:a3b4:6d0]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:ae01:b0:81e:591c:e7b8 with SMTP id d2e1a72fcca58-8249ae8dfcfmr2079095b3a.17.1770817862722; Wed, 11 Feb 2026 05:51:02 -0800 (PST) Date: Wed, 11 Feb 2026 05:50:59 -0800 In-Reply-To: <20260210210911.1118316-1-jamieliu@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260210210911.1118316-1-jamieliu@google.com> Message-ID: Subject: Re: [PATCH] KVM: x86: Virtualize AMD CPUID faulting From: Sean Christopherson To: Jamie Liu Cc: Paolo Bonzini , Borislav Petkov , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Tue, Feb 10, 2026, Jamie Liu wrote: > CPUID faulting via MSR_MISC_FEATURES_ENABLES_CPUID_FAULT is only used on > Intel CPUs. The mechanism virtualized by this change is used on AMD > CPUs. See arch/x86/kernel/cpu/amd.c:bsp_init_amd(), > arch/x86/kernel/process.c:set_cpuid_faulting(). Please rewrite this to state what is being changed, e.g. how KVM is virtualizing the feature, and most importantly why it is "safe" to do so. Specifically, this needs to call out that CPUID_USER_DIS is documented in the APM as an architectural MSR, which for me at least, is mandatory for virtualizing/emulating any of the MSR_K7_HWCR. The fact that Intel uses some other mechanism is irrelevant, and the kernel source code is not authoritative for things like this.