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

Re: [Xen-devel] [PATCH v6 11/29] xen/x86: add bitmap of enabled emulated devices



>>> On 04.09.15 at 14:08, <roger.pau@xxxxxxxxxx> wrote:
> --- a/xen/include/asm-x86/domain.h
> +++ b/xen/include/asm-x86/domain.h
> @@ -387,8 +387,21 @@ struct arch_domain
>      bool_t mem_access_emulate_enabled;
>  
>      struct monitor_write_data *event_write_data;
> +
> +    /* Emulated devices enabled bitmap. */
> +    uint32_t emulation_flags;
>  } __cacheline_aligned;
>  
> +#define has_vlapic(d)       ((d)->arch.emulation_flags & XEN_X86_EMU_LAPIC)
> +#define has_vhpet(d)        ((d)->arch.emulation_flags & XEN_X86_EMU_HPET)
> +#define has_vpmtimer(d)     ((d)->arch.emulation_flags & XEN_X86_EMU_PMTIMER)
> +#define has_vrtc(d)         ((d)->arch.emulation_flags & XEN_X86_EMU_RTC)
> +#define has_vioapic(d)      ((d)->arch.emulation_flags & XEN_X86_EMU_IOAPIC)
> +#define has_vpic(d)         ((d)->arch.emulation_flags & XEN_X86_EMU_PIC)
> +#define has_vpmu(d)         ((d)->arch.emulation_flags & XEN_X86_EMU_PMU)
> +#define has_vvga(d)         ((d)->arch.emulation_flags & XEN_X86_EMU_VGA)
> +#define has_viommu(d)       ((d)->arch.emulation_flags & XEN_X86_EMU_IOMMU)

And btw, now that I saw a few uses of these - do they really all need
to be has_v*() instead of just has_*()? Together with the macros taking
a domain pointer it's quite obvious that talk is about virtual devices...

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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