Compare commits
20 Commits
v3.0.0-rc3
...
v3.0.0
Author | SHA1 | Date | |
---|---|---|---|
|
38441756b7 | ||
|
6ad9080538 | ||
|
93f874fe9d | ||
|
09b94ac0f2 | ||
|
09d98b6980 | ||
|
341823c172 | ||
|
326049cc8e | ||
|
7b69454a12 | ||
|
adc4fda6d5 | ||
|
78e9ddd75e | ||
|
1fb57da72a | ||
|
896b63dbff | ||
|
e3a4129abd | ||
|
1c707d6990 | ||
|
10efd7e108 | ||
|
16e2841d20 | ||
|
16b4226363 | ||
|
388a86df9c | ||
|
6484ab3dff | ||
|
1069a3c6e1 |
@@ -421,6 +421,11 @@ static void virtio_gpu_disable_scanout(VirtIOGPU *g, int scanout_id)
|
||||
scanout->height ?: 480,
|
||||
"Guest disabled display.");
|
||||
}
|
||||
|
||||
if (g->disable_scanout) {
|
||||
g->disable_scanout(g, scanout_id);
|
||||
}
|
||||
|
||||
dpy_gfx_replace_surface(scanout->con, ds);
|
||||
scanout->resource_id = 0;
|
||||
scanout->ds = NULL;
|
||||
|
@@ -75,6 +75,16 @@ static void virtio_vga_gl_block(void *opaque, bool block)
|
||||
}
|
||||
}
|
||||
|
||||
static void virtio_vga_disable_scanout(VirtIOGPU *g, int scanout_id)
|
||||
{
|
||||
VirtIOVGA *vvga = container_of(g, VirtIOVGA, vdev);
|
||||
|
||||
if (scanout_id == 0) {
|
||||
/* reset surface if needed */
|
||||
vvga->vga.graphic_mode = -1;
|
||||
}
|
||||
}
|
||||
|
||||
static const GraphicHwOps virtio_vga_ops = {
|
||||
.invalidate = virtio_vga_invalidate_display,
|
||||
.gfx_update = virtio_vga_update_display,
|
||||
@@ -156,6 +166,7 @@ static void virtio_vga_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
|
||||
vvga->vga_mrs, true);
|
||||
|
||||
vga->con = g->scanout[0].con;
|
||||
g->disable_scanout = virtio_vga_disable_scanout;
|
||||
graphic_console_set_hwops(vga->con, &virtio_vga_ops, vvga);
|
||||
|
||||
for (i = 0; i < g->conf.max_outputs; i++) {
|
||||
|
@@ -2269,7 +2269,16 @@ static void build_srat_hotpluggable_memory(GArray *table_data, uint64_t base,
|
||||
numamem = acpi_data_push(table_data, sizeof *numamem);
|
||||
|
||||
if (!info) {
|
||||
build_srat_memory(numamem, cur, end - cur, default_node,
|
||||
/*
|
||||
* Entry is required for Windows to enable memory hotplug in OS
|
||||
* and for Linux to enable SWIOTLB when booted with less than
|
||||
* 4G of RAM. Windows works better if the entry sets proximity
|
||||
* to the highest NUMA node in the machine at the end of the
|
||||
* reserved space.
|
||||
* Memory devices may override proximity set by this entry,
|
||||
* providing _PXM method if necessary.
|
||||
*/
|
||||
build_srat_memory(numamem, end - 1, 1, default_node,
|
||||
MEM_AFFINITY_HOTPLUGGABLE | MEM_AFFINITY_ENABLED);
|
||||
break;
|
||||
}
|
||||
@@ -2392,9 +2401,12 @@ build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine)
|
||||
mem_len = next_base - pcms->below_4g_mem_size;
|
||||
next_base = mem_base + mem_len;
|
||||
}
|
||||
numamem = acpi_data_push(table_data, sizeof *numamem);
|
||||
build_srat_memory(numamem, mem_base, mem_len, i - 1,
|
||||
MEM_AFFINITY_ENABLED);
|
||||
|
||||
if (mem_len > 0) {
|
||||
numamem = acpi_data_push(table_data, sizeof *numamem);
|
||||
build_srat_memory(numamem, mem_base, mem_len, i - 1,
|
||||
MEM_AFFINITY_ENABLED);
|
||||
}
|
||||
}
|
||||
slots = (table_data->len - numa_start) / sizeof *numamem;
|
||||
for (; slots < pcms->numa_nodes + 2; slots++) {
|
||||
@@ -2402,14 +2414,6 @@ build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine)
|
||||
build_srat_memory(numamem, 0, 0, 0, MEM_AFFINITY_NOFLAGS);
|
||||
}
|
||||
|
||||
/*
|
||||
* Entry is required for Windows to enable memory hotplug in OS
|
||||
* and for Linux to enable SWIOTLB when booted with less than
|
||||
* 4G of RAM. Windows works better if the entry sets proximity
|
||||
* to the highest NUMA node in the machine.
|
||||
* Memory devices may override proximity set by this entry,
|
||||
* providing _PXM method if necessary.
|
||||
*/
|
||||
if (hotplugabble_address_space_size) {
|
||||
build_srat_hotpluggable_memory(table_data, machine->device_memory->base,
|
||||
hotplugabble_address_space_size,
|
||||
|
@@ -29,148 +29,11 @@
|
||||
#include "hw/arm/linux-boot-if.h"
|
||||
#include "sysemu/kvm.h"
|
||||
|
||||
static int gicv3_pre_save(void *opaque)
|
||||
|
||||
static void gicv3_gicd_no_migration_shift_bug_post_load(GICv3State *cs)
|
||||
{
|
||||
GICv3State *s = (GICv3State *)opaque;
|
||||
ARMGICv3CommonClass *c = ARM_GICV3_COMMON_GET_CLASS(s);
|
||||
|
||||
if (c->pre_save) {
|
||||
c->pre_save(s);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gicv3_post_load(void *opaque, int version_id)
|
||||
{
|
||||
GICv3State *s = (GICv3State *)opaque;
|
||||
ARMGICv3CommonClass *c = ARM_GICV3_COMMON_GET_CLASS(s);
|
||||
|
||||
if (c->post_load) {
|
||||
c->post_load(s);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool virt_state_needed(void *opaque)
|
||||
{
|
||||
GICv3CPUState *cs = opaque;
|
||||
|
||||
return cs->num_list_regs != 0;
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_gicv3_cpu_virt = {
|
||||
.name = "arm_gicv3_cpu/virt",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = virt_state_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT64_2DARRAY(ich_apr, GICv3CPUState, 3, 4),
|
||||
VMSTATE_UINT64(ich_hcr_el2, GICv3CPUState),
|
||||
VMSTATE_UINT64_ARRAY(ich_lr_el2, GICv3CPUState, GICV3_LR_MAX),
|
||||
VMSTATE_UINT64(ich_vmcr_el2, GICv3CPUState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
static int icc_sre_el1_reg_pre_load(void *opaque)
|
||||
{
|
||||
GICv3CPUState *cs = opaque;
|
||||
|
||||
/*
|
||||
* If the sre_el1 subsection is not transferred this
|
||||
* means SRE_EL1 is 0x7 (which might not be the same as
|
||||
* our reset value).
|
||||
*/
|
||||
cs->icc_sre_el1 = 0x7;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool icc_sre_el1_reg_needed(void *opaque)
|
||||
{
|
||||
GICv3CPUState *cs = opaque;
|
||||
|
||||
return cs->icc_sre_el1 != 7;
|
||||
}
|
||||
|
||||
const VMStateDescription vmstate_gicv3_cpu_sre_el1 = {
|
||||
.name = "arm_gicv3_cpu/sre_el1",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.pre_load = icc_sre_el1_reg_pre_load,
|
||||
.needed = icc_sre_el1_reg_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT64(icc_sre_el1, GICv3CPUState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_gicv3_cpu = {
|
||||
.name = "arm_gicv3_cpu",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT32(level, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_ctlr, GICv3CPUState),
|
||||
VMSTATE_UINT32_ARRAY(gicr_statusr, GICv3CPUState, 2),
|
||||
VMSTATE_UINT32(gicr_waker, GICv3CPUState),
|
||||
VMSTATE_UINT64(gicr_propbaser, GICv3CPUState),
|
||||
VMSTATE_UINT64(gicr_pendbaser, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_igroupr0, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_ienabler0, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_ipendr0, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_iactiver0, GICv3CPUState),
|
||||
VMSTATE_UINT32(edge_trigger, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_igrpmodr0, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_nsacr, GICv3CPUState),
|
||||
VMSTATE_UINT8_ARRAY(gicr_ipriorityr, GICv3CPUState, GIC_INTERNAL),
|
||||
VMSTATE_UINT64_ARRAY(icc_ctlr_el1, GICv3CPUState, 2),
|
||||
VMSTATE_UINT64(icc_pmr_el1, GICv3CPUState),
|
||||
VMSTATE_UINT64_ARRAY(icc_bpr, GICv3CPUState, 3),
|
||||
VMSTATE_UINT64_2DARRAY(icc_apr, GICv3CPUState, 3, 4),
|
||||
VMSTATE_UINT64_ARRAY(icc_igrpen, GICv3CPUState, 3),
|
||||
VMSTATE_UINT64(icc_ctlr_el3, GICv3CPUState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (const VMStateDescription * []) {
|
||||
&vmstate_gicv3_cpu_virt,
|
||||
NULL
|
||||
},
|
||||
.subsections = (const VMStateDescription * []) {
|
||||
&vmstate_gicv3_cpu_sre_el1,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
static int gicv3_gicd_no_migration_shift_bug_pre_load(void *opaque)
|
||||
{
|
||||
GICv3State *cs = opaque;
|
||||
|
||||
/*
|
||||
* The gicd_no_migration_shift_bug flag is used for migration compatibility
|
||||
* for old version QEMU which may have the GICD bmp shift bug under KVM mode.
|
||||
* Strictly, what we want to know is whether the migration source is using
|
||||
* KVM. Since we don't have any way to determine that, we look at whether the
|
||||
* destination is using KVM; this is close enough because for the older QEMU
|
||||
* versions with this bug KVM -> TCG migration didn't work anyway. If the
|
||||
* source is a newer QEMU without this bug it will transmit the migration
|
||||
* subsection which sets the flag to true; otherwise it will remain set to
|
||||
* the value we select here.
|
||||
*/
|
||||
if (kvm_enabled()) {
|
||||
cs->gicd_no_migration_shift_bug = false;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gicv3_gicd_no_migration_shift_bug_post_load(void *opaque,
|
||||
int version_id)
|
||||
{
|
||||
GICv3State *cs = opaque;
|
||||
|
||||
if (cs->gicd_no_migration_shift_bug) {
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* Older versions of QEMU had a bug in the handling of state save/restore
|
||||
@@ -199,16 +62,152 @@ static int gicv3_gicd_no_migration_shift_bug_post_load(void *opaque,
|
||||
* for next migration to work from this new version QEMU.
|
||||
*/
|
||||
cs->gicd_no_migration_shift_bug = true;
|
||||
}
|
||||
|
||||
static int gicv3_pre_save(void *opaque)
|
||||
{
|
||||
GICv3State *s = (GICv3State *)opaque;
|
||||
ARMGICv3CommonClass *c = ARM_GICV3_COMMON_GET_CLASS(s);
|
||||
|
||||
if (c->pre_save) {
|
||||
c->pre_save(s);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gicv3_post_load(void *opaque, int version_id)
|
||||
{
|
||||
GICv3State *s = (GICv3State *)opaque;
|
||||
ARMGICv3CommonClass *c = ARM_GICV3_COMMON_GET_CLASS(s);
|
||||
|
||||
gicv3_gicd_no_migration_shift_bug_post_load(s);
|
||||
|
||||
if (c->post_load) {
|
||||
c->post_load(s);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool virt_state_needed(void *opaque)
|
||||
{
|
||||
GICv3CPUState *cs = opaque;
|
||||
|
||||
return cs->num_list_regs != 0;
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_gicv3_cpu_virt = {
|
||||
.name = "arm_gicv3_cpu/virt",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = virt_state_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT64_2DARRAY(ich_apr, GICv3CPUState, 3, 4),
|
||||
VMSTATE_UINT64(ich_hcr_el2, GICv3CPUState),
|
||||
VMSTATE_UINT64_ARRAY(ich_lr_el2, GICv3CPUState, GICV3_LR_MAX),
|
||||
VMSTATE_UINT64(ich_vmcr_el2, GICv3CPUState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
static int vmstate_gicv3_cpu_pre_load(void *opaque)
|
||||
{
|
||||
GICv3CPUState *cs = opaque;
|
||||
|
||||
/*
|
||||
* If the sre_el1 subsection is not transferred this
|
||||
* means SRE_EL1 is 0x7 (which might not be the same as
|
||||
* our reset value).
|
||||
*/
|
||||
cs->icc_sre_el1 = 0x7;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool icc_sre_el1_reg_needed(void *opaque)
|
||||
{
|
||||
GICv3CPUState *cs = opaque;
|
||||
|
||||
return cs->icc_sre_el1 != 7;
|
||||
}
|
||||
|
||||
const VMStateDescription vmstate_gicv3_cpu_sre_el1 = {
|
||||
.name = "arm_gicv3_cpu/sre_el1",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = icc_sre_el1_reg_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT64(icc_sre_el1, GICv3CPUState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
}
|
||||
};
|
||||
|
||||
static const VMStateDescription vmstate_gicv3_cpu = {
|
||||
.name = "arm_gicv3_cpu",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.pre_load = vmstate_gicv3_cpu_pre_load,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT32(level, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_ctlr, GICv3CPUState),
|
||||
VMSTATE_UINT32_ARRAY(gicr_statusr, GICv3CPUState, 2),
|
||||
VMSTATE_UINT32(gicr_waker, GICv3CPUState),
|
||||
VMSTATE_UINT64(gicr_propbaser, GICv3CPUState),
|
||||
VMSTATE_UINT64(gicr_pendbaser, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_igroupr0, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_ienabler0, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_ipendr0, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_iactiver0, GICv3CPUState),
|
||||
VMSTATE_UINT32(edge_trigger, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_igrpmodr0, GICv3CPUState),
|
||||
VMSTATE_UINT32(gicr_nsacr, GICv3CPUState),
|
||||
VMSTATE_UINT8_ARRAY(gicr_ipriorityr, GICv3CPUState, GIC_INTERNAL),
|
||||
VMSTATE_UINT64_ARRAY(icc_ctlr_el1, GICv3CPUState, 2),
|
||||
VMSTATE_UINT64(icc_pmr_el1, GICv3CPUState),
|
||||
VMSTATE_UINT64_ARRAY(icc_bpr, GICv3CPUState, 3),
|
||||
VMSTATE_UINT64_2DARRAY(icc_apr, GICv3CPUState, 3, 4),
|
||||
VMSTATE_UINT64_ARRAY(icc_igrpen, GICv3CPUState, 3),
|
||||
VMSTATE_UINT64(icc_ctlr_el3, GICv3CPUState),
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
.subsections = (const VMStateDescription * []) {
|
||||
&vmstate_gicv3_cpu_virt,
|
||||
&vmstate_gicv3_cpu_sre_el1,
|
||||
NULL
|
||||
}
|
||||
};
|
||||
|
||||
static int gicv3_pre_load(void *opaque)
|
||||
{
|
||||
GICv3State *cs = opaque;
|
||||
|
||||
/*
|
||||
* The gicd_no_migration_shift_bug flag is used for migration compatibility
|
||||
* for old version QEMU which may have the GICD bmp shift bug under KVM mode.
|
||||
* Strictly, what we want to know is whether the migration source is using
|
||||
* KVM. Since we don't have any way to determine that, we look at whether the
|
||||
* destination is using KVM; this is close enough because for the older QEMU
|
||||
* versions with this bug KVM -> TCG migration didn't work anyway. If the
|
||||
* source is a newer QEMU without this bug it will transmit the migration
|
||||
* subsection which sets the flag to true; otherwise it will remain set to
|
||||
* the value we select here.
|
||||
*/
|
||||
if (kvm_enabled()) {
|
||||
cs->gicd_no_migration_shift_bug = false;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool needed_always(void *opaque)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
const VMStateDescription vmstate_gicv3_gicd_no_migration_shift_bug = {
|
||||
.name = "arm_gicv3/gicd_no_migration_shift_bug",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.pre_load = gicv3_gicd_no_migration_shift_bug_pre_load,
|
||||
.post_load = gicv3_gicd_no_migration_shift_bug_post_load,
|
||||
.needed = needed_always,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_BOOL(gicd_no_migration_shift_bug, GICv3State),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -219,6 +218,7 @@ static const VMStateDescription vmstate_gicv3 = {
|
||||
.name = "arm_gicv3",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.pre_load = gicv3_pre_load,
|
||||
.pre_save = gicv3_pre_save,
|
||||
.post_load = gicv3_post_load,
|
||||
.priority = MIG_PRI_GICV3,
|
||||
|
@@ -554,9 +554,8 @@ static void cuda_init(Object *obj)
|
||||
CUDAState *s = CUDA(obj);
|
||||
SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
|
||||
|
||||
object_initialize(&s->mos6522_cuda, sizeof(s->mos6522_cuda),
|
||||
TYPE_MOS6522_CUDA);
|
||||
qdev_set_parent_bus(DEVICE(&s->mos6522_cuda), sysbus_get_default());
|
||||
sysbus_init_child_obj(obj, "mos6522-cuda", &s->mos6522_cuda,
|
||||
sizeof(s->mos6522_cuda), TYPE_MOS6522_CUDA);
|
||||
|
||||
memory_region_init_io(&s->mem, obj, &mos6522_cuda_ops, s, "cuda", 0x2000);
|
||||
sysbus_init_mmio(sbd, &s->mem);
|
||||
|
@@ -209,14 +209,11 @@ static void macio_oldworld_realize(PCIDevice *d, Error **errp)
|
||||
static void macio_init_ide(MacIOState *s, MACIOIDEState *ide, size_t ide_size,
|
||||
int index)
|
||||
{
|
||||
gchar *name;
|
||||
gchar *name = g_strdup_printf("ide[%i]", index);
|
||||
|
||||
object_initialize(ide, ide_size, TYPE_MACIO_IDE);
|
||||
qdev_set_parent_bus(DEVICE(ide), sysbus_get_default());
|
||||
sysbus_init_child_obj(OBJECT(s), name, ide, ide_size, TYPE_MACIO_IDE);
|
||||
memory_region_add_subregion(&s->bar, 0x1f000 + ((index + 1) * 0x1000),
|
||||
&ide->mem);
|
||||
name = g_strdup_printf("ide[%i]", index);
|
||||
object_property_add_child(OBJECT(s), name, OBJECT(ide), NULL);
|
||||
g_free(name);
|
||||
}
|
||||
|
||||
@@ -232,9 +229,7 @@ static void macio_oldworld_init(Object *obj)
|
||||
qdev_prop_allow_set_link_before_realize,
|
||||
0, NULL);
|
||||
|
||||
object_initialize(&s->cuda, sizeof(s->cuda), TYPE_CUDA);
|
||||
qdev_set_parent_bus(DEVICE(&s->cuda), sysbus_get_default());
|
||||
object_property_add_child(obj, "cuda", OBJECT(&s->cuda), NULL);
|
||||
sysbus_init_child_obj(obj, "cuda", &s->cuda, sizeof(s->cuda), TYPE_CUDA);
|
||||
|
||||
object_initialize(&os->nvram, sizeof(os->nvram), TYPE_MACIO_NVRAM);
|
||||
dev = DEVICE(&os->nvram);
|
||||
@@ -390,8 +385,8 @@ static void macio_newworld_init(Object *obj)
|
||||
qdev_prop_allow_set_link_before_realize,
|
||||
0, NULL);
|
||||
|
||||
object_initialize(&ns->gpio, sizeof(ns->gpio), TYPE_MACIO_GPIO);
|
||||
qdev_set_parent_bus(DEVICE(&ns->gpio), sysbus_get_default());
|
||||
sysbus_init_child_obj(obj, "gpio", &ns->gpio, sizeof(ns->gpio),
|
||||
TYPE_MACIO_GPIO);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
macio_init_ide(s, &ns->ide[i], sizeof(ns->ide[i]), i);
|
||||
@@ -404,13 +399,10 @@ static void macio_instance_init(Object *obj)
|
||||
|
||||
memory_region_init(&s->bar, obj, "macio", 0x80000);
|
||||
|
||||
object_initialize(&s->dbdma, sizeof(s->dbdma), TYPE_MAC_DBDMA);
|
||||
qdev_set_parent_bus(DEVICE(&s->dbdma), sysbus_get_default());
|
||||
object_property_add_child(obj, "dbdma", OBJECT(&s->dbdma), NULL);
|
||||
sysbus_init_child_obj(obj, "dbdma", &s->dbdma, sizeof(s->dbdma),
|
||||
TYPE_MAC_DBDMA);
|
||||
|
||||
object_initialize(&s->escc, sizeof(s->escc), TYPE_ESCC);
|
||||
qdev_set_parent_bus(DEVICE(&s->escc), sysbus_get_default());
|
||||
object_property_add_child(obj, "escc", OBJECT(&s->escc), NULL);
|
||||
sysbus_init_child_obj(obj, "escc", &s->escc, sizeof(s->escc), TYPE_ESCC);
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_macio_oldworld = {
|
||||
|
@@ -770,9 +770,8 @@ static void pmu_init(Object *obj)
|
||||
qdev_prop_allow_set_link_before_realize,
|
||||
0, NULL);
|
||||
|
||||
object_initialize(&s->mos6522_pmu, sizeof(s->mos6522_pmu),
|
||||
TYPE_MOS6522_PMU);
|
||||
qdev_set_parent_bus(DEVICE(&s->mos6522_pmu), sysbus_get_default());
|
||||
sysbus_init_child_obj(obj, "mos6522-pmu", &s->mos6522_pmu,
|
||||
sizeof(s->mos6522_pmu), TYPE_MOS6522_PMU);
|
||||
|
||||
memory_region_init_io(&s->mem, obj, &mos6522_pmu_ops, s, "via-pmu",
|
||||
0x2000);
|
||||
|
@@ -57,7 +57,7 @@ typedef struct PPC440PCIXState {
|
||||
struct PLBOutMap pom[PPC440_PCIX_NR_POMS];
|
||||
struct PLBInMap pim[PPC440_PCIX_NR_PIMS];
|
||||
uint32_t sts;
|
||||
qemu_irq irq[PCI_NUM_PINS];
|
||||
qemu_irq irq;
|
||||
AddressSpace bm_as;
|
||||
MemoryRegion bm;
|
||||
|
||||
@@ -418,21 +418,20 @@ static void ppc440_pcix_reset(DeviceState *dev)
|
||||
* This may need further refactoring for other boards. */
|
||||
static int ppc440_pcix_map_irq(PCIDevice *pci_dev, int irq_num)
|
||||
{
|
||||
int slot = pci_dev->devfn >> 3;
|
||||
trace_ppc440_pcix_map_irq(pci_dev->devfn, irq_num, slot);
|
||||
return slot - 1;
|
||||
trace_ppc440_pcix_map_irq(pci_dev->devfn, irq_num, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ppc440_pcix_set_irq(void *opaque, int irq_num, int level)
|
||||
{
|
||||
qemu_irq *pci_irqs = opaque;
|
||||
qemu_irq *pci_irq = opaque;
|
||||
|
||||
trace_ppc440_pcix_set_irq(irq_num);
|
||||
if (irq_num < 0) {
|
||||
error_report("%s: PCI irq %d", __func__, irq_num);
|
||||
return;
|
||||
}
|
||||
qemu_set_irq(pci_irqs[irq_num], level);
|
||||
qemu_set_irq(*pci_irq, level);
|
||||
}
|
||||
|
||||
static AddressSpace *ppc440_pcix_set_iommu(PCIBus *b, void *opaque, int devfn)
|
||||
@@ -471,19 +470,15 @@ static int ppc440_pcix_initfn(SysBusDevice *dev)
|
||||
{
|
||||
PPC440PCIXState *s;
|
||||
PCIHostState *h;
|
||||
int i;
|
||||
|
||||
h = PCI_HOST_BRIDGE(dev);
|
||||
s = PPC440_PCIX_HOST_BRIDGE(dev);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(s->irq); i++) {
|
||||
sysbus_init_irq(dev, &s->irq[i]);
|
||||
}
|
||||
|
||||
sysbus_init_irq(dev, &s->irq);
|
||||
memory_region_init(&s->busmem, OBJECT(dev), "pci bus memory", UINT64_MAX);
|
||||
h->bus = pci_register_root_bus(DEVICE(dev), NULL, ppc440_pcix_set_irq,
|
||||
ppc440_pcix_map_irq, s->irq, &s->busmem,
|
||||
get_system_io(), PCI_DEVFN(0, 0), 4, TYPE_PCI_BUS);
|
||||
ppc440_pcix_map_irq, &s->irq, &s->busmem,
|
||||
get_system_io(), PCI_DEVFN(0, 0), 1, TYPE_PCI_BUS);
|
||||
|
||||
s->dev = pci_create_simple(h->bus, PCI_DEVFN(0, 0), "ppc4xx-host-bridge");
|
||||
|
||||
|
@@ -515,10 +515,8 @@ static void sam460ex_init(MachineState *machine)
|
||||
|
||||
/* PCI bus */
|
||||
ppc460ex_pcie_init(env);
|
||||
/* FIXME: is this correct? */
|
||||
dev = sysbus_create_varargs("ppc440-pcix-host", 0xc0ec00000,
|
||||
uic[1][0], uic[1][20], uic[1][21], uic[1][22],
|
||||
NULL);
|
||||
/* All PCI irqs are connected to the same UIC pin (cf. UBoot source) */
|
||||
dev = sysbus_create_simple("ppc440-pcix-host", 0xc0ec00000, uic[1][0]);
|
||||
pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci.0");
|
||||
if (!pci_bus) {
|
||||
error_report("couldn't create PCI controller!");
|
||||
|
@@ -663,12 +663,14 @@ static void vhost_iommu_region_add(MemoryListener *listener,
|
||||
struct vhost_iommu *iommu;
|
||||
Int128 end;
|
||||
int iommu_idx;
|
||||
IOMMUMemoryRegion *iommu_mr = IOMMU_MEMORY_REGION(section->mr);
|
||||
IOMMUMemoryRegion *iommu_mr;
|
||||
|
||||
if (!memory_region_is_iommu(section->mr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
iommu_mr = IOMMU_MEMORY_REGION(section->mr);
|
||||
|
||||
iommu = g_malloc0(sizeof(*iommu));
|
||||
end = int128_add(int128_make64(section->offset_within_region),
|
||||
section->size);
|
||||
|
@@ -125,6 +125,7 @@ typedef struct VirtIOGPU {
|
||||
uint32_t bytes_3d;
|
||||
} stats;
|
||||
|
||||
void (*disable_scanout)(struct VirtIOGPU *g, int scanout_id);
|
||||
Error *migration_blocker;
|
||||
} VirtIOGPU;
|
||||
|
||||
|
@@ -154,7 +154,7 @@ m_inc(struct mbuf *m, int size)
|
||||
int datasize;
|
||||
|
||||
/* some compilers throw up on gotos. This one we can fake. */
|
||||
if (m->m_size > size) {
|
||||
if (M_ROOM(m) > size) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -184,6 +184,7 @@ static const VMStateDescription vmstate_m_faultmask_primask = {
|
||||
.name = "cpu/m/faultmask-primask",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = m_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT32(env.v7m.faultmask[M_REG_NS], ARMCPU),
|
||||
VMSTATE_UINT32(env.v7m.primask[M_REG_NS], ARMCPU),
|
||||
@@ -230,6 +231,7 @@ static const VMStateDescription vmstate_m_scr = {
|
||||
.name = "cpu/m/scr",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = m_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT32(env.v7m.scr[M_REG_NS], ARMCPU),
|
||||
VMSTATE_END_OF_LIST()
|
||||
@@ -240,6 +242,7 @@ static const VMStateDescription vmstate_m_other_sp = {
|
||||
.name = "cpu/m/other-sp",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.needed = m_needed,
|
||||
.fields = (VMStateField[]) {
|
||||
VMSTATE_UINT32(env.v7m.other_sp, ARMCPU),
|
||||
VMSTATE_END_OF_LIST()
|
||||
|
@@ -149,7 +149,7 @@ static void xtensa_cpu_initfn(Object *obj)
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
env->address_space_er = g_malloc(sizeof(*env->address_space_er));
|
||||
env->system_er = g_malloc(sizeof(*env->system_er));
|
||||
memory_region_init_io(env->system_er, NULL, NULL, env, "er",
|
||||
memory_region_init_io(env->system_er, obj, NULL, env, "er",
|
||||
UINT64_C(0x100000000));
|
||||
address_space_init(env->address_space_er, env->system_er, "ER");
|
||||
#endif
|
||||
|
@@ -1094,9 +1094,9 @@ void tcg_optimize(TCGContext *s)
|
||||
tmp = arg_info(op->args[1])->val;
|
||||
tmp = dup_const(TCGOP_VECE(op), tmp);
|
||||
tcg_opt_gen_movi(s, op, op->args[0], tmp);
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
goto do_default;
|
||||
|
||||
CASE_OP_32_64(not):
|
||||
CASE_OP_32_64(neg):
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user