Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4582391pxj; Wed, 12 May 2021 08:38:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxm/qvnZk0nwPsAKZMQw9IECQfHN5HledKF+k4FJT8D5FA7S+22jEo3AzEuDP+v0xDflFwu X-Received: by 2002:a2e:8557:: with SMTP id u23mr29478907ljj.221.1620833927087; Wed, 12 May 2021 08:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620833927; cv=none; d=google.com; s=arc-20160816; b=sLlXz3NtxlITO5pKUwqV2SH/ZeeGjB7YwvWzh3UfdeGfqGrhXJoySmIcujeAvu0V8G v70s478g6jvbA83tdnCYQv78VpiUx0oCE/0URFD3/5smS3U3Xlj2LXDGAb3WPgy1HT4j 1ssYuqAg7Pc4rMXvuA4Mu1jWEV2qv66ibwkrZxZvXaYbaYX6EKFO5VxSe9ex80is0BLX WdYXAoZrwCfzflOjwbikt7plQ2UIVp3QJ4XU8EY17VxzaNjWVCh2YZKae6RL75Fhs8gi wWsBUmzO1+iy+GaB9rzxgeLDb3iegRuFFy2r+5xjN1+rTRgsuNFGoRAPTld7HmObRJeo FQ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gpWGXq6BJ72oV1JGSWVUbKHitd2eCK6UjYLqcHE0q/o=; b=NWJJ5uIuLm2dhx/sakTgiR0a3NBEri278u85X2+CkL4Ezj8iKPvzEMUzxeN2vgI2Xi SYpXbOpqohOxezzEfWZTFv48IUyKfHfEQkAYOjpZkzkbf22LP1hjmhROEBeSK8THkZSd 3CmcGvhtyXoKfj7jWkLvIoucH8X2wxl7FG5qkguupR46k9yzAfOQumzKhny1TaLBbyio Yot6fcAo+1Txo69h5CxufJicQy3uSnB4by/tpn03vG4MXomq3HfaEYtRS6K8cvE++EjB Sx301cgH39Oe3+O34u+CJ5VEFL1IhU7FmSCMEo7Dmll5omyyL/m6k2lreyINTaZnDf9Z +cww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rbTLilYS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h3si335929lfm.66.2021.05.12.08.38.16; Wed, 12 May 2021 08:38:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rbTLilYS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236194AbhELPhR (ORCPT + 99 others); Wed, 12 May 2021 11:37:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:49670 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234356AbhELPQg (ORCPT ); Wed, 12 May 2021 11:16:36 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 603FA61958; Wed, 12 May 2021 15:06:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620831984; bh=swWjcGHxHBfsgF9qsbV9bir1xyrptSbVxG4/u95uxiU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rbTLilYSQuJctDBpxJKMmZ29Nnx33aLFRc8ovrsqLfIUfCVPLRx8LqZZLq2daR5DE +6/OFc9DaEaSn6Ivxnx3LEYdxfeB6kgIM+NyQbxfzfIh2ds0p43k5QhBL1YMkeJqXp A7oCx8+qJT+hsGoREwKODR5tru9eknKRzheI57s4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brijesh Singh , Tom Lendacky , Sean Christopherson , Paolo Bonzini Subject: [PATCH 5.10 094/530] KVM: SVM: Dont strip the C-bit from CR2 on #PF interception Date: Wed, 12 May 2021 16:43:24 +0200 Message-Id: <20210512144822.895020635@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Christopherson commit 6d1b867d045699d6ce0dfa0ef35d1b87dd36db56 upstream. Don't strip the C-bit from the faulting address on an intercepted #PF, the address is a virtual address, not a physical address. Fixes: 0ede79e13224 ("KVM: SVM: Clear C-bit from the page fault address") Cc: stable@vger.kernel.org Cc: Brijesh Singh Cc: Tom Lendacky Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-13-seanjc@google.com> Signed-off-by: Paolo Bonzini Signed-off-by: Greg Kroah-Hartman --- arch/x86/kvm/svm/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -1805,7 +1805,7 @@ static void svm_set_dr7(struct kvm_vcpu static int pf_interception(struct vcpu_svm *svm) { - u64 fault_address = __sme_clr(svm->vmcb->control.exit_info_2); + u64 fault_address = svm->vmcb->control.exit_info_2; u64 error_code = svm->vmcb->control.exit_info_1; return kvm_handle_page_fault(&svm->vcpu, error_code, fault_address,