All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] xen: don't save/restore the physmap on VM save/restore
@ 2017-06-30 16:07 ` Igor Druzhinin
  0 siblings, 0 replies; 24+ messages in thread
From: Igor Druzhinin @ 2017-06-30 16:07 UTC (permalink / raw)
  To: xen-devel, qemu-devel
  Cc: Igor Druzhinin, sstabellini, anthony.perard, paul.durrant, pbonzini

Saving/restoring the physmap to/from xenstore was introduced to
QEMU majorly in order to cover up the VRAM region restore issue.
The sequence of restore operations implies that we should know
the effective guest VRAM address *before* we have the VRAM region
restored (which happens later). Unfortunately, in Xen environment
VRAM memory does actually belong to a guest - not QEMU itself -
which means the position of this region is unknown beforehand and
can't be mapped into QEMU address space immediately.

Previously, recreating xenstore keys, holding the physmap, by the
toolstack helped to get this information in place at the right
moment ready to be consumed by QEMU to map the region properly.
But using xenstore for it has certain disadvantages: toolstack
needs to be aware of these keys and save/restore them accordingly;
accessing xenstore requires extra privileges which hinders QEMU
sandboxing.

The previous attempt to get rid of that was to remember all the
VRAM pointers during QEMU initialization phase and then update
them all at once when an actual foreign mapping is established.
Unfortunately, this approach worked only for VRAM and only for
a predefined set of devices - stdvga and cirrus. QXL and other
possible future devices using a moving emulated MMIO region
would be equally broken.

The new approach leverages xenforeignmemory_map2() call recently
introduced in libxenforeignmemory. It allows to create a dummy
anonymous mapping for QEMU during its initialization and change
it to a real one later during machine state restore.

Igor Druzhinin (4):
  xen: move physmap saving into a separate function
  xen/mapcache: add an ability to create dummy mappings
  xen/mapcache: introduce xen_remap_cache_entry()
  xen: don't use xenstore to save/restore physmap anymore

 configure                     |  18 ++++++
 hw/i386/xen/xen-hvm.c         | 100 ++++++++++++++++++++------------
 hw/i386/xen/xen-mapcache.c    | 129 +++++++++++++++++++++++++++++++++++++++---
 include/hw/xen/xen_common.h   |   8 +++
 include/sysemu/xen-mapcache.h |   6 ++
 5 files changed, 217 insertions(+), 44 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2017-07-03 21:10 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30 16:07 [Qemu-devel] [PATCH 0/4] xen: don't save/restore the physmap on VM save/restore Igor Druzhinin
2017-06-30 16:07 ` Igor Druzhinin
2017-06-30 16:07 ` [Qemu-devel] [PATCH 1/4] xen: move physmap saving into a separate function Igor Druzhinin
2017-06-30 16:07   ` Igor Druzhinin
2017-07-01  0:06   ` [Qemu-devel] " Stefano Stabellini
2017-07-01  0:06     ` Stefano Stabellini
2017-06-30 16:07 ` [Qemu-devel] [PATCH 2/4] xen/mapcache: add an ability to create dummy mappings Igor Druzhinin
2017-06-30 16:07   ` Igor Druzhinin
2017-07-01  0:06   ` [Qemu-devel] " Stefano Stabellini
2017-07-01  0:06     ` Stefano Stabellini
2017-07-03 20:03     ` [Qemu-devel] " Igor Druzhinin
2017-07-03 20:03       ` Igor Druzhinin
2017-07-03 21:10       ` [Qemu-devel] " Stefano Stabellini
2017-07-03 21:10         ` Stefano Stabellini
2017-06-30 16:07 ` [Qemu-devel] [PATCH 3/4] xen/mapcache: introduce xen_remap_cache_entry() Igor Druzhinin
2017-06-30 16:07   ` Igor Druzhinin
2017-07-01  0:08   ` [Qemu-devel] " Stefano Stabellini
2017-07-01  0:08     ` Stefano Stabellini
2017-07-03 20:38     ` [Qemu-devel] " Igor Druzhinin
2017-07-03 20:38       ` Igor Druzhinin
2017-06-30 16:07 ` [Qemu-devel] [PATCH 4/4] xen: don't use xenstore to save/restore physmap anymore Igor Druzhinin
2017-06-30 16:07   ` Igor Druzhinin
2017-07-01  0:10   ` [Qemu-devel] " Stefano Stabellini
2017-07-01  0:10     ` Stefano Stabellini

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.