From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (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 5721C29BD80 for ; Wed, 25 Feb 2026 20:18:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772050720; cv=none; b=pnTR67QjyxA9uZRxaE9nw6yMUTx47hZ4TIR0O9ESsmd5XlLtMB5XCz2vhzmuUSHRNZbYhGBRdpASbUPQK3j4ZTQn5kFQHc+JUZ2SkEbvVanG56KV9EuLzUmDnj5d4USAoL8moIz8xeTbrct9ocYBcXi4t0ExCwV8q/t6XAs8xiA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772050720; c=relaxed/simple; bh=73uUBydhTJ9kiw40BhpuQa4vPgQRTsDCCbi38Y+iOis=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=FYVCau/7ESHXo+hpZSsNaKPcuZP95fw1QBmE1HWZ7GtH4CWLKu1oE5/8nX3Avr0xednPN+lrt/hr8Rb4V/YJQGgJc9X5IxbwehFodzWcY5dKEqpehYhWQogEn/5lfctY6JYc9vDQ6jicYvaID+pJdMzmnaW+jFrQKE8bzYCpZ38= 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=hDatz0xM; arc=none smtp.client-ip=209.85.216.73 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="hDatz0xM" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-35845fcf0f5so131446a91.0 for ; Wed, 25 Feb 2026 12:18:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1772050719; x=1772655519; 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=cGOTi7L+9kQkTZX4usPtOtn5qfNrhka9c/M4/aVdHLg=; b=hDatz0xM+JUM26K9lK4wxKv24uH/+W7Ql69SXOPbCrFUR5U0qY8RqQU646bLe0v+5D q0tZAisw5b5/2VCQPhk2v2+CkHIZFtpPFE01naSnH02RyOzON1lp0FGkEGsxT7nyVd3i M0yXI8j6j9H8hbcSECHcHswqNZQqX/5Dmi0FuAj25oFXzJ4qU/Mo/V9vJ8iiP2MeD6oP LCgHWrYoI5LnkXslKNxT1lOtSsPV3qZSPfGirI1f7lwuVvxVxxjmdS4+kqEbOrQ+AvNc CPqLEp4cqemQbrXpkdGCysVK1OQ1SB1GEx/tWJr5nzLT1P1jb4VCaohd1WucRVaKGmV9 clVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772050719; x=1772655519; 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=cGOTi7L+9kQkTZX4usPtOtn5qfNrhka9c/M4/aVdHLg=; b=j0lVGQSRaIOlt07fBhDQg/fgDNSzdKRYmThxbO2WqhDkynuzutKab4nEWWcGHBhaUg /ergrP8QnZd1U78Ceecm8Z8okx2NHApz8Es9gow4atW+1ySiVhsHL0DabZXbf5/s/pRV VF+r6f34Smcx2Qs+uGWSnM0+BOVo4BDlkl1LlY/uMzMindk6w2OsXBGfQSh5eSKNAIpn gmpbjIkhNQfRaQ5SwKaE52Ic7Xj7vYPdmOE3mLNaen0i5dkejA7Pjg7kKFpvlFkogMCg 7B5b4Q9M9Mec71Z40dfedQD6rbYR0s2rrSgLIMIMFUZn8qz3ebE5sEFwRqkSSJMDtvKF G7xg== X-Forwarded-Encrypted: i=1; AJvYcCVrZVuG4rYFvDb3oiMdbpRe14hwCifZqtJWV70FSaE1YYTQJZvfY/fQubIWzQ4DB1baVvNM5pPL960A2dY=@vger.kernel.org X-Gm-Message-State: AOJu0YwRMsaVjGOcAXHVVkW3T/mV+tfwoJrK0GkeMWOgFbAVuGKAp2hm A6kj5djFijIz0Msj/DPmNTLylaAflDsXB8XgEVZSg5tJLo2D8su3txaY105R8rcgLd+p7kO1aRd ayzZwAg== X-Received: from pjbsl11.prod.google.com ([2002:a17:90b:2e0b:b0:34e:90d2:55c0]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:4cc9:b0:354:57eb:c826 with SMTP id 98e67ed59e1d1-359385d1493mr261264a91.2.1772050718473; Wed, 25 Feb 2026 12:18:38 -0800 (PST) Date: Wed, 25 Feb 2026 12:18:37 -0800 In-Reply-To: <20260120144550.1083396-1-griffoul@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260120144550.1083396-1-griffoul@gmail.com> Message-ID: Subject: Re: [PATCH] KVM: nVMX: Track vmx emulation errors From: Sean Christopherson To: Fred Griffoul Cc: kvm@vger.kernel.org, pbonzini@redhat.com, linux-kernel@vger.kernel.org, Fred Griffoul Content-Type: text/plain; charset="us-ascii" On Tue, Jan 20, 2026, Fred Griffoul wrote: > From: Fred Griffoul > > Add a new kvm_stat vcpu counter called "nested_errors" to track the > number of errors returned to an L1 hypervisor when emulated VMX > instructions fail. This is too broad/vague, and very imperfect. E.g. if a guest is tripping on a specific VMREAD for whatever reason, it will pollute the count and make it hard to detect more serious issues like VM-Entry failures. And if VMCS shadowing is in use, KVM could easily underreport meaningful errors. I also dislike implementing this for nVMX but not nSVM. nSVM doesn't have the same ISA surface and so many of the errors simply don't exist, but at the very least VMRUN failures should be accounted. And counting VM-Fail but not faults is rather odd if the goal is to monitor L1 hypervisor health. > This counter should help monitor nVMX health and troubleshoot issues > with L1 hypervisors. There are lots of ways to monitor the health of L1 hypervisors, it's not clear to me why we need a KVM-provide stat for VM-Fail.