All of lore.kernel.org
 help / color / mirror / Atom feed
* question about memory allocation for driver domain
@ 2015-02-04 16:47 Oleksandr Tyshchenko
  2015-02-05 13:12 ` Ian Campbell
  0 siblings, 1 reply; 15+ messages in thread
From: Oleksandr Tyshchenko @ 2015-02-04 16:47 UTC (permalink / raw)
  To: xen-devel@lists.xen.org; +Cc: Andrii Anisov

Hi, all.

We have begun to use the driver domain on OMAP5 platform.
To make driver domain running on OMAP5 platform we need to have it
memory 1 to 1 mapped because of lacking SMMU support on this platform.
To satisfy this requirement we have done temporally solution which
works but not entirely completed and looks not good from Xen
perspective. The main question in memory allocator in Xen.

We did next steps:
1. toolstack:
- allow to allocate 128/256/512 Mb memory chunks
- add ability to set rambase_pfn via cfg file

2. hypervisor:
- alloc driver domain memory 1 to 1
  - mark domain with id 1 as privileged
  - update memory allocation logic for such domain
  - allocate memory in the same way as for domain 0

But we have encountered with one thing related to memory allocation algorithm.
Let me describe what I mean.
Our requirements is to allocate one specified chunk if it is present in domheap.
We have this "spec_mfn" which are a "rambase_pfn" for driver domain we
want to map 1 to 1. We can get it from extent_list. So, we need to
alloc chunk which would be correspond to "spec_mfn".
In other world we need to allocate known chunk of memory. But if I
understood correctly that the existing allocator doesn't allow us to
do that directly.

There are some thoughts how to do that. But, at first, we need to
choose right direction:
1. Add the separate memory allocator which allow us to alloc specified
chunk if it is present. And use it in case when we need to allocate
memory for driver domain 1:1 only. We can pass bool variable via cfg
file to show what we want (1:1 or not).
2. Don't add separate allocator. Modify existing allocator to add
ability to alloc specified chunk.
3. Don't add and modify anything. Let the allocator to work as usual.
Return mfn of allocating chunk and correct the default rambase_pfn in
toolstack.
What we actually have in the moment but do that manually. We see what
the mfn we got and corrected "rambase_pfn" property in cfg file.

Could someone explain me what is a right way?
All suggestions welcomed!

-- 

Oleksandr Tyshchenko | Embedded Dev
GlobalLogic
www.globallogic.com

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

end of thread, other threads:[~2015-02-10  1:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-04 16:47 question about memory allocation for driver domain Oleksandr Tyshchenko
2015-02-05 13:12 ` Ian Campbell
2015-02-05 13:49   ` Oleksandr Tyshchenko
2015-02-05 15:24     ` Julien Grall
2015-02-05 16:36       ` Oleksandr Tyshchenko
2015-02-06 17:15         ` Oleksandr Tyshchenko
2015-02-09  8:31           ` Julien Grall
2015-02-09 10:53             ` Ian Campbell
2015-02-09 11:16               ` Julien Grall
2015-02-09 12:55                 ` Oleksandr Tyshchenko
2015-02-09 13:08                 ` Ian Campbell
2015-02-09 14:58                   ` Julien Grall
2015-02-09 12:29               ` Oleksandr Tyshchenko
2015-02-09 12:02             ` Oleksandr Tyshchenko
2015-02-10  1:31               ` Julien Grall

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.