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 7FF4B4DC53D 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=1772484108; cv=none; b=qacCfefjvUpE8GTeUFpX6Zqdz+MyWiWqrh5AbTmQaQHMJbrOCluVBdWRYnKRTUV5gbQTABcMPdriPMfrWaw3VVOBx/TU8QAAPYOhBmzFtTsoXZINoB7MrV+vLVJUfiREJE8FJNAe02iZfia9cMzK+7C2cPL8XhI0tNdYEmVbG58= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772484108; 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=CaiG5/iVJdbL5XB8VB4sa3ZFMwuvqoQK4O+sJvMqXtVFHd5d4VgM/hgmpRdfPG5jn1ddRCXBTr/7qYMhEKkossdeTpOOeYtfqkYYK0uKMBqv5VNu1m0BQiFUcQIDAKyOvvi3GF4SyI8Cxvr4MJObvyPqlNVoAdtUbANWW6Sz5Fs= 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-358f058973fso4483633a91.1 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=LF8c6NtNfnKSEbdXXACPtxgSY4uiiEjCHJPH1i/utxItRMXNVWheFnAmRvms6W8Lzu GeqLH1NWBoqkQB4WDukARh/SLFSGTyWvo4cE2P86wIdGBRw57hxrHdz3Dc11uVLxck++ PHVkcdDsEYYG6aqSOz02khkfPfW25t+xh2PjK3SSJTLYWzaEiHmGXTNw5ql4O0ucwwPw ayBjxwmufdD+sWD4FXolBamKo9FomFBvzf8EER1oAdMqtHb5AL+ABOMXxr7ogE0MmzTe +oTEEEdMyzBOwQbUpnEVv96OfQ8BRkO6HjL2HDvuqKhu7V2GHGHb+CamFCbeuLYWkVFv idcQ== X-Forwarded-Encrypted: i=1; AJvYcCWobKoDT2kgGI3Z4r7AsL1gkVbiOuN18NRZe4sewrhN+BOo4hHiy6CxWJUKn6+vidRntGir9Ni52Op7cPQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyadfkCOAcvseZmmYYmCCp+80XoHafcXJee1NzKphvw+cythbYS 1zAKjqI22XRsrCfJSRQHwx/IZjWTS2F1MzQDEZh5pSq5kTC+9VwIDOqjYciBrWIBP6/azAMPeCm /kT4JNA== 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: linux-kernel@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.