diff mbox

[v2,03/11] xen/hvmlite: Initialize HVMlite kernel

Message ID 1454341137-14110-4-git-send-email-boris.ostrovsky@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Boris Ostrovsky Feb. 1, 2016, 3:38 p.m. UTC
HVMlite guests need to make a few additional initialization calls
compared to regular HVM guests.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
 arch/x86/xen/enlighten.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

Comments

Luis Chamberlain Feb. 17, 2016, 8:08 p.m. UTC | #1
On Mon, Feb 1, 2016 at 7:38 AM, Boris Ostrovsky
<boris.ostrovsky@oracle.com> wrote:
> +               pv_info.paravirt_enabled = 1;

As its being discussed we want to remove paravirt_enabled so this
series should not be merged with this:

http://kernelnewbies.org/KernelProjects/remove-paravirt-enabled

 Luis
diff mbox

Patch

diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 5f05fa2..1409de6 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1863,15 +1863,21 @@  static void __init init_hvm_pv_info(void)
 	minor = eax & 0xffff;
 	printk(KERN_INFO "Xen version %d.%d.\n", major, minor);
 
-	cpuid(base + 2, &pages, &msr, &ecx, &edx);
-
-	pfn = __pa(hypercall_page);
-	wrmsr_safe(msr, (u32)pfn, (u32)(pfn >> 32));
+	/* HVMlite set up hypercall page earlier in xen_prepare_hvmlite() */
+	if (xen_hvmlite) {
+		pv_info.name = "Xen HVMlite";
+		pv_info.paravirt_enabled = 1;
+		xen_init_apic();
+		machine_ops = xen_machine_ops;
+	} else {
+		pv_info.name = "Xen HVM";
+		cpuid(base + 2, &pages, &msr, &ecx, &edx);
+		pfn = __pa(hypercall_page);
+		wrmsr_safe(msr, (u32)pfn, (u32)(pfn >> 32));
+	}
 
 	xen_setup_features();
 
-	pv_info.name = "Xen HVM";
-
 	xen_domain_type = XEN_HVM_DOMAIN;
 }