stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: gregkh@linuxfoundation.org
Cc: sean.j.christopherson@intel.com, pbonzini@redhat.com,
	stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] KVM: x86: Use gpa_t for cr2/gpa to fix TDP support on 32-bit" failed to apply to 5.4-stable tree
Date: Sun, 9 Feb 2020 15:06:19 -0500	[thread overview]
Message-ID: <20200209200619.GY3584@sasha-vm> (raw)
In-Reply-To: <1581251500104115@kroah.com>

On Sun, Feb 09, 2020 at 01:31:40PM +0100, gregkh@linuxfoundation.org wrote:
>
>The patch below does not apply to the 5.4-stable tree.
>If someone wants it applied there, or to any other stable or longterm
>tree, then please email the backport, including the original git commit
>id to <stable@vger.kernel.org>.
>
>thanks,
>
>greg k-h
>
>------------------ original commit in Linus's tree ------------------
>
>From 736c291c9f36b07f8889c61764c28edce20e715d Mon Sep 17 00:00:00 2001
>From: Sean Christopherson <sean.j.christopherson@intel.com>
>Date: Fri, 6 Dec 2019 15:57:14 -0800
>Subject: [PATCH] KVM: x86: Use gpa_t for cr2/gpa to fix TDP support on 32-bit
> KVM
>
>Convert a plethora of parameters and variables in the MMU and page fault
>flows from type gva_t to gpa_t to properly handle TDP on 32-bit KVM.
>
>Thanks to PSE and PAE paging, 32-bit kernels can access 64-bit physical
>addresses.  When TDP is enabled, the fault address is a guest physical
>address and thus can be a 64-bit value, even when both KVM and its guest
>are using 32-bit virtual addressing, e.g. VMX's VMCS.GUEST_PHYSICAL is a
>64-bit field, not a natural width field.
>
>Using a gva_t for the fault address means KVM will incorrectly drop the
>upper 32-bits of the GPA.  Ditto for gva_to_gpa() when it is used to
>translate L2 GPAs to L1 GPAs.
>
>Opportunistically rename variables and parameters to better reflect the
>dual address modes, e.g. use "cr2_or_gpa" for fault addresses and plain
>"addr" instead of "vaddr" when the address may be either a GVA or an L2
>GPA.  Similarly, use "gpa" in the nonpaging_page_fault() flows to avoid
>a confusing "gpa_t gva" declaration; this also sets the stage for a
>future patch to combing nonpaging_page_fault() and tdp_page_fault() with
>minimal churn.
>
>Sprinkle in a few comments to document flows where an address is known
>to be a GVA and thus can be safely truncated to a 32-bit value.  Add
>WARNs in kvm_handle_page_fault() and FNAME(gva_to_gpa_nested)() to help
>document such cases and detect bugs.
>
>Cc: stable@vger.kernel.org
>Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

File and variable renames. I've cleaned it up and queued for 5.4 and
4.19.

-- 
Thanks,
Sasha

      reply	other threads:[~2020-02-09 20:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-09 12:31 FAILED: patch "[PATCH] KVM: x86: Use gpa_t for cr2/gpa to fix TDP support on 32-bit" failed to apply to 5.4-stable tree gregkh
2020-02-09 20:06 ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200209200619.GY3584@sasha-vm \
    --to=sashal@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=pbonzini@redhat.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).