From: Paolo Bonzini Subject: Re: [PATCH] x86/Hyper-V: Fix definition HV_MAX_FLUSH_REP_COUNT Date: Fri, 15 Mar 2019 18:45:32 +0100 Message-ID: References: <20190222104844.1847-1-Tianyu.Lan@microsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Lan Tianyu , kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, sashal@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org, rkrcmar@redhat.com, devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, michael.h.kelley@microsoft.com, vkuznets@redhat.com, stable@vger.kernel.org To: lantianyu1986@gmail.com Return-path: In-Reply-To: <20190222104844.1847-1-Tianyu.Lan@microsoft.com> Content-Language: en-US Sender: stable-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 22/02/19 11:48, lantianyu1986@gmail.com wrote: > From: Lan Tianyu > > 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: > Fixs: cc4edae4b9(x86/hyper-v: Add HvFlushGuestAddressList hypercall support) > Signed-off-by: Lan Tianyu > --- > 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 { > Queued for after he merge window, with the fixed "Fixes" tag. Paolo