linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Why do we mark vpending table as non-shareable in GICR_VPENDBASER?
@ 2019-05-09  7:10 Heyi Guo
  2019-05-09  7:58 ` Marc Zyngier
  0 siblings, 1 reply; 4+ messages in thread
From: Heyi Guo @ 2019-05-09  7:10 UTC (permalink / raw)
  To: linux-kernel; +Cc: Marc Zyngier, Christoffer Dall, wanghaibin 00208455

Hi Marc,

We can see in its_vpe_schedule() the shareability bits of GICR_VPENDBASER are set as non-shareable, But we set physical PENDBASER as inner-shareable. Is there any special reason for doing this? If it is because the vpending table is GICR specific, why don't we do the same for physical pending table?

We have not seen function issue with this setting, but a special detector in our hardware warns us that there are non-shareable requests sent out while some inner shareable cache entries still present in the cache, and it may cause data inconsistent.

Thanks,

Heyi



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

* Re: Why do we mark vpending table as non-shareable in GICR_VPENDBASER?
  2019-05-09  7:10 Why do we mark vpending table as non-shareable in GICR_VPENDBASER? Heyi Guo
@ 2019-05-09  7:58 ` Marc Zyngier
  2019-05-09  8:56   ` Heyi Guo
  2019-05-09 12:05   ` Heyi Guo
  0 siblings, 2 replies; 4+ messages in thread
From: Marc Zyngier @ 2019-05-09  7:58 UTC (permalink / raw)
  To: Heyi Guo; +Cc: linux-kernel, Christoffer Dall, wanghaibin 00208455

On Thu, 09 May 2019 08:10:09 +0100,
Heyi Guo <guoheyi@huawei.com> wrote:
> 
> Hi Marc,
> 
> We can see in its_vpe_schedule() the shareability bits of
> GICR_VPENDBASER are set as non-shareable, But we set physical
> PENDBASER as inner-shareable. Is there any special reason for doing
> this? If it is because the vpending table is GICR specific, why
> don't we do the same for physical pending table?

That's a good question. They should have similar attributes.

> We have not seen function issue with this setting, but a special
> detector in our hardware warns us that there are non-shareable
> requests sent out while some inner shareable cache entries still
> present in the cache, and it may cause data inconsistent.

The main issue with the inner-shareable attributes and the GIC is that
nothing in the spec says that CPUs and GIC have to be in the same
inner-shareable domain, as the system can have as many as you want.

You obviously have built it with GICR in the same inner-shareability
domain as the CPU. I'm happy to change the VPENDBASER attributes,
given that the CPU has a mapping to that memory already, and that
shouldn't affect systems where GICR isn't in the same inner shareable
domain anyway.

Thanks,

	M.

-- 
Jazz is not dead, it just smell funny.

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

* Re: Why do we mark vpending table as non-shareable in GICR_VPENDBASER?
  2019-05-09  7:58 ` Marc Zyngier
@ 2019-05-09  8:56   ` Heyi Guo
  2019-05-09 12:05   ` Heyi Guo
  1 sibling, 0 replies; 4+ messages in thread
From: Heyi Guo @ 2019-05-09  8:56 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-kernel, Christoffer Dall, wanghaibin 00208455

Thanks.

One more question about the cacheability of VPROPBASER, which is RaWb, while it is RaWaWb for PROPBASER. Any special reason for this?

Heyi


On 2019/5/9 15:58, Marc Zyngier wrote:
> On Thu, 09 May 2019 08:10:09 +0100,
> Heyi Guo <guoheyi@huawei.com> wrote:
>> Hi Marc,
>>
>> We can see in its_vpe_schedule() the shareability bits of
>> GICR_VPENDBASER are set as non-shareable, But we set physical
>> PENDBASER as inner-shareable. Is there any special reason for doing
>> this? If it is because the vpending table is GICR specific, why
>> don't we do the same for physical pending table?
> That's a good question. They should have similar attributes.
>
>> We have not seen function issue with this setting, but a special
>> detector in our hardware warns us that there are non-shareable
>> requests sent out while some inner shareable cache entries still
>> present in the cache, and it may cause data inconsistent.
> The main issue with the inner-shareable attributes and the GIC is that
> nothing in the spec says that CPUs and GIC have to be in the same
> inner-shareable domain, as the system can have as many as you want.
>
> You obviously have built it with GICR in the same inner-shareability
> domain as the CPU. I'm happy to change the VPENDBASER attributes,
> given that the CPU has a mapping to that memory already, and that
> shouldn't affect systems where GICR isn't in the same inner shareable
> domain anyway.
>
> Thanks,
>
> 	M.
>



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

* Re: Why do we mark vpending table as non-shareable in GICR_VPENDBASER?
  2019-05-09  7:58 ` Marc Zyngier
  2019-05-09  8:56   ` Heyi Guo
@ 2019-05-09 12:05   ` Heyi Guo
  1 sibling, 0 replies; 4+ messages in thread
From: Heyi Guo @ 2019-05-09 12:05 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-kernel, Christoffer Dall, wanghaibin 00208455

After thinking about it for a while, I feel it difficult to image how non shareable plus normal cacheable works for vpending table. Supposing the shareability bits are to direct the corresponding GICR to read/write table memory, if a vPE is first scheduled on pCPU0 with GICR0 and an VLPI is triggered, so a pending bit in vpending table is set by GICR0 (or ITS?); before the interrupt is activated, the vPE is then scheduled on pCPU1 with GICR1, could GICR1 still be guaranteed to see the pending bit in vpending table when the shareability is non-shareable?

It seems more reasonable for physical pending table to be non-shareable, for it is pinned with one GICR. Even with this assumption, the code will still fall back to non-cacheable cacheability when we have no more choice for shareability attribute other than non-shareable, as the comment says:

         /*
          * The HW reports non-shareable, we must remove the
          * cacheability attributes as well.
          */

Did I miss something?

Thanks,
Heyi

On 2019/5/9 15:58, Marc Zyngier wrote:
> On Thu, 09 May 2019 08:10:09 +0100,
> Heyi Guo <guoheyi@huawei.com> wrote:
>> Hi Marc,
>>
>> We can see in its_vpe_schedule() the shareability bits of
>> GICR_VPENDBASER are set as non-shareable, But we set physical
>> PENDBASER as inner-shareable. Is there any special reason for doing
>> this? If it is because the vpending table is GICR specific, why
>> don't we do the same for physical pending table?
> That's a good question. They should have similar attributes.
>
>> We have not seen function issue with this setting, but a special
>> detector in our hardware warns us that there are non-shareable
>> requests sent out while some inner shareable cache entries still
>> present in the cache, and it may cause data inconsistent.
> The main issue with the inner-shareable attributes and the GIC is that
> nothing in the spec says that CPUs and GIC have to be in the same
> inner-shareable domain, as the system can have as many as you want.
>
> You obviously have built it with GICR in the same inner-shareability
> domain as the CPU. I'm happy to change the VPENDBASER attributes,
> given that the CPU has a mapping to that memory already, and that
> shouldn't affect systems where GICR isn't in the same inner shareable
> domain anyway.
>
> Thanks,
>
> 	M.
>



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

end of thread, other threads:[~2019-05-09 12:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-09  7:10 Why do we mark vpending table as non-shareable in GICR_VPENDBASER? Heyi Guo
2019-05-09  7:58 ` Marc Zyngier
2019-05-09  8:56   ` Heyi Guo
2019-05-09 12:05   ` Heyi Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).