From: Wei Liu <wei.liu@kernel.org>
To: Michael Kelley <mikelley@microsoft.com>
Cc: kys@microsoft.com, haiyangz@microsoft.com,
sthemmin@microsoft.com, wei.liu@kernel.org, tglx@linutronix.de,
mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com,
linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org
Subject: Re: [PATCH 1/1] Drivers: hv: Move AEOI determination to architecture dependent code
Date: Tue, 21 Apr 2020 10:07:04 +0100 [thread overview]
Message-ID: <20200421090704.gypbtaiplde7ebbq@debian> (raw)
In-Reply-To: <20200420164926.24471-1-mikelley@microsoft.com>
On Mon, Apr 20, 2020 at 09:49:26AM -0700, Michael Kelley wrote:
> Hyper-V on ARM64 doesn't provide a flag for the AEOI recommendation
> in ms_hyperv.hints, so having the test in architecture independent
> code doesn't work. Resolve this by moving the check of the flag
> to an architecture dependent helper function. No functionality is
> changed.
>
> Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Applied to hyperv-fixes. Thanks.
> ---
> arch/x86/include/asm/mshyperv.h | 2 ++
> drivers/hv/hv.c | 6 +-----
> 2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
> index 1c42ecbe75cb..d30805ed323e 100644
> --- a/arch/x86/include/asm/mshyperv.h
> +++ b/arch/x86/include/asm/mshyperv.h
> @@ -35,6 +35,8 @@ typedef int (*hyperv_fill_flush_list_func)(
> rdmsrl(HV_X64_MSR_SINT0 + int_num, val)
> #define hv_set_synint_state(int_num, val) \
> wrmsrl(HV_X64_MSR_SINT0 + int_num, val)
> +#define hv_recommend_using_aeoi() \
> + (!(ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED))
>
> #define hv_get_crash_ctl(val) \
> rdmsrl(HV_X64_MSR_CRASH_CTL, val)
> diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
> index 6098e0cbdb4b..533c8b82b344 100644
> --- a/drivers/hv/hv.c
> +++ b/drivers/hv/hv.c
> @@ -184,11 +184,7 @@ void hv_synic_enable_regs(unsigned int cpu)
>
> shared_sint.vector = HYPERVISOR_CALLBACK_VECTOR;
> shared_sint.masked = false;
> - if (ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED)
> - shared_sint.auto_eoi = false;
> - else
> - shared_sint.auto_eoi = true;
> -
> + shared_sint.auto_eoi = hv_recommend_using_aeoi();
> hv_set_synint_state(VMBUS_MESSAGE_SINT, shared_sint.as_uint64);
>
> /* Enable the global synic bit */
> --
> 2.18.2
>
prev parent reply other threads:[~2020-04-21 9:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-20 16:49 [PATCH 1/1] Drivers: hv: Move AEOI determination to architecture dependent code Michael Kelley
2020-04-21 9:07 ` Wei Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200421090704.gypbtaiplde7ebbq@debian \
--to=wei.liu@kernel.org \
--cc=bp@alien8.de \
--cc=haiyangz@microsoft.com \
--cc=hpa@zytor.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikelley@microsoft.com \
--cc=mingo@redhat.com \
--cc=sthemmin@microsoft.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox