From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>, xen-devel@lists.xenproject.org
Cc: Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v1 for-4.6 2/2] xen: prevent access to HPET from Dom0
Date: Thu, 18 Dec 2014 18:51:57 +0000 [thread overview]
Message-ID: <5493224D.9050001@citrix.com> (raw)
In-Reply-To: <1418927225-60266-3-git-send-email-roger.pau@citrix.com>
On 18/12/14 18:27, Roger Pau Monne wrote:
> Prevent Dom0 from accessing HPET MMIO region by adding it to the list of
> denied memory regions.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Apologies that this reply is split between patch 0 and 2 - I replied to
your cover letter before reading this patch.
Denying access is only valid if acpi_table_hpet.flags &
ACPI_HPET_PAGE_PROTECT4 is true.
~Andrew
> ---
> xen/arch/x86/domain_build.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
> index aa3bf0f..788f7db 100644
> --- a/xen/arch/x86/domain_build.c
> +++ b/xen/arch/x86/domain_build.c
> @@ -36,6 +36,9 @@
> #include <asm/bzimage.h> /* for bzimage_parse */
> #include <asm/io_apic.h>
> #include <asm/hap.h>
> +#ifdef CONFIG_HPET_TIMER
> +#include <asm/hpet.h> /* for hpet_address */
> +#endif
>
> #include <public/version.h>
>
> @@ -1516,6 +1519,15 @@ int __init construct_dom0(
> rc |= iomem_deny_access(d, sfn, efn);
> }
>
> +#ifdef CONFIG_HPET_TIMER
> + /* Prevent access to HPET */
> + if ( hpet_address != 0 )
> + {
> + mfn = paddr_to_pfn(hpet_address);
> + rc |= iomem_deny_access(d, mfn, mfn);
> + }
> +#endif
> +
> BUG_ON(rc != 0);
>
> if ( elf_check_broken(&elf) )
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-12-18 18:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-18 18:27 [PATCH v1 for-4.6 1/2] xen: fixes for PVH Dom0 MMIO regions Roger Pau Monne
2014-12-18 18:27 ` [PATCH v1 for-4.6 1/2] xen/pvh: check permissions when adding " Roger Pau Monne
2014-12-18 19:05 ` Andrew Cooper
2014-12-19 9:06 ` Jan Beulich
2014-12-18 18:27 ` [PATCH v1 for-4.6 2/2] xen: prevent access to HPET from Dom0 Roger Pau Monne
2014-12-18 18:51 ` Andrew Cooper [this message]
2014-12-19 8:04 ` Roger Pau Monné
2014-12-19 11:25 ` Andrew Cooper
2014-12-19 9:02 ` Jan Beulich
2014-12-19 9:11 ` Jan Beulich
2014-12-19 11:32 ` Andrew Cooper
2014-12-19 13:08 ` Jan Beulich
2014-12-19 9:01 ` Jan Beulich
2014-12-18 18:39 ` [PATCH v1 for-4.6 1/2] xen: fixes for PVH Dom0 MMIO regions Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5493224D.9050001@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.