All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Joerg Roedel <joerg.roedel@amd.com>,
	Benjamin Serebrin <benjamin.serebrin@amd.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	kvm@vger.kernel.org, Alexander Graf <agraf@suse.de>,
	Arjan van de Ven <arjan@infradead.org>,
	Alexander van Heukelum <heukelum@fastmail.fm>
Subject: Re: kvm vmload/vmsave vs tss.ist
Date: Thu, 25 Dec 2008 19:40:15 +0200	[thread overview]
Message-ID: <4953C57F.70502@redhat.com> (raw)
In-Reply-To: <20081225164232.GA25195@elte.hu>

Ingo Molnar wrote:
> * 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.
>   

I think it's enough to switch %rsp before incrementing irqcount, no?

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2008-12-25 17:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-25 14:59 kvm vmload/vmsave vs tss.ist Avi Kivity
2008-12-25 15:17 ` Ingo Molnar
2008-12-25 15:46   ` Avi Kivity
2008-12-25 16:21     ` Ingo Molnar
2008-12-25 16:42       ` Ingo Molnar
2008-12-25 17:40         ` Avi Kivity [this message]
2008-12-25 17:58           ` Ingo Molnar
2008-12-25 18:12             ` Avi Kivity
2008-12-25 18:18               ` Ingo Molnar
2008-12-25 18:19               ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4953C57F.70502@redhat.com \
    --to=avi@redhat.com \
    --cc=agraf@suse.de \
    --cc=arjan@infradead.org \
    --cc=benjamin.serebrin@amd.com \
    --cc=heukelum@fastmail.fm \
    --cc=hpa@zytor.com \
    --cc=joerg.roedel@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.