PV drivers product number registration
cover PV drivers product number registration
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.
PATCH 1/2 Add a new pvdrivers header to serve as the register of product numbers.
These product numbers are used by the QEMU blacklisting protocol in traditional QEMU and are currently coded directly into the xenstore.c source module. Since there are now multiple QEMUs this information should be pulled into a public header to avoid duplication/conflict. hvm-emulated-unplug.markdown has also been adjusted to reference the new header.
--- docs/misc/hvm-emulated-unplug.markdown | 2 +- xen/include/public/hvm/pvdrivers.h | 53 ++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletions(-) create mode 100644 xen/include/public/hvm/pvdrivers.h
docs/misc/hvm-emulated-unplug.markdown +1 -1
@@ -65,4 +65,4 @@ decimal number. `{product_name}` is a string corresponding to the product number in step 3. The master registry of product names and numbers is in -qemu-xen-unstable's xenstore.c. +xen/include/public/hvm/pvdrivers.h
xen/include/public/hvm/pvdrivers.h new file +53 -0
53 lines not on this page · raw message
Signature · 1 line
1.7.2.5
PATCH 2/2 Register Linux PV-on-HVM drivers product number.
In reply to Paul DurrantThis is already in use despite never being registereed. See XEN_IOPORT_LINUX_PRODNUM in include/xen/platform_pci.h
--- xen/include/public/hvm/pvdrivers.h | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
xen/include/public/hvm/pvdrivers.h +5 -5
@@ -28,17 +28,14 @@* This is the master registry of product numbers for * PV drivers. * If you need a new product number allocating, please -* post to [email protected]. You should NOT use +* post to [email protected]. You should NOT use * a product number without allocating one. * If you maintain a separate 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 EXPERIMENTAL product ID to +* During development, you may use the product ID to * indicate a driver which is yet to be released. -* -* See docs/misc/hvm-emulated-unplug.markdown for details of how -* the product number is used. */ #define PVDRIVERS_XENSOURCE_WINDOWS_ID 0x0001/* Citrix */
@@ -47,6 +44,9 @@#define PVDRIVERS_GPLPV_WINDOWS_ID 0x0002/* James Harper */ #define PVDRIVERS_GPLPV_WINDOWS_NAME "gplpv-windows" +#define PVDRIVERS_LINUX_ID 0x0003/* platform_pci.h */ +#define PVDRIVERS_LINUX_NAME "linux" +#define PVDRIVERS_EXPERIMENTAL_ID 0xffff#define PVDRIVERS_EXPERIMENTAL_NAME "experimental"
Signature · 1 line
1.7.2.5
Re: [PATCH 1/2] Add a new pvdrivers header to serve as the register of product numbers.
In reply to Paul DurrantPaul Durrant writes ("[Xen-devel] [PATCH 1/2] Add a new pvdrivers header to serve as the register of product numbers."):
Quoted 7 lines
These product numbers are used by the QEMU blacklisting protocol in traditional QEMU and are currently coded directly into the
xenstore.csource module. Since there are now multiple QEMUs this information should be pulled into a public header to avoid duplication/conflict. hvm-emulated-unplug.markdown has also been adjusted to reference the new header.
xen/include/public/hvm/pvdrivers.h line 51
Quoted 8 lines
xen/include/public/hvm/pvdrivers.h new file +8
-0+#define PVDRIVERS_XENSOURCE_WINDOWS_ID 0x0001/* Citrix */ +#define PVDRIVERS_XENSOURCE_WINDOWS_NAME "xensource-windows" + +#define PVDRIVERS_GPLPV_WINDOWS_ID 0x0002/* James Harper */ +#define PVDRIVERS_GPLPV_WINDOWS_NAME "gplpv-windows" + +#define PVDRIVERS_EXPERIMENTAL_ID 0xffff +#define PVDRIVERS_EXPERIMENTAL_NAME "experimental"
This form for this list is very ill-suited to many obvious uses. For example it cannot be used to automatically generate a switch statement or a table of values for printing.
Can I suggest
#define PVDRIVERS_ID_NAME_LIST(EACH) \
EACH(WINDOWS, 0x0001 /* Citrix */, "xensource-windows") \
...
or something ?
Ian.