linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Update PATCH] x86/Hyper-V: Fix definition HV_MAX_FLUSH_REP_COUNT
@ 2019-02-25 14:12 lantianyu1986
  2019-02-25 14:19 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: lantianyu1986 @ 2019-02-25 14:12 UTC (permalink / raw)
  To: kys, haiyangz, sthemmin, sashal, tglx, mingo, bp, hpa, x86, gregkh
  Cc: Lan Tianyu, devel, linux-kernel, stable

From: Lan Tianyu <Tianyu.Lan@microsoft.com>

The max flush rep count of HvFlushGuestPhysicalAddressList hypercall
is equal with how many entries of union hv_gpa_page_range can be populated
into the input parameter page. The origin code lacks parenthesis around
PAGE_SIZE - 2 * sizeof(u64). This patch is to fix it.

Cc: <stable@vger.kernel.org>
Fixs: cc4edae4b924 ("x86/hyper-v: Add HvFlushGuestAddressList hypercall support")
Signed-off-by: Lan Tianyu <Tianyu.Lan@microsoft.com>
---
 arch/x86/include/asm/hyperv-tlfs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h
index 705dafc2d11a..2bdbbbcfa393 100644
--- a/arch/x86/include/asm/hyperv-tlfs.h
+++ b/arch/x86/include/asm/hyperv-tlfs.h
@@ -841,7 +841,7 @@ union hv_gpa_page_range {
  * count is equal with how many entries of union hv_gpa_page_range can
  * be populated into the input parameter page.
  */
-#define HV_MAX_FLUSH_REP_COUNT (PAGE_SIZE - 2 * sizeof(u64) /	\
+#define HV_MAX_FLUSH_REP_COUNT ((PAGE_SIZE - 2 * sizeof(u64)) /	\
 				sizeof(union hv_gpa_page_range))
 
 struct hv_guest_mapping_flush_list {
-- 
2.14.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Update PATCH] x86/Hyper-V: Fix definition HV_MAX_FLUSH_REP_COUNT
  2019-02-25 14:12 [Update PATCH] x86/Hyper-V: Fix definition HV_MAX_FLUSH_REP_COUNT lantianyu1986
@ 2019-02-25 14:19 ` Greg KH
  2019-02-25 14:33   ` Tianyu Lan
  0 siblings, 1 reply; 3+ messages in thread
From: Greg KH @ 2019-02-25 14:19 UTC (permalink / raw)
  To: lantianyu1986
  Cc: kys, haiyangz, sthemmin, sashal, tglx, mingo, bp, hpa, x86,
	Lan Tianyu, devel, linux-kernel, stable

On Mon, Feb 25, 2019 at 10:12:14PM +0800, lantianyu1986@gmail.com wrote:
> From: Lan Tianyu <Tianyu.Lan@microsoft.com>
> 
> The max flush rep count of HvFlushGuestPhysicalAddressList hypercall
> is equal with how many entries of union hv_gpa_page_range can be populated
> into the input parameter page. The origin code lacks parenthesis around
> PAGE_SIZE - 2 * sizeof(u64). This patch is to fix it.
> 
> Cc: <stable@vger.kernel.org>
> Fixs: cc4edae4b924 ("x86/hyper-v: Add HvFlushGuestAddressList hypercall support")

"Fixes"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Update PATCH] x86/Hyper-V: Fix definition HV_MAX_FLUSH_REP_COUNT
  2019-02-25 14:19 ` Greg KH
@ 2019-02-25 14:33   ` Tianyu Lan
  0 siblings, 0 replies; 3+ messages in thread
From: Tianyu Lan @ 2019-02-25 14:33 UTC (permalink / raw)
  To: Greg KH
  Cc: kys, haiyangz, sthemmin, Sasha Levin, Thomas Gleixner,
	Ingo Molnar, bp, H. Peter Anvin, the arch/x86 maintainers,
	Lan Tianyu, devel, linux-kernel@vger kernel org, stable

On Mon, Feb 25, 2019 at 10:19 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Mon, Feb 25, 2019 at 10:12:14PM +0800, lantianyu1986@gmail.com wrote:
> > From: Lan Tianyu <Tianyu.Lan@microsoft.com>
> >
> > The max flush rep count of HvFlushGuestPhysicalAddressList hypercall
> > is equal with how many entries of union hv_gpa_page_range can be populated
> > into the input parameter page. The origin code lacks parenthesis around
> > PAGE_SIZE - 2 * sizeof(u64). This patch is to fix it.
> >
> > Cc: <stable@vger.kernel.org>
> > Fixs: cc4edae4b924 ("x86/hyper-v: Add HvFlushGuestAddressList hypercall support")
>
> "Fixes"

Sorry, fix this in the V2.
-- 
Best regards
Tianyu Lan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-25 14:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-25 14:12 [Update PATCH] x86/Hyper-V: Fix definition HV_MAX_FLUSH_REP_COUNT lantianyu1986
2019-02-25 14:19 ` Greg KH
2019-02-25 14:33   ` Tianyu Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).