search for: pfn_valid

Displaying 20 results from an estimated 46 matches for "pfn_valid".

2023 May 19
1
[PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling
On Fri, May 19, 2023 at 01:49:46PM +0100, Andrew Cooper wrote: > > The alternative would be to finally merge swiotlb-xen into swiotlb, in > > which case we might be able to do this later. Let me see what I can > > do there. > > If that is an option, it would be great to reduce the special-cashing. I think it's doable, and I've been wanting it for a while. I just
2005 Apr 25
3
BUG: xend oopses on munmap of /proc/xen/privcmd
This is with last night''s Xen snapshot (apr 24th), on kernel 2.6.12-rc3 - but the mess is so horrid that I''m not quite sure how to fix it... This oops prevents xen from starting xenU domains. Basically xend does the following: 1) mmap /proc/xen/privcmd 2) call an ioctl to populate the mmap 3) munmap the mapping created in (1) During the munmap, the dom0 kernel oopses, as
2007 Jun 11
5
[PATCH][Linux] gnttab: make dma address conversion logic of gnttab dma arch specific.
...ss space(maddr_t). With the terminology in xen/include/public/mm.h, dma_addr_t is maddr and maddr_t is gmaddr. So they should be handled differently with auto translated physmap mode enabled. - dma address conversion depends on dma api implementation and its paravirtualization. "pfn_valid(mfn_to_local_pfn(maddr >> PAGE_SHIFT)" check in gnttab_dma_map_page() doesn''t make sense with auto translate physmap mode enabled. To address those issues, split those logic from gnttab_dma_map_page() and gnttab_dma_unmap_page(), and put it into arch specific files. This pa...
2020 Jul 28
0
[vhost:vhost 38/45] include/linux/vdpa.h:43:21: error: expected ':', ',', ';', '}' or '__attribute__' before '.' token
...clude/asm-generic/bug.h:144:27: note: in definition of macro 'WARN_ON_ONCE' 144 | int __ret_warn_once = !!(condition); \ | ^~~~~~~~~ arch/m68k/include/asm/page_mm.h:170:25: note: in expansion of macro 'virt_addr_valid' 170 | #define pfn_valid(pfn) virt_addr_valid(pfn_to_virt(pfn)) | ^~~~~~~~~~~~~~~ include/linux/dma-mapping.h:352:19: note: in expansion of macro 'pfn_valid' 352 | if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr)))) | ^~~~~~~~~ -- In file includ...
2019 Aug 08
2
[PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk
...ut if the intent is to make sure > the device is still attached/enabled that check is invalidated at > put_dev_pagemap(). > > If it's the former case, validating ZONE_DEVICE pfns, I imagine we can > do something cheaper with a helper that is on the order of the same > cost as pfn_valid(). I.e. replace PTE_DEVMAP with a mem_section flag > or something similar. The hmm literally never dereferences the pgmap, so validity checking is the only explanation for it. > > + /* > > + * We do put_dev_pagemap() here so that we can leverage > &g...
2019 Sep 06
0
[vhost:linux-next 13/15] arch/ia64/include/asm/page.h:51:23: warning: "hpage_shift" is not defined, evaluates to 0
...nclude/asm-ia64/page.h Linus Torvalds 2005-04-16 94 #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 95 ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 96 #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 97 ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 98 #ifdef CONFIG_VIRTUAL_MEM_MAP ^1da177e4c3f41 include/asm-ia64/page.h Linus Torvalds 2005-04-16 99...
2019 Aug 07
2
[PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk
On Tue, Aug 06, 2019 at 07:05:42PM +0300, Christoph Hellwig wrote: > There is only a single place where the pgmap is passed over a function > call, so replace it with local variables in the places where we deal > with the pgmap. > > Signed-off-by: Christoph Hellwig <hch at lst.de> > mm/hmm.c | 62 ++++++++++++++++++++++++-------------------------------- > 1 file
2011 Oct 30
2
Module Error
...- Peace of code (simplified): int init_module () { unsigned long pfn; struct inode *ino; unsigned char * c; struct address_space *end; struct dentry *dentry; int fl; struct filepage * temp; struct filepage *pos; for (pfn = 0; pfn < num_physpages; pfn++) { struct page *page; if (!pfn_valid(pfn)) continue; page = pfn_to_page(pfn); if((page->mapping!=NULL) && (!PageAnon(page)) && (!PageSwapCache(page))) { end = page->mapping; if(end->host==NULL) { <- without this line, no hangs, but the module returns wrong data to me... printk(K...
2011 Oct 30
2
Module Error
...- Peace of code (simplified): int init_module () { unsigned long pfn; struct inode *ino; unsigned char * c; struct address_space *end; struct dentry *dentry; int fl; struct filepage * temp; struct filepage *pos; for (pfn = 0; pfn < num_physpages; pfn++) { struct page *page; if (!pfn_valid(pfn)) continue; page = pfn_to_page(pfn); if((page->mapping!=NULL) && (!PageAnon(page)) && (!PageSwapCache(page))) { end = page->mapping; if(end->host==NULL) { <- without this line, no hangs, but the module returns wrong data to me... printk(K...
2019 Aug 14
0
[PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk
...ure > > the device is still attached/enabled that check is invalidated at > > put_dev_pagemap(). > > > > If it's the former case, validating ZONE_DEVICE pfns, I imagine we can > > do something cheaper with a helper that is on the order of the same > > cost as pfn_valid(). I.e. replace PTE_DEVMAP with a mem_section flag > > or something similar. > > The hmm literally never dereferences the pgmap, so validity checking is > the only explanation for it. > > > > + /* > > > + * We do put_dev_pagemap() her...
2013 Jul 25
0
How to get the PFN of a vmalloc'ed address in a domU ?
...t;buffer_addr+recv_offset*PAGE_SIZE))) printk(KERN_INFO "Is virt addr\n"); unsigned long pfn = vmalloc_to_pfn((void *)(x->buffer_addr+recv_offset*PAGE_SIZE)); printk(KERN_INFO "PFN 1 : %lu\n", pfn); // The returned PFN is "0", it''s therefore useless if(pfn_valid(pfn)){ printk(KERN_INFO "PFN 1 est valide\n"); } struct page * shPage = vmalloc_to_page((void *)(x->buffer_addr+recv_offset*PAGE_SIZE)); if(!page_count(shPage)){ printk(KERN_INFO "Error in page_count\n"); // I get a page, but the function page_count fails } I also tr...
2010 Dec 13
0
[PATCH, RFC] x86/iommu: don''t map RAM holes above 4G
...age; i++ ) - amd_iommu_map_page(d, i, i, IOMMUF_readable|IOMMUF_writable); + for ( i = 0; i < max_pdx; i++ ) + { + unsigned long pfn = pdx_to_pfn(i); + + /* + * XXX Should we really map all non-RAM (above 4G)? Minimally + * a pfn_valid() check would seem desirable here. + */ + amd_iommu_map_page(d, pfn, pfn, IOMMUF_readable|IOMMUF_writable); + } } amd_iommu_setup_dom0_devices(d); --- a/xen/drivers/passthrough/vtd/x86/vtd.c +++ b/xen/drivers/passthrough/vtd/x86/vtd.c @@ -129,14 +129,14 @@...
2019 Aug 07
0
[PATCH 04/15] mm: remove the pgmap field from struct hmm_vma_walk
...y some ZONE_DEVICE instance, but if the intent is to make sure the device is still attached/enabled that check is invalidated at put_dev_pagemap(). If it's the former case, validating ZONE_DEVICE pfns, I imagine we can do something cheaper with a helper that is on the order of the same cost as pfn_valid(). I.e. replace PTE_DEVMAP with a mem_section flag or something similar. > > > } > > pfns[i] = hmm_device_entry_from_pfn(range, pfn) | cpu_flags; > > } > > - if (hmm_vma_walk->pgmap) { > > - put_dev_pagemap(hmm_v...
2010 Aug 05
0
[GIT PULL] x86/mm for 2.6.36
...or (pfn = phys_addr >> PAGE_SHIFT; - (pfn << PAGE_SHIFT) < (last_addr & PAGE_MASK); - pfn++) { - + last_pfn = last_addr >> PAGE_SHIFT; + for (pfn = phys_addr >> PAGE_SHIFT; pfn <= last_pfn; pfn++) { int is_ram = page_is_ram(pfn); if (is_ram && pfn_valid(pfn) && !PageReserved(pfn_to_page(pfn))) @@ -115,7 +113,7 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr, * Mappings have to be page-aligned */ offset = phys_addr & ~PAGE_MASK; - phys_addr &= PAGE_MASK; + phys_addr &= PHYSICAL_PAGE_MASK; size = PAGE...
2008 Mar 28
12
[PATCH 00/12] Xen arch portability patches (take 4)
Hi Jeremy. According to your suggestion, I recreated patches for Ingo's x86.git tree. And this patch series includes Eddie's modification. Please review and forward them. (or push back to respin.) Recently the xen-ia64 community started to make efforts to merge xen/ia64 Linux to upstream. The first step is to merge up domU portion. This patchset is preliminary for xen/ia64 domU linux
2008 Mar 28
12
[PATCH 00/12] Xen arch portability patches (take 4)
Hi Jeremy. According to your suggestion, I recreated patches for Ingo's x86.git tree. And this patch series includes Eddie's modification. Please review and forward them. (or push back to respin.) Recently the xen-ia64 community started to make efforts to merge xen/ia64 Linux to upstream. The first step is to merge up domU portion. This patchset is preliminary for xen/ia64 domU linux
2008 Nov 13
69
[PATCH 00 of 38] xen: add more Xen dom0 support
Hi Ingo, Here''s the chunk of patches to add Xen Dom0 support (it''s probably worth creating a new xen/dom0 topic branch for it). A dom0 Xen domain is basically the same as a normal domU domain, but it has extra privileges to directly access hardware. There are two issues to deal with: - translating to and from the domain''s pseudo-physical addresses and real machine
2008 Mar 05
51
[PATCH 00/50] ia64/xen take 3: ia64/xen domU paravirtualization
Hi. This patchset implements xen/ia64 domU support. Qing He and Eddie Dong also has been woring on pv_ops so that I want to discuss before going further and avoid duplicated work. I suppose that Eddie will also post his own patch. So reviewing both patches, we can reach to better pv_ops interface. - I didn't changed the ia64 intrinsic paravirtulization abi from the last post. Presumably it
2008 Mar 05
51
[PATCH 00/50] ia64/xen take 3: ia64/xen domU paravirtualization
Hi. This patchset implements xen/ia64 domU support. Qing He and Eddie Dong also has been woring on pv_ops so that I want to discuss before going further and avoid duplicated work. I suppose that Eddie will also post his own patch. So reviewing both patches, we can reach to better pv_ops interface. - I didn't changed the ia64 intrinsic paravirtulization abi from the last post. Presumably it
2007 Apr 18
20
[patch 00/20] XEN-paravirt: Xen guest implementation for paravirt_ops interface
This patch series implements the Linux Xen guest in terms of the paravirt-ops interface. The features in implemented this patch series are: * domU only * UP only (most code is SMP-safe, but there's no way to create a new vcpu) * writable pagetables, with late pinning/early unpinning (no shadow pagetable support) * supports both PAE and non-PAE modes * xen console * virtual block