This commit is contained in:
committed by
Git OBS Bridge
parent
be29349429
commit
cf62e5ae4d
@@ -1,18 +1,18 @@
|
||||
Index: xen-unstable/tools/ioemu/hw/ide.c
|
||||
Index: xen-3.2-testing/tools/ioemu/hw/ide.c
|
||||
===================================================================
|
||||
--- xen-unstable.orig/tools/ioemu/hw/ide.c
|
||||
+++ xen-unstable/tools/ioemu/hw/ide.c
|
||||
@@ -392,6 +392,9 @@ typedef struct PCIIDEState {
|
||||
--- xen-3.2-testing.orig/tools/ioemu/hw/ide.c
|
||||
+++ xen-3.2-testing/tools/ioemu/hw/ide.c
|
||||
@@ -394,6 +394,9 @@ typedef struct PCIIDEState {
|
||||
int type; /* see IDE_TYPE_xxx */
|
||||
} PCIIDEState;
|
||||
|
||||
+static PCIIDEState *principal_ide_controller;
|
||||
+extern FILE *logfile;
|
||||
+
|
||||
#define DMA_MULTI_THREAD
|
||||
#if defined(__ia64__)
|
||||
#include <xen/hvm/ioreq.h>
|
||||
|
||||
#ifdef DMA_MULTI_THREAD
|
||||
@@ -2165,6 +2168,27 @@ static void ide_reset(IDEState *s)
|
||||
@@ -2237,6 +2240,27 @@ static void ide_reset(IDEState *s)
|
||||
ide_dummy_transfer_stop(s);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ Index: xen-unstable/tools/ioemu/hw/ide.c
|
||||
struct partition {
|
||||
uint8_t boot_ind; /* 0x80 - active */
|
||||
uint8_t head; /* starting head */
|
||||
@@ -2600,6 +2624,9 @@ void pci_cmd646_ide_init(PCIBus *bus, Bl
|
||||
@@ -2638,6 +2662,9 @@ void pci_cmd646_ide_init(PCIBus *bus, Bl
|
||||
sizeof(PCIIDEState),
|
||||
-1,
|
||||
NULL, NULL);
|
||||
@@ -50,7 +50,7 @@ Index: xen-unstable/tools/ioemu/hw/ide.c
|
||||
d->type = IDE_TYPE_CMD646;
|
||||
pci_conf = d->dev.config;
|
||||
pci_conf[0x00] = 0x95; // CMD646
|
||||
@@ -2771,6 +2798,9 @@ void pci_piix3_ide_init(PCIBus *bus, Blo
|
||||
@@ -2812,6 +2839,9 @@ void pci_piix_ide_init(PCIBus *bus, Bloc
|
||||
NULL, NULL);
|
||||
d->type = IDE_TYPE_PIIX3;
|
||||
|
||||
@@ -60,11 +60,11 @@ Index: xen-unstable/tools/ioemu/hw/ide.c
|
||||
pci_conf = d->dev.config;
|
||||
pci_conf[0x00] = 0x86; // Intel
|
||||
pci_conf[0x01] = 0x80;
|
||||
Index: xen-unstable/tools/ioemu/hw/pci.c
|
||||
Index: xen-3.2-testing/tools/ioemu/hw/pci.c
|
||||
===================================================================
|
||||
--- xen-unstable.orig/tools/ioemu/hw/pci.c
|
||||
+++ xen-unstable/tools/ioemu/hw/pci.c
|
||||
@@ -517,3 +517,24 @@ void pci_nic_init(PCIBus *bus, NICInfo *
|
||||
--- xen-3.2-testing.orig/tools/ioemu/hw/pci.c
|
||||
+++ xen-3.2-testing/tools/ioemu/hw/pci.c
|
||||
@@ -571,6 +571,28 @@ void pci_nic_init(PCIBus *bus, NICInfo *
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,23 +89,36 @@ Index: xen-unstable/tools/ioemu/hw/pci.c
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
Index: xen-unstable/tools/ioemu/hw/xen_platform.c
|
||||
+
|
||||
typedef struct {
|
||||
PCIDevice dev;
|
||||
PCIBus *bus;
|
||||
Index: xen-3.2-testing/tools/ioemu/hw/xen_platform.c
|
||||
===================================================================
|
||||
--- xen-unstable.orig/tools/ioemu/hw/xen_platform.c
|
||||
+++ xen-unstable/tools/ioemu/hw/xen_platform.c
|
||||
@@ -29,15 +29,46 @@
|
||||
--- xen-3.2-testing.orig/tools/ioemu/hw/xen_platform.c
|
||||
+++ xen-3.2-testing/tools/ioemu/hw/xen_platform.c
|
||||
@@ -28,10 +28,47 @@
|
||||
|
||||
extern FILE *logfile;
|
||||
|
||||
+static uint32_t ioport_base;
|
||||
+
|
||||
static void platform_ioport_write(void *opaque, uint32_t addr, uint32_t val)
|
||||
static void platform_ioport_map(PCIDevice *pci_dev, int region_num,
|
||||
uint32_t addr, uint32_t size, int type)
|
||||
{
|
||||
- /* nothing yet */
|
||||
+ ioport_base = addr;
|
||||
+
|
||||
+ register_ioport_write(addr, 1, 1, platform_ioport_write, NULL);
|
||||
+}
|
||||
+
|
||||
+static void platform_ioport_write(void *opaque, uint32_t addr, uint32_t val)
|
||||
+{
|
||||
+ DECLARE_DOMCTL;
|
||||
+ int rc;
|
||||
+
|
||||
if (val == 0)
|
||||
qemu_invalidate_map_cache();
|
||||
+ if (val == 0)
|
||||
+ qemu_invalidate_map_cache();
|
||||
+
|
||||
+ switch (addr - ioport_base) {
|
||||
+ case 0:
|
||||
@@ -132,20 +145,13 @@ Index: xen-unstable/tools/ioemu/hw/xen_platform.c
|
||||
+ }
|
||||
}
|
||||
|
||||
static void platform_ioport_map(PCIDevice *pci_dev, int region_num,
|
||||
uint32_t addr, uint32_t size, int type)
|
||||
{
|
||||
+ ioport_base = addr;
|
||||
+
|
||||
register_ioport_write(addr, 1, 1, platform_ioport_write, NULL);
|
||||
}
|
||||
|
||||
Index: xen-unstable/tools/ioemu/vl.c
|
||||
static uint32_t platform_mmio_read(void *opaque, target_phys_addr_t addr)
|
||||
Index: xen-3.2-testing/tools/ioemu/vl.c
|
||||
===================================================================
|
||||
--- xen-unstable.orig/tools/ioemu/vl.c
|
||||
+++ xen-unstable/tools/ioemu/vl.c
|
||||
@@ -170,6 +170,19 @@ time_t timeoffset = 0;
|
||||
char domain_name[1024] = { 'H','V', 'M', 'X', 'E', 'N', '-'};
|
||||
--- xen-3.2-testing.orig/tools/ioemu/vl.c
|
||||
+++ xen-3.2-testing/tools/ioemu/vl.c
|
||||
@@ -194,6 +194,19 @@ int xc_handle;
|
||||
char domain_name[64] = "Xen-no-name";
|
||||
extern int domid;
|
||||
|
||||
+typedef struct IOHandlerRecord {
|
||||
@@ -161,10 +167,10 @@ Index: xen-unstable/tools/ioemu/vl.c
|
||||
+
|
||||
+static IOHandlerRecord *first_io_handler;
|
||||
+
|
||||
char vncpasswd[64];
|
||||
unsigned char challenge[AUTHCHALLENGESIZE];
|
||||
/***********************************************************/
|
||||
/* x86 ISA bus support */
|
||||
|
||||
@@ -3139,6 +3152,7 @@ void net_slirp_smb(const char *exported_
|
||||
@@ -3333,6 +3346,7 @@ void net_slirp_smb(const char *exported_
|
||||
typedef struct TAPState {
|
||||
VLANClientState *vc;
|
||||
int fd;
|
||||
@@ -172,7 +178,7 @@ Index: xen-unstable/tools/ioemu/vl.c
|
||||
} TAPState;
|
||||
|
||||
static void tap_receive(void *opaque, const uint8_t *buf, int size)
|
||||
@@ -3166,6 +3180,36 @@ static void tap_send(void *opaque)
|
||||
@@ -3360,6 +3374,36 @@ static void tap_send(void *opaque)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,7 +215,7 @@ Index: xen-unstable/tools/ioemu/vl.c
|
||||
/* fd support */
|
||||
|
||||
static TAPState *net_tap_fd_init(VLANState *vlan, int fd)
|
||||
@@ -3177,6 +3221,8 @@ static TAPState *net_tap_fd_init(VLANSta
|
||||
@@ -3371,6 +3415,8 @@ static TAPState *net_tap_fd_init(VLANSta
|
||||
return NULL;
|
||||
s->fd = fd;
|
||||
s->vc = qemu_new_vlan_client(vlan, tap_receive, NULL, s);
|
||||
@@ -218,7 +224,7 @@ Index: xen-unstable/tools/ioemu/vl.c
|
||||
qemu_set_fd_handler(s->fd, tap_send, NULL, s);
|
||||
snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd);
|
||||
return s;
|
||||
@@ -4117,19 +4163,6 @@ void dumb_display_init(DisplayState *ds)
|
||||
@@ -4332,20 +4378,6 @@ void dumb_display_init(DisplayState *ds)
|
||||
|
||||
#define MAX_IO_HANDLERS 64
|
||||
|
||||
@@ -227,6 +233,7 @@ Index: xen-unstable/tools/ioemu/vl.c
|
||||
- IOCanRWHandler *fd_read_poll;
|
||||
- IOHandler *fd_read;
|
||||
- IOHandler *fd_write;
|
||||
- int deleted;
|
||||
- void *opaque;
|
||||
- /* temporary data */
|
||||
- struct pollfd *ufd;
|
||||
@@ -238,24 +245,16 @@ Index: xen-unstable/tools/ioemu/vl.c
|
||||
/* XXX: fd_read_poll should be suppressed, but an API change is
|
||||
necessary in the character devices to suppress fd_can_read(). */
|
||||
int qemu_set_fd_handler2(int fd,
|
||||
Index: xen-unstable/tools/ioemu/vl.h
|
||||
Index: xen-3.2-testing/tools/ioemu/vl.h
|
||||
===================================================================
|
||||
--- xen-unstable.orig/tools/ioemu/vl.h
|
||||
+++ xen-unstable/tools/ioemu/vl.h
|
||||
@@ -844,6 +844,7 @@ void pci_piix3_ide_init(PCIBus *bus, Blo
|
||||
int pmac_ide_init (BlockDriverState **hd_table,
|
||||
SetIRQFunc *set_irq, void *irq_opaque, int irq);
|
||||
void ide_stop_dma_thread(void);
|
||||
+void ide_unplug_harddisks(void);
|
||||
|
||||
/* cdrom.c */
|
||||
int cdrom_read_toc(int nb_sectors, uint8_t *buf, int msf, int start_track);
|
||||
@@ -1286,6 +1287,8 @@ void kqemu_record_dump(void);
|
||||
--- xen-3.2-testing.orig/tools/ioemu/vl.h
|
||||
+++ xen-3.2-testing/tools/ioemu/vl.h
|
||||
@@ -1492,6 +1492,8 @@ void kqemu_record_dump(void);
|
||||
extern char domain_name[];
|
||||
|
||||
void destroy_hvm_domain(void);
|
||||
+void net_tap_shutdown_all(void);
|
||||
+void pci_unplug_netifs(void);
|
||||
|
||||
/* VNC Authentication */
|
||||
#define AUTHCHALLENGESIZE 16
|
||||
#ifdef __ia64__
|
||||
static inline void xc_domain_shutdown_hook(int xc_handle, uint32_t domid)
|
||||
|
Reference in New Issue
Block a user