All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu@kernel.org>
To: Michael Kelley <mikelley@microsoft.com>
Cc: Wei Liu <wei.liu@kernel.org>,
	Joseph Salisbury <Joseph.Salisbury@microsoft.com>,
	KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"bp@alien8.de" <bp@alien8.de>, "hpa@zytor.com" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] x86/hyperv: Move hv_do_rep_hypercall to asm-generic
Date: Sun, 18 Apr 2021 15:35:15 +0000	[thread overview]
Message-ID: <20210418153515.tdhbcmwbquv7hbdp@liuwe-devbox-debian-v2> (raw)
In-Reply-To: <CY4PR21MB15863413859BBF15CADD214CD74A9@CY4PR21MB1586.namprd21.prod.outlook.com>

On Sun, Apr 18, 2021 at 02:42:55PM +0000, Michael Kelley wrote:
> From: Wei Liu <wei.liu@kernel.org> Sent: Sunday, April 18, 2021 6:09 AM
> > On Fri, Apr 16, 2021 at 05:43:02PM -0700, Joseph Salisbury wrote:
> > > From: Joseph Salisbury <joseph.salisbury@microsoft.com>
> > >
> > > This patch makes no functional changes.  It simply moves hv_do_rep_hypercall()
> > > out of arch/x86/include/asm/mshyperv.h and into asm-generic/mshyperv.h
> > >
> > > hv_do_rep_hypercall() is architecture independent, so it makes sense that it
> > > should be in the architecture independent mshyperv.h, not in the x86-specific
> > > mshyperv.h.
> > >
> > > This is done in preperation for a follow up patch which creates a consistent
> > > pattern for checking Hyper-V hypercall status.
> > >
> > > Signed-off-by: Joseph Salisbury <joseph.salisbury@microsoft.com>
> > > ---
> > [...]
> > > +static inline u64 hv_do_rep_hypercall(u16 code, u16 rep_count, u16 varhead_size,
> > > +				      void *input, void *output)
> > > +{
> > > +	u64 control = code;
> > > +	u64 status;
> > > +	u16 rep_comp;
> > > +
> > > +	control |= (u64)varhead_size << HV_HYPERCALL_VARHEAD_OFFSET;
> > > +	control |= (u64)rep_count << HV_HYPERCALL_REP_COMP_OFFSET;
> > > +
> > > +	do {
> > > +		status = hv_do_hypercall(control, input, output);
> > > +		if ((status & HV_HYPERCALL_RESULT_MASK) != HV_STATUS_SUCCESS)
> > > +			return status;
> > > +
> > > +		/* Bits 32-43 of status have 'Reps completed' data. */
> > > +		rep_comp = (status & HV_HYPERCALL_REP_COMP_MASK) >>
> > > +			HV_HYPERCALL_REP_COMP_OFFSET;
> > > +
> > > +		control &= ~HV_HYPERCALL_REP_START_MASK;
> > > +		control |= (u64)rep_comp << HV_HYPERCALL_REP_START_OFFSET;
> > > +
> > > +		touch_nmi_watchdog();
> > 
> > This seems to be missing in Arm. Does it compile?
> > 
> > Wei.
> 
> touch_nmi_watchdog() is defined as "static inline" in include/linux/nmi.h.  So
> it should be present in all architectures.  It calls arch_touch_nmi_watchdog,
> which is an empty function if CONFIG_HAVE_NMI_WATCHDOG is not defined,
> as is the case on ARM64.

I see. I couldn't find arch_touch_nmi_watchdog on Arm but missed the
stub function. Thanks for the information.

Wei.

  reply	other threads:[~2021-04-18 15:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17  0:43 [PATCH 1/2] x86/hyperv: Move hv_do_rep_hypercall to asm-generic Joseph Salisbury
2021-04-17  0:43 ` [PATCH 2/2] drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status Joseph Salisbury
2021-04-20 21:30   ` Michael Kelley
2021-04-21  9:47     ` Wei Liu
2021-04-18 13:09 ` [PATCH 1/2] x86/hyperv: Move hv_do_rep_hypercall to asm-generic Wei Liu
2021-04-18 14:42   ` Michael Kelley
2021-04-18 15:35     ` Wei Liu [this message]
2021-04-20 21:25 ` Michael Kelley

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=20210418153515.tdhbcmwbquv7hbdp@liuwe-devbox-debian-v2 \
    --to=wei.liu@kernel.org \
    --cc=Joseph.Salisbury@microsoft.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.