[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/shadow: slightly consolidate sh_unshadow_for_p2m_change() (part I)
commit 0caf699e69d79f54b94191e2f84956713c4be0da Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Aug 18 09:28:05 2022 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Aug 18 09:28:05 2022 +0200 x86/shadow: slightly consolidate sh_unshadow_for_p2m_change() (part I) Replace a p2m_is_ram() check in the 2M case by an explicit _PAGE_PRESENT one, to make more obvious that the subsequent l1e_get_mfn() actually retrieves something that really is an MFN. It doesn't really matter whether it's RAM, as the subsequent comparison with the original MFN is going to lead to zapping of everything except the "same MFN again" case. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Acked-by: Tim Deegan <tim@xxxxxxx> --- xen/arch/x86/mm/shadow/hvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/shadow/hvm.c b/xen/arch/x86/mm/shadow/hvm.c index 9438a1a7ad..fbfae450a0 100644 --- a/xen/arch/x86/mm/shadow/hvm.c +++ b/xen/arch/x86/mm/shadow/hvm.c @@ -856,7 +856,7 @@ static void cf_check sh_unshadow_for_p2m_change( for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ ) { if ( !npte || - !p2m_is_ram(p2m_flags_to_type(l1e_get_flags(npte[i]))) || + !(l1e_get_flags(npte[i]) & _PAGE_PRESENT) || !mfn_eq(l1e_get_mfn(npte[i]), omfn) ) { /* This GFN->MFN mapping has gone away */ -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |