From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.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 199F429BDAB for ; Mon, 12 Jan 2026 17:41:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768239696; cv=none; b=RYu78DkGEri2X3Fk+IyluTlQvxHHQS2W1+op66PU5KeaR9n7h7II+IYNClV1HGfq2IyHdVnU3FBl2xYcU46v8zhdBUbpCdHKwtiIPsOnQt4M9ceRyoz6IVa5cMgjUmAfw3mBpyq5ixLLdaoG+oaR1sIi4cDG1z+IZBBDVDTdSMs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768239696; c=relaxed/simple; bh=vz3s4QEoQSCPIcBCfTW7AiJd2EK5vdhq+cM9ipv5WYU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=YyPH9jJTJS9Ti/kQEqJRDUBLUm6M1YUHL6BWOxKjRceY1SRDT5VulMeVMZZlhe5riDD9nohluk6lOlWwIAxCQOxd8xRZQpTkN9KaP3aWmIjlPw+FQ1/ZOt3PRhz6OdQO00dc3rPhejbLyLmrKWkZyFumnMCJ2CQfexfh+XmH4sw= 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=AcORyvlu; arc=none smtp.client-ip=209.85.214.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="AcORyvlu" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-2a0bb1192cbso62220275ad.1 for ; Mon, 12 Jan 2026 09:41:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1768239694; x=1768844494; 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=HJn+6mDwhm4cb58DlkOOR+klYuk5zdCPDtsBuhP8pM8=; b=AcORyvluE4zBY+MvgFRmOjKYhoFzEqWt3l1lq8R9Cm3EEPr9yTxlJV/aNwtoIZMAOQ L2uaHKYVv535HzUwoeVJREjutZsVujSFE48994pDEPb7XUusfeEg2DlnF19M9KIyPZtC HR5oMoFYsK9oaa1Npmd8a2r9J200/I5kmV7148dytSlUZVdjVV7pW+awoAFFOdvz2pMr VmTCKcKrPbAlBKeKwn3K9HQMUZB4Q2YbV+x38G65ttPjhmhaTGqDmqj2H+/F7LG7UVeZ llBvZoWBjo+2Tq+WVXhmcsxLKjSxk6aOW+1tsznHcC45y6clVh790xGPdsHZs9ArkS+m QQ+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768239694; x=1768844494; 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=HJn+6mDwhm4cb58DlkOOR+klYuk5zdCPDtsBuhP8pM8=; b=Dkeag6Z8lP5XeZCuc8tFKlkmD2pMpcRtwgJIXoNmmYY3CgcP4J+mKT5Sdq7QHw9Gj5 EuAo0Ydpv4yzrP+QL8v8cIpllZtzeN+rHhJ8AlS/tfIcNcAY3AggO6Q5l0evx302Xeaq G3/93uwWPrEZm6VyAGGtiG3elmMPIctgO/Og1NTfY1YiSeAVQsZYBFcFMzVs9gJgqyu7 5EKBp79Foeya802htLACgONQIiLRxdoFcGCXkDpsws4xm7yJows2+y007cFzQQ5WakZO SIpHNGGPoqTjQYPiyIhde1JDZ8G1sPWlc3D0/YYXBIDP1PDHhx0v5slgVv5TcFIzN6xt EmUw== X-Forwarded-Encrypted: i=1; AJvYcCVpnva1tQp9uSK+kh07gAHJoK2Dan2pUXup7yrS94UGiRCFHIBEHedK8JddnJicwl1WcMHCZZSe3XVeCyI=@vger.kernel.org X-Gm-Message-State: AOJu0Yygu9N+Aj66bwTl/br0ryEQTsYXRG2ZeIJp135MTSMFjOvDHED3 2CdY8pL5BUK7DFh6TTNT5Dm9Yw2i0u2mpRxnHvOvBaRmAQAJrjfjxKF7N6CDx/KAfIqVUjgCu3z 2zn1xuQ== X-Google-Smtp-Source: AGHT+IEL/FnAl+pohq5kuGuvhM4Ebv1523qeW+ugft+GugmQFozzPxALeZAi8oj2SUHMtnrU0D072WAd40A= X-Received: from pjyj13.prod.google.com ([2002:a17:90a:e60d:b0:34c:2b52:cf75]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:ce0a:b0:298:4ee2:19f3 with SMTP id d9443c01a7336-2a3ee4edf11mr195610105ad.49.1768239694498; Mon, 12 Jan 2026 09:41:34 -0800 (PST) Date: Mon, 12 Jan 2026 09:38:54 -0800 In-Reply-To: <20251215192510.2300816-1-chengkev@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251215192510.2300816-1-chengkev@google.com> X-Mailer: git-send-email 2.52.0.457.g6b5491de43-goog Message-ID: <176823877360.1368641.767900599632930102.b4-ty@google.com> Subject: Re: [PATCH v3] KVM: SVM: Don't allow L1 intercepts for instructions not advertised From: Sean Christopherson To: Sean Christopherson , pbonzini@redhat.com, Kevin Cheng Cc: jmattson@google.com, yosry.ahmed@linux.dev, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Mon, 15 Dec 2025 19:25:10 +0000, Kevin Cheng wrote: > If a feature is not advertised in the guest's CPUID, prevent L1 from > intercepting the unsupported instructions by clearing the corresponding > intercept in KVM's cached vmcb12. > > When an L2 guest executes an instruction that is not advertised to L1, > we expect a #UD exception to be injected by L0. However, the nested svm > exit handler first checks if the instruction intercept is set in vmcb12, > and if so, synthesizes an exit from L2 to L1 instead of a #UD exception. > If a feature is not advertised, the L1 intercept should be ignored. > > [...] Applied to kvm-x86 svm, thanks! [1/1] KVM: SVM: Don't allow L1 intercepts for instructions not advertised https://github.com/kvm-x86/linux/commit/1d1722e52fcd -- https://github.com/kvm-x86/linux/tree/next