diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2010-11-11 12:37:43 -0800 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-11-11 12:37:43 -0800 |
commit | e060e7af98182494b764d002eba7fa022fe91bdf (patch) | |
tree | 556b1a8c0d5cddf245c18bf220259691fb8f31d3 /arch/x86 | |
parent | 313e74412105c670ff8900ec8099a3a5df1fa83c (diff) | |
download | linux-e060e7af98182494b764d002eba7fa022fe91bdf.tar.gz linux-e060e7af98182494b764d002eba7fa022fe91bdf.tar.bz2 linux-e060e7af98182494b764d002eba7fa022fe91bdf.zip |
xen: set vma flag VM_PFNMAP in the privcmd mmap file_op
Set VM_PFNMAP in the privcmd mmap file_op, rather than later in
xen_remap_domain_mfn_range when it is too late because
vma_wants_writenotify has already been called and vm_page_prot has
already been modified.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/xen/mmu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index f08ea045620f..792de4349c79 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -2299,7 +2299,8 @@ int xen_remap_domain_mfn_range(struct vm_area_struct *vma, prot = __pgprot(pgprot_val(prot) | _PAGE_IOMAP); - vma->vm_flags |= VM_IO | VM_RESERVED | VM_PFNMAP; + BUG_ON(!((vma->vm_flags & (VM_PFNMAP | VM_RESERVED | VM_IO)) == + (VM_PFNMAP | VM_RESERVED | VM_IO))); rmd.mfn = mfn; rmd.prot = prot; |