Re: [RFC] KVM Source layout Proposal to accommodate new CPU architecture

Hollis Blanchard
2007-10-02T06:01:14Z

On Tue, 2007-10-02 at 14:11 +1000, Rusty Russell wrote:
> On Tue, 2007-10-02 at 01:19 +0000, Hollis Blanchard wrote:
> > On Sun, 30 Sep 2007 15:56:16 +0200, Avi Kivity wrote:
> > >
> > > Eventually I'd like to see the code in arch/*/kvm. That's probably not
> > > easily doable right now because modules cannot span directories, but
> > > once that's solved, we'll do that as this is most consistent with the
> > > rest of the kernel.
> >
> > What is the "spanning directories" issue? Can't I build
> > arch/powerpc/kvm/kvm-powerpc.ko and drivers/kvm/kvm.ko and let modprobe
> > sort out the dependency?
>
> Sure, but it creates a silly module.

Isn't there precedent in other areas? What about cpufreq or ALSA? (I'm
really asking; don't have time to investigate further right now.)

> I think guest code belongs in arch/*/kvm/, but host code can be done as
> subdirs under drivers/kvm/.

Funny, I would say the opposite. The host code is where I'm mucking with
deep architectural state like stealing the TLB out from under Linux. The
guest state is all "what would a processor like this do?"

--
Hollis Blanchard
IBM Linux Technology Center