xen/pvh: set xen_domain_type to HVM in xen_pvh_init

This change “xen/pvh: set xen_domain_type to HVM in xen_pvh_init” (commit c9f804d) in Linux kernel is authored by Roger Pau Monne <roger.pau [at] citrix.com> on Tue Apr 23 15:04:15 2019 +0200.

Description of "xen/pvh: set xen_domain_type to HVM in xen_pvh_init"

The change “xen/pvh: set xen_domain_type to HVM in xen_pvh_init” introduces changes as follows.

xen/pvh: set xen_domain_type to HVM in xen_pvh_init

Or else xen_domain() returns false despite xen_pvh being set.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: stable@vger.kernel.org # 4.19+

Linux kernel releases containing commit c9f804d

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "xen/pvh: set xen_domain_type to HVM in xen_pvh_init"

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 arch/x86/xen/enlighten_pvh.c | 1 +
 1 file changed, 1 insertion(+)
 
diff --git a/arch/x86/xen/enlighten_pvh.c b/arch/x86/xen/enlighten_pvh.c
index 35b7599d2d0b..bbffa409e0e8 100644
--- a/arch/x86/xen/enlighten_pvh.c
+++ b/arch/x86/xen/enlighten_pvh.c
@@ -27,6 +27,7 @@ void __init xen_pvh_init(void)
 	u64 pfn;
 
 	xen_pvh = 1;
+	xen_domain_type = XEN_HVM_DOMAIN;
 	xen_start_flags = pvh_start_info.flags;
 
 	msr = cpuid_ebx(xen_cpuid_base() + 2);

The commit for this change in Linux stable tree is c9f804d (patch).

Last modified: 2020/02/08