[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1210221428050.2689@kaball.uk.xensource.com>
Date: Mon, 22 Oct 2012 14:34:44 +0100
From: Stefano Stabellini <stefano.stabellini@...citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
"mukesh.rathor@...cle.com" <mukesh.rathor@...cle.com>,
Ian Campbell <Ian.Campbell@...rix.com>,
Stefano Stabellini <Stefano.Stabellini@...citrix.com>
Subject: Re: [PATCH 4/6] xen/pvh: bootup and setup related changes.
On Sat, 20 Oct 2012, Konrad Rzeszutek Wilk wrote:
> From: Mukesh Rathor <mukesh.rathor@...cle.com>
>
> In enlighten.c for PVH we can trap cpuid via vmexit, so don't
> need to use emulated prefix call. We also check for vector callback
> early on, as it is a required feature. PVH also runs at default kernel
> IOPL.
>
> In setup.c, in xen_add_extra_mem() we can skip updating P2M as it's managed
> by Xen. PVH maps the entire IO space, but only RAM pages need to be repopulated.
>
> Finally, pure PV settings are moved to a separate function that is only called
> for pure PV, ie, pv with pvmmu.
>
> Signed-off-by: Mukesh Rathor <mukesh.rathor@...cle.com>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
>
> diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
> index 8971a26..8cce47b 100644
> --- a/arch/x86/xen/setup.c
> +++ b/arch/x86/xen/setup.c
> @@ -27,6 +27,7 @@
> #include <xen/interface/memory.h>
> #include <xen/interface/physdev.h>
> #include <xen/features.h>
> +#include "mmu.h"
> #include "xen-ops.h"
> #include "vdso.h"
>
> @@ -78,6 +79,9 @@ static void __init xen_add_extra_mem(u64 start, u64 size)
>
> memblock_reserve(start, size);
>
> + if (xen_feature(XENFEAT_auto_translated_physmap))
> + return;
> +
> xen_max_p2m_pfn = PFN_DOWN(start + size);
> for (pfn = PFN_DOWN(start); pfn < xen_max_p2m_pfn; pfn++) {
> unsigned long mfn = pfn_to_mfn(pfn);
> @@ -100,6 +104,7 @@ static unsigned long __init xen_do_chunk(unsigned long start,
> .domid = DOMID_SELF
> };
> unsigned long len = 0;
> + int xlated_phys = xen_feature(XENFEAT_auto_translated_physmap);
> unsigned long pfn;
> int ret;
>
> @@ -113,7 +118,7 @@ static unsigned long __init xen_do_chunk(unsigned long start,
> continue;
> frame = mfn;
> } else {
> - if (mfn != INVALID_P2M_ENTRY)
> + if (!xlated_phys && mfn != INVALID_P2M_ENTRY)
> continue;
> frame = pfn;
> }
Shouldn't we add a "!xlated_phys &&" to the other case as well?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists