Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1323263

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

From Boris Ostrovsky <boris.ostrovsky@oracle.com>
Newsgroups linux.kernel
Subject [PATCH v2 03/11] xen/hvmlite: Initialize HVMlite kernel
Date 2016-02-01 16:50 +0100
Message-ID <qXoTP-4WL-61@gated-at.bofh.it> (permalink)
References <qXoTM-4WL-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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(-)

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;
 }
 
-- 
1.7.1

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v2 03/11] xen/hvmlite: Initialize HVMlite kernel Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-02-01 16:50 +0100

csiph-web