[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 09/22] vixen: modify the e820 table to advertise HVM special pages as RAM
On Sun, Jan 7, 2018 at 12:16 AM, Roger Pau Monné <roger.pau@xxxxxxxxxx> wrote: > On Sat, Jan 06, 2018 at 02:54:24PM -0800, Anthony Liguori wrote: >> diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c >> index a56f875..935901b 100644 >> --- a/xen/arch/x86/mm.c >> +++ b/xen/arch/x86/mm.c >> @@ -122,6 +122,7 @@ >> #include <asm/fixmap.h> >> #include <asm/io_apic.h> >> #include <asm/pci.h> >> +#include <asm/guest.h> >> >> #include <asm/hvm/grant_table.h> >> #include <asm/pv/grant_table.h> >> @@ -945,7 +946,7 @@ get_page_from_l1e( >> case 0: >> break; >> case 1: >> - if ( !is_hardware_domain(l1e_owner) ) >> + if ( !is_vixen() && !is_hardware_domain(l1e_owner) ) >> break; >> /* fallthrough */ >> case -1: >> @@ -5536,6 +5537,21 @@ void arch_dump_shared_mem_info(void) >> mem_sharing_get_nr_saved_mfns()); >> } >> >> +const unsigned long *__init >> +vixen_get_platform_badpages(unsigned int *array_size) >> +{ >> + static unsigned long __initdata bad_pages[] = { >> + 0xfeffc000, >> + 0xfeffd000, >> + 0xfeffe000, >> + 0xfefff000, > > This values shouldn't be hardcoded. IMHO it would also be good to > place all the vixen_ helpers in a single file. Ack on moving to a helper. I don't know of a way to call the hypervisor to ask "what's the special page range?". I can find special pages via the hvm get parameters calls but there's no guarantee they are contiguous so the resulting code to punch holes in the e820 because fairly complex. Any ideas how to do this nicely? Regards, Anthony Liguori > Thanks, Roger. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxxxxxxxxx > https://lists.xenproject.org/mailman/listinfo/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |