[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] libxl: arm: Allow grant mappings for backends running on Dom0
- To: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
- From: Oleksandr Tyshchenko <olekstysh@xxxxxxxxx>
- Date: Fri, 5 May 2023 16:11:23 +0300
- Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxx, stratos-dev@xxxxxxxxxxxxxxxxxxx, Juergen Gross <jgross@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Alex Bennée <alex.bennee@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>, Erik Schilling <erik.schilling@xxxxxxxxxx>
- Delivery-date: Fri, 05 May 2023 13:11:48 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hello Viresh
[sorry for the possible format issues] On 05-04-23, 05:12, Viresh Kumar wrote:
> On 04-04-23, 21:16, Oleksandr Tyshchenko wrote:
> > ok, probably makes sense
>
> While testing both foreign and grant mappings I stumbled upon another
> related problem. How do I control the creation of iommu node from
> guest configuration file, irrespective of the domain backend is
> running at ? This is what we have right now:
>
> - always create iommu nodes if backend-dom != 0
> - always create iommu nodes if forced_grant == 1
>
> what I need to cover is
> - don't create iommu nodes irrespective of the domain
>
> This is required if you want to test both foreign and grant memory
> allocations, with different guests kernels. i.e. one guest kernel for
> device with grant mappings and another guest for device with foreign
> mappings. There is no way, that I know of, to disable the creation of
> iommu nodes. Of course we would want to use the same images for kernel
> and other stuff, so this needs to be controlled from guest
> configuration file.
Any input on this please ?
I was going to propose an idea, but I have just realized that you already voiced it here [1] )) So what you proposed there sounds reasonable to me.
I will just rephrase it according to my understanding:
We probably need to consider transforming your "forced_grant" to something three-state, for example "grant_usage" (or "use_grant" as you suggested) which could be "default behaviour" or "always disabled", or "always enabled".
With "grant_usage=default" we will get exact what we have at the moment (only create iommu nodes if backend-domid != 0) With "grant_usage=disabled" we will force grants to be always disabled (don't create iommu nodes irrespective of the domain) With "grant_usage=enabled" we will force grants to be always enabled (always create iommu nodes irrespective of the domain)
--
viresh
--
|