xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/8]: PVH : PV guest in HVM container
@ 2012-08-16  0:52 Mukesh Rathor
  2012-08-16 14:42 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 2+ messages in thread
From: Mukesh Rathor @ 2012-08-16  0:52 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: Xen-devel@lists.xensource.com

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


Thanks,
Mukesh

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH 0/8]: PVH : PV guest in HVM container
  2012-08-16  0:52 [RFC PATCH 0/8]: PVH : PV guest in HVM container Mukesh Rathor
@ 2012-08-16 14:42 ` Konrad Rzeszutek Wilk
  0 siblings, 0 replies; 2+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-08-16 14:42 UTC (permalink / raw)
  To: Mukesh Rathor; +Cc: Xen-devel@lists.xensource.com

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@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-16 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-16  0:52 [RFC PATCH 0/8]: PVH : PV guest in HVM container Mukesh Rathor
2012-08-16 14:42 ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).