xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [Xen-devel] [RFC PATCH v2 0/14] Live update: boot memory management, data stream handling
@ 2020-01-22  8:53 David Woodhouse
  2020-01-22  8:53 ` [Xen-devel] [RFC PATCH v2 01/14] x86/setup: Don't skip 2MiB underneath relocated Xen image David Woodhouse
  0 siblings, 1 reply; 16+ messages in thread
From: David Woodhouse @ 2020-01-22  8:53 UTC (permalink / raw)
  To: Xen-devel
  Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Rzeszutek Wilk,
	George Dunlap, Andrew Cooper, Varad Gautam, paul, Ian Jackson,
	Xia, Hongyan, Amit Shah, Roger Pau Monné


[-- Attachment #1.1: Type: text/plain, Size: 2016 bytes --]

Expanding on the previous WIP patch set.

As before, reserve a contiguous region of memory which can be safely
used by the boot allocator in the new Xen, before the live update data
stream has been processed and thus before the locations of all the
other pages which contain live domain data are known.

As the last gasp of kexec_reloc(), leave a 'breadcrumb' in the first
words of the reserved bootmem region, for Xen to find the live update
data. Which is mostly a guest-transparent live migration data stream,
except the guest memory is left in-place.

The breadcrumb has a magic value, the physical address of an MFN array
referencing the pages with actual data, and the number of such pages.
All of these are allocated in arbitrary heap pages (and not in the
reserved bootmem region) by the original Xen.

Provide functions on the "save" side for appending to the LU data
stream (designed to cope with the way that hvm_save_size() and
hvm_save() work), and on the "receive" side for detecting and mapping it.

On the way to excluding "already in use" pages from being added to the
heap at start up, also fix the long-standing bug that pages marked bad
with 'badpage=' on the command line weren't being eschewed if they were
above HYPERVISOR_VIRT_END and added directly to the heap; only
init_boot_pages() was doing that filtering.

This is now handled by setting either PGC_broken (for bad pages) or
PGC_allocated (for those containing live update data) in the
corresponding page_info, at a time when the frametable is expected to
be initialised to zero. When init_heap_pages() sees such a page it
knows not to use it. Bad pages thus get completely ignored as they
should be (and put on the pointless page_broken_list that nobody ever
uses AFAICT).

The "in use" pages will need some rehabilitation (of refcount,
ownership etc.) before the system is in a correct state. That will come
shortly, as we start passing real domain data across this mechanism and
processing it.

[-- Attachment #1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5174 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2020-01-28 14:56 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-22  8:53 [Xen-devel] [RFC PATCH v2 0/14] Live update: boot memory management, data stream handling David Woodhouse
2020-01-22  8:53 ` [Xen-devel] [RFC PATCH v2 01/14] x86/setup: Don't skip 2MiB underneath relocated Xen image David Woodhouse
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 02/14] x86/boot: Reserve live update boot memory David Woodhouse
2020-01-28 14:55     ` Wei Liu
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 03/14] Don't add unused parts of live update reserved bootmem to heap David Woodhouse
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 04/14] Add KEXEC_RANGE_MA_LIVEUPDATE David Woodhouse
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 05/14] Add KEXEC_TYPE_LIVE_UPDATE David Woodhouse
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 06/14] Add IND_WRITE64 primitive to kexec kimage David Woodhouse
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 07/14] Add kimage_add_live_update_data() David Woodhouse
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 08/14] Add basic live update stream creation David Woodhouse
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 09/14] Add basic lu_save_all() shell David Woodhouse
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 10/14] Put *something* into LU data David Woodhouse
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 11/14] Don't panic if no multiboot modules are provided on live update boot David Woodhouse
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 12/14] Don't add bad pages above HYPERVISOR_VIRT_END to the domheap David Woodhouse
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 13/14] Basic shell of lu_reserve_all() from breadcrumb at boot David Woodhouse
2020-01-22  8:53   ` [Xen-devel] [RFC PATCH v2 14/14] debug hacks David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).