public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
To: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] KVM: Remove arch specific components	from	the general code
Date: Fri, 27 Jul 2007 09:27:03 +1000	[thread overview]
Message-ID: <1185492423.9484.9.camel@localhost.localdomain> (raw)
In-Reply-To: <46A87FDD.7060308-atKUWr5tajBWk0Htik3J/w@public.gmane.org>

On Thu, 2007-07-26 at 14:05 +0300, Avi Kivity wrote:
> Rusty Russell wrote:
> > 	Great minds think alike.  This is a little rough, but I decided to send
> > it out tonight because it would make your life easier...
> 
> What about my life?  Which patch should I apply first?

Such are the responsibilities of command, Avi.

(Actually, the normal way is to send us both away to create a combined
patch set, and thus make it Not Your Problem).

> > ===
> > Dynamically allocate vcpus
> >
> > This patch converts the vcpus array in "struct kvm" to a linked list
> > of VCPUs, and changes the "vcpu_create" and "vcpu_setup" hooks into
> > one "vcpu_create" call which does the allocation and initialization of
> > the vcpu (calling back into the kvm_vcpu_init core helper).
> 
> Linked list?  So that the in-kernel apic code has to traverse a list, 
> making sure the cpu still knows how to transfer dirty cache lines for 
> every vcpu?
> 
> A good old fashioned pointer array will suit just fine.

So the in-kernel apic code has to traverse every element in the array?
That is clearly better because?  We get to place an artificial maximum
and keep a ceiling variable like the existing code does?

> > +	spin_lock(&kvm->lock);
> > +	/* What do we care if they create duplicate CPU ids?  But be nice. */
> >   
> 
> Oh, we care.  Esp. the apic code.

Yeah, I left the check although it's currently unneeded, but I still
don't think we should care.  We shouldn't use the cpu_id internally, but
use pointers.  Sure, the guest might get confused, by that's not the kvm
module's problem.

Thanks,
Rusty.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

  parent reply	other threads:[~2007-07-26 23:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26  4:31 [PATCH] KVM: Remove arch specific components from the general code Gregory Haskins
     [not found] ` <20070726042948.5893.58975.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-07-26 10:03   ` Avi Kivity
2007-07-26 10:37   ` Rusty Russell
     [not found]     ` <1185446238.4895.6.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-26 11:05       ` Avi Kivity
     [not found]         ` <46A87FDD.7060308-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-26 23:27           ` Rusty Russell [this message]
     [not found]             ` <1185492423.9484.9.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-27  4:41               ` Avi Kivity
     [not found]                 ` <46A9776C.9010007-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-27  5:23                   ` Rusty Russell
  -- strict thread matches above, loose matches on Subject: below --
2007-07-26 12:20 Gregory Haskins
     [not found] ` <46A8594E0200005A0002831D-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-07-26 12:33   ` Avi Kivity
2007-07-26 13:16 Gregory Haskins
2007-07-26 13:16 Gregory Haskins
     [not found] ` <46A866860200005A00028332-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-07-26 13:37   ` Avi Kivity
2007-07-26 13:51 Gregory Haskins
     [not found] ` <46A86E8A0200005A00028346-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-07-26 13:59   ` Avi Kivity
2007-07-26 23:50 Gregory Haskins
     [not found] ` <46A8FB230200005A000283D9-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-07-27  1:11   ` Rusty Russell
     [not found]     ` <1185498672.12151.11.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-27  4:51       ` 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=1185492423.9484.9.camel@localhost.localdomain \
    --to=rusty-8n+1lvoiyb80n/f98k4iww@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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