vm: allow split of mem_anon_contig region
. so that memory of such regions can be deallocated in any order Change-Id: I34013d6085cf19a482412cf9bed6b7f96e60e1e6
This commit is contained in:
parent
45474c5368
commit
48e74378c7
2 changed files with 10 additions and 0 deletions
|
@ -15,6 +15,8 @@ static int anon_contig_pagefault(struct vmproc *vmp, struct vir_region *region,
|
|||
int len, int *io);
|
||||
static int anon_contig_sanitycheck(struct phys_region *pr, const char *file, int line);
|
||||
static int anon_contig_writable(struct phys_region *pr);
|
||||
static void anon_contig_split(struct vmproc *vmp, struct vir_region *vr,
|
||||
struct vir_region *r1, struct vir_region *r2);
|
||||
static int anon_contig_resize(struct vmproc *vmp, struct vir_region *vr, vir_bytes l);
|
||||
static int anon_contig_new(struct vir_region *vr);
|
||||
static int anon_contig_pt_flags(struct vir_region *vr);
|
||||
|
@ -26,6 +28,7 @@ struct mem_type mem_type_anon_contig = {
|
|||
.ev_unreference = anon_contig_unreference,
|
||||
.ev_pagefault = anon_contig_pagefault,
|
||||
.ev_resize = anon_contig_resize,
|
||||
.ev_split = anon_contig_split,
|
||||
.ev_sanitycheck = anon_contig_sanitycheck,
|
||||
.writable = anon_contig_writable,
|
||||
.pt_flags = anon_contig_pt_flags,
|
||||
|
@ -121,3 +124,9 @@ static int anon_contig_writable(struct phys_region *pr)
|
|||
return mem_type_anon.writable(pr);
|
||||
}
|
||||
|
||||
static void anon_contig_split(struct vmproc *vmp, struct vir_region *vr,
|
||||
struct vir_region *r1, struct vir_region *r2)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1160,6 +1160,7 @@ static int split_region(struct vmproc *vmp, struct vir_region *vr,
|
|||
if(!vr->def_memtype->ev_split) {
|
||||
printf("VM: split region not implemented for %s\n",
|
||||
vr->def_memtype->name);
|
||||
sys_diagctl_stacktrace(vmp->vm_endpoint);
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue