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

Re: [Xen-devel] [PATCH 03/10 v2] xen/arm: vpl011: Enable pl011 emulation for a guest domain in Xen

Hi Bhupinder,

On 02/05/17 16:20, Bhupinder Thakur wrote:
Hi Jan,

@@ -631,6 +632,9 @@ int arch_domain_create(struct domain *d, unsigned int 
     if ( (rc = domain_vtimer_init(d, config)) != 0 )
         goto fail;

+    if ( domcr_flags & DOMCRF_vuart )
+        if ( (rc = domain_vpl011_init(d, config)) != 0 )
+            goto fail;

I am planning to remove the usage of domain creation flag to check
whether vuart is enabled/disabled. Please see my next comment. With
that change, domain_vpl011_init() will be called always. The
domain_vpl011_init() will check whether vuart is enabled or disabled
in the config structure passed. If vuart is enabled then it will go
ahead with vpl011 initialization else it will return without
initializing vpl011.

Please don't do that. The arch code decides whether domain_vpl011_init not the invert.

I would much prefer if you do:

if ( enable_vuart && ((rc = domain_vpl011_init(d, config) != 0) )
  goto fail;

   rc = (enable_vuart) ? domain_vpl011_init(d, config) : 0;
   if ( rc != 0 )
     goto fail;


Julien Grall

Xen-devel mailing list



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