[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH 0/8]: PVH : PV guest in HVM container



On Wed, Aug 15, 2012 at 05:52:24PM -0700, Mukesh Rathor wrote:
> Hi,
> 
>       Following are series of patches for PVH linux changes. xen
>       patches will follow later.
> 
>         A PVH is a PV guest that runs in an HVM container. Its only available
>         for x86_64 only. It runs in ring 0 (the kernel), has native page 
> tables,
>         native IDT, and requires HAP. It uses lot of HVM code paths. Both in
>         the guest and xen, the guest is viewed as pv guest,  and is_hvm()
>         would return false. It uses event channels thereby eliminating APIC
>         emulation code paths in xen.
> 
>         This series of patches implment this feature. They were built on
>         top of fc6bdb59a501740b28ed3b616641a22c8dc5dd31 from the following
>         tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Neat. I like the patches. The one thing that you might also want to expose so
is something like this:

diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig
index fdce49c..cd60024 100644
--- a/arch/x86/xen/Kconfig
+++ b/arch/x86/xen/Kconfig
@@ -27,6 +27,13 @@ config XEN_PVHVM
        def_bool y
        depends on XEN && PCI && X86_LOCAL_APIC
 
+config XEN_PVH
+       def_bool n
+       depends on XEN_DOM0 && SPECIAL_PTE?
+       help
+         Run initial domain in a HVM container. The hypervisor
+        must have the extensions.. blah blah.
+
 config XEN_MAX_DOMAIN_MEMORY
        int
        default 500 if X86_64
diff --git a/include/xen/xen.h b/include/xen/xen.h
index e823639..0317a36 100644
--- a/include/xen/xen.h
+++ b/include/xen/xen.h
@@ -20,9 +20,12 @@ extern enum xen_domain_type xen_domain_type;
                                 xen_domain_type == XEN_HVM_DOMAIN)
 /* xen_pv_domain check is necessary as start_info ptr is null in HVM. Also,
  * note, xen PVH domain shares lot of HVM code */
+#ifdef CONFIG_XEN_PVH
 #define xen_pvh_domain()       (xen_pv_domain() &&                     \
                                (xen_start_info->flags & SIF_IS_PVINHVM))
-
+#else
+#define xen_pvh_domain()       (0)
+#endif
 #ifdef CONFIG_XEN_DOM0
 #include <xen/interface/xen.h>
 #include <asm/xen/hypervisor.h>

That way we can work through all the kinks without having to worry
about causing revert issues or adding extra undue config build options.

Better yet, it allows to test all your code in pure PV and HVM to make
sure nothing broke. And when all is ready this can be removed.

> 
> 
> Thanks,
> Mukesh
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.