From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753752AbcLHQuk (ORCPT ); Thu, 8 Dec 2016 11:50:40 -0500 Received: from merlin.infradead.org ([205.233.59.134]:42536 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751697AbcLHQuj (ORCPT ); Thu, 8 Dec 2016 11:50:39 -0500 Date: Thu, 8 Dec 2016 17:50:13 +0100 From: Peter Zijlstra To: Pan Xinhui Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Peter Anvin , Ingo Molnar , Thomas Gleixner , Borislav Petkov , Jeremy Fitzhardinge , Chris Wright , Alok Kataria , Rusty Russell , virtualization@lists.linux-foundation.org, Pan Xinhui , Paolo Bonzini , kernel test robot Subject: Re: [PATCH 2/2] x86, paravirt: Fix bool return type for PVOP_CALL Message-ID: <20161208165013.GM3107@twins.programming.kicks-ass.net> References: <20161208154213.952687487@infradead.org> <20161208154349.346057680@infradead.org> <474f05c8-8bca-f68f-6499-ce7b424ff984@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <474f05c8-8bca-f68f-6499-ce7b424ff984@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 09, 2016 at 12:40:35AM +0800, Pan Xinhui wrote: > > hi, Peter > I think I know the point. > > then could we just let __eax rettype(here is bool), not unsigned long? > I does not do tests for my thoughts. > > @@ -461,7 +461,9 @@ int paravirt_disable_iospace(void); > #define PVOP_VCALL_ARGS \ > unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx; \ > register void *__sp asm("esp") > -#define PVOP_CALL_ARGS PVOP_VCALL_ARGS > +#define PVOP_CALL_ARGS \ > + rettype __eax = __eax, __edx = __edx, __ecx = __ecx; \ > + register void *__sp asm("esp") Doesn't work on i386 where eax is also an argument register.