All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel@lists.xenproject.org, tim@xen.org,
	stefano.stabellini@citrix.com
Subject: Re: [PATCH 05/10] xen/arm: vgic-v3: Document the current restrictions
Date: Wed, 21 Jan 2015 13:19:47 +0000	[thread overview]
Message-ID: <54BFA773.2010904@linaro.org> (raw)
In-Reply-To: <1421844486.13271.38.camel@citrix.com>

On 21/01/15 12:48, Ian Campbell wrote:
> On Wed, 2015-01-21 at 12:33 +0000, Julien Grall wrote:
>> On 21/01/15 12:16, Ian Campbell wrote:
>>> On Tue, 2015-01-20 at 17:49 +0000, Julien Grall wrote:
>>>
>>>>>>     - A processor can only access his own redistributor. For buggy
>>>>>>     assumption, the current code bank the redistributors MMIO.
>>>>>
>>>>> What assumption? It's not clear if you mean that a foreign redistributor
>>>>> should not be accessible and is, or if it should be accessible and
>>>>> isn't.
>>>>
>>>> Every redistributor (one per processor) are mapped in distinct MMIO region.
>>>>
>>>> Unlike the distributor, the redistributor is not banked.
>>>
>>> Understood.
>>>
>>>> Our current implementation (see vgic_v3_rdistr_mmio_write) consider that
>>>> the redistributor is banked and replicate n-times in the memory.
>>>
>>> IOW instead of having e.g. 8 individual redistributors each vcpu sees
>>> it's own redistributor 8 times. That does seem a bit dubious.
>>
>> It's the current behavior. You can see the difference in linux log. The
>> address of each redistributor is the same.
> 
> Are you sure that isn't the "redistributor region"? One of those can
> contain multiple redistributors, i.e. gic_v3_init sets up a single
> region and that propagates to the DTB given to the guest.
> 
> So the error is just in the mmio decode stage I think, not in the setup
> we are trying to achieve.

Right, the device tree is valid, we expose a region containing enough
space for up to 8 distributor.
The problem is in our MMIO emulation.

>>>> If you give a look to the redistributor iniatialization (see Xen and
>>>> Linux GICv3 code). The code will go through all the redistributors and
>>>> check GICR_TYPER to see if the processor is associated to this
>>>> redistributor.
>>>>
>>>> I'm not sure how the redistributor should behave if it's accessed by
>>>> another processor.
>>>
>>> Please can you find a spec reference and include it in the clarified
>>> version of this item.
>>
>> Rather than the distributor, there is multiple redistributor (one per
>> processor).
>>
>> I think the section 5.4.1 in the GICv3 should answer to this question:
>>
>> "Each re-distributor must be allocated at one page for controlling the
>> overall behavior of the re-distributor and for controlling physical
>> LPIs. The base address of this page is referred to as RD_base. In
>> addition, each re-distributor must be also allocated the following
>> additional pages".
> 
> That doesn't say anything about one CPU touching another's
> redistributor.

Linux is at least using GICR_TYPER, to retrieve the right distributor.
For the other the register I've no idea. I've asked ARM. Let see what
they will answer.

-- 
Julien Grall

  reply	other threads:[~2015-01-21 13:20 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-19 16:29 [PATCH 00/10] xen/arm: Bug fixes for the vGIC Julien Grall
2015-01-19 16:29 ` [PATCH 01/10] xen/arm: vgic-v3: Correctly set GICD_TYPER.IDbits Julien Grall
2015-01-20 15:34   ` Ian Campbell
2015-01-20 17:16     ` Julien Grall
2015-01-20 15:43   ` Ian Campbell
2015-01-19 16:29 ` [PATCH 02/10] xen/arm: vgic-v3: Correctly set GICD_TYPER.CPUNumber Julien Grall
2015-01-20 15:43   ` Ian Campbell
2015-01-19 16:29 ` [PATCH 03/10] xen/arm: vgic-v3: Correctly handle GICD_CTLR Julien Grall
2015-01-20 15:51   ` Ian Campbell
2015-01-20 17:17     ` Julien Grall
2015-01-19 16:29 ` [PATCH 04/10] xen/arm: vgic-v3: Don't check the size when we ignore the write/read as zero Julien Grall
2015-01-20 15:57   ` Ian Campbell
2015-01-20 17:41     ` Julien Grall
2015-01-20 17:57       ` Ian Campbell
2015-01-20 18:50         ` Julien Grall
2015-01-21 12:11           ` Ian Campbell
2015-01-21 12:28             ` Julien Grall
2015-01-21 12:36               ` Ian Campbell
2015-01-21 12:45                 ` Julien Grall
2015-01-21 12:50                   ` Ian Campbell
2015-01-20 18:04       ` Julien Grall
2015-01-19 16:29 ` [PATCH 05/10] xen/arm: vgic-v3: Document the current restrictions Julien Grall
2015-01-20 16:00   ` Ian Campbell
2015-01-20 17:49     ` Julien Grall
2015-01-21 12:16       ` Ian Campbell
2015-01-21 12:33         ` Julien Grall
2015-01-21 12:48           ` Ian Campbell
2015-01-21 13:19             ` Julien Grall [this message]
2015-01-22 15:19               ` Julien Grall
2015-01-19 16:29 ` [PATCH 06/10] xen/arm: vgic-v3: Print the domain/vcpu in each message Julien Grall
2015-01-20 16:05   ` Ian Campbell
2015-01-20 17:50     ` Julien Grall
2015-01-19 16:29 ` [PATCH 07/10] xen/arm: vgic-v2: Correctly set GICD_TYPER.CPUNumber Julien Grall
2015-01-20 16:06   ` Ian Campbell
2015-01-19 16:29 ` [PATCH 08/10] xen/arm: vgic-v2: Don't check the size when we ignore the write/read a zero Julien Grall
2015-01-20 16:08   ` Ian Campbell
2015-01-19 16:29 ` [PATCH 09/10] xen/arm: vgic-v2: Take the lock when writing into GICD_CTLR Julien Grall
2015-01-20 16:09   ` Ian Campbell
2015-01-19 16:29 ` [PATCH 10/10] xen/arm: vgic-v2: Print the domain/vcpu in each message Julien Grall
2015-01-20 16:09   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54BFA773.2010904@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.