Messages in this thread | | | Date | Wed, 16 Mar 2022 19:29:56 +0100 | From | Borislav Petkov <> | Subject | Re: [PATCH v3] perf/x86/amd: Don't touch the Host-only bit inside the guest hypervisor |
| |
On Mon, Mar 14, 2022 at 12:22:54PM +0800, Dongli Si wrote: > diff --git a/arch/x86/include/asm/hypervisor.h b/arch/x86/include/asm/hypervisor.h > index e41cbf2ec41d..fcc66c23cc72 100644 > --- a/arch/x86/include/asm/hypervisor.h > +++ b/arch/x86/include/asm/hypervisor.h > @@ -73,11 +73,21 @@ static inline bool hypervisor_is_type(enum x86_hypervisor_type type) > { > return x86_hyper_type == type; > } > + > +static inline bool run_as_host(void) > +{ > + return hypervisor_is_type(X86_HYPER_NATIVE); > +}
What's the point of this "wrapper"?
-- Regards/Gruss, Boris.
https://people.kernel.org/tglx/notes-about-netiquette
| |