lkml.org 
[lkml]   [2020]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Using fixed LPI number for some Device ID
Dongjiu,

On Sat, 31 Oct 2020 02:19:19 +0000,
Dongjiu Geng <gengdongjiu@huawei.com> wrote:
>
> Hi Marc,
> Sorry to disturb you, Currently the LPI number is not fixed for the
> device. The LPI number is dynamically allocated start from 8092.
> For two OS which shares the ITS, One OS needs to configure the
> device interrupt required by another OS, and the other OS uses a
> fixed interrupt ID to respond the interrupt. Therefore, the LPI IRQ
> number of the device needed be fixed. I want to upstream this
> feature that allocate fixed LPI number for the device that is
> specified through the DTS. What is your meaning? Thanks

I think you are starting from the wrong premises.

You can't "share" an ITS directly between two operating systems. The
ITS can only be controlled by a single operating system, because its
function goes way beyond allocating an LPI. How would you deal with
simple things such as masking an interrupt, which requires:

- Access to memory (configuration table)
- Access to the command queue (to insert an invalidation command)
- Access to MMIO registers (to kick the command queue into action)

all of which needs to be exclusive of concurrent modifications. How do
you propose this is implemented in a safe manner by two operating
systems which, by nature, distrust each other? Allocating LPIs is the
least of your problems, really.

If you need two concurrent OSs taking interrupts, use virtualisation.
That is its purpose. On your HW, you'll even get direct injection.

Thanks,

M.

--
Without deviation from the norm, progress is not possible.

\
 
 \ /
  Last update: 2020-10-31 10:56    [W:0.074 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site