search for: virt_to_mfn

Displaying 20 results from an estimated 92 matches for "virt_to_mfn".

2013 Oct 23
3
[PATCH] xen/arm: add_to_physmap_one: Avoid to map mfn 0 if an error occurs
...b/xen/arch/arm/mm.c index 474dfef..eaeb0c3 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -981,6 +981,8 @@ static int xenmem_add_to_physmap_one( idx &= ~XENMAPIDX_grant_table_status; if ( idx < nr_status_frames(d->grant_table) ) mfn = virt_to_mfn(d->grant_table->status[idx]); + else + return -EINVAL; } else { @@ -990,6 +992,8 @@ static int xenmem_add_to_physmap_one( if ( idx < nr_grant_frames(d->grant_table) ) mfn = virt_to_mfn(d->grant_table...
2008 Jan 18
0
[PATCH] minios: support COW for a zero page
...ed long *phys_to_machine_mapping; +unsigned long mfn_zero; extern char stack[]; extern void page_walk(unsigned long virt_addr); @@ -492,10 +493,13 @@ static void clear_bootstrap(void) static void clear_bootstrap(void) { struct xen_memory_reservation reservation; - xen_pfn_t mfns[] = { virt_to_mfn(0), virt_to_mfn(&shared_info) }; + xen_pfn_t mfns[] = { virt_to_mfn(&shared_info) }; int n = sizeof(mfns)/sizeof(*mfns); pte_t nullpte = { }; + /* Use page 0 as the CoW zero page */ + memset(NULL, 0, PAGE_SIZE); + mfn_zero = pfn_to_mfn(0); if (HYPERVISOR_update_...
2005 Sep 01
3
question about page_to_phys
The page_to_phys is defined as #define page_to_phys(page) (phys_to_machine(page_to_pseudophys(page))) so it return machine addresss while virt_to_phys return psedophys. include/asm-xen/asm-i386/io.h this is really confusing. why not define page_to_machine? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com
2006 Aug 30
0
[patch] phys_to_machine_mapping alignment on x86_64
...save/restore. */ - pfn_to_mfn_frame_list_list = alloc_bootmem(PAGE_SIZE); + pfn_to_mfn_frame_list_list = alloc_bootmem_pages(PAGE_SIZE); HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list = virt_to_mfn(pfn_to_mfn_frame_list_list); @@ -873,7 +873,7 @@ void __init setup_arch(char **cmdline_p) k++; BUG_ON(k>=fpp); pfn_to_mfn_frame_list[k] = -...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...} SHARED_RING_INIT(sring); - FRONT_RING_INIT(&info->ring, sring, PAGE_SIZE); + FRONT_RING_INIT(&info->ring, sring, PAGE_SIZE << info->ring_order); sg_init_table(info->sg, BLKIF_MAX_SEGMENTS_PER_REQUEST); - err = xenbus_grant_ring(dev, virt_to_mfn(info->ring.sring)); + err = xenbus_grant_ring(dev, info->ring.sring, 1 << info->ring_order, + info->ring_ref); if (err < 0) { - free_page((unsigned long)sring); + free_pages((unsigned long)sring, info->r...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...} SHARED_RING_INIT(sring); - FRONT_RING_INIT(&info->ring, sring, PAGE_SIZE); + FRONT_RING_INIT(&info->ring, sring, PAGE_SIZE << info->ring_order); sg_init_table(info->sg, BLKIF_MAX_SEGMENTS_PER_REQUEST); - err = xenbus_grant_ring(dev, virt_to_mfn(info->ring.sring)); + err = xenbus_grant_ring(dev, info->ring.sring, 1 << info->ring_order, + info->ring_ref); if (err < 0) { - free_page((unsigned long)sring); + free_pages((unsigned long)sring, info->r...
2012 Mar 05
11
[PATCH 0001/001] xen: multi page ring support for block devices
...} SHARED_RING_INIT(sring); - FRONT_RING_INIT(&info->ring, sring, PAGE_SIZE); + FRONT_RING_INIT(&info->ring, sring, PAGE_SIZE << info->ring_order); sg_init_table(info->sg, BLKIF_MAX_SEGMENTS_PER_REQUEST); - err = xenbus_grant_ring(dev, virt_to_mfn(info->ring.sring)); + err = xenbus_grant_ring(dev, info->ring.sring, 1 << info->ring_order, + info->ring_ref); if (err < 0) { - free_page((unsigned long)sring); + free_pages((unsigned long)sring, info->r...
2008 Apr 04
8
Grant tables
Hi, I need to use the grant table mechanism, but I can''t find any example regarding how to do it. Could you please provide some examples? Thanks Carlo -- È molto più bello sapere qualcosa di tutto, che sapere tutto di una cosa. Blaise Pascal _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
2007 Feb 14
2
[PATCH 8/8] 2.6.17: scan DMI early
...emset(empty_zero_page, 0, sizeof(empty_zero_page)); + + /* Setup mapping of lower 1st MB */ + for (next = 0; next < NR_FIX_ISAMAPS; next++) + if (is_initial_xendomain()) + set_fixmap(FIX_ISAMAP_BEGIN - next, next * PAGE_SIZE); + else + __set_fixmap(FIX_ISAMAP_BEGIN - next, + virt_to_mfn(empty_zero_page) << PAGE_SHIFT, + PAGE_KERNEL_RO); + + BUG_ON(start_pfn > table_end); + table_end = start_pfn; } __flush_tlb_all(); @@ -817,7 +869,6 @@ size_zones(unsigned long *z, unsigned lo void __init paging_init(void) { unsigned long zones[MAX_NR_ZONES], holes[MAX...
2007 Nov 15
0
[patch 13/19] xen: fix incorrect vcpu_register_vcpu_info hypercall argument
...<gregkh@suse.de> --- arch/i386/xen/enlighten.c | 2 +- include/xen/interface/vcpu.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) --- a/arch/i386/xen/enlighten.c +++ b/arch/i386/xen/enlighten.c @@ -116,7 +116,7 @@ static void __init xen_vcpu_setup(int cp info.mfn = virt_to_mfn(vcpup); info.offset = offset_in_page(vcpup); - printk(KERN_DEBUG "trying to map vcpu_info %d at %p, mfn %x, offset %d\n", + printk(KERN_DEBUG "trying to map vcpu_info %d at %p, mfn %llx, offset %d\n", cpu, vcpup, info.mfn, info.offset); /* Check to see if the hy...
2007 Nov 26
0
[PATCH] [Mini-OS] Make gnttab allocation/free safe
...50:31 2007 +0000 @@ -147,6 +147,7 @@ moretodo: struct net_buffer* buf = &rx_buffers[id]; void* page = buf->page; + /* We are sure to have free gnttab entries since they got released above */ buf->gref = req->gref = gnttab_grant_access(0,virt_to_mfn(page),0); @@ -436,8 +437,9 @@ void netfront_xmit(unsigned char* data,i down(&tx_sem); local_irq_save(flags); + id = get_id_from_freelist(tx_freelist); + local_irq_restore(flags); - id = get_id_from_freelist(tx_freelist); buf = &tx_buffers[id]; page = buf-&...
2007 Nov 15
0
[patch 13/19] xen: fix incorrect vcpu_register_vcpu_info hypercall argument
...<gregkh@suse.de> --- arch/i386/xen/enlighten.c | 2 +- include/xen/interface/vcpu.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) --- a/arch/i386/xen/enlighten.c +++ b/arch/i386/xen/enlighten.c @@ -116,7 +116,7 @@ static void __init xen_vcpu_setup(int cp info.mfn = virt_to_mfn(vcpup); info.offset = offset_in_page(vcpup); - printk(KERN_DEBUG "trying to map vcpu_info %d at %p, mfn %x, offset %d\n", + printk(KERN_DEBUG "trying to map vcpu_info %d at %p, mfn %llx, offset %d\n", cpu, vcpup, info.mfn, info.offset); /* Check to see if the hy...
2012 Dec 18
0
[PATCH] nested vmx: nested TPR shadow/threshold emulation
...+ u32 ctrl; + void *vapic_va; + + ctrl = __n2_exec_control(v); + if ( ctrl & CPU_BASED_TPR_SHADOW ) + { + vapic_gpfn = __get_vvmcs(nvcpu->nv_vvmcx, VIRTUAL_APIC_PAGE_ADDR) >> PAGE_SHIFT; + vapic_va = hvm_map_guest_frame_ro(vapic_gpfn); + vapic_mfn = virt_to_mfn(vapic_va); + __vmwrite(VIRTUAL_APIC_PAGE_ADDR, (vapic_mfn << PAGE_SHIFT)); + hvm_unmap_guest_frame(vapic_va); + } + else + __vmwrite(VIRTUAL_APIC_PAGE_ADDR, 0); +} + +static void nvmx_update_tpr_threshold(struct vcpu *v) +{ + struct nestedvcpu *nvcpu = &vcpu...
2007 Jan 17
6
Ehancement to domU suspend/resume
...necessary step is to freeze all processes since some may still hold critical resource. In this case, we need borrow some Linux PM stuff into xen suspend path, something like: Smp_suspend(); freeze_processes(); device_suspend(); device_power_down(); xenbus_suspend(); ... HYPERVISOR_suspend(virt_to_mfn(xen_start_info)); ... xenbus_resume(); device_power_up(); device_resume(); thaw_processes(); smp_resume(); It may be more difficult if we want to support wake-on-LAN when that NIC is assigned to domU, which is more tightly related to ACPI. So we will simply consider normal device suspend...
2005 Sep 05
2
[PATCH][1/6] add a hypercall number for virtual device in unmodified guest
add a hypercall number for virtual device in unmodified guest There are 6 patches for para-driver support in vmx guest. This is the first one. Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com> Signed-off-by: Arun Sharma <arun.sharma@intel.com> diff -r 287d36b46fa3 xen/arch/x86/x86_32/entry.S --- a/xen/arch/x86/x86_32/entry.S Tue Aug 30 20:36:49 2005 +++
2007 Apr 18
2
paravirt & xen & SMP
Hi, Anyone has this working? Looks like there is a chicken-and-egg issue with pda setup: * xen_load_gdt() uses multicalls, thus depends on cpu-specific variables (per-cpu mc buffer) which in turn requires pda being setup already. * pda setup can't be done before xen_load_gdt() ... Next question while looking at xen_load_gdt(): why does it use multicalls in the first place?
2007 Apr 18
2
paravirt & xen & SMP
Hi, Anyone has this working? Looks like there is a chicken-and-egg issue with pda setup: * xen_load_gdt() uses multicalls, thus depends on cpu-specific variables (per-cpu mc buffer) which in turn requires pda being setup already. * pda setup can't be done before xen_load_gdt() ... Next question while looking at xen_load_gdt(): why does it use multicalls in the first place?
2012 Nov 20
52
[PATCH RFC] stubdom: Change vTPM shared page ABI
...x == NULL) { + dev->page = (vtpm_shared_page_t*) alloc_page(); + if(dev->page == NULL) { TPMFRONT_ERR("Unable to allocate page for shared memory\n"); goto error; } - memset(dev->tx, 0, PAGE_SIZE); - dev->ring_ref = gnttab_grant_access(dev->bedomid, virt_to_mfn(dev->tx), 0); + memset(dev->page, 0, PAGE_SIZE); + dev->ring_ref = gnttab_grant_access(dev->bedomid, virt_to_mfn(dev->page), 0); TPMFRONT_DEBUG("grant ref is %lu\n", (unsigned long) dev->ring_ref); /*Create event channel */ @@ -228,7 +257,7 @@ error_postevt...
2012 Nov 26
13
[PATCH 0 of 4] Minios improvements for app development
This patch series contains a set of patches making minios rather easier to use, from an application development point of view. Overview of patches: 1 Command line argument parsing support, from Xen. 2 Weak console handler function. 3 Build system tweaks for application directories. 4 Trailing whitespace cleanup. (because it is very messy) Patch 4 is likely to be more controversial than
2008 Feb 21
4
[PATCH 0/2] xen pvfb: Para-virtual framebuffer, keyboard and pointer
This is a pair of Xen para-virtual frontend device drivers: drivers/video/xen-fbfront.c provides a framebuffer, and drivers/input/xen-kbdfront provides keyboard and mouse. The backends run in dom0 user space. I started with the Xen version at http://xenbits.xensource.com/linux-2.6.18-xen.hg?rev/ca05cf1a9bdc Differences to that Xen version, for those who care: * Rewritten on top of fb deferred