Displaying 20 results from an estimated 29 matches for "mfn_valid".
Did you mean:
  pfn_valid
  
2007 Jan 05
0
The mfn_valid on shadow_set_p2m_entry()
Noticed that on change set 12568, we change the valid_mfn to be in fact
the mfn_valid(). Then on change set 12572, we change the
shadow_set_p2m_entry() to use mfn_valid().
I''m a bit confused by this change. I think current meaning of
mfn_valid() is to check if the mfn is valid RAM. It is ok for page table
pages. But for p2m table, considering shadow for driver domain or
con...
2007 Oct 03
0
[PATCH 3/3] TLB flushing and IO memory mapping
.../arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Wed Jul 25 14:03:08 2007 +0100
+++ b/xen/arch/x86/mm.c	Wed Jul 25 14:03:12 2007 +0100
@@ -594,6 +594,14 @@ get_##level##_linear_pagetable(         
     return 1;
\
 }
 
+
+int iomem_page_test(unsigned long mfn, struct page_info *page)
+{
+    return unlikely(!mfn_valid(mfn)) ||
+        unlikely(page_get_owner(page) == dom_io);
+}
+
+
 int
 get_page_from_l1e(
     l1_pgentry_t l1e, struct domain *d)
@@ -611,8 +619,7 @@ get_page_from_l1e(
         return 0;
     }
 
-    if ( unlikely(!mfn_valid(mfn)) ||
-         unlikely(page_get_owner(page) == dom_io) )
+    if...
2013 Nov 14
4
[PATCH] xen/arm: Allow balooning working with 1:1 memory mapping
...gs *a)
         }
         else
         {
-            page = alloc_domheap_pages(d, a->extent_order, a->memflags);
+#ifdef CONFIG_ARM
+            if ( d == dom0 && platform_has_quirk(PLATFORM_QUIRK_DOM0_MAPPING_11) )
+            {
+                mfn = gpfn;
+                if (!mfn_valid(mfn))
+                {
+                    gdprintk(XENLOG_INFO, "Invalid mfn 0x%"PRI_xen_pfn"\n",
+                             mfn);
+                    goto out;
+                }
+
+                page = mfn_to_page(mfn);
+                if ( !get_page(page, d) )
+...
2011 Sep 23
2
Some problems about xenpaging
...}
in 
@@ -2595,34 +2624,39 @@
     struct page_info *page;
     p2m_type_t p2mt;
     mfn_t mfn;
-
+    int ret;
+    p2m_lock(d->arch.p2m);
     /* Get mfn */
-    mfn = gfn_to_mfn(d, gfn, &p2mt);
+    mfn = gfn_to_mfn_query(d, gfn, &p2mt);
+    
+    ret = -EINVAL;
     if ( unlikely(!mfn_valid(mfn)) )
-        return -EINVAL;
+        goto out;
 
     if (p2mt != p2m_ram_paging_out)
      {
          printk("p2m_mem_paging_evict type %d\n", p2mt);
-               return -EINVAL;
+         goto out;
      }
     /* Get the page so it doesn''t get modified under Xen'&...
2011 Jan 17
8
[PATCH 0 of 3] Miscellaneous populate-on-demand bugs
This patch series includes a series of bugs related to p2m, ept, and
PoD code which were found as part of our XenServer product testing.
Each of these fixes actual bugs, and the 3.4-based version of the patch
has been tested thoroughly.  (There may be bugs in porting the patches,
but most of them are simple enough as to make it unlikely.)
Each patch is conceptually independent, so they can each
2007 May 14
0
[PATCH] x86: ptwr adjustments
...0 +0200
+++ 2007-05-14/xen/arch/x86/mm.c	2007-05-14 13:44:25.000000000 +0200
@@ -3238,13 +3238,14 @@ static int ptwr_emulated_update(
 
     /* We are looking only for read-only mappings of p.t. pages. */
     ASSERT((l1e_get_flags(pte) & (_PAGE_RW|_PAGE_PRESENT)) == _PAGE_PRESENT);
+    ASSERT(mfn_valid(mfn));
     ASSERT((page->u.inuse.type_info & PGT_type_mask) == PGT_l1_page_table);
     ASSERT((page->u.inuse.type_info & PGT_count_mask) != 0);
     ASSERT(page_get_owner(page) == d);
 
     /* Check the new PTE. */
     nl1e = l1e_from_intpte(val);
-    if ( unlikely(!get_page_from...
2009 Aug 06
2
[PATCH] hvm emul: fix cmpxchg emulation to use an atomic operation
...;
+        return _mfn(BAD_GVA_TO_GFN);
+    }
+
+    /* Translate the GFN to an MFN */
+    mfn = gfn_to_mfn(v->domain, gfn, &p2mt);
+        
+    if ( p2mt == p2m_ram_ro )
+        return _mfn(READONLY_GFN);
+    if ( !p2m_is_ram(p2mt) )
+        return _mfn(BAD_GFN_TO_MFN);
+
+    ASSERT(mfn_valid(mfn_x(mfn)));
+
+    return mfn;
+}
+
+/* Check that the user is allowed to perform this write. 
+ * Returns a mapped pointer to write to, or NULL for error. */
+#define MAPPING_UNHANDLEABLE ((void *)(unsigned long)X86EMUL_UNHANDLEABLE)
+#define MAPPING_EXCEPTION    ((void *)(unsigned long)X86EMUL_...
2012 Jun 08
18
[PATCH 0 of 4 RFC] Populate-on-demand: Check pages being returned by the balloon driver
Populate-on-demand: Check pages being returned by the balloon driver
This patch series is the second result of my work last summer on
decreasing fragmentation of superpages in a guests'' p2m when using
populate-on-demand.
This patch series is against 4.1; I''m posting it to get feedback on
the viability of getting a ported version of this patch into 4.2.
As with the previous
2013 Dec 06
36
[V6 PATCH 0/7]: PVH dom0....
Hi,
V6: The only change from V5 is in patch #6:
     - changed comment to reflect autoxlate
     - removed a redundant ASSERT
     - reworked logic a bit so that get_page_from_gfn() is called with NULL
       for p2m type as before. arm has ASSERT wanting it to be NULL.
Tim: patch 4 needs your approval.
Daniel:  patch 5 needs your approval.
These patches implement PVH dom0.
Patches 1 and 2
2012 Mar 01
14
[PATCH 0 of 3] RFC Paging support for AMD NPT V2
There has been some progress, but still no joy. Definitely not intended for
inclusion at this point.
Tim, Wei, I added a Xen command line toggle to disable IOMMU and P2M table
sharing.
Tim, I verified that changes to p2m-pt.c don''t break shadow mode (64bit
hypervisor and Win 7 guest).
Hongkaixing, I incorporated your suggestion in patch 2, so I should add your
Signed-off-by eventually.
2011 Nov 29
10
[PATCH 0 of 2] Fix correctness race in xc_mem_paging_prep
ging_prep ensures that an mfn is backing the paged-out gfn, and
transitions to the next state in the paging state machine for this page. 
Foreign mappings of the gfn will now succeed. This is the key idea, as it 
allows the pager to now map the gfn and fill in its contents.
Unfortunately, it also allows any other foreign mapper to map the gfn and read
its contents. This is particularly dangerous
2012 Feb 06
1
[PATCH] ia64: fix build (next instance)
A number of build problems crept in once again. Fix them.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -683,7 +683,7 @@ long do_memory_op(unsigned long cmd, XEN
         mfn = get_gfn_untyped(d, xrfp.gpfn);
 
         if ( mfn_valid(mfn) )
-            guest_physmap_remove_page(d, xrfp.gpfn, mfn, PAGE_ORDER_4K);
+            guest_physmap_remove_page(d, xrfp.gpfn, mfn, 0);
         else
             rc = -ENOENT;
 
--- a/xen/include/asm-ia64/linux-xen/asm/irq.h
+++ b/xen/include/asm-ia64/linux-xen/asm/irq.h
@@ -72,7 +72,7 @@ e...
2011 Nov 01
2
xenpaing: one way to avoid paging out the page, when the corresponding mfn is in use.
...s detected, 
   paging should skip selecting this page. 
The pseudo-code of step 3 can be written as follow:
int p2m_mem_paging_nominate(struct domain *d, unsigned long gfn)
{
   
    mfn = gfn_to_mfn_noreference(d, gfn, &p2mt);   -----> avoid saving timestamp and access tag 
    
    if ( !mfn_valid(mfn) )
        goto out;
    
    clear_access_tag();   ----------> clear the access tag of this page
    if (test_page_hot())
       goto out;           ------> if the page is accessed recently, go to out
    ........
  
    set_p2m_entry(d, gfn, mfn, 0, p2m_ram_paging_out);
    if ( test_ac...
2010 Dec 13
0
[PATCH, RFC] x86/iommu: don''t map RAM holes above 4G
...*/
-        if ( !page_is_ram_type(i, RAM_TYPE_CONVENTIONAL) &&
-             (!iommu_inclusive_mapping ||
-              page_is_ram_type(i, RAM_TYPE_UNUSABLE)) )
+        unsigned long pfn = pdx_to_pfn(i);
+
+        if ( pfn > (0xffffffffUL >> PAGE_SHIFT) ?
+             (!mfn_valid(pfn) ||
+              !page_is_ram_type(pfn, RAM_TYPE_CONVENTIONAL)) :
+             iommu_inclusive_mapping ?
+             page_is_ram_type(pfn, RAM_TYPE_UNUSABLE) :
+             !page_is_ram_type(pfn, RAM_TYPE_CONVENTIONAL) )
             continue;
 
         /* Exclude Xen bits */
-        if...
2011 Mar 25
2
[RFC PATCH 2/3] AMD IOMMU: Implement p2m sharing
--
Advanced Micro Devices GmbH
Sitz: Dornach, Gemeinde Aschheim,
Landkreis München Registergericht München,
HRB Nr. 43632
WEEE-Reg-Nr: DE 12919551
Geschäftsführer:
Alberto Bozzo, Andrew Bowd
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
2012 Dec 12
2
[PATCH v7 1/2] xen: unify domain locking in domctl code
These two patches were originally part of the XSM series that I have
posted, and remain prerequisites for that series. However, they are
independent of the XSM changes and are a useful simplification
regardless of the use of XSM.
The Acked-bys on these patches were provided before rebasing them over
the copyback changes in 26268:1b72138bddda, which had minor conflicts
that I resolved.
[PATCH
2011 Sep 08
5
[PATCH 0 of 2] v2: memshare/xenpaging/xen-access fixes for xen-unstable
The following two patches allow the parallel use of memsharing, xenpaging and
xen-access by using an independent ring buffer for each feature.
Please review.
v2:
 - update mem_event_check_ring arguments, check domain rather than domain_id
 - check ring_full first because its value was just evaluated
 - check if ring buffer is initialized before calling
   mem_access_domctl/mem_paging_domctl
2009 Apr 22
7
Consult some concepts about shadow paging mechanism
Dear All:
I am pretty new to xen-devel, please correct me in the following.
Assume we have the following terms
GPT: guest page table
SPT: shadow page table
(Question a) When guest OS is running, is it always using SPT for
address translation? If it is the case, how does guest OS refer and
modify its own GPT content? It seems that there is a page table entry
in SPT for the GPT page.
(Question
2011 May 06
14
[PATCH 0 of 4] Use superpages on restore/migrate
This patch series restores the use of superpages when restoring or
migrating a VM, while retaining efficient batching of 4k pages when
superpages are not appropriate or available.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
2011 Mar 15
6
[PATCH] ept: Fix bug in changeset 22526:7a5ee3800417
...(1GiB or 2MiB),
-         * the intermediate tables will be freed below after the ept flush */
+         * the intermediate tables will be freed below after the ept flush
+         *
+         * Read-then-write is OK because we hold the p2m lock. */
         old_entry = *ept_entry;
 
         if ( mfn_valid(mfn_x(mfn)) || direct_mmio || p2m_is_paged(p2mt) ||
@@ -390,10 +392,10 @@
             new_entry.access = p2ma;
             new_entry.rsvd2_snp = (iommu_enabled && iommu_snoop);
 
-            if ( new_entry.mfn == mfn_x(mfn) )
+            new_entry.mfn = mfn_x(mfn);
+
+            if ( o...