From: Keir Fraser <keir@xen.org>
To: Aravindh Puthiyaparambil <aravindh@virtuata.com>,
xen-devel@lists.xensource.com
Cc: Tim Deegan <tim@xen.org>
Subject: Re: [PATCH] mem_access: fix setting default mem_access type
Date: Wed, 18 Apr 2012 09:32:19 +0100 [thread overview]
Message-ID: <CBB43AA3.3E628%keir@xen.org> (raw)
In-Reply-To: <CAB10MZA-64tOohf5_1-8LJ52E3dUC0xOYSUPRgUgeqC3mOBhKQ@mail.gmail.com>
On 18/04/2012 02:09, "Aravindh Puthiyaparambil" <aravindh@virtuata.com>
wrote:
> When xc_hvm_set_mem_access(xch, domain_id, default_access, ~0ull, 0)
> is called, first_pfn=~0ull is a hint to HVMOP_set_mem_access as to
> what the default mem_access type is for the domain. This call was
> failing because it was gated by the memory range check in the
> HVMOP_set_mem_access case statement in do_hvm_op(). The following
> patch fixes this issue.
>
> Signed-off-by: Aravindh Puthiyaparambil <aravindh@virtuata.com>
Looks okay to me. Probably should be checked and applied by Tim.
-- Keir
> ---
> xen/arch/x86/hvm/hvm.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff -r a06e6cdeafe3 xen/arch/x86/hvm/hvm.c
> --- a/xen/arch/x86/hvm/hvm.c Mon Apr 16 13:05:28 2012 +0200
> +++ b/xen/arch/x86/hvm/hvm.c Tue Apr 17 18:03:37 2012 -0700
> @@ -4170,9 +4170,10 @@
> goto param_fail5;
>
> rc = -EINVAL;
> - if ( (a.first_pfn > domain_get_maximum_gpfn(d)) ||
> + if ( (a.first_pfn != ~0ull) &&
> + ((a.first_pfn > domain_get_maximum_gpfn(d)) ||
> ((a.first_pfn + a.nr - 1) < a.first_pfn) ||
> - ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
> + ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d))) )
> goto param_fail5;
>
> rc = p2m_set_mem_access(d, a.first_pfn, a.nr, a.hvmmem_access);
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2012-04-18 8:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-18 1:09 [PATCH] mem_access: fix setting default mem_access type Aravindh Puthiyaparambil
2012-04-18 8:32 ` Keir Fraser [this message]
2012-04-18 12:40 ` Tim Deegan
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=CBB43AA3.3E628%keir@xen.org \
--to=keir@xen.org \
--cc=aravindh@virtuata.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xensource.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).