xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Rathor <mukesh.rathor@oracle.com>
To: xen-devel@lists.xenproject.org
Cc: George.Dunlap@eu.citrix.com, keir.xen@gmail.com, tim@xen.org,
	JBeulich@suse.com
Subject: [V8 PATCH 8/8] pvh dom0: add opt_dom0pvh to setup.c
Date: Fri, 21 Mar 2014 18:39:17 -0700	[thread overview]
Message-ID: <1395452357-1598-9-git-send-email-mukesh.rathor@oracle.com> (raw)
In-Reply-To: <1395452357-1598-1-git-send-email-mukesh.rathor@oracle.com>

A pvh dom0 is booted by adding dom0pvh to grub xen command line.

Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
---
 docs/misc/pvh-readme.txt |  2 ++
 xen/arch/x86/setup.c     | 12 +++++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/docs/misc/pvh-readme.txt b/docs/misc/pvh-readme.txt
index 9fea137..c5b3de4 100644
--- a/docs/misc/pvh-readme.txt
+++ b/docs/misc/pvh-readme.txt
@@ -37,6 +37,8 @@ supported. Phase I patches are broken into three parts:
    - tools changes for creating a PVH guest
    - boot of 64bit dom0 in PVH mode.
 
+To boot 64bit dom0 in PVH mode, add dom0pvh to grub xen command line.
+
 Following fixme's exist in the code:
   - arch/x86/time.c: support more tsc modes.
 
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index 4dbf2b7..1283455 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -61,6 +61,10 @@ integer_param("maxcpus", max_cpus);
 static bool_t __initdata disable_smep;
 invbool_param("smep", disable_smep);
 
+/* Boot dom0 in pvh mode */
+bool_t __initdata opt_dom0pvh;
+boolean_param("dom0pvh", opt_dom0pvh);
+
 /* **** Linux config option: propagated to domain0. */
 /* "acpi=off":    Sisables both ACPI table parsing and interpreter. */
 /* "acpi=force":  Override the disable blacklist.                   */
@@ -541,7 +545,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
 {
     char *memmap_type = NULL;
     char *cmdline, *kextra, *loader;
-    unsigned int initrdidx;
+    unsigned int initrdidx, domcr_flags = 0;
     multiboot_info_t *mbi = __va(mbi_p);
     module_t *mod = (module_t *)__va(mbi->mods_addr);
     unsigned long nr_pages, raw_max_page, modules_headroom, *module_map;
@@ -1337,8 +1341,10 @@ void __init noreturn __start_xen(unsigned long mbi_p)
     if ( !tboot_protect_mem_regions() )
         panic("Could not protect TXT memory regions");
 
-    /* Create initial domain 0. */
-    dom0 = domain_create(0, DOMCRF_s3_integrity, 0);
+     /* Create initial domain 0. */
+     domcr_flags = (opt_dom0pvh ? DOMCRF_pvh | DOMCRF_hap : 0);
+     domcr_flags |= DOMCRF_s3_integrity;
+     dom0 = domain_create(0, domcr_flags, 0);
     if ( IS_ERR(dom0) || (alloc_dom0_vcpu0() == NULL) )
         panic("Error creating domain 0");
 
-- 
1.8.3.1

  parent reply	other threads:[~2014-03-22  1:40 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-22  1:39 [V8 PATCH 0/8] pvh dom0 Mukesh Rathor
2014-03-22  1:39 ` [V8 PATCH 1/8] pvh dom0: move some pv specific code to static functions Mukesh Rathor
2014-03-22  1:39 ` [V8 PATCH 2/8] pvh dom0: construct_dom0 changes Mukesh Rathor
2014-03-26 19:05   ` George Dunlap
2014-03-27 10:14     ` Jan Beulich
2014-03-27 10:55       ` George Dunlap
2014-03-27 11:03         ` George Dunlap
2014-03-27 15:04         ` Jan Beulich
2014-03-27 15:30           ` Tim Deegan
2014-04-05  0:53             ` Mukesh Rathor
2014-04-07  7:30               ` Jan Beulich
2014-04-07  9:27               ` George Dunlap
2014-03-22  1:39 ` [V8 PATCH 3/8] pvh dom0: Introduce p2m_map_foreign Mukesh Rathor
2014-03-24  9:00   ` Jan Beulich
2014-03-27 12:29   ` George Dunlap
2014-04-05  0:57     ` Mukesh Rathor
2014-03-22  1:39 ` [V8 PATCH 4/8] pvh dom0: make xsm_map_gmfn_foreign available for x86 Mukesh Rathor
2014-03-25 17:53   ` Daniel De Graaf
2014-03-22  1:39 ` [V8 PATCH 5/8] pvh dom0: Add and remove foreign pages Mukesh Rathor
2014-03-24  9:26   ` Jan Beulich
2014-04-05  1:17     ` Mukesh Rathor
2014-04-07  6:57       ` Jan Beulich
2014-04-08  1:11         ` Mukesh Rathor
2014-04-08  7:36           ` Jan Beulich
2014-04-08 14:01             ` Tim Deegan
2014-04-08 14:07               ` Jan Beulich
2014-04-08 14:18                 ` Tim Deegan
2014-04-08 15:40                   ` George Dunlap
2014-04-11  1:33     ` Mukesh Rathor
2014-04-11  8:02       ` Jan Beulich
2014-03-22  1:39 ` [V8 PATCH 6/8] pvh dom0: allow get_pg_owner for translated domains Mukesh Rathor
2014-03-24  9:31   ` Jan Beulich
2014-04-01 14:31     ` George Dunlap
2014-04-05  0:59       ` Mukesh Rathor
2014-03-22  1:39 ` [V8 PATCH 7/8] pvh dom0: add check for pvh in vioapic_range Mukesh Rathor
2014-03-24  9:34   ` Jan Beulich
2014-04-01 14:40     ` George Dunlap
2014-04-01 15:09       ` Jan Beulich
2014-04-05  1:00         ` Mukesh Rathor
2014-04-07  6:59           ` Jan Beulich
2014-04-07  9:28             ` George Dunlap
2014-04-08  1:00               ` Mukesh Rathor
2014-04-08  8:21                 ` Jan Beulich
2014-03-22  1:39 ` Mukesh Rathor [this message]
2014-03-24  9:35   ` [V8 PATCH 8/8] pvh dom0: add opt_dom0pvh to setup.c Jan Beulich
2014-03-24  8:57 ` [V8 PATCH 0/8] pvh dom0 Jan Beulich
2014-03-24 21:36   ` Mukesh Rathor
2014-03-28 17:36 ` Roger Pau Monné
2014-03-28 19:48   ` Mukesh Rathor
2014-04-01 16:04 ` George Dunlap
2014-04-02  1:22   ` Mukesh Rathor

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=1395452357-1598-9-git-send-email-mukesh.rathor@oracle.com \
    --to=mukesh.rathor@oracle.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir.xen@gmail.com \
    --cc=tim@xen.org \
    --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;
as well as URLs for NNTP newsgroup(s).