All of lore.kernel.org
 help / color / mirror / Atom feed
* bogus gfn - mfn - gfn - mfn checks in guest_physmap_add_entry
@ 2010-11-23 21:01 Olaf Hering
  2010-11-24 10:22 ` Tim Deegan
  0 siblings, 1 reply; 15+ messages in thread
From: Olaf Hering @ 2010-11-23 21:01 UTC (permalink / raw)
  To: xen-devel


Hello,

what is the purpose of the mfn_to_gfn() check in
guest_physmap_add_entry()?
This function gets a fresh mfn and its gfn passed to update the global
p2m state. But before doing that, it checks wether that fresh mfn maps
still to some gfn. If it does, it checks if that gfn maps to any mfn. If
it doesnt, Xen crashes with an assert.

Now, if that mfn was part of an old guest, should that old guest cleanup
all of its mfns and update the machine_to_phys_mapping[]? Appearently
that rarely happens.
And if there is still some random gfn number in that array, the function
tries to see what happens with this number in the current guests
context. IF that number happens to be a gfn in paged-out state, there
will be no mfn. So the ASSERT triggers.

I would guess that if guest_physmap_add_entry() gets a page with type
p2m_ram_rw, nothing else can own that page. Is that right?
If so, this ASSERT or most of the loop can be removed.


Olaf

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-11-26  7:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-23 21:01 bogus gfn - mfn - gfn - mfn checks in guest_physmap_add_entry Olaf Hering
2010-11-24 10:22 ` Tim Deegan
2010-11-24 10:26   ` Tim Deegan
2010-11-24 14:41   ` Olaf Hering
2010-11-24 14:53     ` Tim Deegan
2010-11-24 15:00       ` Olaf Hering
2010-11-25 15:03       ` Olaf Hering
2010-11-25 15:32         ` Tim Deegan
2010-11-25 20:56           ` Olaf Hering
2010-11-25 17:16         ` Keir Fraser
2010-11-25 20:53           ` Olaf Hering
2010-11-25 22:30             ` Keir Fraser
2010-11-26  7:27               ` Olaf Hering
2010-11-24 19:58     ` Olaf Hering
2010-11-24 20:25       ` Patrick Colp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.