[lkml]   [2008]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 04/16] per-cpu run guest
On Tuesday 08 January 2008 00:05:25 Glauber de Oliveira Costa wrote:
> + /* Watch out for arbitrary vcpu indexes! */
> + if (vcpu_id > lg->nr_vcpus)
> + return -EINVAL;
> +
> + vcpu = &lg->vcpus[vcpu_id];
> +

Out-by-one error here... Fixed it for you, plus a couple of others.

I've applied the patches, but made one minor-but-invasive change: I didn't
want to ask you to spin the patches again!

I changed "vcpu" to "cpu" everywhere (the v is pretty redundant in this
context), which cut about a dozen lines of code out (things now fitted

I also changed "vcpu_id" to simply "id" and made it unsigned. Do you plan for
this to always be equal to the index in the vcpu array BTW? If so, we can
neaten vcpu_start (now lg_cpu_start)...

You can grab the latest now...


 \ /
  Last update: 2008-01-08 12:05    [W:0.059 / U:4.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site