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

Re: [Xen-devel] [PATCH 3/9] x86/guest: clean up guest/xen.h



On Fri, Jan 19, 2018 at 12:22:48PM +0000, Wei Liu wrote:
> On Fri, Jan 19, 2018 at 10:21:46AM +0000, Roger Pau Monné wrote:
> > On Thu, Jan 18, 2018 at 06:16:46PM +0000, Wei Liu wrote:
> > > Remove extraneous semicolon. Add blank lines.
> > > 
> > > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> > > ---
> > > Cc: Jan Beulich <jbeulich@xxxxxxxx>
> > > Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> > > ---
> > >  xen/include/asm-x86/guest/xen.h | 12 ++++++++----
> > >  1 file changed, 8 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/xen/include/asm-x86/guest/xen.h 
> > > b/xen/include/asm-x86/guest/xen.h
> > > index 11243fe60d..31326442f7 100644
> > > --- a/xen/include/asm-x86/guest/xen.h
> > > +++ b/xen/include/asm-x86/guest/xen.h
> > > @@ -49,7 +49,8 @@ DECLARE_PER_CPU(struct vcpu_info *, vcpu_info);
> > >  #define xen_guest 0
> > >  #define pv_console 0
> > >  
> > > -static inline void probe_hypervisor(void) {};
> > > +static inline void probe_hypervisor(void) {}
> > > +
> > >  static inline void hypervisor_setup(void)
> > >  {
> > >      ASSERT_UNREACHABLE();
> > > @@ -63,20 +64,23 @@ static inline void hypervisor_fixup_e820(struct 
> > > e820map *e820)
> > >  {
> > >      ASSERT_UNREACHABLE();
> > >  }
> > > +
> > >  static inline const unsigned long *hypervisor_reserved_pages(unsigned 
> > > int *size)
> > >  {
> > >      ASSERT_UNREACHABLE();
> > >      return NULL;
> > > -};
> > > +}
> > > +
> > >  static inline uint32_t hypervisor_cpuid_base(void)
> > >  {
> > >      ASSERT_UNREACHABLE();
> > >      return 0;
> > > -};
> > > +}
> > > +
> > >  static inline void hypervisor_resume(void)
> > >  {
> > >      ASSERT_UNREACHABLE();
> > > -};
> > > +}
> > 
> > AFAICT hypervisor_cpuid_base and hypervisor_resume could be removed,
> > because those are only called from shim code, and it's not even
> > possible to compile the shim code without having Xen guest support
> > enabled.
> 
> They need to stay. This header is included by the shim code itself.

But the shim code never sees those, instead it should see the function
prototypes above (inside the #ifdef CONFIG_XEN_GUEST guard).

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.