All of lore.kernel.org
 help / color / mirror / Atom feed
* User space for lapic2
@ 2007-07-09  0:35 Dong, Eddie
       [not found] ` <10EA09EFD8728347A513008B6B0DA77A01B8F537-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Dong, Eddie @ 2007-07-09  0:35 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Avi:
	To make lapic code into mainline earlier, I am thinking what
should the user space code look like.  If we wait till lapic branch has
all same functionality as mainline have today i.e. live migration, all
guests etc, we may have very long way to go given that only Greg (temply
off), me have contribution to the code besides you. So what I am
thinking is to reduce the bar to "no regression", which means a user
space command to choice kernel pic/apic. When choosing user pic/apic, we
make sure everything works including livemigration and all known good
guests; if choosing kernel pic/apic, we have better performance but
some feature lagging such as live migration.
	Does this make sense? If yes, How about command option "-irqchip
k" and "-irqchip u"? the default value is user.

thx, eddie

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: User space for lapic2
@ 2007-07-10 14:29 Gregory Haskins
       [not found] ` <46935F990200005A000273CA-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Gregory Haskins @ 2007-07-10 14:29 UTC (permalink / raw)
  To: eddie.dong-ral2JQCrhuEAvxtiuMwx3w
  Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Tue, 2007-07-10 at 22:08 +0800, Dong, Eddie wrote:
> > I don't think live migration is particularly difficult.  You
> > need a APIs
> > to read and write the PIC+LAPIC states, and you write the
> > state into the
> 
> This is partily true party not. 

I agree with Avi here.  The system is already set up to understand that
there are userspace and kernel components that need to save state for a
migration.  Its only a matter of adding any new elements to the set.

> Like what did in Xen, a live migration
> in kernel side need to consider not only device state, but also cpu
> state. 

Right, and this is already true in KVM as well.  

> Especially when live migration happens when a VCPU get valid
> IDT_Vectoring, we need to save all various cpu states,  (What current
> code did to "push back" an vector can't service us with apic in kernel),
> and we have NMI state to save too.

I had already solved these types of issues neatly in the lapic branch,
so perhaps you can model a solution from that (at least in spirit).  For
instance, the irq.deferred source has the IDT_Vectoring state,
irq.pending has the vcpu interrupt state (NMI, EXTINT, etc),
kvm->isa_int has the PIC state, and vcpu->apic has the lapic state, etc.
I never got to adding the live-migration support, but if I had I would
have added elements to the data set for these components (vcpu->irq,
vcpu->apic, kvm->isa_irq) in addition to whats already saved (most of
the rest of the vcpu state).




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: User space for lapic2
@ 2007-07-11  1:40 Gregory Haskins
  0 siblings, 0 replies; 11+ messages in thread
From: Gregory Haskins @ 2007-07-11  1:40 UTC (permalink / raw)
  To: eddie.dong-ral2JQCrhuEAvxtiuMwx3w
  Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Wed, 2007-07-11 at 09:34 +0800, Dong, Eddie wrote:

> No, what you mean is only for external irq. IDT_Vectoring can happen for
> any exception injection.

Well, yes, but that really is just an attribute the irq.deferred
"source" needs to maintain, right?  I had been thinking of adding
something like this to distinquish between NMIs and EXTINTs (since they
have different interruptibility rules, etc.  Today they are all treated
as homogeneous EXTINTs once deferred ).

However, there is no reason that concept cannot be extended to support
attributes beyond EXTINT/NMI. E.g. EXCEPTION.  After all, there can only
be one deferred vector at a time and they all follow the general model
of "vector between 0-255", right? 



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-07-11  1:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-09  0:35 User space for lapic2 Dong, Eddie
     [not found] ` <10EA09EFD8728347A513008B6B0DA77A01B8F537-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-07-09 13:00   ` Avi Kivity
     [not found]     ` <46923177.7080807-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-10  0:42       ` Dong, Eddie
     [not found]         ` <10EA09EFD8728347A513008B6B0DA77A01BD733F-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-07-10 13:04           ` Dong, Eddie
     [not found]             ` <10EA09EFD8728347A513008B6B0DA77A01BD792E-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-07-10 13:07               ` Avi Kivity
     [not found]                 ` <469384A2.1070407-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-10 13:22                   ` Dong, Eddie
     [not found]                     ` <10EA09EFD8728347A513008B6B0DA77A01BD7933-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-07-10 13:45                       ` Avi Kivity
     [not found]                         ` <46938D70.7060106-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-10 14:08                           ` Dong, Eddie
  -- strict thread matches above, loose matches on Subject: below --
2007-07-10 14:29 Gregory Haskins
     [not found] ` <46935F990200005A000273CA-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-07-11  1:34   ` Dong, Eddie
2007-07-11  1:40 Gregory Haskins

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.