On 28.01.2025 00:57, Jason Andryuk wrote:
> On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote:
>> --- /dev/null
>> +++ b/xen/include/public/virtdev.h
>> @@ -0,0 +1,61 @@
>> +/* SPDX-License-Identifier: GPL-2.0-only */
>> +#ifndef XEN__PUBLIC_VIRTDEV_H
>> +#define XEN__PUBLIC_VIRTDEV_H
>> +
>> +/*
>> + * Domain hardware emulation flags.
>> + */
>> +enum {
>> +    VIRTDEV_LAPIC      = 1U << 0,
>> +    VIRTDEV_HPET       = 1U << 1,
>> +    VIRTDEV_PM         = 1U << 2,
>> +    VIRTDEV_RTC        = 1U << 3,
>> +    VIRTDEV_IOAPIC     = 1U << 4,
>> +    VIRTDEV_PIC        = 1U << 5,
>> +    VIRTDEV_VGA        = 1U << 6,
>> +    VIRTDEV_IOMMU      = 1U << 7,
>> +    VIRTDEV_PIT        = 1U << 8,
>> +    VIRTDEV_PIRQ       = 1U << 9,
>> +    VIRTDEV_PCI        = 1U << 10,
>> +};
> 
> If you do create this new header, I think you'll want to leave these as 
> just bit numbers and shifts.  IIRC, the headers strive for greatest 
> compatibility and, enums are less rigorously defined.

+1 - any use of enums we have in the public headers was a mistake. (I'm
yet to figure why we need this new header in the first place.)

Jan

Reply via email to