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

Re: [Xen-devel] [PATCH] x86/HVM: Improve EFER validation error messages



>>> On 23.01.15 at 16:53, <andrew.cooper3@xxxxxxxxxx> wrote:
> The previous error message was very little use in identifying the actual
> problem after the fact.  Now, hvm_efer_valid() will indicate the issue which
> it objects to, which is far more useful for diagnosing issues from logs.

Nice, but ...

> @@ -1848,10 +1850,11 @@ static int hvm_load_cpu_ctxt(struct domain *d, 
> hvm_domain_context_t *h)
>          return -EINVAL;
>      }
>  
> -    if ( !hvm_efer_valid(v, ctxt.msr_efer, MASK_EXTR(ctxt.cr0, X86_CR0_PG)) )
> +    errstr = hvm_efer_valid(v, ctxt.msr_efer, MASK_EXTR(ctxt.cr0, 
> X86_CR0_PG));
> +    if ( errstr )
>      {
> -        printk(XENLOG_G_ERR "HVM%d restore: bad EFER %#" PRIx64 "\n",
> -               d->domain_id, ctxt.msr_efer);
> +        printk(XENLOG_G_ERR "HVM%d restore: bad EFER %#" PRIx64 " - %s\n",
> +               d->domain_id, ctxt.msr_efer, errstr);

... as you fiddle with it to make it more useful, could you make this
print domain and vcpu ID?

> @@ -2988,13 +2991,16 @@ err:
>  int hvm_set_efer(uint64_t value)
>  {
>      struct vcpu *v = current;
> +    const char *errstr;
>  
>      value &= ~EFER_LMA;
>  
> -    if ( !hvm_efer_valid(v, value, -1) )
> +    errstr = hvm_efer_valid(v, value, -1);
> +    if ( errstr )
>      {
> -        gdprintk(XENLOG_WARNING, "Trying to set reserved bit in "
> -                 "EFER: %#"PRIx64"\n", value);
> +        printk(XENLOG_G_WARNING
> +               "%pv Invalid EFER update: %#"PRIx64" -> %#"PRIx64" - %s\n",

Perhaps another colon after the %pv?

Jan


_______________________________________________
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®.