[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/3] xen/arm: grant-table: Support read-only mapping
Use guest_physmap_add_page_rw to map the page in the guest with a specific read-write attribute. Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> --- xen/arch/arm/mm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index eaeb0c3..e45c6aa 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -1262,19 +1262,15 @@ int create_grant_host_mapping(unsigned long addr, unsigned long frame, unsigned int flags, unsigned int cache_flags) { int rc; + bool_t rw; if ( cache_flags || (flags & ~GNTMAP_readonly) != GNTMAP_host_map ) return GNTST_general_error; - /* XXX: read only mappings */ - if ( flags & GNTMAP_readonly ) - { - gdprintk(XENLOG_WARNING, "read only mappings not implemented yet\n"); - return GNTST_general_error; - } + rw = !(flags & GNTMAP_readonly); - rc = guest_physmap_add_page(current->domain, - addr >> PAGE_SHIFT, frame, 0); + rc = guest_physmap_add_page_rw(current->domain, + addr >> PAGE_SHIFT, frame, 0, rw); if ( rc ) return GNTST_general_error; else -- 1.8.3.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |