> -----Original Message----- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 22 March 2017 12:15 > To: xen-de...@lists.xenproject.org > Cc: Paul Durrant <paul.durr...@citrix.com>; Ian Jackson > <ian.jack...@citrix.com>; Andrew Cooper <andrew.coop...@citrix.com> > Subject: [PATCH v4 3/3] x86/viridian: implement the crash MSRs > > Section 2.4.4 of the Hypervisor Top Level Functional Specification states > that enabling bit 10 in EDX of CPUID leaf 3 advertises to Windows a set > of MSRs into which it can write crash information. > > This patch advertises that bit and implements the MSRs such that Xen can > log the information if a Windows guest crashes. > > Signed-off-by: Paul Durrant <paul.durr...@citrix.com> > Reviewed-by: Jan Beulich <jbeul...@suse.com> > Reviewed-by: Wei Liu <wei.l...@citrix.com> > --- > Cc: Ian Jackson <ian.jack...@eu.citrix.com> > Cc: Paul Durrant <paul.durr...@citrix.com> > Cc: Andrew Cooper <andrew.coop...@citrix.com> > > v4: > - Name the union in HV_CRASH_CTL_REG_CONTENTS to keep older gcc > happy > > v3: > - Use WARNING level message rather than INFO > > v2: > - Make MSRs per-vcpu rather than per-domain > - Fix hypervisor stack leak > - Replicate BUILD_BOG_ON() > - Use gprintk() rather than printk() > --- > docs/man/xl.cfg.pod.5.in | 10 ++++-- > tools/libxl/libxl.h | 6 ++++ > tools/libxl/libxl_dom.c | 4 +++ > tools/libxl/libxl_types.idl | 1 + > xen/arch/x86/hvm/viridian.c | 69 > ++++++++++++++++++++++++++++++++++++++ > xen/include/asm-x86/hvm/viridian.h | 1 + > xen/include/public/hvm/params.h | 7 +++- > 7 files changed, 95 insertions(+), 3 deletions(-) > > diff --git a/docs/man/xl.cfg.pod.5.in b/docs/man/xl.cfg.pod.5.in > index 52802d5..991960b 100644 > --- a/docs/man/xl.cfg.pod.5.in > +++ b/docs/man/xl.cfg.pod.5.in > @@ -1601,11 +1601,17 @@ per-vcpu event channel upcall vectors. > Note that this enlightenment will have no effect if the guest is > using APICv posted interrupts. > > +=item B<crash_ctl> > + > +This group incorporates the crash control MSRs. These enlightenments > +allow Windows to write crash information such that it can be logged > +by Xen. > + > =item B<defaults> > > This is a special value that enables the default set of groups, which > -is currently the B<base>, B<freq>, B<time_ref_count> and B<apic_assist> > -groups. > +is currently the B<base>, B<freq>, B<time_ref_count>, B<apic_assist> > +and B<crash_ctl> groups. > > =item B<all> > > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > index 72ec39d..af45582 100644 > --- a/tools/libxl/libxl.h > +++ b/tools/libxl/libxl.h > @@ -288,6 +288,12 @@ > #define LIBXL_HAVE_SCHED_CREDIT2_PARAMS 1 > > /* > + * LIBXL_HAVE_CRASH_CTL indicates that the 'crash_ctl' value > + * is present in the viridian enlightenment enumeration. > + */ > +#define LIBXL_HAVE_CRASH_CTL 1
Sorry, I forgot to fix this up. Can this be done at commit assuming the rest of the patch is now ok? Paul _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel