Hi Vijay,
On 15/07/2015 20:13, Julien Grall wrote:
+uint8_t vgic_its_get_priority(struct vcpu *v, uint32_t pid)
+{
+ uint8_t priority;
+
+ priority = readb_relaxed(v->domain->arch.vits->prop_page + pid);
Why do you use readb_relaxed here? This should only be used for Device
MMIO.
Although, you need to ensure that the value will be correctly
synchronize if another CPU is writing in prop_page which is protected by
prop_lock.
I though a bit more during the night about this function. On patch #11,
where you allocate prop_page, you allow to have a smaller table than the
number of LPIs. If the pid is too high, even though valid, you may read
Xen memory or even crash Xen.
Although, what does mean pid? Should not it be vlpi?
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel