[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH for-next v2 8/9] x86: be more verbose when running on a hypervisor
On 21.10.2019 12:00, Roger Pau Monné wrote: > On Mon, Sep 30, 2019 at 04:00:42PM +0100, Wei Liu wrote: >> --- a/xen/include/asm-x86/guest/hypervisor.h >> +++ b/xen/include/asm-x86/guest/hypervisor.h >> @@ -36,6 +36,7 @@ bool hypervisor_probe(void); >> void hypervisor_setup(void); >> void hypervisor_ap_setup(void); >> void hypervisor_resume(void); >> +const char *hypervisor_name(void); >> >> #else >> >> @@ -45,6 +46,7 @@ static inline bool hypervisor_probe(void) { return false; } >> static inline void hypervisor_setup(void) {} >> static inline void hypervisor_ap_setup(void) {} >> static inline void hypervisor_resume(void) {} >> +static inline char *hypervisor_name(void) { return NULL; } > > I think you want an ASSERT_UNREACHABLE here, since hypervisor_name > shouldn't be called unless Xen has detected that's running as a guest, > which can only happen if CONFIG_GUEST is selected. And please bring prototype and stub in sync return-type-wise. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |