On Tue, Sep 11, 2018 at 12:48 PM Andrew Cooper <andrew.coop...@citrix.com> wrote: > > Poisoning idle_vcpu[0] with the sanity debug value isn't actually a clever > idea, because it passes a NULL pointer check but isn't a usable vcpu. It is > also the reason for the (!is_idle_domain(d) || vcpu_id) part of the existing > sanity BUG_ON(). > > Now that d->max_vcpus is appropriately set up before vcpu_create() is called, > we can properly range check the requested vcpu_id. Drop the BUG_ON() and > replace it with code which is runtime safe but non-fatal. > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> > --- > CC: Jan Beulich <jbeul...@suse.com> > CC: Wei Liu <wei.l...@citrix.com> > CC: Roger Pau Monné <roger....@citrix.com> > CC: Stefano Stabellini <sstabell...@kernel.org> > CC: Julien Grall <julien.gr...@arm.com> > CC: Jason Andryuk <jandr...@gmail.com> > > v2: > * Fix the tboot check following the un-poisioning of idle_vcpu[0] > * Exclude the idle domain from the next_in_list list, and vastly simplify the > linking logic.
Reviewed-by: Jason Andryuk <jandr...@gmail.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel