xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: JGross@suse.com
Cc: xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com,
	linux-kernel@vger.kernel.org, roger.pau@citrix.com
Subject: [PATCH v3 6/9] xen/pvh: Initialize grant table for PVH guests
Date: Mon,  6 Feb 2017 12:00:22 -0500	[thread overview]
Message-ID: <1486400425-5356-7-git-send-email-boris.ostrovsky@oracle.com> (raw)
In-Reply-To: <1486400425-5356-1-git-send-email-boris.ostrovsky@oracle.com>

Like PV guests, PVH does not have PCI devices and therefore cannot
use MMIO space to store grants. Instead it balloons out memory and
keeps grants there.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
---
 drivers/xen/grant-table.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index bb36b1e..d6786b8 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -1146,13 +1146,13 @@ EXPORT_SYMBOL_GPL(gnttab_init);
 
 static int __gnttab_init(void)
 {
+	if (!xen_domain())
+		return -ENODEV;
+
 	/* Delay grant-table initialization in the PV on HVM case */
-	if (xen_hvm_domain())
+	if (xen_hvm_domain() && !xen_pvh_domain())
 		return 0;
 
-	if (!xen_pv_domain())
-		return -ENODEV;
-
 	return gnttab_init();
 }
 /* Starts after core_initcall so that xen_pvh_gnttab_setup can be called
-- 
2.7.4


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

  parent reply	other threads:[~2017-02-06 17:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-06 17:00 [PATCH v3 0/9] PVH v2 support (domU) Boris Ostrovsky
2017-02-06 17:00 ` [PATCH v3 1/9] x86/boot/32: Convert the 32-bit pgtable setup code from assembly to C Boris Ostrovsky
2017-02-06 17:00 ` [PATCH v3 2/9] xen/x86: Remove PVH support Boris Ostrovsky
2017-02-06 17:00 ` [PATCH v3 3/9] xen/pvh: Import PVH-related Xen public interfaces Boris Ostrovsky
2017-02-06 17:00 ` [PATCH v3 4/9] xen/pvh: Bootstrap PVH guest Boris Ostrovsky
2017-02-06 19:29   ` kbuild test robot
2017-02-06 17:00 ` [PATCH v3 5/9] xen/pvh: Make sure we don't use ACPI_IRQ_MODEL_PIC for SCI Boris Ostrovsky
2017-02-07 10:19   ` Juergen Gross
2017-02-06 17:00 ` Boris Ostrovsky [this message]
2017-02-06 17:00 ` [PATCH v3 7/9] xen/pvh: PVH guests always have PV devices Boris Ostrovsky
2017-02-06 17:00 ` [PATCH v3 8/9] xen/pvh: Enable CPU hotplug Boris Ostrovsky
2017-02-06 17:00 ` [PATCH v3 9/9] xen/pvh: Use Xen's emergency_restart op for PVH guests Boris Ostrovsky
2017-02-07 17:48 ` [PATCH v3 0/9] PVH v2 support (domU) Boris Ostrovsky

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=1486400425-5356-7-git-send-email-boris.ostrovsky@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=JGross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roger.pau@citrix.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;
as well as URLs for NNTP newsgroup(s).