[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/5] hyperv: factor out arch-independent API int
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 3/5] hyperv: factor out arch-independent API into hw/hyperv |
Date: |
Wed, 3 Oct 2018 13:47:00 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 |
On 03/10/2018 13:34, Roman Kagan wrote:
> On Wed, Oct 03, 2018 at 12:56:00PM +0200, Paolo Bonzini wrote:
>> On 21/09/2018 10:20, Roman Kagan wrote:
>>> A significant part of hyperv.c is not actually tied to x86, and can
>>> be moved to hw/.
>>>
>>> This will allow to maintain most of Hyper-V and VMBus
>>> target-independent, and to avoid conflicts with inclusion of
>>> arch-specific headers down the road in VMBus implementation.
>>>
>>> Also this stuff can now be opt-out with CONFIG_HYPERV.
>>>
>>> Signed-off-by: Roman Kagan <address@hidden>
>>
>> We can squash this in too:
>>
>> diff --git a/hw/Makefile.objs b/hw/Makefile.objs
>> index b8f4675219..30722ccf98 100644
>> --- a/hw/Makefile.objs
>> +++ b/hw/Makefile.objs
> ...
>> -devices-dirs-$(CONFIG_SOFTMMU) += hyperv/
>> +devices-dirs-$(CONFIG_HYPERV) += hyperv/
> ...
>> --- a/hw/hyperv/Makefile.objs
>> +++ b/hw/hyperv/Makefile.objs
> ...
>> -obj-$(CONFIG_HYPERV) += hyperv.o
>> +obj-y += hyperv.o
>
> Actually I did it this way at first, but then decided to follow the
> pattern of virtio/, xen/, and most other subdirectories there just for
> consistency. Is there any preference for this?
It's half-and-half. For example, CONFIG_IPMI, CONFIG_SCSI,
CONFIG_VIRTFS work this way.
acpi/ and virtio/ use CONFIG_SOFTMMU just because they need to compile
acpi-stub.o/ipmi-stub.o/vhost-stub.o unconditionally. xen/ could be
changed if one was inclined to do it.
Paolo