unmap_domain_page(p);
}
+unsigned long get_upper_mfn_bound(void)
+{
+ /* No memory hotplug yet, so current memory limit is the final one. */
+ return max_page - 1;
+}
+
/*
* Local variables:
* mode: C
_PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_PSE);
}
+unsigned long get_upper_mfn_bound(void)
+{
+ unsigned long max_mfn;
+
+ max_mfn = mem_hotplug ? PFN_DOWN(mem_hotplug) : max_page;
+#ifndef CONFIG_BIGMEM
+ max_mfn = min(max_mfn, 1UL << 32);
+#endif
+ return min(max_mfn, 1UL << (paddr_bits - PAGE_SHIFT)) - 1;
+}
+
/*
* Local variables:
* mode: C
get_outstanding_claims(&pi->free_pages, &pi->outstanding_pages);
pi->scrub_pages = 0;
pi->cpu_khz = cpu_khz;
+ pi->max_mfn = get_upper_mfn_bound();
arch_do_physinfo(pi);
if ( copy_to_guest(u_sysctl, op, 1) )
#include "physdev.h"
#include "tmem.h"
-#define XEN_SYSCTL_INTERFACE_VERSION 0x0000000F
+#define XEN_SYSCTL_INTERFACE_VERSION 0x00000010
/*
* Read console content from Xen buffer ring.
uint32_t nr_nodes; /* # nodes currently online */
uint32_t max_node_id; /* Largest possible node ID on this host */
uint32_t cpu_khz;
+ uint32_t capabilities;/* XEN_SYSCTL_PHYSCAP_??? */
uint64_aligned_t total_pages;
uint64_aligned_t free_pages;
uint64_aligned_t scrub_pages;
uint64_aligned_t outstanding_pages;
+ uint64_aligned_t max_mfn; /* Largest possible MFN on this host */
uint32_t hw_cap[8];
-
- /* XEN_SYSCTL_PHYSCAP_??? */
- uint32_t capabilities;
};
/*
struct page_info **_page, void **_va);
void destroy_ring_for_helper(void **_va, struct page_info *page);
+/* Return the upper bound of MFNs, including hotplug memory. */
+unsigned long get_upper_mfn_bound(void);
+
#include <asm/flushtlb.h>
static inline void accumulate_tlbflush(bool *need_tlbflush,