[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH] xen/memory: Introduce a hypercall to provide unallocated space

  • To: Oleksandr <olekstysh@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 3 Aug 2021 14:53:51 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C7mU+a+f/Jvb5lbS0yxtJsfGF3xoNL3CBzWUiMzrzWg=; b=i8o1JvrI2FD9gwme+GvIhJ5lsb47As9Ka5kKYUuC/vmmDVvnz0SB4PNp6oUTrRf2348heM+5EgixzYq0k6N6emT4e0qc/WT7guz7jK4GoiqMjeKRwKAYXCzjLVA92Fej31QdAsp6LAcmsB8K2OXoFDlIE33y/FYkGsJ6jer1QUuW1zIU5glbbfHw6zS9LetARlpM1LJd26nJI6SOguLFquZqadBRrcpOQMT7Jnvd1XmcQOf1Ln1iLyqpDeJbBWlymRf3dnFn7iVNEaJZ0rOrqFxjr+0soIlTO3XiZ3gjoaVfcP2I8IME+lh2J2sceQn/7398WCj0oi4nXAb8B8c6Pg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XseqnI4symjZDjBWz3F0cwC3CFvSwX2zmpe0CCMY7mom0WALVkG79KQPyh3KlhuN8MwRjs/xH2cI3orpPQe87YdkUKbpqCEHOVfkf5NCecXe+LOmWmC/Wa38MHSPXEPrbEjBIfhDDJOGhnPuza6is7muKmFqBg7SS/62nGh8fcq/jp2dULAguTauN6ZDG75YWxCwUY6FvgwmYKszVTosP+UxUvKBa2uVoBssIC+9FGFRTJ6g3AicsWqSmVCHaJlpa9k7adzMi8nkOtsgXwmGJVupZV+f3FNgy8AAatrpOOSxnOBMLp9Dbtm9kMKfLXjZscmNpflT+RFjlHpJad5Erg==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Tue, 03 Aug 2021 12:54:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 30.07.2021 18:13, Oleksandr wrote:
> Well, if new hypercall and, what is more, "the querying hypervisor at 
> runtime to find unused space" model itself is not welcome, I am ok, 
> let's try to create a working system,
> may we please find a common ground to move this forward (at least on Arm 
> for now, the foreign mapping is the most important question).
> I got the proposed idea in general, but I haven't connected all dots 
> yet, some points need clarification.
> 1. The safe range must be defined/allocated in advance and must remain 
> const during the runtime. The safe range must be chosen by the toolstack.
> [For the initial implementation we can start with some large value 
> (128GB) as discussed above]
> Questions:
> - Do we need to inform Xen about that range (via domain_create 
> hypercall, etc)?
> - What will be in charge of guaranteeing the safety of that range at 
> runtime (reject new mapping requests with possible overlaps, etc), Xen, 
> toolstack or both?

Well, what other entity than Xen could enforce this? (By implication,
the answer to the earlier question can imo only be "yes", unless it's
Xen itself to establish the region.)

> - Where that range should be located in guest address space, should that 
> range be the same for all domains (how GUEST_GNTTAB_BASE(SIZE) for example)
> or it should be calculated based on actual guest_ram_base(size) for a 
> particular domain?

The default size may well be fixed or amount-of-memory-dependent, but
I think there will need to be a way to enlarge the region for guests
with particular needs.

> - What about a safe range the Dom0 can use itself? Xen should choose it 
> for Dom0 the same way how toolstack chooses it for other domains, correct?
> 2. The safe range must be provided to domain using the firmware table.
> [We can start with the DTB and leave ACPI unimplemented for now, 
> assuming we will be able to solve open questions as discussed above]
> Questions:
> - Do we need distinguish between foreign and grant mappings at the 
> domain side at all? Can the same safe range be used for all types of 
> mapping?

Like Stefano I don't think so.




Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.