Displaying 20 results from an estimated 91 matches for "vm_page_prot".
2020 Jun 01
2
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...All errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/vhost/vdpa.c: In function 'vhost_vdpa_fault':
>> drivers/vhost/vdpa.c:754:22: error: implicit declaration of function 'pgprot_noncached' [-Werror=implicit-function-declaration]
754 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
| ^~~~~~~~~~~~~~~~
>> drivers/vhost/vdpa.c:754:22: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int'
cc1: some warnings being treated as errors
vi...
2020 Jun 01
2
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...All errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/vhost/vdpa.c: In function 'vhost_vdpa_fault':
>> drivers/vhost/vdpa.c:754:22: error: implicit declaration of function 'pgprot_noncached' [-Werror=implicit-function-declaration]
754 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
| ^~~~~~~~~~~~~~~~
>> drivers/vhost/vdpa.c:754:22: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int'
cc1: some warnings being treated as errors
vi...
2020 Jun 02
2
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...>>, old ones prefixed by <<):
>>
>> drivers/vhost/vdpa.c: In function 'vhost_vdpa_fault':
>>>> drivers/vhost/vdpa.c:754:22: error: implicit declaration of function 'pgprot_noncached' [-Werror=implicit-function-declaration]
>> 754 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
>> | ^~~~~~~~~~~~~~~~
>>>> drivers/vhost/vdpa.c:754:22: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int'
>> cc1: some warnings b...
2020 Jun 02
2
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...>>, old ones prefixed by <<):
>>
>> drivers/vhost/vdpa.c: In function 'vhost_vdpa_fault':
>>>> drivers/vhost/vdpa.c:754:22: error: implicit declaration of function 'pgprot_noncached' [-Werror=implicit-function-declaration]
>> 754 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
>> | ^~~~~~~~~~~~~~~~
>>>> drivers/vhost/vdpa.c:754:22: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int'
>> cc1: some warnings b...
2020 Jun 03
2
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...<<):
>>>>
>>>> drivers/vhost/vdpa.c: In function 'vhost_vdpa_fault':
>>>>>> drivers/vhost/vdpa.c:754:22: error: implicit declaration of function 'pgprot_noncached' [-Werror=implicit-function-declaration]
>>>> 754 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
>>>> | ^~~~~~~~~~~~~~~~
>>>>>> drivers/vhost/vdpa.c:754:22: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int'
>>>&...
2020 Jun 03
2
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...<<):
>>>>
>>>> drivers/vhost/vdpa.c: In function 'vhost_vdpa_fault':
>>>>>> drivers/vhost/vdpa.c:754:22: error: implicit declaration of function 'pgprot_noncached' [-Werror=implicit-function-declaration]
>>>> 754 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
>>>> | ^~~~~~~~~~~~~~~~
>>>>>> drivers/vhost/vdpa.c:754:22: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int'
>>>&...
2023 Jan 29
0
[PATCH v3 1/2] vdpa: support specify the pgprot of vq notification area
...host/vdpa.c
> index 166044642fd5..036fe88425c8 100644
> --- a/drivers/vhost/vdpa.c
> +++ b/drivers/vhost/vdpa.c
> @@ -1263,7 +1263,9 @@ static vm_fault_t vhost_vdpa_fault(struct vm_fault *vmf)
>
> notify = ops->get_vq_notification(vdpa, index);
>
> - vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> + vma->vm_page_prot = ops->get_vq_notification_pgprot ?
> + ops->get_vq_notification_pgprot(vdpa, index, vma->vm_page_prot) :
> + pgprot_noncached(vma->vm_page_prot);
> if (remap_pfn_ran...
2024 Jan 24
1
[PATCH] mm: Remove double faults once write a device pfn
...double faults on arm64 when call
>> vmf_insert_pfn_prot.
>>
>> Well, that doesn't answer my question why arm64 is double faulting in the
>> first place,.
>>
>
>
> Eh.
>
> On arm64 When userspace mmap() with PROT_WRITE and MAP_SHARED the
> vma->vm_page_prot has the PTE_RDONLY and PTE_WRITE within
> PAGE_SHARED_EXEC. (seeing arm64 protection_map)
>
> When write the userspace virtual address the first fault happen and call
> into driver's .fault->ttm_bo_vm_fault_reserved->vmf_insert_pfn_prot->insert_pfn.
> The insert_pfn will...
2024 Jan 22
2
[PATCH] mm: Remove double faults once write a device pfn
...t; @@ -185,7 +185,8 @@ static vm_fault_t vvar_fault(const struct vm_special_mapping *sm,
> if (pvti && vclock_was_used(VDSO_CLOCKMODE_PVCLOCK)) {
> return vmf_insert_pfn_prot(vma, vmf->address,
> __pa(pvti) >> PAGE_SHIFT,
> - pgprot_decrypted(vma->vm_page_prot));
> + pgprot_decrypted(vma->vm_page_prot),
> + true);
> }
> } else if (sym_offset == image->sym_hvclock_page) {
> pfn = hv_get_tsc_pfn();
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
> index 49a5f1c73...
2020 Jun 02
0
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...es prefixed by >>, old ones prefixed by <<):
>
> drivers/vhost/vdpa.c: In function 'vhost_vdpa_fault':
> >> drivers/vhost/vdpa.c:754:22: error: implicit declaration of function 'pgprot_noncached' [-Werror=implicit-function-declaration]
> 754 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> | ^~~~~~~~~~~~~~~~
> >> drivers/vhost/vdpa.c:754:22: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int'
> cc1: some warnings being treate...
2024 Jan 23
2
[PATCH] mm: Remove double faults once write a device pfn
...clock_was_used(VDSO_CLOCKMODE_PVCLOCK))
>> {
>>> return vmf_insert_pfn_prot(vma, vmf->address,
>>> __pa(pvti) >> PAGE_SHIFT,
>>> - pgprot_decrypted(vma-
>>> vm_page_prot));
>>> + pgprot_decrypted(vma-
>>> vm_page_prot),
>>> + true);
>>> }
>>> } else if (sym_offset == image->sym_hvclock_page) {
>>> pfn = hv_get_t...
2020 Jun 02
0
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...d by <<):
> > >
> > > drivers/vhost/vdpa.c: In function 'vhost_vdpa_fault':
> > > > > drivers/vhost/vdpa.c:754:22: error: implicit declaration of function 'pgprot_noncached' [-Werror=implicit-function-declaration]
> > > 754 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> > > | ^~~~~~~~~~~~~~~~
> > > > > drivers/vhost/vdpa.c:754:22: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int'
> > >...
2024 Jan 24
2
[PATCH] mm: Remove double faults once write a device pfn
...t;>>> {
>>>>> return vmf_insert_pfn_prot(vma, vmf->address,
>>>>> __pa(pvti) >> PAGE_SHIFT,
>>>>> - pgprot_decrypted(vma-
>>>>> vm_page_prot));
>>>>> + pgprot_decrypted(vma-
>>>>> vm_page_prot),
>>>>> + true);
>>>>> }
>>>>> } else if (sym_offset == image->sym_hvclock_page)...
2019 Dec 10
3
[PATCH] drm/virtio: fix mmap page attributes
virtio-gpu uses cached mappings. shmem helpers use writecombine though.
So roll our own mmap function, wrapping drm_gem_shmem_mmap(), to tweak
vm_page_prot accordingly.
Reported-by: Gurchetan Singh <gurchetansingh at chromium.org>
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
drivers/gpu/drm/virtio/virtgpu_object.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virt...
2020 Jun 03
0
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...> > > > > drivers/vhost/vdpa.c: In function 'vhost_vdpa_fault':
> > > > > > > drivers/vhost/vdpa.c:754:22: error: implicit declaration of function 'pgprot_noncached' [-Werror=implicit-function-declaration]
> > > > > 754 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> > > > > | ^~~~~~~~~~~~~~~~
> > > > > > > drivers/vhost/vdpa.c:754:22: error: incompatible types when assigning to type 'pgprot_t' {aka 'struct <anonymous>'} from type 'int&...
2019 Dec 10
3
[PATCH] drm/virtio: fix mmap page attributes
virtio-gpu uses cached mappings. shmem helpers use writecombine though.
So roll our own mmap function, wrapping drm_gem_shmem_mmap(), to tweak
vm_page_prot accordingly.
Reported-by: Gurchetan Singh <gurchetansingh at chromium.org>
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
drivers/gpu/drm/virtio/virtgpu_object.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virt...
2020 May 29
1
[PATCH 4/6] vhost_vdpa: support doorbell mapping via mmap
...onst struct vdpa_config_ops *ops = vdpa->config;
> + struct vdpa_notification_area notify;
> + struct vm_area_struct *vma = vmf->vma;
> + u16 index = vma->vm_pgoff;
> +
> + notify = ops->get_vq_notification(vdpa, index);
> +
> + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
> + if (remap_pfn_range(vma, vmf->address & PAGE_MASK,
> + notify.addr >> PAGE_SHIFT, PAGE_SIZE,
> + vma->vm_page_prot))
> + return VM_FAULT_SIGBUS;
> +
&...
2019 Sep 17
0
[PATCH v2 02/11] drm/shmem: switch shmem helper to &drm_gem_object_funcs.mmap
Switch gem shmem helper to the new mmap() workflow,
from &gem_driver.fops.mmap to &drm_gem_object_funcs.mmap.
v2: Fix vm_flags and vm_page_prot handling.
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
include/drm/drm_gem_shmem_helper.h | 6 ++----
drivers/gpu/drm/drm_gem_shmem_helper.c | 28 +++++++++----------------
drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +-
drivers/gpu/drm/v3d/v3d_bo.c | 2 +-
dr...
2019 Sep 19
0
[PATCH v3 02/11] drm/shmem: switch shmem helper to &drm_gem_object_funcs.mmap
Switch gem shmem helper to the new mmap() workflow,
from &gem_driver.fops.mmap to &drm_gem_object_funcs.mmap.
v2: Fix vm_flags and vm_page_prot handling.
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
include/drm/drm_gem_shmem_helper.h | 6 ++----
drivers/gpu/drm/drm_gem_shmem_helper.c | 28 +++++++++----------------
drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +-
drivers/gpu/drm/v3d/v3d_bo.c | 2 +-
dr...
2019 Oct 16
0
[PATCH v4 02/11] drm/shmem: switch shmem helper to &drm_gem_object_funcs.mmap
Switch gem shmem helper to the new mmap() workflow,
from &gem_driver.fops.mmap to &drm_gem_object_funcs.mmap.
v2: Fix vm_flags and vm_page_prot handling.
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
Reviewed-by: Steven Price <steven.price at arm.com>
---
include/drm/drm_gem_shmem_helper.h | 6 ++----
drivers/gpu/drm/drm_gem_shmem_helper.c | 28 +++++++++----------------
drivers/gpu/drm/panfrost/panfrost_gem.c |...