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 D60DA21773D for ; Tue, 6 Jan 2026 18:57:17 +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=1767725839; cv=none; b=EMZrZuKcF5tsJ5lC4fpm3AiVtlC7D2DFa1yCz5/ZvqglxIA0AuUWyTHzZMYtOrD3wDKoicLFsVWuG7IHAwYsc9WsSPhW2FdW3TjxGVkVEVhB6bOVkSiFDjaKnzYN5gbA+t2HWrKt6AfwOUmGLHCHzMnYKz5BoC+nd43VL4EengM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767725839; c=relaxed/simple; bh=+PyeIABNujjyLtbDpNFpeXtNfj1/FsEsgjw0JhaLChY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=EmBYNyvR1djbB7NAso+YDJrHYZtouO8K6wWlkHuoKJT568dlvjIbT8eemjgfBBtGbCR8gnezvhlAsLkL4nDLruQH7sUdVJZI7JFNz4zOYVEk7PB7eroWcLA6dFd+ASOwcBYjzwLDbXrm9briAbXKkiL0x3bAWxwQkb85R4PitWA= 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=H5FDoZwg; 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="H5FDoZwg" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-7d481452732so2013413b3a.1 for ; Tue, 06 Jan 2026 10:57:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1767725837; x=1768330637; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=kSzoJlm6vX2WUM8FmguhKjIb1ZRG1MeJzjUGe2zOzUs=; b=H5FDoZwgAg6lazMrk3shl4TvaUbd22vz6VFH4u6/KKPY/tl3cV6BW/+nDzPPwG62YD iDdQJXE+fOloPPkGBqC6PyQbhsDTz4UV0kJBKsPOqURf1VP0VyhHD3Y1WtlteELRR1Tk N2VZx2A0PuG9yKtasntxqCMePjlhLbWSF3n4LZ9x1D5xR+tLFdfZydTf4lRtdmuVZaTS 93X4HT61RIsvnUzHRORD5HAk9OPxE8GWW78cHYJ52NG0QUt11CE5b0KBie0rzZgQGTE5 APeHeUKhvdHo49Ye64YzyvRPI5hOnXJMqNmsangu7FSDOH4Jk/t8DKZ5vetihoXwK0Xe zT+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767725837; x=1768330637; h=content-transfer-encoding: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=kSzoJlm6vX2WUM8FmguhKjIb1ZRG1MeJzjUGe2zOzUs=; b=n5YFHhKdrmOj43ZHzXDE8RV8rnwKhKow4UejG9nmQMQZdcAdvWMKzP0fp8AD2NRvdf FC4/0JaVBAOlBqg84EuZYA1vzLMOEG5THIp1bURXgSYA13dGTWrwwxh4ewArF5TP9uXq 8LzlQqYrE+43AUNx+H9RqrCwQq93rHyU6tfQmhzkYofXQZLLn5sHAzdjqdpz6p4sZgdW Herv06cqyNOaHWjn3tuq67pzYpWqpQryFEwcqhlFnErcDggkLheyrUjHrqfJeARBbpHI eRYA5H45bUe1hyheEVLpsOduQ80BunQlg3BRbvGZFli4ggi0Pba0bvuMgahkoA3MOIRK uCPg== X-Forwarded-Encrypted: i=1; AJvYcCXYsCggkseWC42x1K7kCuGdh4w2XkOd37oiBud4a0dcj5uUJmC54oMRm5IwnRkCC+BOSlwWyA20r2D918o=@vger.kernel.org X-Gm-Message-State: AOJu0Yw+TEOyVdwduwW+/rOUkbDgIH33ULONDvkN4uNGdxxuJHDtwIXj 3sZY5P3c3mwUJ/6AgodDVAhHJfvaz1TRNHDmVTS7KVhKFYekFwTKZQJP6lsa394pMnzCtuMfl2v VynobUg== X-Google-Smtp-Source: AGHT+IFxGyiNsU+bMGrti7oCMLKlVqa3y6k03fA5qsZnqU/n8rMV4qDTONBW7egW/vHqGbRZ2ZWRC3CsSJ4= X-Received: from pfvf19.prod.google.com ([2002:a05:6a00:1ad3:b0:7dd:8bba:6395]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:e8c:b0:7fb:c6ce:a858 with SMTP id d2e1a72fcca58-81b81197415mr17362b3a.68.1767725837201; Tue, 06 Jan 2026 10:57:17 -0800 (PST) Date: Tue, 6 Jan 2026 10:57:15 -0800 In-Reply-To: <4c45344f-a462-4d18-810d-8a76a4695a6b@citrix.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <4c45344f-a462-4d18-810d-8a76a4695a6b@citrix.com> Message-ID: Subject: Re: [PATCH 2/2] KVM: SVM: Raise #UD if VMMCALL instruction is not intercepted From: Sean Christopherson To: Andrew Cooper Cc: chengkev@google.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, pbonzini@redhat.com, yosry.ahmed@linux.dev Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 06, 2026, Andrew Cooper wrote: > > Mentioning L2 and L1 is confusing. It reads like arbitrary KVM behavio= r. And > > IMO the most notable thing is what's missing: an intercept check. _Tha= t_ is > > worth commenting, e.g. > > > > /* > > * VMMCALL #UDs if it's not intercepted, and KVM reaches this point if > > * and only if the VMCALL intercept is not set in vmcb12. > > */ >=20 > Not intercepting VMMCALL is stated to be an unconditional VMRUN > failure.=C2=A0 APM Vol3 15.5 Canonicalization and Consistency Checks. Hrm, I can't find that. I see: The VMRUN intercept bit is clear. but I don't see anything about VMMCALL being a mandatory intercept. >=20 > The "VMMCALL was not intercepted" condition is probably what the > pipeline really checks, but really it means "in root mode". >=20 > In most nested virt scenarios, L1 knows it's in a VM and can use VMMCALL > for host facilities. >=20 > ~Andrew