From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA575242D84 for ; Fri, 21 Nov 2025 20:48:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763758110; cv=none; b=fzC7KsUldrvdBfU4Xbf8JygRSWrMTH+I7lGzD8aO8qlSUqedOndKIpmyrkILmROKD7lkXCha3oRKGUXY2r/ehHWQZ6XqE3TgLlm8kBo4aiZTdxaEmtx7DfoE1FchnepJSzZcbSjCSnBrmadJcAFPStGF4Q8C0Cw/07+fJXnDhrc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763758110; c=relaxed/simple; bh=qyre18cpOKvxwwzmBDasMYxqf6NTszu6HKVwU/jZ7cA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dmaJ/V2lt8nCmZQ9GCUT8WnPabMEgUbp3okX/izK2EM9D4+fJYpbcQNZ+X3Mu6PLtvwm6fz6BP6y7C42W+KKGYopCqnQkJTsX+NLnJMJdfEDhV+SDFkIHgsmVWEH0NATEeOL5bmJWwiQy7S0Xa6aqjPOQkerVQ+6A0/ZVROw3Xg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=Q6uK37Op; arc=none smtp.client-ip=91.218.175.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="Q6uK37Op" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1763758105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=zkkn6Am/KVdd3EYkVVX2Yi8kvfVxaybnM5xNkbH18cY=; b=Q6uK37OpHpOSOOKSRCWoblfsRJKUjwFg6wdRp2Na9VLglN51zpwTOpoUSDR4kc9wzkKIz+ WDyE2bJP7pWvwJP0zHOhQL18UNtrtLT9I1MRelu8KDU13tgjhiNAo3HomzII3mjlZcsSG7 T5aQWFbddAC3tk3YoV9r7ML0zwi+oUg= From: Yosry Ahmed To: Paolo Bonzini Cc: Sean Christopherson , Jim Mattson , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Yosry Ahmed Subject: [PATCH v3 0/4] KVM: SVM: GIF and EFER.SVME are independent Date: Fri, 21 Nov 2025 20:47:59 +0000 Message-ID: <20251121204803.991707-1-yosry.ahmed@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Clearing EFER.SVME is not architected to set GIF, so GIF may be clear even when EFER.SVME is clear. This is covered in the discussion at [1]. v2 -> v3: - Keep setting GIF when force-leaving nested (Sean). - Moved the relevant selftests patches from the series at [2] here (Sean). v2: https://lore.kernel.org/kvm/20251009223153.3344555-1-jmattson@google.com/ [1]https://lore.kernel.org/all/5b8787b8-16e9-13dc-7fca-0dc441d673f9@citrix.com/ [2]https://lore.kernel.org/kvm/20251021074736.1324328-1-yosry.ahmed@linux.dev/ Jim Mattson (2): KVM: SVM: Allow KVM_SET_NESTED_STATE to clear GIF when SVME==0 KVM: SVM: Don't set GIF when clearing EFER.SVME Yosry Ahmed (2): KVM: selftests: Use TEST_ASSERT_EQ() in test_vmx_nested_state() KVM: selftests: Extend vmx_set_nested_state_test to cover SVM arch/x86/kvm/svm/nested.c | 6 +- arch/x86/kvm/svm/svm.c | 1 - tools/testing/selftests/kvm/Makefile.kvm | 2 +- ...d_state_test.c => nested_set_state_test.c} | 128 ++++++++++++++++-- 4 files changed, 120 insertions(+), 17 deletions(-) rename tools/testing/selftests/kvm/x86/{vmx_set_nested_state_test.c => nested_set_state_test.c} (70%) base-commit: 115d5de2eef32ac5cd488404b44b38789362dbe6 -- 2.52.0.rc2.455.g230fcf2819-goog