From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (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 E5F2D233704 for ; Thu, 12 Feb 2026 21:18:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770931107; cv=none; b=M3DHs+X3ikVjigbBxGnQCo2gKT96hoMSzV8nZSDeZ5BBakLw1nXn40dFPunMJL+dHgnHvln629LV8qVY7HW3/eG6kFmckcBQuSy9Ps0TYeRen9mXZNicgL1/6repvlr1pCQ++CkXs+ULsBioze3kebpRzD/XzZVcmnwAxc9LfYc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770931107; c=relaxed/simple; bh=93r6rq1czHnX8/8tt4tXPL4Wx8lNSzgeFQPMg/+I/fw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=i/DzIJ3WODseAr4uBTFpzGspf1lAas9Ip9vzk3ctYONd/o8IYtDlECmUMgqGxofghEW0ceSKe/R2lB8vMmjVyPy3eb1VKkArcn7LU6kDm3NcAeGLFGAyKK30vZRE/SEJTDykd85MMHRf/x9ZaPVQypK5DwtzjZPvnPdYBHiGHfo= 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=jGUY/XZq; arc=none smtp.client-ip=209.85.216.74 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="jGUY/XZq" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-352e214cce9so208513a91.1 for ; Thu, 12 Feb 2026 13:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1770931106; x=1771535906; 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=rQIvaW1dQkOQtfQr2mtZP5JGWAsXUY8BUQ9NRLDAah0=; b=jGUY/XZqbq+q/h39Hd+OJFoFodvxZ9kMaeQAR05NvGNG8z9Fnrm480tgnlchNqRZzr 60Cjyt2Ep/EH2y96SZJhwkC9qa/13xrryssWWQHEO1WgVJupNjWIuS/KSLZGYoqqOgkG vnbR2jLffMaIHWwwIL4gwrnWExiVppb/caJEQANaka2lXkpvmt/5naVHYjaJg6jOdaTL p1KbhJz4FbEbVs4t2S+JjwbYFTIMTDF8ueIYJJ4AKEizWRw1Fmir4lKo+mIgDgBPA8pJ 1zOcngPWVLZii36h4O+KOvgrdoDowyj3rUMhmfzY0Fi/xpjlhOn+zGvboNAPs0sqLW79 XQpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770931106; x=1771535906; 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=rQIvaW1dQkOQtfQr2mtZP5JGWAsXUY8BUQ9NRLDAah0=; b=VAM6qy6oZXZJ5xTQxMgxowqQkneEEKUeI/V4AqBKrRXLQHFmRu1DuyLWtWjD5wtqvV iaW9ZC0IWuom7qlRVDpKkQG1Lri93PaqSl1T1Tsc7wQgFuzJJTxhkeyrY5R/FJf9PD3/ iE5BHlhmVjWo9RYSr16bmC+IgWLML7y8tDtE3Dbh+9DvFMnYP0L488OmohdyqpHLtgb4 qE/2n4WL62JSFUE0Up9tZYq8Cvr8aPRkz0uTzsYLi36TCR/Fdc1O3dC/mdnvLNQQGqkK RX68eGMxYbmQz8QJ++bmEkXS8l8gqoi+QCnT0A4qPI4wydRITTvuzIqTd2Fgwrz0CLXf Lknw== X-Forwarded-Encrypted: i=1; AJvYcCWxe0UIFY9FKLFXaLbUKP82OEuV/VmfZ9AvCuVsDcOU2A01CQLxZZwYIB1msZDdNUqJdtGeeCkBecTSZxg=@vger.kernel.org X-Gm-Message-State: AOJu0YxJdPH3OsBcAiY/ik5Kgs/2eggvsSyx8P7ZPkRlSX3Pml/vOCc5 xlItVUR+Y52JuKUerrXCaAx/bct5GNXJ5skSUK3yVeFqrKRrp/kO1hx3XFo5kSv8SJqT7yhyKy9 O1eoDaA== X-Received: from pjsh12.prod.google.com ([2002:a17:90a:2ecc:b0:354:c3a6:280d]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:3dc6:b0:354:a57c:65db with SMTP id 98e67ed59e1d1-356a7aa26a6mr355645a91.20.1770931106029; Thu, 12 Feb 2026 13:18:26 -0800 (PST) Date: Thu, 12 Feb 2026 13:18:24 -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: <20260122045755.205203-1-chengkev@google.com> <20260122045755.205203-3-chengkev@google.com> Message-ID: Subject: Re: [PATCH V3 2/5] KVM: SVM: Inject #UD for STGI if EFER.SVME=0 and SVM Lock and DEV are not available From: Sean Christopherson To: Kevin Cheng Cc: pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, yosry.ahmed@linux.dev Content-Type: text/plain; charset="us-ascii" On Thu, Feb 12, 2026, Sean Christopherson wrote: > On Thu, Jan 22, 2026, Kevin Cheng wrote: > > The AMD APM states that STGI causes a #UD if SVM is not enabled and > > neither SVM Lock nor the device exclusion vector (DEV) are supported. > > Support for DEV is part of the SKINIT architecture. Fix the STGI exit > > handler by injecting #UD when these conditions are met. > > This is entirely pointless. SVML and SKINIT can never bet set in guest caps. > There are many things that are documented in the SDM/APM that don't have "correct" > handling in KVM, because they're completely unsupported. > > _If_ this is causing someone enough heartburn to want to "fix", just add a comment > in nested_svm_check_permissions() stating that KVM doesn't support SVML or SKINIT. Case in point, patch 4 is flawed because it forces interception of STGI if EFER.SVME=0. I.e. by trying to handle the impossible, you're introducing new and novel ways for KVM to do things "wrong".