mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Doug Goldstein <cardoe@cardoe.com>
To: linux-kernel@vger.kernel.org
Cc: xen-devel@lists.xenproject.org,
	David Vrabel <david.vrabel@citrix.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	Doug Goldstein <cardoe@cardoe.com>
Subject: [PATCH 2/2] xen: wrap privcmd on xenfs with COMPAT option
Date: Mon, 30 Nov 2015 15:35:10 -0600	[thread overview]
Message-ID: <1448919310-27981-2-git-send-email-cardoe@cardoe.com> (raw)
In-Reply-To: <1448919310-27981-1-git-send-email-cardoe@cardoe.com>

Since Xen 4.7.0, using privcmd via xenfs (/proc/xen/privcmd) is deprecated
and /dev/xen/privcmd via pvops is used instead. This is an effort to
eventually drop this interface after a reasonable amount of time.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
 drivers/xen/Kconfig       | 12 ++++++++++++
 drivers/xen/xenfs/super.c |  4 ++++
 2 files changed, 16 insertions(+)

diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
index 7003984..c610902 100644
--- a/drivers/xen/Kconfig
+++ b/drivers/xen/Kconfig
@@ -135,6 +135,18 @@ config XEN_COMPAT_XENFS_XENBUS
 	  Xen 4.6.0 and newer.
 	  If in doubt, say yes.
 
+config XEN_COMPAT_XENFS_PRIVCMD
+	bool "privcmd accessible from xenfs"
+	depends on XENFS
+	default y
+	help
+	  Since Xen 4.7.0, Xen userland will prefer to use the
+	  /dev/xen/privcmd device over the "privcmd" interface on the
+	  xenfs filesystem. Selecting this causes the kernel to include
+	  the "privcmd" interface on the xenfs filesystem and you can
+	  safely say no for Xen 4.7.0 and newer.
+	  If in doubt, say yes.
+
 config XEN_SYS_HYPERVISOR
        bool "Create xen entries under /sys/hypervisor"
        depends on SYSFS
diff --git a/drivers/xen/xenfs/super.c b/drivers/xen/xenfs/super.c
index 86ff5b3..bb40970b 100644
--- a/drivers/xen/xenfs/super.c
+++ b/drivers/xen/xenfs/super.c
@@ -50,7 +50,9 @@ static int xenfs_fill_super(struct super_block *sb, void *data, int silent)
 		{ "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
 #endif
 		{ "capabilities", &capabilities_file_ops, S_IRUGO },
+#ifdef CONFIG_XEN_COMPAT_XENFS_PRIVCMD
 		{ "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR },
+#endif
 		{""},
 	};
 
@@ -60,7 +62,9 @@ static int xenfs_fill_super(struct super_block *sb, void *data, int silent)
 		{ "xenbus", &xen_xenbus_fops, S_IRUSR|S_IWUSR },
 #endif
 		{ "capabilities", &capabilities_file_ops, S_IRUGO },
+#ifdef CONFIG_XEN_COMPAT_XENFS_PRIVCMD
 		{ "privcmd", &xen_privcmd_fops, S_IRUSR|S_IWUSR },
+#endif
 		{ "xsd_kva", &xsd_kva_file_ops, S_IRUSR|S_IWUSR},
 		{ "xsd_port", &xsd_port_file_ops, S_IRUSR|S_IWUSR},
 #ifdef CONFIG_XEN_SYMS
-- 
2.4.10


  reply	other threads:[~2015-11-30 21:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-30 21:35 [PATCH 1/2] xen: wrap xenbus " Doug Goldstein
2015-11-30 21:35 ` Doug Goldstein [this message]
2015-12-01 10:42 ` [Xen-devel] " David Vrabel
2015-12-01 10:44   ` David Vrabel
2015-12-01 13:45     ` Doug Goldstein
2015-12-01 13:54       ` David Vrabel

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=1448919310-27981-2-git-send-email-cardoe@cardoe.com \
    --to=cardoe@cardoe.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®