Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Changelog

[xen-unstable] mem_access: fix setting default mem_access type

 

 

Xen changelog RSS feed   Index | Next | Previous | View Threaded


patchbot at xen

Apr 19, 2012, 4:00 AM

Post #1 of 1 (86 views)
Permalink
[xen-unstable] mem_access: fix setting default mem_access type

# HG changeset patch
# User Aravindh Puthiyaparambil <aravindh [at] virtuata>
# Date 1334752727 -3600
# Node ID b595d2f08d1bae7df7705b87cb95951877a4c3b8
# Parent 4bef0d26789c6d69c028515688f716003f6a9a85
mem_access: fix setting default mem_access type

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 [at] virtuata>
Acked-by: Tim Deegan <tim [at] xen>
Committed-by: Tim Deegan <tim [at] xen>
---



diff -r 4bef0d26789c -r b595d2f08d1b xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c Wed Apr 18 13:38:47 2012 +0100
+++ b/xen/arch/x86/hvm/hvm.c Wed Apr 18 13:38:47 2012 +0100
@@ -4195,9 +4195,10 @@ long do_hvm_op(unsigned long op, XEN_GUE
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-changelog mailing list
Xen-changelog [at] lists
http://lists.xensource.com/xen-changelog

Xen changelog RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.