[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 06/24] xen/domain: introduce hardware emulation flags
On 2025-01-03 20:58, Denis Mukhin via B4 Relay wrote: From: Denis Mukhin <dmukhin@xxxxxxxx> Define an architecture-independent location for describing hardware emulation flags for configuring in-hypervisor emulators. I'm not sure about this. It's a lot of churn. The common internal handling makes sense, but specifying in a domain architecture-specific fashion seems okay. Letting ARM specify EMU_VPL011 and x86 EMU_UART better aligns with the rest of the architecture-specific emulation flags. Print d->arch.emulation_flags from 'q' keyhandler for better traceability while debugging in-hypervisor hardware emulators. Also, expanded the error message in arch_domain_create() in x86 case when user-defined domain emulation_flags are incompatible w/ platform supported emulation_flags. These two seem okay, but could be in their own patch. Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx> diff --git a/xen/include/public/virtdev.h b/xen/include/public/virtdev.h new file mode 100644 index 0000000000000000000000000000000000000000..27434377ecacfe069a91dea3768d14b0c14e08b4 --- /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. Regards, Jason
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |