[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YjIspMR0lm6+W/Pp@zn.tnic>
Date: Wed, 16 Mar 2022 19:29:56 +0100
From: Borislav Petkov <bp@...en8.de>
To: Dongli Si <kvmx86@...il.com>
Cc: peterz@...radead.org, joerg.roedel@....com,
liam.merwick@...cle.com, kim.phillips@....com, mingo@...nel.org,
acme@...nel.org, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, jolsa@...nel.org,
namhyung@...nel.org, tglx@...utronix.de,
dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
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
Powered by blists - more mailing lists