From: Glauber Costa <glommer@redhat.com>
To: Gleb Natapov <gleb@redhat.com>
Cc: kvm@vger.kernel.org, avi@redhat.com
Subject: Re: [PATCH 6/8] provide env->kvm_fd
Date: Wed, 8 Jul 2009 10:44:01 -0300 [thread overview]
Message-ID: <20090708134401.GA3528@poweredge.glommer> (raw)
In-Reply-To: <20090708133237.GO28046@redhat.com>
On Wed, Jul 08, 2009 at 04:32:37PM +0300, Gleb Natapov wrote:
> On Wed, Jul 08, 2009 at 09:09:00AM -0400, Glauber Costa wrote:
> > qemu upstream puts kvm information on env. Do that too, since it will
> > allow us to use CPUState in cpu-specific functions, instead of kvm-specific
> > types.
> >
> > Signed-off-by: Glauber Costa <glommer@redhat.com>
> > ---
> > kvm-all.c | 12 ++++++++----
> > libkvm-all.h | 12 ------------
> > 2 files changed, 8 insertions(+), 16 deletions(-)
> >
> > diff --git a/kvm-all.c b/kvm-all.c
> > index 15bd429..b404f76 100644
> > --- a/kvm-all.c
> > +++ b/kvm-all.c
> > @@ -1519,21 +1519,25 @@ void kvm_disable_pit_creation(kvm_context_t kvm)
> > kvm->no_pit_creation = 1;
> > }
> >
> > -kvm_vcpu_context_t kvm_create_vcpu(kvm_context_t kvm, int id)
> > +static kvm_vcpu_context_t kvm_create_vcpu(kvm_context_t kvm, CPUState *env)
> > {
> > long mmap_size;
> > int r;
> > kvm_vcpu_context_t vcpu_ctx = qemu_malloc(sizeof(struct kvm_vcpu_context));
> >
> > vcpu_ctx->kvm = kvm;
> > - vcpu_ctx->id = id;
> > + vcpu_ctx->id = env->cpu_index;
> >
> > - r = ioctl(kvm->vm_fd, KVM_CREATE_VCPU, id);
> > + r = ioctl(kvm->vm_fd, KVM_CREATE_VCPU, env->cpu_index);
> This just reverts all my work to separate apic_id from env->cpu_index.
> We want to bring good things from qemu-kvm to upstream not bad things
> from upstream to qemu-kvm :) If anything you should use env->cpuid_apic_id
> instead of env->cpu_index here.
cpuid_apic_id is fine.
my bad here.
next prev parent reply other threads:[~2009-07-08 13:37 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-08 13:08 [PATCH 0/8] Move closer to upstream Glauber Costa
2009-07-08 13:08 ` [PATCH 1/8] Provide KVMState definition outside CONFIG_KVM Glauber Costa
[not found] ` <1247058542-31211-3-git-send-email-glommer@redhat.com>
2009-07-08 13:08 ` [PATCH 3/8] put qemu-kvm-x86.c into kvm.c Glauber Costa
2009-07-08 13:08 ` [PATCH 4/8] replace malloc with qemu_malloc Glauber Costa
2009-07-08 13:08 ` [PATCH 5/8] move kvm_context inside KVMState Glauber Costa
2009-07-08 13:09 ` [PATCH 6/8] provide env->kvm_fd Glauber Costa
2009-07-08 13:09 ` [PATCH 7/8] use kvm_upstream sw_breakpoints structure Glauber Costa
2009-07-08 13:09 ` [PATCH 8/8] use upstream code for breakpoint handling Glauber Costa
2009-07-08 13:27 ` [PATCH 7/8] use kvm_upstream sw_breakpoints structure Avi Kivity
2009-07-08 13:39 ` Glauber Costa
2009-07-08 13:44 ` Avi Kivity
2009-07-08 15:23 ` Jan Kiszka
2009-07-08 19:44 ` Jan Kiszka
2009-07-08 19:55 ` Avi Kivity
2009-07-08 13:32 ` [PATCH 6/8] provide env->kvm_fd Gleb Natapov
2009-07-08 13:44 ` Glauber Costa [this message]
2009-07-08 13:38 ` Gleb Natapov
2009-07-08 13:23 ` [PATCH 3/8] put qemu-kvm-x86.c into kvm.c Avi Kivity
2009-07-08 13:28 ` Gleb Natapov
2009-07-08 13:41 ` Glauber Costa
2009-07-08 13:23 ` [PATCH 2/8] move qemu-kvm.c to kvm-all.c Avi Kivity
2009-07-08 13:52 ` Glauber Costa
2009-07-08 13:22 ` [PATCH 1/8] Provide KVMState definition outside CONFIG_KVM Avi Kivity
2009-07-08 13:27 ` [PATCH 0/8] Move closer to upstream 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=20090708134401.GA3528@poweredge.glommer \
--to=glommer@redhat.com \
--cc=avi@redhat.com \
--cc=gleb@redhat.com \
--cc=kvm@vger.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