lkml.org 
[lkml]   [2008]   [Dec]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kvm vmload/vmsave vs tss.ist

* Ingo Molnar <mingo@elte.hu> wrote:

> i'd suggest to reuse the irq-stacks for this. Right now on 64-bit we've
> got the following stack layout: 8K process stacks, a 16K IRQ stack on
> each CPU, shared by all IRQs. Then we have the IST stacks with weird
> sizes: debug:8K, the others: 4K.

this has to be done carefully though, as there's a subtle detail here:
right now the pda_irqcount and the pda_irqstackptr logic in entry_64.S is
not re-entry safe and relies on IRQs being off.

If critical exceptions are moved to the IRQ stack then %rsp switching to
the IRQ stack has to be done atomically: instead of using the pda_irqcount
check the %rsp value itself should be checked against pda_irqstackptr - if
it's within that 16K range then we are already on the IRQ stack and do not
need to switch to it but can just use the current %rsp.

Ingo


\
 
 \ /
  Last update: 2008-12-25 17:45    [W:0.447 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site