xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Use new Xen public header for product numbers and names
@ 2012-10-01  9:43 Paul Durrant
  2012-10-01 15:14 ` Ian Jackson
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Durrant @ 2012-10-01  9:43 UTC (permalink / raw)
  To: xen-devel; +Cc: Paul Durrant

xen/include/public/hvm/pvdrivers.h has been added as the
register of product numbers used by the blacklisting protocol.
Use the definitions therein rather then locally coded values.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
---
 xenstore.c |   23 +++++++----------------
 1 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/xenstore.c b/xenstore.c
index 1857160..4382674 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -23,6 +23,8 @@
 #include "qemu-timer.h"
 #include "qemu-xen.h"
 
+#include <xen/hvm/pvdrivers.h>
+
 struct xs_handle *xsh = NULL;
 static char *media_filename[MAX_DRIVES+1];
 static QEMUTimer *insert_timer = NULL;
@@ -960,28 +962,17 @@ xenstore_pv_driver_build_blacklisted(uint16_t product_nr,
     char *tmp;
     const char *product;
 
+#define PRODUCT(_name, _nr) case _nr: product = _name; break;
     switch (product_nr) {
-    /*
-     * In qemu-xen-unstable, this is the master registry of product
-     * numbers.  If you need a new product number allocating, please
-     * post to xen-devel@lists.xensource.com.  You should NOT use
-     * an existing product number without allocating one.
-     *
-     * If you maintain a seaparate versioning and distribution path
-     * for PV drivers you should have a separate product number so
-     * that your drivers can be separated from others'.
-     *
-     * During development, you may use the product ID 0xffff to
-     * indicate a driver which is yet to be released.
-     */
-    case 1: product = "xensource-windows";  break; /* Citrix */
-    case 2: product = "gplpv-windows";      break; /* James Harper */
-    case 0xffff: product = "experimental";  break;
+    PVDRIVERS_PRODUCT_LIST(PRODUCT)
     default:
         /* Don't know what product this is -> we can't blacklist
          * it. */
         return 0;
     }
+
+#undef  PRODUCT
+
     if (asprintf(&buf, "/mh/driver-blacklist/%s/%d", product, build_nr) < 0)
         return 0;
     tmp = xs_read(xsh, XBT_NULL, buf, NULL);
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 14+ messages in thread
* [PATCH 0/2] PV drivers product number registration (v3)
@ 2012-10-01 16:28 Paul Durrant
  2012-10-01 16:28 ` [PATCH 2/2] Register Linux PV-on-HVM drivers product number Paul Durrant
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Durrant @ 2012-10-01 16:28 UTC (permalink / raw)
  To: xen-devel; +Cc: Paul Durrant

PV drivers in HVM guests typically make use off an 'unplug' protocol in QEMU
to prevent co-existence of emulated devices.
See docs/misc/hvm-emulated-unplug.markdown for details.

The register of product numbers used by the blacklisting feature of this
protocol is currently directly in the xenstore.c source moduleof traditional
QEMU. It should really be in a Xen header file to prevent duplication/conflict
between QEMU versions.

Moreover the linux PV-on-HVM drivers make use of product number 3 seemingly
without ever registering that number.

This patch series introduces a new header and registers product number 3 for
Linux's use. A subsequent patch to qemu-xen-unstable wll be created to make use
of the new header.

Version 2:

I have re-coded at Ian Jackson's request in the form of macros that allow a
switch statement or array to be easily generated from the product list.

Version 3:

Ditching the terminator list entry.
The associated QEMU patch is unmodified by this so not resending.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH 0/2] PV drivers product number registration
@ 2012-09-26 13:50 Paul Durrant
  2012-09-26 13:50 ` [PATCH 2/2] Register Linux PV-on-HVM drivers product number Paul Durrant
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Durrant @ 2012-09-26 13:50 UTC (permalink / raw)
  To: xen-devel; +Cc: Paul Durrant

PV drivers in HVM guests typically make use off an 'unplug' protocol in QEMU
to prevent co-existence of emulated devices.
See docs/misc/hvm-emulated-unplug.markdown for details.

The register of product numbers used by the blacklisting feature of this
protocol is currently directly in the xenstore.c source module of traditional
QEMU. It should really be in a Xen header file to prevent duplication/conflict
between QEMU versions.

Moreover the linux PV-on-HVM drivers make use of product number 3 seemingly
without ever registering that number.

This patch series introduces a new header and registers product number 3 for
Linux's use. A subsequent patch to qemu-xen-unstable wll be created to make
use of the new header.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCH 0/2] PV drivers product number registration
@ 2012-09-26 12:23 Paul Durrant
  2012-09-26 12:23 ` [PATCH 2/2] Register Linux PV-on-HVM drivers product number Paul Durrant
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Durrant @ 2012-09-26 12:23 UTC (permalink / raw)
  To: xen-devel; +Cc: Paul Durrant

PV drivers in HVM guests typically make use off an 'unplug' protocol in QEMU
to prevent co-existence of emulated devices.
See docs/misc/hvm-emulated-unplug.markdown for details.

The register of product numbers used by the blacklisting feature of this
protocol is currently directly in the xenstore.c source module of
traditional QEMU. It should really be in a Xen header file to prevent
duplication/conflict between QEMU versions.

Moreover the linux PV-on-HVM drivers make use of product number 3 seemingly
without ever registering that number.

This patch series introduces a new header and registers product number 3
for Linux's use. A subsequent patch to qemu-xen-unstable wll be created to
make use of the new header.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>

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

end of thread, other threads:[~2012-10-02  9:25 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-01  9:43 [PATCH] Use new Xen public header for product numbers and names Paul Durrant
2012-10-01 15:14 ` Ian Jackson
2012-10-01 16:08   ` Paul Durrant
2012-10-01  9:41     ` [PATCH 0/2] PV drivers product number registration (v2) Paul Durrant
2012-10-01  9:41       ` [PATCH 1/2] Add a new pvdrivers header to serve as the register of product numbers Paul Durrant
2012-10-01 15:12         ` Ian Jackson
2012-10-01 16:17           ` Paul Durrant
2012-10-01 16:27             ` [PATCH 1/2] Add a new pvdrivers header to serve as the register of product numbers. [and 1 more messages] Ian Jackson
2012-10-01  9:41       ` [PATCH 2/2] Register Linux PV-on-HVM drivers product number Paul Durrant
2012-10-02  9:25     ` [PATCH] Use new Xen public header for product numbers and names Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2012-10-01 16:28 [PATCH 0/2] PV drivers product number registration (v3) Paul Durrant
2012-10-01 16:28 ` [PATCH 2/2] Register Linux PV-on-HVM drivers product number Paul Durrant
2012-10-01 16:56   ` Ian Jackson
2012-09-26 13:50 [PATCH 0/2] PV drivers product number registration Paul Durrant
2012-09-26 13:50 ` [PATCH 2/2] Register Linux PV-on-HVM drivers product number Paul Durrant
2012-09-26 12:23 [PATCH 0/2] PV drivers product number registration Paul Durrant
2012-09-26 12:23 ` [PATCH 2/2] Register Linux PV-on-HVM drivers product number Paul Durrant

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).