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

Re: [Xen-devel] [PATCH v5 04/13] pvh/acpi: Install handlers for ACPI-related PVH IO accesses



>>> On 17.12.16 at 00:18, <boris.ostrovsky@xxxxxxxxxx> wrote:
> --- a/xen/include/public/arch-x86/hvm/save.h
> +++ b/xen/include/public/arch-x86/hvm/save.h
> @@ -527,7 +527,37 @@ DECLARE_HVM_SAVE_TYPE(HPET, 12, struct hvm_hw_hpet);
>  /*
>   * PM timer
>   */
> +#if __XEN_INTERFACE_VERSION__ >= 0x00040800
> +struct hvm_hw_pmtimer {
> +    uint32_t tmr_val;   /* PM_TMR_BLK.TMR_VAL: 32bit free-running counter */
> +    uint16_t pm1a_sts;  /* PM1a_EVT_BLK.PM1a_STS: status register */
> +    uint16_t pm1a_en;   /* PM1a_EVT_BLK.PM1a_EN: enable register */
> +#if defined(__XEN__) || defined(__XEN_TOOLS__)
> +    uint16_t gpe0_sts;
> +    uint16_t gpe0_en;
> +#endif

Why inside another #ifdef? There's no other example in this file
which might have suggested to you that it needs doing this way.
In fact there are also no pre-existing uses of
__XEN_INTERFACE_VERSION__ in this header, so I also don't see
why you added one (and then with a slightly off value check).

If anything the _whole_ header would need to become Xen/tools
only.

> +static inline int _hvm_hw_fix_pmtimer(void *h, uint32_t size)
> +{
> +#if defined(__XEN__) || defined(__XEN_TOOLS__)
> +    struct hvm_hw_pmtimer *acpi = (struct hvm_hw_pmtimer *)h;
> +
> +    if ( size == sizeof(struct hvm_hw_pmtimer_compat) )
> +        acpi->gpe0_sts = acpi->gpe0_en = 0;
> +#endif

Same here.

Jan


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

 


Rackspace

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