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 7FEA63BE17E for ; Mon, 2 Mar 2026 20:41:46 +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=1772484107; cv=none; b=k7I9HrfTAKUhJUOqwW1f+jS1u2n2ed15G3XQLO+mLgfl+LrD88i2dZE5XU4bgX24wbb6PF7o7O5r4VOm91bMVz1uS7/Iya/TxRbW2zJ/jwrZRbD7QDfPYlf7V9c/n91+0LUUz0cUN6GpFiBraBshzSn1/i47wy9V9HOdnIxg2fE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772484107; c=relaxed/simple; bh=R/MIcxqUVQTwE5wwGHyGtW9Y/bGlblc1zMp+2swWJbA=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=nNLAUj/eToPMQtJr2yGhJ5GCilhqMRc5kjtxD4B6nU3kpZtmiBn7U0Xhzl0Tq5qYrm55AiLFJWL4rHS4EwUIuInhBZVjiNLrXYfJTkVvoiFzTGmgMpap2DMC4tBu0IMjRmKhFt96cXNVaaNVG5hOixYJ1l2pnAxYMpvzTaHVavM= 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=RLTXvBuI; 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="RLTXvBuI" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-358df8fbd1cso4237699a91.0 for ; Mon, 02 Mar 2026 12:41:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1772484106; x=1773088906; 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=LgZDmqmpagJozBHMzfcbK0Tu/J0kjNTVJeXoQ0mkXOo=; b=RLTXvBuIv+tpS/Y4nq4dGMGUemVDivwhhxcYUlswcPt7lFpV1LDYYeCDiH8SDr+eSE A7yPRj5NMUJYu0L1Dw8nOnlecvKDeh2XVosoiBXFX4i4LmPteiyV+nwigY8Pos5Qg+xa /wLjHqB2SIbcTZV9IbkOEy8brhzKgqJpMqD3BrzydBIb5fMREdE1tVSaT40xtYfIs3JS 9kI+3YXL/JwYOM6nqL+OWQVUVtHmjlfJObefcFp0VwxtfvYU9OIndFgAyZIf380a9Wmh 652egbnj1UvdeMZnt0dwhmCK9kemdK+EwkUufdmU6vAfw6AdrdeTu6keJjMXg6itRGEh AjEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772484106; x=1773088906; 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=LgZDmqmpagJozBHMzfcbK0Tu/J0kjNTVJeXoQ0mkXOo=; b=fBq8zc/usucXQeqcF9cYV7K9seADc1M7JQVK/Xbx509ZiX9m+/zxPHARw8XwtHWUvb /Pk2QXeYcnp3Ik9Cr6GbEI1GcJc94j2yfAECy4uCUagp67ZjECAhGYFRaj9WvBiOW3+/ bkps/L50vcCbTJSuadcHkmKCVsmZ6egl2lF8ERgq4kNKVKfx0dEkfSQQNg5+5lHiMBzD x554G/56cT40bw6Yu4OcJvHutPjnFDn/JIPVuk4SauDVQsD0EkW2vh/Luxn0RisQHJK1 zQ2V38A01uhiwNSEY9xAakPdmbax7nmKuCcFT5GEoL0JIvoej1wCoidzoMzhDwuEohiu 8Mdg== X-Forwarded-Encrypted: i=1; AJvYcCXyPdMq+G4C/pv7bRLTnet3MytMoDAwIXzvOmdZmnxrIo8bQyC0eBHZuXmsicWCRc2D6pfHXvI=@vger.kernel.org X-Gm-Message-State: AOJu0YwBEuqr11uTHX+m2OwsyuwWpyOLEErH6o7UitEtlcAl06JZeWMe 6NUY4UsfsZiBQeJr68N7wb2QjXe7ZO8UtiDzknWrpDMlJS7iZrpvTXCCRcef1XmxYECvsyyPQEz bwanllQ== X-Received: from pjwo3.prod.google.com ([2002:a17:90a:d243:b0:359:8c13:8588]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:524a:b0:356:7b41:d348 with SMTP id 98e67ed59e1d1-35965cd00e3mr10408302a91.20.1772484105712; Mon, 02 Mar 2026 12:41:45 -0800 (PST) Date: Mon, 2 Mar 2026 12:41:44 -0800 In-Reply-To: Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260225005950.3739782-1-yosry@kernel.org> <20260225005950.3739782-3-yosry@kernel.org> Message-ID: Subject: Re: [PATCH v3 2/8] KVM: nSVM: Sync interrupt shadow to cached vmcb12 after VMRUN of L2 From: Sean Christopherson To: Yosry Ahmed Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Content-Type: text/plain; charset="us-ascii" On Fri, Feb 27, 2026, Yosry Ahmed wrote: > > diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c > > index de90b104a0dd5..9909ff237e5ca 100644 > > --- a/arch/x86/kvm/svm/nested.c > > +++ b/arch/x86/kvm/svm/nested.c > > @@ -521,6 +521,7 @@ void nested_sync_control_from_vmcb02(struct vcpu_svm *svm) > > u32 mask; > > svm->nested.ctl.event_inj = svm->vmcb->control.event_inj; > > svm->nested.ctl.event_inj_err = svm->vmcb->control.event_inj_err; > > + svm->nested.ctl.int_state = svm->vmcb->control.int_state; > > FWIW, this is an incomplete fix. KVM might update the interrupt shadow > after this point through __svm_skip_emulated_instruction(), and that > won't be captured in svm->nested.ctl.int_state. > > I think it's not worth fixing that case too, and any further effort > should go toward teaching KVM_GET_NESTED_STATE to pull state from the > correct place as discussed earlier. +1. FWIW, AMD doesn't have a MOV/POP SS shadow, so practically speaking the only impact is that an STI shadow could get extended for one extra instruction. Unless the guest is doing e.g. "sti; hlt; cli", that's a non-issue.