[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH v1 08/10] xen/arm: Add support for GIC v3



Hello Vijay,

For next time, can you try to quote only what you need? It's hard to find your answer in a long mail.

On 22/03/14 10:21, Vijay Kilari wrote:
On Thu, Mar 20, 2014 at 10:10 PM, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
Please check all the file against CODING_STYLE. I won't shout anymore on
every coding style error in this mail.
OK. Is there any script to check coding style of Xen?

Unfortunately no. It might be interesting to have one for Xen as the coding style differs from Linux. People are often confusing between them :)

+static void save_state(struct vcpu *v)
+{
+    int i;
+    struct gic_state_data *d;
+    d = (struct gic_state_data *)v->arch.gic_state;
+
+    /* No need for spinlocks here because interrupts are disabled around
+     * this call and it only accesses struct vcpu fields that cannot be
+     * accessed simultaneously by another pCPU.
+     */
+    for ( i=0; i<nr_lrs; i++)
+        d->gic_lr[i] = gich_read_lr(i);

You are introducing a helper to read/write lr. How the compiler handle
it? Will it optimize?

For me it seems very slow...

   because LR registers are system registers, we have to
use READ/WRITE_SYSREG

Is it possible to read all of them (without looking at nr_lrs)?

I see that KVM is using this solution, e.g not looping.

Regards,

--
Julien Grall

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.