From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (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 08C5A1C2AA for ; Wed, 8 Apr 2026 00:14:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775607291; cv=none; b=SXzPkY2N86oVa2fIj86fublUruao2CPI3xAKfJ02K/Ys6DIq9f+1PwH/bO0v/L2oI2reVaPKtDnZT58l/wgds4y5xO2dlqVGfl4F57HhxZDl1o0PPMfn7AoVnLaGyEYlyCjUqJRG/3+adJmvCmq17z5TYdA/dSAKOmFmg9ykBXM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775607291; c=relaxed/simple; bh=5KxGGM+4+4sQsw/wZ1SfrWjwNPm6IlgjcJlez989a+o=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=KeR/+UYSMGdXgvF2+0Bm3BBHe9pdG4X/+xjiTo26oqnDITRh/uZrkKb0cP4ar4fKyEyQA9RvphmSOEyyjiQZlY2jqWmrNlKKLqQhjskdrWKJhX2ZmaPm0m2Mc9X8jzgdjAqGx/xeMdQCEefvpSH5bT6tZ520ZJJJfYN7Pvq0mCg= 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=v9OngwPn; arc=none smtp.client-ip=209.85.216.74 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="v9OngwPn" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-35dacc40f92so5074612a91.2 for ; Tue, 07 Apr 2026 17:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1775607289; x=1776212089; 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=/6c/3aNAgdBfmE3uCVOikIv8jDS0Gj3+AoFK1vTn9w4=; b=v9OngwPnE7v7Ljkors5hICLxHEtXeAsKGKfUZOaQ2BQE/Be0wTcti+d9c1tPIVpWji i/4UjQhUEI+R7lUaXTVCuQz9D1xQbI5ttDrt/RloCzoGjpTQCovFBM+5ZjQh1mzg3kLq jMD7x6c8q27NJsJV9/F84/ZUIUm4zEFvnq41CuNwWX0BspEmsv8glIwxiYy/0CHDd8/K M7qE6Q7z5xfwEhK3VuzYnC7kmmu1o5qIg3/YcfCAyd7tGzdg/kmY9mmBpKonuClLowI4 6gDjFr1Q3lGUArF8HMDLlIi/Et/XKPYu5p2PZNRVSBSpELHvqEndRfoSBpVL1kEhWTfH MI9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775607289; x=1776212089; 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=/6c/3aNAgdBfmE3uCVOikIv8jDS0Gj3+AoFK1vTn9w4=; b=Oc7PV7yoJxC63E1PLmVjo/G3ql+otNVc+t71FHALF71oC6ivObqVZBbkQD2Cr6EtGQ 7nvSNC6uEckFyTaGMjypo/EPRqPpwCWmBSBURXd0CZsngGVFuwTY9q3rCDAG6XbWnbtE IgYvVKBL1LTNIQnT6WeNJGa0/4quPSmnExy1hQ0oI1Z52/PSdpl0YIWFNCwu31Z7Bl+T iRXH9X6oDjgg2bD2lqRIQSFSukFKe1aw0XQjCAgjVP3x/lN9M14pXk7TOstWLQcR873g MKPwVKDHnLWBXUDYSrSDE3UzxiuHHau7NKqF47KVtDYHlbxt4oFcWjseaGh+L7l1Nyl8 6pGA== X-Forwarded-Encrypted: i=1; AJvYcCUpUAyEd/08Qx85dx3O0DEAGjf3x1eXAdLiTzq3RZMkP89IAhKhEZVm5l1FBNCihLR8Hgst2k/tgvD6SZY=@vger.kernel.org X-Gm-Message-State: AOJu0Yz4XPzpM/tT004WjMaF9vYIzb8qoQXlVL5sNss5DeIow3k4Oc+1 9/qZLpwCX7WbeZRIcosyrL7FjzX3BXFtEvi6aO1cqUzu0CAB9bIAtROwA9DGdUOaH2YlY0mZ6d8 LHbUsIA== X-Received: from pghu8.prod.google.com ([2002:a63:ef08:0:b0:c76:6b03:96ea]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a20:918a:b0:398:80a4:d6ba with SMTP id adf61e73a8af0-39f2f01ec8dmr18831199637.38.1775607289290; Tue, 07 Apr 2026 17:14:49 -0700 (PDT) Date: Tue, 7 Apr 2026 17:14:38 -0700 In-Reply-To: <20260316202732.3164936-1-yosry@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260316202732.3164936-1-yosry@kernel.org> X-Mailer: git-send-email 2.53.0.1213.gd9a14994de-goog Message-ID: <177560710241.1572937.2964119730170259262.b4-ty@google.com> Subject: Re: [PATCH v4 0/9] KVM: SVM: Fixes for VMCB12 checks and mapping From: Sean Christopherson To: Sean Christopherson , Yosry Ahmed Cc: Paolo Bonzini , Jim Mattson , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Mon, 16 Mar 2026 20:27:23 +0000, Yosry Ahmed wrote: > Jim pointed out that VMRUN/VMLOAD/VMSAVE injecting a #GP when the vmcb12 > GPA is valid but not mappable is not architectural [1]. The series > handles them as emulation failures and (mostly) exits to userspace > instead. It also fixes the checks performed on the vmcb12 GPA (i.e. RAX) > in a few places. > > Note that there's a few other bugs that this series leaves alone, mostly > to keep it focused on fixing the non-architectrual #GPs, this includes: > - KVM synthesizing #VMEXIT(VMLOAD/VMSAVE) to L1 when intercepting #GP > from L2 on VMLOAD/VMSAVE, even if L1 does not intercept VMLOAD/VMSAVE > (e.g. VLS enabled). > - KVM not respecting priority of #GP vs. #UD when EFER.SVME is disabled > by the guest. > > [...] Applied to kvm-x86 nested, thanks! [1/9] KVM: SVM: Properly check RAX in the emulator for SVM instructions https://github.com/kvm-x86/linux/commit/c85aaff26d55 [2/9] KVM: SVM: Refactor SVM instruction handling on #GP intercept https://github.com/kvm-x86/linux/commit/27f70eaa8661 [3/9] KVM: SVM: Properly check RAX on #GP intercept of SVM instructions https://github.com/kvm-x86/linux/commit/435741a4e766 [4/9] KVM: SVM: Move RAX legality check to SVM insn interception handlers https://github.com/kvm-x86/linux/commit/d2fbeb61e145 [5/9] KVM: SVM: Check EFER.SVME and CPL on #GP intercept of SVM instructions https://github.com/kvm-x86/linux/commit/783cf7d01fb8 [6/9] KVM: SVM: Treat mapping failures equally in VMLOAD/VMSAVE emulation https://github.com/kvm-x86/linux/commit/878b8efa2adb [7/9] KVM: nSVM: Fail emulation of VMRUN/VMLOAD/VMSAVE if mapping vmcb12 fails https://github.com/kvm-x86/linux/commit/2daf71bfd77d [8/9] KVM: selftests: Rework svm_nested_invalid_vmcb12_gpa https://github.com/kvm-x86/linux/commit/428543fbf06c [9/9] KVM: selftests: Drop 'invalid' from svm_nested_invalid_vmcb12_gpa's name https://github.com/kvm-x86/linux/commit/052ca584bd7c -- https://github.com/kvm-x86/linux/tree/next