public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Andi Kleen <andi@firstfloor.org>, Ingo Molnar <mingo@elte.hu>
Cc: x86@kernel.org, linux-kernel <linux-kernel@vger.kernel.org>,
	KVM list <kvm@vger.kernel.org>
Subject: Re: [PATCH 0/3] Remove interrupt stack table usage from x86_64 kernel
Date: Sun, 28 Dec 2008 21:07:36 +0200	[thread overview]
Message-ID: <4957CE78.6030706@redhat.com> (raw)
In-Reply-To: <20081228190840.GD496@one.firstfloor.org>

Andi Kleen wrote:
> On Sun, Dec 28, 2008 at 04:09:26PM +0200, Avi Kivity wrote:
>   
>> I don't see how syscall could work on i386, and indeed:
>>     
>
> i386 has task gates which support unconditional stack switching. But there 
> are no 64bit task gates, just ISTs.
>
>   

i386 is not that interesting to me (and probably task switching couldn't 
be made to work well with guest state in TR).

> BTW I think there are more similar problems in your patch too.
>   

One fatal problem is enough -- I don't thing that patch can be made to 
work.  Pity since it did clean up some stuff.

I would like however to speed up kvm.  Here's a plan:

1. Add per-cpu IDT
2. When switching to the guest TR (and other state), switch off IST use 
in the current IDT
3. When switching away from the kvm task, restore the IST entries

per-cpu IDT would cost around 4K per cpu.  I propose to make it 
kconfigurable, and have kvm select it.

Ingo, does this sound workable?  It increases complexity rather than 
decreasing it as the previous solution, but I don't see any way to drop 
the use of IST as SYSCALL cannot work without IST if NMIs are enabled.

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

  reply	other threads:[~2008-12-28 19:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-25 20:58 [PATCH 0/3] Remove interrupt stack table usage from x86_64 kernel Avi Kivity
2008-12-25 20:58 ` [PATCH 1/3] x86: drop the use of the tss interrupt stack table (IST) Avi Kivity
2008-12-25 20:58 ` [PATCH 2/3] x86: Remove pda.irqcount Avi Kivity
2008-12-25 20:58 ` [PATCH 3/3] x86: Switch critical exceptions and NMI to irqstack Avi Kivity
2008-12-26  9:15 ` [PATCH 0/3] Remove interrupt stack table usage from x86_64 kernel Ingo Molnar
     [not found] ` <87vdt5vfxc.fsf@basil.nowhere.org>
     [not found]   ` <4956A0B1.1060908@redhat.com>
     [not found]     ` <20081227224029.GB496@one.firstfloor.org>
     [not found]       ` <49573FE7.9090802@redhat.com>
     [not found]         ` <20081228131605.GC496@one.firstfloor.org>
2008-12-28 14:09           ` Avi Kivity
2008-12-28 19:08             ` Andi Kleen
2008-12-28 19:07               ` Avi Kivity [this message]
2008-12-28 19:19                 ` Avi Kivity
2008-12-28 20:08                   ` Avi Kivity
2008-12-28 20:34                     ` Andi Kleen
2008-12-28 20:28                       ` Avi Kivity
2008-12-28 19:30                 ` Andi Kleen

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=4957CE78.6030706@redhat.com \
    --to=avi@redhat.com \
    --cc=andi@firstfloor.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=x86@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox