Re: 回复：Re: 回复：Re: The design of vCPU.
gedare at rtems.org
Thu Jun 12 15:54:31 UTC 2014
On Thu, Jun 12, 2014 at 11:37 AM, shenyouren <shenyouren at gmail.com> wrote:
>> >> Hi,
>> >> can you please evaluate, which pieces already implemented in
>> >> pok/kernel/* can be reused to build the vCPU structure?
>> > I don't think there are lot of code which can be reused. The vCPU is a
>> > new concept in POK. I can only figure out that the context store/resume
>> > function can be reused.
>> Yes, it is a new concept. But the partition structure has some similar
>> elements. E.g. context_t. Is there more?
> Since you considered a vCPU is corresponding to a partition, there is no
> more function need by vCPU except context and interrupt store/resume.
> Of course these code may be able to reuse.
> But if we add more function into vCPU, like scheduler, those should be
> By the way, when it comes "reuse", it means use it directly or copy paste to
> be vCPU functions?
Prefer to reuse by using existing code directly, for example by
writing your own function that calls existing functions. Avoid
copy-paste of source code.
>> >> Also, how the vCPU structure can be build on top of / merged into the
>> >> partition structure.
>> > I think we can put a point on vCPU structure, a point point to partition
>> > bond with the vCPU.
>> > This vCPU structure, as you said do not need SMP for now, and a
>> > partition is a vCPU(I understand this as we do not need scheduler for
>> > vCPU now), is just a structure for interrupt store, also maybe for the
>> > context store.
>> > If my understanding is correct, the implementation of vCPU is a
>> > realistic target for midterm.
>> Ok, then run a hello World on the vCPU without a guest system until
>> But first write a blog post, where you want to place the implementation
>> of the vCPU and how it interacts with the partition it's running in and
>> other components of the kernel.
More information about the devel