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

Re: [Xen-devel] [PATCH v3 09/23] xsplice: Add support for bug frames. (v4)



On Tue, Feb 16, 2016 at 07:35:32PM +0000, Andrew Cooper wrote:
> On 12/02/16 18:05, Konrad Rzeszutek Wilk wrote:
> > diff --git a/xen/common/symbols.c b/xen/common/symbols.c
> > index a59c59d..bf5623f 100644
> > --- a/xen/common/symbols.c
> > +++ b/xen/common/symbols.c
> > @@ -17,6 +17,7 @@
> >  #include <xen/lib.h>
> >  #include <xen/string.h>
> >  #include <xen/spinlock.h>
> > +#include <xen/xsplice.h>
> >  #include <public/platform.h>
> >  #include <xen/guest_access.h>
> >  
> > @@ -101,6 +102,12 @@ bool_t is_active_kernel_text(unsigned long addr)
> >              (system_state < SYS_STATE_active && is_kernel_inittext(addr)));
> >  }
> >  
> > +bool_t is_active_text(unsigned long addr)
> > +{
> > +    return is_active_kernel_text(addr) ||
> > +           is_active_module_text(addr);
> > +}
> 
> This would be better as a static inline in a header file, to avoid a
> call into a separate translation unit.

I stuck it in kernel.h, as so, would that work for you?

diff --git a/xen/include/xen/kernel.h b/xen/include/xen/kernel.h
index 548b64d..1e8ed68 100644
--- a/xen/include/xen/kernel.h
+++ b/xen/include/xen/kernel.h
@@ -100,5 +100,20 @@ extern enum system_state {
 
 bool_t is_active_kernel_text(unsigned long addr);
 
+#ifdef CONFIG_XSPLICE
+#include <xen/xsplice.h>
+
+static bool_t is_active_text(unsigned long addr)
+{
+    return is_active_kernel_text(addr) ||
+           is_active_patch_text(addr);
+}
+#else
+static bool_t is_active_text(unsigned long addr)
+{
+    return is_active_kernel_text(addr);
+}
+#endif
+
 #endif /* _LINUX_KERNEL_H */
 

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