On 2018-09-28 16:22, Halil Pasic wrote:
> 
> 
> On 09/27/2018 02:29 PM, Thomas Huth wrote:
>>> +static void vfio_ap_bus_class_init(ObjectClass *klass, void *data)
>>> +{
>>> +    BusClass *k = BUS_CLASS(klass);
>> I think calling the variable "oc" (or something similar) instead of
>> "klass" is prefered nowadays.
>>
>>> +    k->get_dev_path = vfio_ap_bus_get_dev_path;
>>> +    /* More than one vfio-ap device does not make sense */
>>> +    k->max_dev = 1;
>> Would it make sense to set a DEVICE_CATEGORY here, too?
>>
> 
> It would be 
> set_bit(DEVICE_CATEGORY_MISC, dc->categories);
> I guess.
> 
> People seem to do this, but I'm not sure what is the actual impact of having
> DEVICE_CATEGORY_MISC set or not set, except for vfio_ap being listed as misc
> or uncategorized device respectively. Currently we have loader and vfio-ap
> uncategorized. Should loader become MISC too?

All devices that are visible in the output of "-device help" should have
a category. If no other category fits, it should be put into MISC. So
yes, loader should become MISC, too.

 Thomas

Reply via email to