[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Minios-devel] [PATCH v3 00/19] mini-os: support of auto-ballooning
On Fri, Aug 12, 2016 at 12:42:31PM +0100, Wei Liu wrote: > On Thu, Aug 11, 2016 at 11:18:03AM +0200, Juergen Gross wrote: > > Support ballooning Mini-OS automatically up in case of memory shortage. > > > > Do some cleanups, a small correction and add some basic features to > > lay groundwork for support of ballooning in Mini-OS (patches 1-14). > > > > The main visible change is the virtual memory layout: to be able to > > add memory to the running Mini-OS we need to have some spare areas > > especially after the 1:1 mapping of physical memory. > > > > Then add the ballooning functionality: the p2m map must be expanded, > > the page allocator's bitmap must be expanded and we must get new > > memory from the hypervisor. > > > > In case of a detected memory shortage the domain will balloon up until > > either enough memory is available or the upper limit has been reached. > > > > Ballooning has been tested with a xenstore stubdom. > > Regression tests have been done with: > > - pure mini-os > > - ioemu stubdom > > - pvgrub 64 bit > > > > Unfortunately vtmpmgr stubdom build failed. :-/ > And that's probably because vtpmmgr uses printk or whatever... Here is a patch that seems to fix the build: ---8<--- From d72510368cdc3c73af3c8918a404a8137f40bd9c Mon Sep 17 00:00:00 2001 From: Wei Liu <wei.liu2@xxxxxxxxxx> Date: Fri, 12 Aug 2016 11:32:57 +0100 Subject: [PATCH] x86/arch_mm.h: move p2m_chk_pfn to x86/mm.c Making that function inlined won't buy us much and is causing error in vtpm manager stubdom build. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- arch/x86/mm.c | 9 +++++++++ include/x86/arch_mm.h | 11 +++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/arch/x86/mm.c b/arch/x86/mm.c index 8fa3b4c..88a928d 100644 --- a/arch/x86/mm.c +++ b/arch/x86/mm.c @@ -608,6 +608,15 @@ static void clear_bootstrap(void) printk("Unable to unmap NULL page. rc=%d\n", rc); } +void p2m_chk_pfn(unsigned long pfn) +{ + if ( (pfn >> L3_P2M_SHIFT) > 0 ) + { + printk("Error: Too many pfns.\n"); + do_exit(); + } +} + void arch_init_p2m(unsigned long max_pfn) { unsigned long *l2_list = NULL, *l3_list; diff --git a/include/x86/arch_mm.h b/include/x86/arch_mm.h index e5d9c57..690a919 100644 --- a/include/x86/arch_mm.h +++ b/include/x86/arch_mm.h @@ -190,14 +190,9 @@ typedef unsigned long pgentry_t; #define L2_P2M_IDX(pfn) (((pfn) >> L1_P2M_SHIFT) & P2M_MASK) #define L3_P2M_IDX(pfn) (((pfn) >> L2_P2M_SHIFT) & P2M_MASK) #define INVALID_P2M_ENTRY (~0UL) -static inline void p2m_chk_pfn(unsigned long pfn) -{ - if ( (pfn >> L3_P2M_SHIFT) > 0 ) - { - printk("Error: Too many pfns.\n"); - do_exit(); - } -} + +void p2m_chk_pfn(unsigned long pfn); + static inline unsigned long p2m_pages(unsigned long pages) { return (pages + P2M_ENTRIES - 1) >> L1_P2M_SHIFT; -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |