search for: mfn_to_pfn

Displaying 20 results from an estimated 82 matches for "mfn_to_pfn".

2005 Dec 07
5
[PATCH] Arch-neutral balloon driver
...3 2005 @@ -65,6 +65,8 @@ extern unsigned long *phys_to_machine_mapping; #define pfn_to_mfn(pfn) \ (phys_to_machine_mapping[(unsigned int)(pfn)] & ~(1UL<<31)) +#define phys_to_machine_mapping_valid(pfn) \ + (phys_to_machine_mapping[pfn] != INVALID_P2M_ENTRY) static inline unsigned long mfn_to_pfn(unsigned long mfn) { unsigned long pfn; diff -r 0255f48b757f linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypercall.h --- a/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypercall.h Sun Dec 4 19:12:00 2005 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-ia64/hypercall.h Tue Dec 6 16:25:53 2005 @...
2008 Mar 19
10
Illegal PV kernel pfm/pfn translations on PROT_NONE ioremaps
...these pages and is caught by the pte_present() tests.) Unfortunately, it looks like recent X servers are attempting to do mprotect(PROT_NONE) and back on regions of ioremap()ed memory. When we do so, the translation of mfn to pfn results on x86_64 in end_pfn: maddr.h: static inline unsigned long mfn_to_pfn(unsigned long mfn) { ... if (unlikely((mfn >> machine_to_phys_order) != 0)) return end_pfn; and when we do mprotect(PROT_READ) later on on the same ptes, this end_pfn value is illegal: maddr.h: static inline unsigned long pfn_to_mfn(unsigned long pfn) { BUG_ON(end_pfn && pfn &gt...
2007 Jan 16
0
[PATCH] linux/i386: enhance dump_fault_path() in the highpte case
...,9 +232,12 @@ static void dump_fault_path(unsigned lon p += (address >> 21) * 2; printk(KERN_ALERT "%08lx -> *pme = %08lx:%08lx\n", page, p[1], p[0]); -#ifndef CONFIG_HIGHPTE + mfn = (p[0] >> PAGE_SHIFT) | (p[1] << 20); +#ifdef CONFIG_HIGHPTE + if (mfn_to_pfn(mfn) >= highstart_pfn) + return; +#endif if (p[0] & 1) { - mfn = (p[0] >> PAGE_SHIFT) | (p[1] << 20); page = mfn_to_pfn(mfn) << PAGE_SHIFT; p = (unsigned long *) __va(page); address &= 0x001fffff; @@ -242,7 +245,6 @@ static void dump_fault_path(uns...
2013 Aug 27
1
[PATCH] xen/balloon: don't set P2M entry for auto translated guest
...lloon.c index a3dc75d..3101cf6 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c @@ -430,8 +430,13 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) /* No more mappings: invalidate P2M and add to balloon. */ for (i = 0; i < nr_pages; i++) { pfn = mfn_to_pfn(frame_list[i]); - __set_phys_to_machine(pfn, - pfn_to_mfn(page_to_pfn(__get_cpu_var(balloon_scratch_page)))); + if (!xen_feature(XENFEAT_auto_translated_physmap)) { + unsigned long p; + struct page *pg; + pg = __get_cpu_var(balloon_scratch_page); + p = page_to_pfn(pg); + __set_phys_t...
2005 Aug 22
4
Kernel build help
...rs in.) drivers/xen/balloon/balloon.c:218: error: `INVALID_P2M_ENTRY'' undeclared (first use in this function) drivers/xen/balloon/balloon.c:261: warning: implicit declaration of function `scrub_pages'' drivers/xen/balloon/balloon.c:283: warning: implicit declaration of function `mfn_to_pfn'' make[3]: *** [drivers/xen/balloon/balloon.o] Error 1 make[2]: *** [drivers/xen/balloon] Error 2 make[1]: *** [drivers/xen] Error 2 make: *** [drivers] Error 2 Does anyone know what caused this error? I need to try and build this kernel and get it to boot, I think I also need to build a...
2012 Jan 21
2
[Ques]:xen_ident_map_ISA ant it's mfns...
Hi, I am bit confused about the do_update_va_mapping call that dom0 makes in xen_ident_map_ISA() to map ffff8800000a0000 to mfn a0. The mfn belongs to DOMID_IO. Before the mfn is mapped, the l1 entry is not empty: 0000000139d08500: 00100001380a0027 After the mapping: 0000000139d08500: 00100000000a0467 as expected. However, the mfn 1380a0 still seems to belong to dom0. Shouldn''t
2008 Oct 27
0
[PATCH 4/4] linux/i386: utilize hypervisor highmem handling helpers
...t)) + && (PageHighMem(from) || PageHighMem(to))) { + unsigned long from_pfn = page_to_pfn(from); + unsigned long to_pfn = page_to_pfn(to); + struct mmuext_op meo; + + meo.cmd = MMUEXT_COPY_PAGE; + meo.arg1.mfn = pfn_to_mfn(to_pfn); + meo.arg2.src_mfn = pfn_to_mfn(from_pfn); + if (mfn_to_pfn(meo.arg2.src_mfn) == from_pfn + && mfn_to_pfn(meo.arg1.mfn) == to_pfn + && HYPERVISOR_mmuext_op(&meo, 1, NULL, DOMID_SELF) == 0) + return; + } + + vfrom = kmap_atomic(from, KM_USER0); + vto = kmap_atomic(to, KM_USER1); + copy_page(vto, vfrom); + kunmap_atomic(vfrom,...
2011 Sep 01
9
[PATCH V4 0/3] xen-blkfront/blkback discard support
Dear list, This is the V4 of the trim support for xen-blkfront/blkback, Now we move BLKIF_OP_TRIM to BLKIF_OP_DISCARD, and dropped all "trim" stuffs in the patches, and use "discard" instead. Also we updated the helpers of blkif_x86_{32|64}_request or we will meet problems using a non-native protocol. And this patch has been tested with both SSD and raw file, with SSD we will
2013 Sep 19
3
[PATCH] xen/balloon: don't alloc page while non-preemptible
...ation(unsigned long nr_pages, gfp_t gfp) BUG_ON(ret); } #endif - } - - /* Ensure that ballooned highmem pages don''t have kmaps. */ - kmap_flush_unused(); - flush_tlb_all(); - - /* No more mappings: invalidate P2M and add to balloon. */ - for (i = 0; i < nr_pages; i++) { - pfn = mfn_to_pfn(frame_list[i]); if (!xen_feature(XENFEAT_auto_translated_physmap)) { unsigned long p; p = page_to_pfn(scratch_page); __set_phys_to_machine(pfn, pfn_to_mfn(p)); } + put_balloon_scratch_page(); + balloon_append(pfn_to_page(pfn)); } - put_balloon_scratch_page(); + /* Ensure t...
2005 Jun 06
4
DMA not enabled in Xen Kernel?
I installed Xen using the binary release on debian sarge and got it to boot no problem but when I check if dma is enabled with ''hdparm /dev/hda'' it''s not. I can''t enable it either with ''hdparm -d1 /dev/hda''. Says operation not permited. Using my debian default kernel dma works just fine. How can I enable dma with the Xen Kernel? Thanks!
2013 Oct 17
42
[PATCH v8 0/19] enable swiotlb-xen on arm and arm64
...XENMEM_unpin) are not needed anymore. This latest version doesn''t need any hypervisor changes anymore. Cheers, Stefano Changes in v8: - use __phys_to_pfn and __pfn_to_phys in phys_to_dma and dma_to_phys; - cast 0 to dma_addr_t in the definition of DMA_ERROR_CODE; - move pfn_to_mfn and mfn_to_pfn to page.h as static inline functions; - no need to walk the two p2m trees if phys_to_mach.rb_node is NULL; - correctly handle multipage p2m entries; - substitute the p2m spin_lock with a rwlock; - assume dom0 is mapped 1:1, no need to call XENMEM_exchange in xen_create_contiguous_region; - add two...
2008 Aug 26
0
[PATCH] xen: wrap load_cr3() in manage.c for ia64 support.
...db..ac139a2 100644 --- a/arch/x86/xen/suspend.c +++ b/arch/x86/xen/suspend.c @@ -10,6 +10,11 @@ #include "xen-ops.h" #include "mmu.h" +void xen_pre_device_suspend(void) +{ + load_cr3(swapper_pg_dir); +} + void xen_pre_suspend(void) { xen_start_info->store_mfn = mfn_to_pfn(xen_start_info->store_mfn); diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index a5bc91a..c7f2953 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c @@ -39,8 +39,7 @@ static int xen_suspend(void *data) BUG_ON(!irqs_disabled()); - load_cr3(swapper_pg_dir); - + xen_pre_de...
2013 Feb 28
0
[PATCH RFC 05/12] xen-blkfront: remove frame list from blk_shadow
...); ref = gnt_list_entry->gref; - buffer_mfn = pfn_to_mfn(gnt_list_entry->pfn); info->shadow[id].grants_used[i] = gnt_list_entry; @@ -465,7 +462,6 @@ static int blkif_queue_request(struct request *req) kunmap_atomic(shared_data); } - info->shadow[id].frame[i] = mfn_to_pfn(buffer_mfn); ring_req->u.rw.seg[i] = (struct blkif_request_segment) { .gref = ref, @@ -1269,7 +1265,7 @@ static int blkif_recover(struct blkfront_info *info) gnttab_grant_foreign_access_ref( req->u.rw.seg[j].gref, info->xbdev->otherend_id, - p...
2007 Feb 12
0
[PATCH] lift physical address restriction in svae/restore code
...MFN_MASK_X86; if (!MFN_IS_IN_PSEUDOPHYS_MAP(mfn)) { /* This will happen if the type info is stale which is quite feasible under live migration */ @@ -541,7 +541,7 @@ static int canonicalize_pagetable(unsign } else pfn = mfn_to_pfn(mfn); - pte &= 0xffffff0000000fffULL; + pte &= ~MADDR_MASK_X86; pte |= (uint64_t)pfn << PAGE_SHIFT; } Index: 2007-02-07/tools/libxc/xc_pagetab.c =================================================================== --- 2007-02-07.orig/tool...
2006 Feb 26
0
Unable to build linux-2.6-xen.hg
...r: for each function it appears in.) include/asm/mach-xen/asm/page.h: In function `phys_to_machine_mapping_valid'': include/asm/mach-xen/asm/page.h:97: error: `XENFEAT_auto_translated_physmap'' undeclared (first use in this function) include/asm/mach-xen/asm/page.h: In function `mfn_to_pfn'': include/asm/mach-xen/asm/page.h:106: error: `XENFEAT_auto_translated_physmap'' undeclared (first use in this function) include/asm/mach-xen/asm/page.h: In function `mfn_to_local_pfn'': include/asm/mach-xen/asm/page.h:150: error: `XENFEAT_auto_translated_physmap'...
2013 Nov 11
0
[GIT PULL] (xen) stable/for-linus-3.13-rc0-tag
...iotlb-xen: fix error code returned by xen_swiotlb_map_sg_attrs arm: make SWIOTLB available pci-swiotlb-xen: call pci_request_acs only ifdef CONFIG_PCI swiotlb-xen: missing include dma-direction.h arm,arm64/include/asm/io.h: define struct bio_vec xen/arm: pfn_to_mfn and mfn_to_pfn return the argument if nothing is in the p2m Thierry Reding (1): tracing/events: Fix swiotlb tracepoint creation Zoltan Kiss (1): tracing/events: Add bounce tracing to swiotbl
2008 Jan 18
0
[PATCH] minios: support COW for a zero page
...har _text, _etext, _erodata, _edata, _end; +extern unsigned long mfn_zero; #define pfn_to_mfn(_pfn) (phys_to_machine_mapping[(_pfn)]) static __inline__ maddr_t phys_to_machine(paddr_t phys) { @@ -224,5 +227,6 @@ static __inline__ paddr_t machine_to_phy #define pte_to_virt(_pte) to_virt(mfn_to_pfn(pte_to_mfn(_pte)) << PAGE_SHIFT) #define map_frames(f, n) map_frames_ex(f, n, 1, 0, 1, DOMID_SELF, 0, L1_PROT) +#define map_zero(n, a) map_frames_ex(&mfn_zero, n, 0, 0, a, DOMID_SELF, 0, L1_PROT_RO) #endif /* _ARCH_MM_H_ */ diff -r 27ad7ed41be2 extras/mini-os/include/x86/traps.h ---...
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
2014 Feb 27
3
[PATCH] xen/grant-table: Refactor gnttab_[un]map_refs to avoid m2p_override
...t_phys_to_machine(unsigned long pfn, unsigned long mfn); bool __set_phys_to_machine_multi(unsigned long pfn, unsigned long mfn, diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c index b31ee1b2..9c48778 100644 --- a/arch/arm/xen/p2m.c +++ b/arch/arm/xen/p2m.c @@ -146,6 +146,38 @@ unsigned long __mfn_to_pfn(unsigned long mfn) } EXPORT_SYMBOL_GPL(__mfn_to_pfn); +int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops, + struct gnttab_map_grant_ref *kmap_ops, + struct page **pages, unsigned int count); +{ + int i; + + for (i = 0; i < count; i++) { + if (map_ops[i].status) +...