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

Re: [Xen-devel] [PATCH for-next RFC 4/8] x86: factor out xen variants for hypervisor setup code



On 27.09.2019 13:30, Wei Liu wrote:
> On Wed, Sep 25, 2019 at 12:23:54PM +0200, Roger Pau Monné wrote:
>> Also it might be nice to introduce something like:
>>
>> enum guest_type {
>>     XEN_GUEST,
>> } guest_type;
>>
> 
> This works for me.
> 
>> So that you can add a switch here, even if the only case is Xen ATM. I
>> guess this will be done in a later patch, or introduce an
>> hypervisor_ops struct that contain pointers to functions to allow for
>> different implementations.
>>
> 
> I debated this. These changes require more code churn with no apparent
> benefit, but if people agree this is better I can make those changes.

Well, if the expectation is for the enum to grow (even just by one
further entry), then yes, I'd agree that a switch() would be nice.

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.