On 31/05/2019 16:00, Stefano Stabellini wrote: > Introduce two global parameters to disable debug registers trapping and > perf counters trapping. They are only safe to use in static partitiong > scenarios where sched=null is used -- vcpu cannot be migrated from one > pcpu to the next. > > Introduce a new simple umbrella command line option > "static_partitioning" that enables vwfi=native, sched=null, and also > sets debug_registers_trap and perf_counters_trap to false. > > Signed-off-by: Stefano Stabellini <stefa...@xilinx.com> > CC: Julien Grall <julien.gr...@arm.com> > CC: Andrew Cooper <andrew.coop...@citrix.com> > CC: George Dunlap <george.dun...@eu.citrix.com> > CC: Ian Jackson <ian.jack...@eu.citrix.com> > CC: Jan Beulich <jbeul...@suse.com> > CC: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> > CC: Tim Deegan <t...@xen.org> > CC: Wei Liu <w...@xen.org> > CC: George Dunlap <george.dun...@eu.citrix.com> > CC: Dario Faggioli <dfaggi...@suse.com> > --- > This is not ideal. The best course of action would be to implement > proper context switching of all the necessary debug and perf counters > registers. This is an imperfect shortcut, which could reasonably be left > out of the upstream tree but I shared it with others for their > convenience. > --- > xen/arch/arm/traps.c | 26 +++++++++++++++++++++++++- > xen/common/schedule.c | 2 +- > xen/include/xen/sched.h | 1 +
I see no hunk in docs/ ... > 3 files changed, 27 insertions(+), 2 deletions(-) > > diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c > index 5c18e918b0..d6eaffde23 100644 > --- a/xen/arch/arm/traps.c > +++ b/xen/arch/arm/traps.c > @@ -118,6 +118,28 @@ static int __init parse_vwfi(const char *s) > } > custom_param("vwfi", parse_vwfi); > > +static bool debug_registers_trap = true; > +static bool perf_counters_trap = true; > + > +static int __init opt_static_partitioning(const char *s) > +{ > + if ( strcmp(s, "true") && > + strcmp(s, "True") && > + strcmp(s, "1") ) > + return 0; Please please please don't opencode boolean checking. I think I've purged all of it (certainly all that I'm aware of), and this example isn't remotely compatible with existing boolean options. Furthermore, you can't make something which looks like a single boolean option with custom_param(), because you can't make the no- prefix work. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel