[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v2] x86/paravirt: Don't make vcpu_is_preempted() a callee-save function
- To: Waiman Long <longman@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Tue, 14 Feb 2017 16:18:55 +0000
- Cc: linux-arch@xxxxxxxxxxxxxxx, Juergen Gross <jgross@xxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, Radim Krčmář <rkrcmar@xxxxxxxxxx>, Pan Xinhui <xinhui.pan@xxxxxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx, Chris Wright <chrisw@xxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Alok Kataria <akataria@xxxxxxxxxx>
- Delivery-date: Tue, 14 Feb 2017 16:19:36 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|