This commit is contained in:
230
xu-11905-pv-hvm.diff
Normal file
230
xu-11905-pv-hvm.diff
Normal file
@@ -0,0 +1,230 @@
|
||||
# HG changeset patch
|
||||
# User Ian Campbell <ian.campbell@xensource.com>
|
||||
# Date Wed Oct 25 13:58:30 2006 +0100
|
||||
# Node ID 206e20b7b54e09394ed161006439ee2b75ecee5e
|
||||
# parent: db23596992f9388fb776a4518ae638b22ee7c8c2
|
||||
PV-on-HVM: Add infrastructure for a compatibility shim in order to
|
||||
support PV-on-HVM drivers for older kernel releases.
|
||||
|
||||
The compatability code is included in the xen-platform-pci module
|
||||
since this module underpins all the others.
|
||||
|
||||
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
|
||||
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
|
||||
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
|
||||
|
||||
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -48,6 +48,10 @@
|
||||
#include <asm/hypervisor.h>
|
||||
#include <asm/maddr.h>
|
||||
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
+
|
||||
#define BLKIF_STATE_DISCONNECTED 0
|
||||
#define BLKIF_STATE_CONNECTED 1
|
||||
#define BLKIF_STATE_SUSPENDED 2
|
||||
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -35,6 +35,10 @@
|
||||
#include "block.h"
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/list.h>
|
||||
+
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
|
||||
#define BLKIF_MAJOR(dev) ((dev)>>8)
|
||||
#define BLKIF_MINOR(dev) ((dev) & 0xff)
|
||||
--- a/linux-2.6-xen-sparse/drivers/xen/core/features.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/linux-2.6-xen-sparse/drivers/xen/core/features.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -10,6 +10,10 @@
|
||||
#include <linux/module.h>
|
||||
#include <asm/hypervisor.h>
|
||||
#include <xen/features.h>
|
||||
+
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
|
||||
u8 xen_features[XENFEAT_NR_SUBMAPS * 32] __read_mostly;
|
||||
/* Not a GPL symbol: used in ubiquitous macros, so too restrictive. */
|
||||
--- a/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/linux-2.6-xen-sparse/drivers/xen/core/gnttab.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -44,6 +44,10 @@
|
||||
#include <asm/io.h>
|
||||
#include <xen/interface/memory.h>
|
||||
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
+
|
||||
/* External tools reserve first few grant table entries. */
|
||||
#define NR_RESERVED_ENTRIES 8
|
||||
|
||||
--- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -64,6 +64,10 @@
|
||||
#include <xen/interface/grant_table.h>
|
||||
#include <xen/gnttab.h>
|
||||
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Mutually-exclusive module options to select receive data path:
|
||||
* rx_copy : Packets are copied by network backend into local memory
|
||||
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_client.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -34,6 +34,10 @@
|
||||
#include <xen/gnttab.h>
|
||||
#include <xen/xenbus.h>
|
||||
#include <xen/driver_util.h>
|
||||
+
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
|
||||
/* xenbus_probe.c */
|
||||
extern char *kasprintf(const char *fmt, ...);
|
||||
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_comms.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -39,6 +39,10 @@
|
||||
#include <xen/xenbus.h>
|
||||
#include "xenbus_comms.h"
|
||||
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
+
|
||||
static int xenbus_irq;
|
||||
|
||||
extern void xenbus_probe(void *);
|
||||
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_dev.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -49,6 +49,10 @@
|
||||
#include <xen/xenbus.h>
|
||||
#include <xen/xen_proc.h>
|
||||
#include <asm/hypervisor.h>
|
||||
+
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
|
||||
struct xenbus_dev_transaction {
|
||||
struct list_head list;
|
||||
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -58,6 +58,10 @@
|
||||
#include "xenbus_comms.h"
|
||||
#include "xenbus_probe.h"
|
||||
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
+
|
||||
int xen_store_evtchn;
|
||||
struct xenstore_domain_interface *xen_store_interface;
|
||||
static unsigned long xen_store_mfn;
|
||||
--- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_xs.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -47,6 +47,10 @@
|
||||
#include <xen/xenbus.h>
|
||||
#include "xenbus_comms.h"
|
||||
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
+
|
||||
/* xenbus_probe.c */
|
||||
extern char *kasprintf(const char *fmt, ...);
|
||||
|
||||
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/synch_bitops.h Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/synch_bitops.h Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -8,6 +8,10 @@
|
||||
*/
|
||||
|
||||
#include <linux/config.h>
|
||||
+
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
|
||||
#define ADDR (*(volatile long *) addr)
|
||||
|
||||
--- a/unmodified_drivers/linux-2.6/overrides.mk Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/unmodified_drivers/linux-2.6/overrides.mk Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -9,4 +9,4 @@ EXTRA_CFLAGS += -DCONFIG_XEN_BLKDEV_GRAN
|
||||
EXTRA_CFLAGS += -DCONFIG_XEN_BLKDEV_GRANT -DXEN_EVTCHN_MASK_OPS
|
||||
EXTRA_CFLAGS += -DCONFIG_XEN_NETDEV_GRANT_RX -DCONFIG_XEN_NETDEV_GRANT_TX
|
||||
EXTRA_CFLAGS += -D__XEN_INTERFACE_VERSION__=0x00030202
|
||||
-EXTRA_CFLAGS += -I$(M)/include
|
||||
+EXTRA_CFLAGS += -I$(M)/include -I$(M)/compat-include -DHAVE_XEN_PLATFORM_COMPAT_H
|
||||
--- a/unmodified_drivers/linux-2.6/platform-pci/Kbuild Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/unmodified_drivers/linux-2.6/platform-pci/Kbuild Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -4,4 +4,4 @@ obj-m := xen-platform-pci.o
|
||||
|
||||
EXTRA_CFLAGS += -I$(M)/platform-pci
|
||||
|
||||
-xen-platform-pci-objs := evtchn.o platform-pci.o gnttab.o xen_support.o features.o
|
||||
+xen-platform-pci-objs := evtchn.o platform-pci.o gnttab.o xen_support.o features.o platform-compat.o
|
||||
--- a/unmodified_drivers/linux-2.6/platform-pci/evtchn.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/unmodified_drivers/linux-2.6/platform-pci/evtchn.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -35,6 +35,10 @@
|
||||
#include <xen/interface/hvm/ioreq.h>
|
||||
#include <xen/features.h>
|
||||
#include "platform-pci.h"
|
||||
+
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
|
||||
void *shared_info_area;
|
||||
|
||||
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -39,6 +39,10 @@
|
||||
|
||||
#include "platform-pci.h"
|
||||
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
+
|
||||
#define DRV_NAME "xen-platform-pci"
|
||||
#define DRV_VERSION "0.10"
|
||||
#define DRV_RELDATE "03/03/2005"
|
||||
--- a/unmodified_drivers/linux-2.6/platform-pci/xen_support.c Wed Oct 25 13:58:30 2006 +0100
|
||||
+++ b/unmodified_drivers/linux-2.6/platform-pci/xen_support.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -26,6 +26,10 @@
|
||||
#include <asm/hypervisor.h>
|
||||
#include "platform-pci.h"
|
||||
|
||||
+#ifdef HAVE_XEN_PLATFORM_COMPAT_H
|
||||
+#include <xen/platform-compat.h>
|
||||
+#endif
|
||||
+
|
||||
void xen_machphys_update(unsigned long mfn, unsigned long pfn)
|
||||
{
|
||||
BUG();
|
||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||
+++ b/unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -0,0 +1,6 @@
|
||||
+#ifndef COMPAT_INCLUDE_XEN_PLATFORM_COMPAT_H
|
||||
+#define COMPAT_INCLUDE_XEN_PLATFORM_COMPAT_H
|
||||
+
|
||||
+#include <linux/version.h>
|
||||
+
|
||||
+#endif
|
||||
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
||||
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c Wed Oct 25 13:58:30 2006 +0100
|
||||
@@ -0,0 +1,4 @@
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/version.h>
|
||||
+
|
||||
+#include <xen/platform-compat.h>
|
||||
|
Reference in New Issue
Block a user