From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
boris.ostrovsky@oracle.com, david.vrabel@citrix.com,
mukesh.rathor@oracle.com, jbeulich@suse.com
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH v11 12/12] xen/pvh: Support ParaVirtualized Hardware extensions.
Date: Tue, 17 Dec 2013 15:51:43 -0500 [thread overview]
Message-ID: <1387313503-31362-13-git-send-email-konrad.wilk@oracle.com> (raw)
In-Reply-To: <1387313503-31362-1-git-send-email-konrad.wilk@oracle.com>
From: Mukesh Rathor <mukesh.rathor@oracle.com>
PVH allows PV linux guest to utilize hardware extended capabilities,
such as running MMU updates in a HVM container.
The Xen side defines PVH as (from docs/misc/pvh-readme.txt,
with modifications):
"* the guest uses auto translate:
- p2m is managed by Xen
- pagetables are owned by the guest
- mmu_update hypercall not available
* it uses event callback and not vlapic emulation,
* IDT is native, so set_trap_table hcall is also N/A for a PVH guest.
For a full list of hcalls supported for PVH, see pvh_hypercall64_table
in arch/x86/hvm/hvm.c in xen. From the ABI prespective, it's mostly a
PV guest with auto translate, although it does use hvm_op for setting
callback vector."
Use .ascii and .asciz to define xen feature string. Note, the PVH
string must be in a single line (not multiple lines with \) to keep the
assembler from putting null char after each string before \.
This patch allows it to be configured and enabled.
Lastly remove some of the scaffolding.
Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
arch/x86/xen/Kconfig | 8 ++++++++
arch/x86/xen/xen-head.S | 8 +++++++-
include/xen/xen.h | 3 +--
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig
index 1a3c765..161cc34 100644
--- a/arch/x86/xen/Kconfig
+++ b/arch/x86/xen/Kconfig
@@ -51,3 +51,11 @@ config XEN_DEBUG_FS
Enable statistics output and various tuning options in debugfs.
Enabling this option may incur a significant performance overhead.
+config XEN_PVH
+ bool "Support for running as a PVH guest"
+ depends on X86_64 && XEN && XEN_PVHVM
+ default n
+ help
+ This option enables support for running as a PVH guest (PV guest
+ using hardware extensions) under a suitably capable hypervisor.
+ If unsure, say N.
diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S
index 7faed58..56f42c0 100644
--- a/arch/x86/xen/xen-head.S
+++ b/arch/x86/xen/xen-head.S
@@ -13,6 +13,12 @@
#include <xen/interface/elfnote.h>
#include <asm/xen/interface.h>
+#ifdef CONFIG_XEN_PVH
+#define PVH_FEATURES_STR "|writable_descriptor_tables|auto_translated_physmap|supervisor_mode_kernel|hvm_callback_vector"
+#else
+#define PVH_FEATURES_STR ""
+#endif
+
__INIT
ENTRY(startup_xen)
cld
@@ -95,7 +101,7 @@ NEXT_HYPERCALL(arch_6)
#endif
ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, _ASM_PTR startup_xen)
ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, _ASM_PTR hypercall_page)
- ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb")
+ ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .ascii "!writable_page_tables|pae_pgdir_above_4gb"; .asciz PVH_FEATURES_STR)
ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes")
ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic")
ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID,
diff --git a/include/xen/xen.h b/include/xen/xen.h
index 1d6a237..a248002 100644
--- a/include/xen/xen.h
+++ b/include/xen/xen.h
@@ -29,8 +29,7 @@ extern enum xen_domain_type xen_domain_type;
#define xen_initial_domain() (0)
#endif /* CONFIG_XEN_DOM0 */
-#ifdef CONFIG_XEN_PVHVM
-/* Temporarily under XEN_PVHVM, but will be under CONFIG_XEN_PVH */
+#ifdef CONFIG_XEN_PVH
#include <xen/features.h>
#define xen_pvh_domain() (xen_pv_domain() && \
xen_feature(XENFEAT_auto_translated_physmap) && \
--
1.8.3.1
next prev parent reply other threads:[~2013-12-17 20:57 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 20:51 [PATCH v11] PVH support for Linux kernel Konrad Rzeszutek Wilk
2013-12-17 20:51 ` [PATCH v11 01/12] xen/p2m: Check for auto-xlat when doing mfn_to_local_pfn Konrad Rzeszutek Wilk
2013-12-18 14:10 ` [Xen-devel] " Stefano Stabellini
2013-12-17 20:51 ` [PATCH v11 02/12] xen/pvh: Define what an PVH guest is Konrad Rzeszutek Wilk
2013-12-18 14:22 ` [Xen-devel] " Stefano Stabellini
2013-12-18 14:55 ` Stefano Stabellini
2013-12-18 16:01 ` Ian Campbell
2013-12-18 16:58 ` Konrad Rzeszutek Wilk
2013-12-18 17:03 ` Ian Campbell
2013-12-18 14:57 ` Konrad Rzeszutek Wilk
2013-12-17 20:51 ` [PATCH v11 03/12] xen/pvh: Early bootup changes in PV code Konrad Rzeszutek Wilk
2013-12-18 14:27 ` [Xen-devel] " Stefano Stabellini
2013-12-18 14:58 ` Konrad Rzeszutek Wilk
2013-12-18 15:05 ` Stefano Stabellini
2013-12-17 20:51 ` [PATCH v11 04/12] xen/pvh: Don't setup P2M tree Konrad Rzeszutek Wilk
2013-12-18 14:39 ` [Xen-devel] " Stefano Stabellini
2013-12-18 15:05 ` Konrad Rzeszutek Wilk
2013-12-17 20:51 ` [PATCH v11 05/12] xen/pvh: Update E820 to work with PVH Konrad Rzeszutek Wilk
2013-12-18 18:25 ` [Xen-devel] " Stefano Stabellini
2013-12-18 20:30 ` Konrad Rzeszutek Wilk
2013-12-18 23:44 ` Mukesh Rathor
2013-12-19 11:25 ` Stefano Stabellini
2013-12-17 20:51 ` [PATCH v11 06/12] xen/pvh: Load GDT/GS in early PV bootup code for BSP Konrad Rzeszutek Wilk
2013-12-17 20:51 ` [PATCH v11 07/12] xen/pvh: Secondary VCPU bringup (non-bootup CPUs) Konrad Rzeszutek Wilk
2013-12-17 20:51 ` [PATCH v11 08/12] xen/pvh: MMU changes for PVH Konrad Rzeszutek Wilk
2013-12-18 14:48 ` [Xen-devel] " Stefano Stabellini
2013-12-18 15:10 ` Konrad Rzeszutek Wilk
2013-12-18 15:15 ` Stefano Stabellini
2013-12-17 20:51 ` [PATCH v11 09/12] xen/pvh: Piggyback on PVHVM XenBus and event channels " Konrad Rzeszutek Wilk
2013-12-18 18:31 ` [Xen-devel] " Stefano Stabellini
2013-12-18 21:17 ` Konrad Rzeszutek Wilk
2014-01-04 0:48 ` Mukesh Rathor
2014-01-05 17:18 ` Stefano Stabellini
2013-12-31 18:56 ` Konrad Rzeszutek Wilk
2014-01-03 15:04 ` Stefano Stabellini
2014-01-04 0:29 ` Mukesh Rathor
2013-12-17 20:51 ` [PATCH v11 10/12] xen/pvh: Piggyback on PVHVM for grant driver Konrad Rzeszutek Wilk
2013-12-18 18:46 ` [Xen-devel] " Stefano Stabellini
2013-12-18 21:21 ` Konrad Rzeszutek Wilk
2014-01-03 15:10 ` Stefano Stabellini
2013-12-17 20:51 ` [PATCH v11 11/12] xen/pvh: Disable PV code that does not work with PVH Konrad Rzeszutek Wilk
2013-12-18 14:19 ` [Xen-devel] " Stefano Stabellini
2013-12-18 14:56 ` Konrad Rzeszutek Wilk
2013-12-18 15:22 ` Stefano Stabellini
2013-12-17 20:51 ` Konrad Rzeszutek Wilk [this message]
2013-12-18 14:52 ` [Xen-devel] [PATCH v11 12/12] xen/pvh: Support ParaVirtualized Hardware extensions Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1387313503-31362-13-git-send-email-konrad.wilk@oracle.com \
--to=konrad.wilk@oracle.com \
--cc=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=jbeulich@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mukesh.rathor@oracle.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®