Hi Andre,

On 03/04/17 19:25, Andre Przywara wrote:
On 24/03/17 13:00, Julien Grall wrote:
On 03/16/2017 11:20 AM, Andre Przywara wrote:
+ */
+bool read_itte(struct virt_its *its, uint32_t devid, uint32_t evid,
+               struct vcpu **vcpu, uint32_t *vlpi)
+{
+    struct vits_itte *itte;
+    int collid;
+    uint32_t _vlpi;
+    struct vcpu *_vcpu;
+
+    spin_lock(&its->its_lock);

Do we expect multiple vCPU calling read_itte at the same time? This
needs to be clarify in the comments because this current function is not
scalable.

We need this lock here because this protects our data structures.
A guest locks accesses to the ITS command queue anyway (otherwrite
multiple VCPUs would race for CWRITER and CREADR), so I don't see a real
problem. And this lock is pre ITS, not per guest.

Fair point, please ignore my request then.

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to