From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754564AbdBNQT3 (ORCPT ); Tue, 14 Feb 2017 11:19:29 -0500 Received: from smtp.eu.citrix.com ([185.25.65.24]:53454 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753584AbdBNQTW (ORCPT ); Tue, 14 Feb 2017 11:19:22 -0500 X-IronPort-AV: E=Sophos;i="5.35,161,1484006400"; d="scan'208";a="40753078" Subject: Re: [Xen-devel] [PATCH v2] x86/paravirt: Don't make vcpu_is_preempted() a callee-save function To: Waiman Long , Peter Zijlstra References: <1486741389-8513-1-git-send-email-longman@redhat.com> <20170210161928.GI6515@twins.programming.kicks-ass.net> <1c949ed0-1b88-ae6e-4e6c-426502bfab5f@redhat.com> <14854496-0baa-1bf6-c819-f3d7fae13c2c@redhat.com> <20170213104716.GM6515@twins.programming.kicks-ass.net> <20170213105343.GJ6536@twins.programming.kicks-ass.net> <3dc50409-60dd-ad47-f971-448191e66038@redhat.com> <6f69b112-7ae4-bf8f-b767-29a68fd48632@redhat.com> <20170213215220.GN25813@worktop.programming.kicks-ass.net> <933ba8c6-4ebe-63e2-3c3a-2e5afef9269a@redhat.com> <20170214093946.GM6500@twins.programming.kicks-ass.net> CC: , Juergen Gross , Jeremy Fitzhardinge , , , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Boris Ostrovsky , Pan Xinhui , Paolo Bonzini , Rusty Russell , , , Chris Wright , Ingo Molnar , "H. Peter Anvin" , , Alok Kataria , Thomas Gleixner From: Andrew Cooper Message-ID: <5c3c2a13-b397-6e9f-8772-a8aaa3f70771@citrix.com> Date: Tue, 14 Feb 2017 16:18:55 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) To AMSPEX02CL02.citrite.net (10.69.22.126) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/02/17 14:46, Waiman Long wrote: > On 02/14/2017 04:39 AM, Peter Zijlstra wrote: >> On Mon, Feb 13, 2017 at 05:34:01PM -0500, Waiman Long wrote: >>> It is the address of &steal_time that will exceed the 32-bit limit. >> That seems extremely unlikely. That would mean we have more than 4G >> worth of per-cpu variables declared in the kernel. > I have some doubt about if the compiler is able to properly use > RIP-relative addressing for this. Anyway, it seems like constraints > aren't allowed for asm() when not in the function context, at least for > the the compiler that I am using (4.8.5). So it is a moot point. You can work the issue of not having parameters in a plain asm() statement by using an asm-offset, stringizing it, and have C put the string fragments back together. "cmpb $0, " STR(STEAL_TIME_preempted) "(%rax);" ~Andrew