All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Jan Beulich <jbeulich@suse.com>, "Durrant, Paul" <pdurrant@amazon.co.uk>
Cc: "sstabellini@kernel.org" <sstabellini@kernel.org>,
	"julien@xen.org" <julien@xen.org>, "wl@xen.org" <wl@xen.org>,
	"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>,
	"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
	"ian.jackson@eu.citrix.com" <ian.jackson@eu.citrix.com>,
	"george.dunlap@citrix.com" <george.dunlap@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"Volodymyr_Babchuk@epam.com" <Volodymyr_Babchuk@epam.com>
Subject: Re: [Xen-devel] [PATCH 2/2] domain: use PGC_extra domheap page for shared_info
Date: Fri, 06 Mar 2020 14:49:41 +0200	[thread overview]
Message-ID: <b7f1e8cc34dc6f68867ce244cb1e0b590be074bf.camel@infradead.org> (raw)
In-Reply-To: <d1b07e09-809c-ae87-20c7-b0a25ee5dbd0@suse.com>


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

On Fri, 2020-03-06 at 13:29 +0100, Jan Beulich wrote:
> How do you tell pages in use by domains from ones free to re-use?
> Because of the overloading of struct page_info, I expect you can't
> judge by just looking at a page's struct page_info instance. Are
> you peeking into the migration streams for the domains to collect
> all the pages? And are you walking IOMMU structures to collect the
> ones used for but not accessible by the domains?

I just outlined the two-part nature of the issue. First the old Xen
must ensure *not* to put any pages that need to be preserved, in the
reserved region.

You're talking about the second part, where the new Xen has to work out
what pages in the *rest* of memory are available to it and which it
needs to preserve.

Which means my first answer has to be "hell no, you can't even *talk*
about the page_info here". Because what we pass from Xen#1 to Xen#2 has
to be an *ABI*, with clearly defined forward-compatible structures.
Never passing over Xen-internal structs like the page_info.

So yes, the new Xen has to infer it from the migration structures for
the domains, and mark the appropriate pages as 'in use' before
init_heap_pages() gets to look at them.

But bear in mind that we can *define* the structures we use for this
too, based on top of the existing live migration data structures.

We don't want to have to actually walk the hardware page tables in the
new Xen. We'll probably end up passing over a list of pages, from old
Xen to new in a newly-defined record type. And old Xen would just keep
that list as it allocates pages for those page tables. Much as it keeps
the page list for domains.


[-- 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

  reply	other threads:[~2020-03-06 12:50 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-25  9:53 [Xen-devel] [PATCH 0/2] remove one more shared xenheap page: shared_info Paul Durrant
2020-02-25  9:53 ` [Xen-devel] [PATCH 1/2] domain: introduce alloc/free_shared_info() helpers Paul Durrant
2020-02-26  8:03   ` Julien Grall
2020-02-25  9:53 ` [Xen-devel] [PATCH 2/2] domain: use PGC_extra domheap page for shared_info Paul Durrant
2020-02-26 11:33   ` Julien Grall
2020-02-26 11:43     ` Jan Beulich
2020-02-26 12:03     ` Durrant, Paul
2020-02-26 14:22       ` Julien Grall
2020-02-26 14:44         ` Jan Beulich
2020-02-26 11:46   ` Andrew Cooper
2020-02-26 11:53     ` Durrant, Paul
2020-02-26 13:57   ` Jan Beulich
2020-02-26 14:05     ` Durrant, Paul
2020-02-26 15:23       ` Jan Beulich
2020-02-26 16:12         ` Julien Grall
2020-02-26 16:53           ` Woodhouse, David
2020-03-06 11:37             ` Jan Beulich
2020-03-06 11:52               ` David Woodhouse
2020-03-06 11:59                 ` Durrant, Paul
2020-03-06 12:29                   ` Jan Beulich
2020-03-06 12:49                     ` David Woodhouse [this message]
2020-03-06 12:25                 ` Jan Beulich
2020-03-06 12:37                   ` David Woodhouse
2020-03-06 12:55                     ` Jan Beulich
2020-03-06 13:08                       ` David Woodhouse
2020-03-06 12:20               ` David Woodhouse
2020-03-06 12:36                 ` Jan Beulich
2020-03-06 12:57                   ` David Woodhouse
2020-03-06 13:10                     ` Jan Beulich
2020-03-06 13:13                       ` Paul Durrant
2020-03-06 13:23                         ` Jan Beulich
2020-03-06 13:26                           ` Paul Durrant
2020-03-06 13:36                             ` Jan Beulich
2020-03-06 13:41                               ` Paul Durrant
2020-03-06 13:46                                 ` Jan Beulich
2020-03-06 16:27                                   ` Paul Durrant
2020-03-06 17:16                                     ` Jan Beulich
2020-03-09  8:48                                       ` Paul Durrant
2020-03-09  8:54                                         ` Jan Beulich
2020-03-06 13:15                       ` David Woodhouse
2020-03-06 13:22                         ` [Xen-devel] [EXTERNAL][PATCH " Paul Durrant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b7f1e8cc34dc6f68867ce244cb1e0b590be074bf.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=konrad.wilk@oracle.com \
    --cc=pdurrant@amazon.co.uk \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.