Skip to contentSkip to conversation

Citrix PV Bus device

PATCH In review Paul Durrant 3 participants 9 messages Jul 2, 2013 – Jul 26, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Citrix PV Bus device

This patch introduces a new PCI device which will act as the binding point for Citrix branded PV drivers for Xen.
The intention is that Citrix Windows PV drivers will be available on Windows Update and thus using the existing Xen platform PCI device as an anchor point is not desirable as that device has been ubiquitous in HVM guests for a long time and thus existing HVM guests running Windows would start automatically downloading drivers from Windows Update when this may not be desired by either the host or guest admin. This device therefore acts as an opt-in for those wishing to deploy Citrix PV drivers.

---
 hw/i386/Makefile.objs    |    1 +
 hw/i386/citrix_pv_bus.c  |  126 ++++++++++++++++++++++++++++++++++++++++++++++
 include/hw/pci/pci_ids.h |    7 ++-
 trace-events             |    4 ++
 4 files changed, 136 insertions(+), 2 deletions(-)
 create mode 100644 hw/i386/citrix_pv_bus.c
hw/i386/Makefile.objs +1 -0
index 205d22e..8e28831 100644
@@ -4,3 +4,4 @@ obj-y += pc.o pc_piix.o pc_q35.o
 obj-$(CONFIG_XEN) += xen_domainbuild.o xen_machine_pv.o
 
 obj-y += kvmvapic.o
+obj-y += citrix_pv_bus.o
hw/i386/citrix_pv_bus.c new file +126 -0

126 lines not on this page · raw message

include/hw/pci/pci_ids.h +5 -2
index d8dc2f1..95b236f 100644
@@ -142,8 +142,11 @@
 
 #define PCI_DEVICE_ID_INTEL_Q35_MCH      0x29c0
 
-#define PCI_VENDOR_ID_XEN               0x5853
-#define PCI_DEVICE_ID_XEN_PLATFORM      0x0001
+#define PCI_VENDOR_ID_CITRIX             0x5853
+#define PCI_DEVICE_ID_CITRIX_PV_BUS      0x0002
+
+#define PCI_VENDOR_ID_XEN                (PCI_VENDOR_ID_CITRIX)
+#define PCI_DEVICE_ID_XEN_PLATFORM       0x0001
 
 #define PCI_VENDOR_ID_NEC                0x1033
 #define PCI_DEVICE_ID_NEC_UPD720200      0x0194
trace-events +4 -0
index c5f1ccb..63052b9 100644
@@ -1161,3 +1161,7 @@ kvm_run_exit(int cpu_index, uint32_t reason) "cpu_index %d, reason %d"
 # qom/object.c
 object_dynamic_cast_assert(const char *type, const char *target, const char *file, int line, const char *func) "%s->%s (%s:%d:%s)"
 object_class_dynamic_cast_assert(const char *type, const char *target, const char *file, int line, const char *func) "%s->%s (%s:%d:%s)"
+
+# hw/i386/citrix_pv_bus.c
+citrix_pv_bus_mmio_read(uint64_t addr) "WARNING: read from Citrix PV MMIO space (address %"PRIx64")"
+citrix_pv_bus_mmio_write(uint64_t addr) "WARNING: write to Citrix PV MMIO space (address %"PRIx64")"
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 9 lines · Paul Durrant

This patch introduces a new PCI device which will act as the binding point for Citrix branded PV drivers for Xen.
The intention is that Citrix Windows PV drivers will be available on Windows Update and thus using the existing Xen platform PCI device as an anchor point is not desirable as that device has been ubiquitous in HVM guests for a long time and thus existing HVM guests running Windows would start automatically downloading drivers from Windows Update when this may not be desired by either the host or guest admin. This device therefore acts as an opt-in for those wishing to deploy Citrix PV drivers.

This commit message doesn't really make the case for having this driver in upstream, IMHO. It sounds like it's only of use for your branded product, which suggests that the best place for it is probably in your product, not upstream.

Quoted 4 lines
---
 hw/i386/Makefile.objs    |    1 +
 hw/i386/citrix_pv_bus.c  |  126 ++++++++++++++++++++++++++++++++++++++++++++++

hw/i386 is also not the right place for this. hw/misc/ would be better.

thanks
-- PMM

#2 lore raw
In reply to Paul Durrant
Quoted 9 lines · Paul Durrant

This patch introduces a new PCI device which will act as the binding point for Citrix branded PV drivers for Xen.
The intention is that Citrix Windows PV drivers will be available on Windows Update and thus using the existing Xen platform PCI device as an anchor point is not desirable as that device has been ubiquitous in HVM guests for a long time and thus existing HVM guests running Windows would start automatically downloading drivers from Windows Update when this may not be desired by either the host or guest admin. This device therefore acts as an opt-in for those wishing to deploy Citrix PV drivers.

This commit message doesn't really make the case for having this driver in upstream, IMHO. It sounds like it's only of use for your branded product, which suggests that the best place for it is probably in your product, not upstream.

Quoted 4 lines
---
 hw/i386/Makefile.objs    |    1 +
 hw/i386/citrix_pv_bus.c  |  126 ++++++++++++++++++++++++++++++++++++++++++++++

hw/i386 is also not the right place for this. hw/misc/ would be better.

thanks
-- PMM

#3 lore raw
Quoted 15 lines

-----Original Message-----
From: Peter Maydell [mailto:[email protected]]
Sent: 02 July 2013 15:58
To: Paul Durrant
Cc: [email protected]; [email protected]
Subject: Re: [Qemu-devel] [PATCH] Citrix PV Bus device

Quoted 7 lines · Paul Durrant

This patch introduces a new PCI device which will act as the binding point for Citrix branded PV drivers for Xen.
The intention is that Citrix Windows PV drivers will be available on Windows Update and thus using the existing Xen platform PCI device as an anchor point is not desirable as that device has been ubiquitous in HVM guests for a long time and thus existing HVM guests running Windows would start automatically downloading drivers from Windows Update when this may

Quoted 9 lines

not be

Quoted 2 lines

desired by either the host or guest admin. This device therefore acts as an opt-in for those wishing to deploy Citrix PV drivers.

This commit message doesn't really make the case for having this driver in upstream, IMHO. It sounds like it's only of use for your branded product, which suggests that the best place for it is probably in your product, not upstream.

No, that's not true. The drivers themselves may be Citrix branded but they are not solely for use in Citrix branded VMs.

Paul

#4 lore raw
In reply to Peter Maydell
Quoted 15 lines

-----Original Message-----
From: Peter Maydell [mailto:[email protected]]
Sent: 02 July 2013 15:58
To: Paul Durrant
Cc: [email protected]; [email protected]
Subject: Re: [Qemu-devel] [PATCH] Citrix PV Bus device

Quoted 7 lines · Paul Durrant

This patch introduces a new PCI device which will act as the binding point for Citrix branded PV drivers for Xen.
The intention is that Citrix Windows PV drivers will be available on Windows Update and thus using the existing Xen platform PCI device as an anchor point is not desirable as that device has been ubiquitous in HVM guests for a long time and thus existing HVM guests running Windows would start automatically downloading drivers from Windows Update when this may

Quoted 9 lines

not be

Quoted 2 lines

desired by either the host or guest admin. This device therefore acts as an opt-in for those wishing to deploy Citrix PV drivers.

This commit message doesn't really make the case for having this driver in upstream, IMHO. It sounds like it's only of use for your branded product, which suggests that the best place for it is probably in your product, not upstream.

No, that's not true. The drivers themselves may be Citrix branded but they are not solely for use in Citrix branded VMs.

Paul

#5 lore raw
In reply to Paul Durrant
Quoted 9 lines · Paul Durrant

This patch introduces a new PCI device which will act as the binding point for Citrix branded PV drivers for Xen.
The intention is that Citrix Windows PV drivers will be available on Windows Update and thus using the existing Xen platform PCI device as an anchor point is not desirable as that device has been ubiquitous in HVM guests for a long time and thus existing HVM guests running Windows would start automatically downloading drivers from Windows Update when this may not be desired by either the host or guest admin. This device therefore acts as an opt-in for those wishing to deploy Citrix PV drivers.

How does this differ from the xen platform pci device, except for the fact that it has a different PCI ID?

cheers,
Gerd

#6 lore raw
In reply to Paul Durrant
Quoted 9 lines · Paul Durrant

This patch introduces a new PCI device which will act as the binding point for Citrix branded PV drivers for Xen.
The intention is that Citrix Windows PV drivers will be available on Windows Update and thus using the existing Xen platform PCI device as an anchor point is not desirable as that device has been ubiquitous in HVM guests for a long time and thus existing HVM guests running Windows would start automatically downloading drivers from Windows Update when this may not be desired by either the host or guest admin. This device therefore acts as an opt-in for those wishing to deploy Citrix PV drivers.

How does this differ from the xen platform pci device, except for the fact that it has a different PCI ID?

cheers,
Gerd

#7 lore raw
Quoted 15 lines

-----Original Message-----
From: Gerd Hoffmann [mailto:[email protected]]
Sent: 24 July 2013 11:20
To: Paul Durrant
Cc: [email protected]; [email protected]
Subject: Re: [Qemu-devel] [PATCH] Citrix PV Bus device

Quoted 7 lines · Paul Durrant

This patch introduces a new PCI device which will act as the binding point for Citrix branded PV drivers for Xen.
The intention is that Citrix Windows PV drivers will be available on Windows Update and thus using the existing Xen platform PCI device as an anchor point is not desirable as that device has been ubiquitous in HVM guests for a long time and thus existing HVM guests running Windows would start automatically downloading drivers from Windows Update when this may

Quoted 7 lines

not be

Quoted 2 lines

desired by either the host or guest admin. This device therefore acts as an opt-in for those wishing to deploy Citrix PV drivers.

How does this differ from the xen platform pci device, except for the fact that it has a different PCI ID?

This model doesn't implement the fixed IO ports that the platform device does but he main point *is* the different PCI ID.

This patch has been superseded by the Xen PV Device patch (see https://lists.gnu.org/archive/html/qemu-devel/2013-07/msg00733.html) which generalizes the device to make the vendor ID, device ID and revision values configurable.

Paul

#8 lore raw
In reply to Gerd Hoffmann
Quoted 15 lines

-----Original Message-----
From: Gerd Hoffmann [mailto:[email protected]]
Sent: 24 July 2013 11:20
To: Paul Durrant
Cc: [email protected]; [email protected]
Subject: Re: [Qemu-devel] [PATCH] Citrix PV Bus device

Quoted 7 lines · Paul Durrant

This patch introduces a new PCI device which will act as the binding point for Citrix branded PV drivers for Xen.
The intention is that Citrix Windows PV drivers will be available on Windows Update and thus using the existing Xen platform PCI device as an anchor point is not desirable as that device has been ubiquitous in HVM guests for a long time and thus existing HVM guests running Windows would start automatically downloading drivers from Windows Update when this may

Quoted 7 lines

not be

Quoted 2 lines

desired by either the host or guest admin. This device therefore acts as an opt-in for those wishing to deploy Citrix PV drivers.

How does this differ from the xen platform pci device, except for the fact that it has a different PCI ID?

This model doesn't implement the fixed IO ports that the platform device does but he main point *is* the different PCI ID.

This patch has been superseded by the Xen PV Device patch (see https://lists.gnu.org/archive/html/qemu-devel/2013-07/msg00733.html) which generalizes the device to make the vendor ID, device ID and revision values configurable.

Paul