lkml.org 
[lkml]   [2023]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86/mm: fix __swp_entry_to_pte() for Xen PV guests
From
On 06.03.23 13:32, Juergen Gross wrote:
> Normally __swp_entry_to_pte() is never called with a value translating
> to a valid PTE. The only known exception is pte_swap_tests(), resulting
> in a WARN splat in Xen PV guests, as __pte_to_swp_entry() did
> translate the PFN of the valid PTE to a guest local PFN, while
> __swp_entry_to_pte() doesn't do the opposite translation.
>
> Fix that by using __pte() in __swp_entry_to_pte() instead of open
> coding the native variant of it.
>
> For correctness do the similar conversion for __swp_entry_to_pmd().
>
> Fixes: 05289402d717 ("mm/debug_vm_pgtable: add tests validating arch helpers for core MM features")
> Signed-off-by: Juergen Gross <jgross@suse.com>

Any further comments (apart from "It looks sane")?


Juergen

[unhandled content-type:application/pgp-keys][unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-03-27 16:29    [W:0.093 / U:3.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site