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 68B9A4266B2 for ; Fri, 6 Feb 2026 17:55:04 +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=1770400504; cv=none; b=Df1ucCNTdWpaErMPdHnVklXxQLkMVRmJUffQa/iMDhm+FG6f0R3KK0CFFT0kAzSK1GM+fG3K6W6seqZcadbToXAvxlPwQ4GxoyePR4d4DEYioUYEFcumZ8RpX6qmj1KJs3y07790OY3NXJZYsufH13CXm19vlMft2OqDMnP9eK0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770400504; c=relaxed/simple; bh=GlpFnTDi8D4k/ZhVBxdkp4L72SyTwpevsbx9g3COs64=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=YYbBq05EtXpNsSDNszg89Zo4TaX+QVrDQj/hGRzHhA5ERagPVIcFy1ob9wycdXoRoRQGuwGWwLyjWLNqsAaJAiubwIyeeoLIaKJGNFqF2V/dyPG89LilInZY/J3WwTXivr5CQJXefgMlSx5kMX9j3tH3jGvwZkbUcVvjFjnahuU= 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=irfEJoQ0; 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="irfEJoQ0" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-2a8c273332cso25672015ad.1 for ; Fri, 06 Feb 2026 09:55:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1770400504; x=1771005304; 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=B8q7C/N88SwT4oefqY74mjYEGWdcBFY/qeCdLmO+nbo=; b=irfEJoQ0vRjuujv6wvFkTwAuSRR7mWcWJxAVcE1xXorrOBickHki8OvpL5STEO20fa tdiQkfv5fvPJkEWzqdD+XFpNzyYCTAMMcvrDxawg/e6WIy1SFNl2F7Lv0vdWxiFmWLzb w33snzB/v7mFJpavCDg+RIzREaSnI/IE4ulrZT6O9xkgS1iAsAEE4fjYQYYc5efzZ7jX GpG1HtOzPUGx+mRaC2YkZXZcnny9fjRA4FZjV7Rq4RlL6+WpoWpT59RYYeNN6QoNaHg8 rYm/yUakTi3uY9bjy6qDw3aPudzIrKY5Qok15GyLT53qwhuJlEg1dotUGNMsTEilNx5H M0kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770400504; x=1771005304; 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=B8q7C/N88SwT4oefqY74mjYEGWdcBFY/qeCdLmO+nbo=; b=MOMwnw5YzCXl5fQlyaW25b7rYP3hqTr+onWl2a/n4xST6+Mh3euoBi4vAxgXyk67d8 Zdcc+2oN5DCE8j+D/1bPVbxLSISkM84a1E4X0K6ye9C6O6HG0Zewb1qkCaxSeJGXZLzF zPMoFp1JXnfeWM56533ddyYth7s894SmxiC1tmagLdpaYXHhnXXXIodliodeNEcZMCV6 rN+EkPljyIkqvQ+NBEzdzXjvF7rYuGxmwCf3imJZhRKCugJJQLRzylYOXgzV54gTVZY5 Of8pokMLE3esMhklwBQbUB/rPWHxmNNgPpjeeVTDEvc4EJSDgQLaYU+U8nKfPbpTMniN HhzA== X-Forwarded-Encrypted: i=1; AJvYcCV4tozUukaZPc1j3aN2zpiJxdpDNt2Z5SQJ/HhUNG98pDTeO/99gFouGryxM4Uh06bSWCz+S8ESaumNGOU=@vger.kernel.org X-Gm-Message-State: AOJu0YxB4GDPbN2SX2SrsCX9JhORFhOdFK4gzoWLk4SuVW16PgMlrNSf OL7tWw3FCgaT6usdruPBhtsLBHdpa7M6zAWNBgTbjlj6FJiO6PZEli6cze0PCPx8FKFrrnP75kO gbgS1ow== X-Received: from plhs13.prod.google.com ([2002:a17:903:320d:b0:2a8:74f9:83b2]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:903:3d0e:b0:2a9:484c:ff19 with SMTP id d9443c01a7336-2a95194a492mr34248905ad.42.1770400503711; Fri, 06 Feb 2026 09:55:03 -0800 (PST) Date: Fri, 6 Feb 2026 09:55:02 -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: <20260203190711.458413-1-seanjc@google.com> <20260203190711.458413-3-seanjc@google.com> Message-ID: Subject: Re: [PATCH 2/2] KVM: SVM: Set/clear CR8 write interception when AVIC is (de)activated From: Sean Christopherson To: Naveen N Rao Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Jim Mattson , "Maciej S . Szmigiero" Content-Type: text/plain; charset="us-ascii" On Fri, Feb 06, 2026, Naveen N Rao wrote: > On Tue, Feb 03, 2026 at 11:07:10AM -0800, Sean Christopherson wrote: > > Explicitly set/clear CR8 write interception when AVIC is (de)activated to > > fix a bug where KVM leaves the interception enabled after AVIC is > > activated. E.g. if KVM emulates INIT=>WFS while AVIC is deactivated, CR8 > > will remain intercepted in perpetuity. > > Looking at svm_update_cr8_intercept(), I suppose this could also more > commonly happen whenever AVIC is inhibited (IRQ Windows, as an example)? Maybe? I don't think it's actually common in practice. Because the bug requires the source of the inhibition to be removed while the vCPU still has a pending IRQ that is below PPR. Which is definitely possible, but that seems overall unlikely, and it'd also be self-healing to some extent. E.g. if a workload is triggering ExtINT, then odds are good it's going to _keep_ generating ExtINT, keep toggling the inhibit, and thus reconcile CR8 interception every time AVIC is inhibited.