|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 03/14 v4] xen/arm: vpl011: Add pl011 uart emulation in Xen
On 06/14/2017 06:47 AM, Bhupinder Thakur wrote: Hi Julien, Hi Bhupinder,
This is not going to work the day we rework the vGIC to fully support level interrupt. If you don't protect vgic_vcpu_inject_spi(), you may lower the level by mistake. As mentioned on a previous mail, I would prefer if vpl011_update is called with the lock taken. [...] How do you know the compiler will generate assembly which contain the data dependency? Likely it will not be the case because in_cons will be used indirectly as we mask it first.The memory barrier after the 3 statements ensures that intf->in_cons is updated before proceeding ahead.Can you explain why? IHMO, what matter here is in_cons to be written after intf->in[...] is read. Otherwise the backend may see in_cons before the character has effectively been read.ok. The issue is that the other end (xenconsole running on maybe some other CPU) may see the increment operation first before the read operation could complete (due to some quirk of memory/cache architecture) even though the CPU running the mmio_read() will see the effect in the correct order only. It is not about quirk of memory/cache but data access ordering at the processor level. A processor is free to re-order the access if it is more efficient. That's why you have the mb/smp_mb barrier to tell the processor to no do that. Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |