[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200712261034.06419.rusty@rustcorp.com.au>
Date: Wed, 26 Dec 2007 10:34:05 +1100
From: Rusty Russell <rusty@...tcorp.com.au>
To: Glauber de Oliveira Costa <gcosta@...hat.com>
Cc: lguest@...abs.org, glommer@...il.com, linux-kernel@...r.kernel.org,
virtualization@...ts.linux-foundation.org, rostedt@...dmis.org
Subject: Re: [PATCH 01/16] introduce vcpu struct
On Friday 21 December 2007 00:33:41 Glauber de Oliveira Costa wrote:
> this patch introduces a vcpu struct for lguest. In upcoming patches,
> more and more fields will be moved from the lguest struct to the vcpu
Hi Glommer,
> +static inline struct lguest *lg_of_vcpu(struct lguest_vcpu *vcpu)
> +{
> + return container_of((vcpu - vcpu->vcpu_id), struct lguest, vcpus[0]);
> +}
I think this function is a bad idea: it contains implicit UP assumptions which
aren't obvious to the caller. vcpu->lg should do the same thing, no?
Rusty,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists