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

Re: [Xen-devel] [PATCH v3 3/3] xen: prevent access to HPET from Dom0



>>> On 22.01.15 at 16:19, <roger.pau@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/domain_build.c
> +++ b/xen/arch/x86/domain_build.c
> @@ -36,6 +36,7 @@
>  #include <asm/bzimage.h> /* for bzimage_parse */
>  #include <asm/io_apic.h>
>  #include <asm/hap.h>
> +#include <asm/hpet.h> /* for hpet_address */

Please drop the comment - with hpet_flags it's now stale

> @@ -1495,6 +1499,16 @@ int __init construct_dom0(
>              rc |= iomem_deny_access(d, sfn, efn);
>      }
>  
> +    /* Prevent access to HPET */
> +    if ( hpet_address != 0 )
> +    {
> +        mfn = paddr_to_pfn(hpet_address);
> +        if ( hpet_flags & ACPI_HPET_PAGE_PROTECT4 )

The constant isn't a binary mask, you need to also use
ACPI_HPET_PAGE_PROTECT_MASK. I further can't see why
you wouldn't want to also handle ACPI_HPET_PAGE_PROTECT64.

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®.