qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC] Proposal for hw/ split


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC] Proposal for hw/ split
Date: Mon, 11 Mar 2013 12:54:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3

Il 11/03/2013 12:31, Peter Maydell ha scritto:
> On 11 March 2013 11:17, Paolo Bonzini <address@hidden> wrote:
>> - Files go in hw/ARCH/ if they used to be in hw/ARCH/Makefile.objs and
>>   they define multiple devices (example: hw/arm/tc6393xb.c)
> 
> Why are multiple devices in one file a bad thing (or at least, a
> thing that should determine where a file lives)? Should piix_pci.c
> move to hw/i386 because it happens to define four devices?

Two of the devices are different parts of the same device.  Basically
the part that is only on SysBus vs. the part that is visible on the PCI bus.

The other two should indeed be moved to hw/isa/piix3.c (on my todo list).

> Basically I disagree that trying to move more things into hw/$ARCH
> serves any useful purpose. The split-by-subsystem stuff looks good.
> 
>> == hw/arm ==
>> hw/a15mpcore.c                               hw/arm/a15mpcore.c
> 
> One device.
> 
>> hw/a9mpcore.c                                hw/arm/a9mpcore.c
> 
> One device.
> 
>> hw/arm11mpcore.c                             hw/arm/arm11mpcore.c
> 
> Two devices but I can split them if you insist.

These are little more than SoC containers, aren't they?

>> hw/kvm/arm_gic.c                             hw/arm/kvm/arm_gic.c
> 
> If we're going to move kvm specific devices out of hw/kvm I'd
> rather they just went in hw/. It's an implementation detail that
> a device's back end is KVM specific, so kvm_arm_gic.c should go
> alongside arm_gic.c.

I moved them to hw/ARCH because they really depend on the host kernel.
Even the very same device might have a different interface on a
different kernel.  But I can certainly move these to hw/SUBSYSTEM/kvm.

(I think you said you disagree, but the next step for me would be to
move hw/ARCH to target-ARCH/hw).

>> hw/strongarm.c                               hw/arm/strongarm.c
> 
> We could split the individual devices out into files, which would
> leave sa1110_init() itself (which kind of wants to be a SoC
> container eventually I guess).
> 
>> hw/tc6393xb.c                                hw/arm/tc6393xb.c
> 
> This is only a single device. (It happens to be a not-converted-to-qdev
> device.)

Right, I'll move it to hw/display.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]