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

Re: [Xen-devel] [PATCH v3 2/2] xen/vm-events: Move parts of monitor_domctl code to common-side.



On Mon, 15 Feb 2016, Jan Beulich wrote:
> >>> On 15.02.16 at 07:37, <czuzu@xxxxxxxxxxxxxxx> wrote:
> >      default:
> > -        return -EOPNOTSUPP;
> > +        /*
> > +         * Should not be reached unless arch_monitor_get_capabilities() is 
> > not
> > +         * properly implemented. In that case, since reaching this point 
> > does
> > +         * not really break anything, don't crash the hypervisor, issue a
> > +         * warning instead of BUG().
> > +         */
> > +        printk(XENLOG_WARNING
> > +                "WARNING, BUG: arch_monitor_get_capabilities() not 
> > implemented"
> > +                "properly.\n");
> >  
> > -    };
> > +        return -EOPNOTSUPP;
> > +    }
> 
> I disagree with the issuing of a message here. At the very least this
> should be a dprintk(). Perhaps an ASSERT_UNREACHABLE() would be
> the way to go? What's worse though is that I can't see the checking
> which would make true the "should not be reached" statement above
> (not that you must not rely on the caller of the hypercall to be well
> behaved).

ASSERT_UNREACHABLE() is appropriate here

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