Message ID | 0ec2eb9c-a4b9-65c3-3751-3a7fb9b760c1@suse.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | x86/mm: address observations made while working on XSA-388 | expand |
On 01/12/2021 10:53, Jan Beulich wrote: > Pinning is a PV concept, used there only for page table pages. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Perhaps this is a leftover from autotranslate mode? That was doing some very HVM-like things for PV guests. > --- > I'm actually inclined to hide _PGT_pinned in !HVM builds; the downside > of doing so is some new #ifdef-ary which would need adding. Judging by the current users, I doubt it is worth it, although folding this delta wouldn't go amiss. diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index cb9052749963..e5f63daa1a71 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -36,7 +36,7 @@ /* Page is locked? */ #define _PGT_locked PG_shift(4) #define PGT_locked PG_mask(1, 4) - /* Owning guest has pinned this page to its current type? */ + /* Owning guest has pinned this page to its current type? PV only */ #define _PGT_pinned PG_shift(5) #define PGT_pinned PG_mask(1, 5) /* Has this page been validated for use as its current type? */ ~Andrew
--- a/xen/arch/x86/mm/p2m-pod.c +++ b/xen/arch/x86/mm/p2m-pod.c @@ -260,9 +260,6 @@ p2m_pod_set_cache_target(struct p2m_doma goto out; } - if ( test_and_clear_bit(_PGT_pinned, &(page+i)->u.inuse.type_info) ) - put_page_and_type(page + i); - put_page_alloc_ref(page + i); put_page(page + i);
Pinning is a PV concept, used there only for page table pages. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- I'm actually inclined to hide _PGT_pinned in !HVM builds; the downside of doing so is some new #ifdef-ary which would need adding.