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

Re: [Xen-devel] [PATCH v4.1 4/6] xen/x86: Allow stubdom access to irq created for msi.



>>> On 07.03.19 at 23:28, <marmarek@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Thu, Mar 07, 2019 at 03:48:01PM +0100, Roger Pau Monné wrote:
>> Hm, albeit I agree with your analysis, I feel like this proposed
>> solution is kind of a workaround. Given the context, I think the best
>> way to deal with this issue in destroy_irq is to iterate over the list
>> of domains and make sure no domain has permissions over the destroyed
>> irq. Note that with this proposed solution you will have to drop the
>> domain parameter from destroy_irq.
> 
> I'd really like to avoid iterating the whole domain list. Jan, what do
> you think? Code-wise this seems to be the easiest solution.

I'd certainly like to avoid iterations over the domain list, too.

I don't think a back pointer is necessary though. A domain ID would
seem sufficient - if (at the time you need a domain pointer) it doesn't
resolve to a valid domain, or to one whose ->target points back at
the domain you have in hands, then it's gone (at least far enough
for the purposes here).

> Can one HVM domain have multiple stubdomains? If so, it should a be
> list, not a single field.

Other than what Roger has said in his subsequent reply, I'd prefer
if at least no new restrictions were introduced. Yet I agree with
his over-engineering remark, and hence I could see the amount
getting limited to a small number for now (say 4 for 64-bit and 2
for 32-bit, such that the resulting array of domain IDs consumes
just a single pointer's worth of memory).

Jan


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

 


Rackspace

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