From: "Pasi Kärkkäinen" <pasik@iki.fi>
To: Olaf Hering <olaf@aepfle.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
xen-devel@lists.xensource.com, linux-kernel@vger.kernel.org
Subject: Re: [Xen-devel] [PATCH] xen PVonHVM: require at least Xen 3.4 as dom0
Date: Tue, 30 Oct 2012 20:17:32 +0200 [thread overview]
Message-ID: <20121030181732.GZ8912@reaktio.net> (raw)
In-Reply-To: <1351613105-24408-1-git-send-email-olaf@aepfle.de>
On Tue, Oct 30, 2012 at 05:05:05PM +0100, Olaf Hering wrote:
> The XenPVHVM extensions have not been tested much on very old
> hypervisors. At least Xen 3.4 gets some testing with the pvops kernel.
>
> Require at least Xen 3.4 for the PVonHVM extensions. If an older
> hypervisor is detected the extensions will be disabled and the guest
> will only see emulated hardware.
>
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
>
IIRC upstream Linux PVonHVM drivers do work OK today on RHEL5 Xen,
which advertises itself as Xen 3.1.2-based..
-- Pasi
> ---
> arch/x86/xen/enlighten.c | 27 ++++++++++++++++++---------
> 1 file changed, 18 insertions(+), 9 deletions(-)
>
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index 0cc41f8..8566fa8 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -1543,17 +1543,10 @@ static void __init xen_hvm_init_shared_info(void)
>
> static void __init init_hvm_pv_info(void)
> {
> - int major, minor;
> uint32_t eax, ebx, ecx, edx, pages, msr, base;
> u64 pfn;
>
> base = xen_cpuid_base();
> - cpuid(base + 1, &eax, &ebx, &ecx, &edx);
> -
> - major = eax >> 16;
> - minor = eax & 0xffff;
> - printk(KERN_INFO "Xen version %d.%d.\n", major, minor);
> -
> cpuid(base + 2, &pages, &msr, &ecx, &edx);
>
> pfn = __pa(hypercall_page);
> @@ -1604,13 +1597,29 @@ static void __init xen_hvm_guest_init(void)
>
> static bool __init xen_hvm_platform(void)
> {
> + int major, minor, old = 0;
> + uint32_t eax, ebx, ecx, edx, base;
> + bool usable = true;
> +
> if (xen_pv_domain())
> return false;
>
> - if (!xen_cpuid_base())
> + base = xen_cpuid_base();
> + if (!base)
> return false;
>
> - return true;
> + cpuid(base + 1, &eax, &ebx, &ecx, &edx);
> +
> + major = eax >> 16;
> + minor = eax & 0xffff;
> +
> + /* Require at least Xen 3.4 */
> + if (major < 3 || (major == 3 && minor < 4))
> + usable = false;
> + printk(KERN_INFO "Xen version %d.%d.%s\n",
> + major, minor, usable ? "" : " (too old)");
> +
> + return usable;
> }
>
> bool xen_hvm_need_lapic(void)
> --
> 1.8.0
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2012-10-30 18:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-30 16:05 Olaf Hering
2012-10-30 18:17 ` Pasi Kärkkäinen [this message]
2012-10-30 18:28 ` [Xen-devel] " Olaf Hering
2012-10-31 8:30 ` Ian Campbell
2012-10-31 9:29 ` Olaf Hering
2012-10-31 10:21 ` Pasi Kärkkäinen
2012-10-31 11:48 ` Pasi Kärkkäinen
2012-10-31 10:25 ` Ian Campbell
2012-10-31 9:56 ` Olaf Hering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121030181732.GZ8912@reaktio.net \
--to=pasik@iki.fi \
--cc=jeremy@goop.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@aepfle.de \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome