aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/boards.h12
-rw-r--r--include/hw/i386/ioapic_internal.h5
-rw-r--r--include/hw/i386/pc.h9
-rw-r--r--include/hw/mem/pc-dimm.h4
-rw-r--r--include/hw/nmi.h1
-rw-r--r--include/hw/virtio/virtio-gpu.h6
-rw-r--r--include/hw/virtio/virtio-rng.h2
-rw-r--r--include/hw/xen/xen_backend.h6
-rw-r--r--include/hw/xen/xen_common.h2
9 files changed, 27 insertions, 20 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 8d4fe56b5f..d268bd00a9 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -114,7 +114,7 @@ struct MachineClass {
const char *default_machine_opts;
const char *default_boot_order;
const char *default_display;
- GlobalProperty *compat_props;
+ GArray *compat_props;
const char *hw_version;
ram_addr_t default_ram_size;
bool option_rom_has_mr;
@@ -154,6 +154,7 @@ struct MachineState {
bool iommu;
bool suppress_vmdesc;
bool enforce_config_section;
+ bool enable_graphics;
ram_addr_t ram_size;
ram_addr_t maxram_size;
@@ -185,11 +186,18 @@ struct MachineState {
#define SET_MACHINE_COMPAT(m, COMPAT) \
do { \
+ int i; \
static GlobalProperty props[] = { \
COMPAT \
{ /* end of list */ } \
}; \
- (m)->compat_props = props; \
+ if (!m->compat_props) { \
+ m->compat_props = g_array_new(false, false, sizeof(void *)); \
+ } \
+ for (i = 0; props[i].driver != NULL; i++) { \
+ GlobalProperty *prop = &props[i]; \
+ g_array_append_val(m->compat_props, prop); \
+ } \
} while (0)
#endif
diff --git a/include/hw/i386/ioapic_internal.h b/include/hw/i386/ioapic_internal.h
index 797ed47305..cab9e67ee7 100644
--- a/include/hw/i386/ioapic_internal.h
+++ b/include/hw/i386/ioapic_internal.h
@@ -47,6 +47,11 @@
#define IOAPIC_LVT_DEST_MODE (1 << IOAPIC_LVT_DEST_MODE_SHIFT)
#define IOAPIC_LVT_DELIV_MODE (7 << IOAPIC_LVT_DELIV_MODE_SHIFT)
+/* Bits that are read-only for IOAPIC entry */
+#define IOAPIC_RO_BITS (IOAPIC_LVT_REMOTE_IRR | \
+ IOAPIC_LVT_DELIV_STATUS)
+#define IOAPIC_RW_BITS (~(uint64_t)IOAPIC_RO_BITS)
+
#define IOAPIC_TRIGGER_EDGE 0
#define IOAPIC_TRIGGER_LEVEL 1
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index 96f0b66c77..367b6dbf0e 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -360,7 +360,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
HW_COMPAT_2_5
#define PC_COMPAT_2_4 \
- PC_COMPAT_2_5 \
HW_COMPAT_2_4 \
{\
.driver = "Haswell-" TYPE_X86_CPU,\
@@ -431,7 +430,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
#define PC_COMPAT_2_3 \
- PC_COMPAT_2_4 \
HW_COMPAT_2_3 \
{\
.driver = TYPE_X86_CPU,\
@@ -512,7 +510,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
},
#define PC_COMPAT_2_2 \
- PC_COMPAT_2_3 \
HW_COMPAT_2_2 \
{\
.driver = "kvm64" "-" TYPE_X86_CPU,\
@@ -606,7 +603,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
},
#define PC_COMPAT_2_1 \
- PC_COMPAT_2_2 \
HW_COMPAT_2_1 \
{\
.driver = "coreduo" "-" TYPE_X86_CPU,\
@@ -620,7 +616,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
},
#define PC_COMPAT_2_0 \
- PC_COMPAT_2_1 \
{\
.driver = "virtio-scsi-pci",\
.property = "any_layout",\
@@ -680,7 +675,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
},
#define PC_COMPAT_1_7 \
- PC_COMPAT_2_0 \
{\
.driver = TYPE_USB_DEVICE,\
.property = "msos-desc",\
@@ -698,7 +692,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
},
#define PC_COMPAT_1_6 \
- PC_COMPAT_1_7 \
{\
.driver = "e1000",\
.property = "mitigation",\
@@ -722,7 +715,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
},
#define PC_COMPAT_1_5 \
- PC_COMPAT_1_6 \
{\
.driver = "Conroe-" TYPE_X86_CPU,\
.property = "model",\
@@ -766,7 +758,6 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
},
#define PC_COMPAT_1_4 \
- PC_COMPAT_1_5 \
{\
.driver = "scsi-hd",\
.property = "discard_granularity",\
diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
index 218dfb0eda..8cdc3266b3 100644
--- a/include/hw/mem/pc-dimm.h
+++ b/include/hw/mem/pc-dimm.h
@@ -20,8 +20,6 @@
#include "sysemu/hostmem.h"
#include "hw/qdev.h"
-#define DEFAULT_PC_DIMMSIZE (1024*1024*1024)
-
#define TYPE_PC_DIMM "pc-dimm"
#define PC_DIMM(obj) \
OBJECT_CHECK(PCDIMMDevice, (obj), TYPE_PC_DIMM)
@@ -72,7 +70,7 @@ typedef struct PCDIMMDeviceClass {
/**
* MemoryHotplugState:
- * @base: address in guest RAM address space where hotplug memory
+ * @base: address in guest physical address space where hotplug memory
* address space begins.
* @mr: hotplug memory address space container
*/
diff --git a/include/hw/nmi.h b/include/hw/nmi.h
index f4cec6257d..b541772e1d 100644
--- a/include/hw/nmi.h
+++ b/include/hw/nmi.h
@@ -45,6 +45,5 @@ typedef struct NMIClass {
} NMIClass;
void nmi_monitor_handle(int cpu_index, Error **errp);
-void inject_nmi(void);
#endif /* NMI_H */
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 13b0ab0848..1602a13ba2 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -27,8 +27,6 @@
#define VIRTIO_ID_GPU 16
-#define VIRTIO_GPU_MAX_SCANOUT 4
-
struct virtio_gpu_simple_resource {
uint32_t resource_id;
uint32_t width;
@@ -98,8 +96,8 @@ typedef struct VirtIOGPU {
QTAILQ_HEAD(, virtio_gpu_ctrl_command) cmdq;
QTAILQ_HEAD(, virtio_gpu_ctrl_command) fenceq;
- struct virtio_gpu_scanout scanout[VIRTIO_GPU_MAX_SCANOUT];
- struct virtio_gpu_requested_state req_state[VIRTIO_GPU_MAX_SCANOUT];
+ struct virtio_gpu_scanout scanout[VIRTIO_GPU_MAX_SCANOUTS];
+ struct virtio_gpu_requested_state req_state[VIRTIO_GPU_MAX_SCANOUTS];
struct virtio_gpu_conf conf;
int enabled_output_bitmask;
diff --git a/include/hw/virtio/virtio-rng.h b/include/hw/virtio/virtio-rng.h
index 3f07de70c7..2bc1ee5b50 100644
--- a/include/hw/virtio/virtio-rng.h
+++ b/include/hw/virtio/virtio-rng.h
@@ -26,7 +26,7 @@ struct VirtIORNGConf {
RngBackend *rng;
uint64_t max_bytes;
uint32_t period_ms;
- RndRandom *default_backend;
+ RngRandom *default_backend;
};
typedef struct VirtIORNG {
diff --git a/include/hw/xen/xen_backend.h b/include/hw/xen/xen_backend.h
index c839eeb489..6e18a46a97 100644
--- a/include/hw/xen/xen_backend.h
+++ b/include/hw/xen/xen_backend.h
@@ -28,6 +28,7 @@ struct XenDevOps {
int (*free)(struct XenDevice *xendev);
void (*backend_changed)(struct XenDevice *xendev, const char *node);
void (*frontend_changed)(struct XenDevice *xendev, const char *node);
+ int (*backend_register)(void);
};
struct XenDevice {
@@ -60,8 +61,10 @@ extern xc_interface *xen_xc;
extern xenforeignmemory_handle *xen_fmem;
extern struct xs_handle *xenstore;
extern const char *xen_protocol;
+extern DeviceState *xen_sysdev;
/* xenstore helper functions */
+int xenstore_mkdir(char *path, int p);
int xenstore_write_str(const char *base, const char *node, const char *val);
int xenstore_write_int(const char *base, const char *node, int ival);
int xenstore_write_int64(const char *base, const char *node, int64_t ival);
@@ -98,6 +101,9 @@ extern struct XenDevOps xen_kbdmouse_ops; /* xen_framebuffer.c */
extern struct XenDevOps xen_framebuffer_ops; /* xen_framebuffer.c */
extern struct XenDevOps xen_blkdev_ops; /* xen_disk.c */
extern struct XenDevOps xen_netdev_ops; /* xen_nic.c */
+#ifdef CONFIG_USB_LIBUSB
+extern struct XenDevOps xen_usb_ops; /* xen-usb.c */
+#endif
void xen_init_display(int domid);
diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h
index 7b52e8ffc1..5eabf37328 100644
--- a/include/hw/xen/xen_common.h
+++ b/include/hw/xen/xen_common.h
@@ -49,6 +49,8 @@ typedef xc_gnttab xengnttab_handle;
#define xengnttab_unmap(h, a, n) xc_gnttab_munmap(h, a, n)
#define xengnttab_map_grant_refs(h, c, d, r, p) \
xc_gnttab_map_grant_refs(h, c, d, r, p)
+#define xengnttab_map_domain_grant_refs(h, c, d, r, p) \
+ xc_gnttab_map_domain_grant_refs(h, c, d, r, p)
#define xenforeignmemory_open(l, f) xen_xc