Commit e081c24d authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/ehabkost/tags/machine-pull-request' into staging



Machine Core queue, 2016-05-20

# gpg: Signature made Fri 20 May 2016 21:26:49 BST using RSA key ID 984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"

* remotes/ehabkost/tags/machine-pull-request: (21 commits)
  Use &error_fatal when initializing crypto on qemu-{img,io,nbd}
  vl: Use &error_fatal when parsing monitor options
  vl: Use &error_fatal when parsing VNC options
  machine: add properties to compat_props incrementaly
  vl: Simplify global property registration
  vl: Make display_remote a local variable
  vl: Move DisplayType typedef to vl.c
  vl: Make display_type a local variable
  vl: Replace DT_NOGRAPHIC with machine option
  milkymist: Move DT_NOGRAPHIC check outside milkymist_tmu2_create()
  spice: Initialization stubs on qemu-spice.h
  gtk: Initialization stubs
  cocoa: cocoa_display_init() stub
  sdl: Initialization stubs
  curses: curses_display_init() stub
  vnc: Initialization stubs
  vl: Add DT_COCOA DisplayType value
  vl: Replace *_vga_available() functions with class_names field
  vl: Table-based select_vgahw()
  vl: Use exit(1) when requested VGA interface is unavailable
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 65603e2f e8f2d272
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1418,13 +1418,9 @@ static void virt_2_6_instance_init(Object *obj)
static void virt_2_6_class_init(ObjectClass *oc, void *data)
{
    MachineClass *mc = MACHINE_CLASS(oc);
    static GlobalProperty compat_props[] = {
        { /* end of list */ }
    };

    mc->desc = "QEMU 2.6 ARM Virtual Machine";
    mc->alias = "virt";
    mc->compat_props = compat_props;
}

static const TypeInfo machvirt_info = {
+31 −0
Original line number Diff line number Diff line
@@ -257,6 +257,20 @@ static void machine_set_usb(Object *obj, bool value, Error **errp)
    ms->usb_disabled = !value;
}

static bool machine_get_graphics(Object *obj, Error **errp)
{
    MachineState *ms = MACHINE(obj);

    return ms->enable_graphics;
}

static void machine_set_graphics(Object *obj, bool value, Error **errp)
{
    MachineState *ms = MACHINE(obj);

    ms->enable_graphics = value;
}

static bool machine_get_igd_gfx_passthru(Object *obj, Error **errp)
{
    MachineState *ms = MACHINE(obj);
@@ -382,6 +396,7 @@ static void machine_initfn(Object *obj)
    ms->kvm_shadow_mem = -1;
    ms->dump_guest_core = true;
    ms->mem_merge = true;
    ms->enable_graphics = true;

    object_property_add_str(obj, "accel",
                            machine_get_accel, machine_set_accel, NULL);
@@ -460,6 +475,12 @@ static void machine_initfn(Object *obj)
    object_property_set_description(obj, "usb",
                                    "Set on/off to enable/disable usb",
                                    NULL);
    object_property_add_bool(obj, "graphics",
                             machine_get_graphics,
                             machine_set_graphics, NULL);
    object_property_set_description(obj, "graphics",
                                    "Set on/off to enable/disable graphics emulation",
                                    NULL);
    object_property_add_bool(obj, "igd-passthru",
                             machine_get_igd_gfx_passthru,
                             machine_set_igd_gfx_passthru, NULL);
@@ -550,6 +571,15 @@ bool machine_mem_merge(MachineState *machine)
    return machine->mem_merge;
}

static void machine_class_finalize(ObjectClass *klass, void *data)
{
    MachineClass *mc = MACHINE_CLASS(klass);

    if (mc->compat_props) {
        g_array_free(mc->compat_props, true);
    }
}

static const TypeInfo machine_info = {
    .name = TYPE_MACHINE,
    .parent = TYPE_OBJECT,
@@ -557,6 +587,7 @@ static const TypeInfo machine_info = {
    .class_size = sizeof(MachineClass),
    .class_init    = machine_class_init,
    .class_base_init = machine_class_base_init,
    .class_finalize = machine_class_finalize,
    .instance_size = sizeof(MachineState),
    .instance_init = machine_initfn,
    .instance_finalize = machine_finalize,
+0 −13
Original line number Diff line number Diff line
@@ -582,7 +582,6 @@ DEFINE_I440FX_MACHINE(v1_4, "pc-i440fx-1.4", pc_compat_1_4,


#define PC_COMPAT_1_3 \
        PC_COMPAT_1_4 \
        {\
            .driver   = "usb-tablet",\
            .property = "usb_version",\
@@ -614,7 +613,6 @@ DEFINE_I440FX_MACHINE(v1_3, "pc-1.3", pc_compat_1_3,


#define PC_COMPAT_1_2 \
        PC_COMPAT_1_3 \
        {\
            .driver   = "nec-usb-xhci",\
            .property = "msi",\
@@ -653,7 +651,6 @@ DEFINE_I440FX_MACHINE(v1_2, "pc-1.2", pc_compat_1_2,


#define PC_COMPAT_1_1 \
        PC_COMPAT_1_2 \
        {\
            .driver   = "virtio-scsi-pci",\
            .property = "hotplug",\
@@ -696,7 +693,6 @@ DEFINE_I440FX_MACHINE(v1_1, "pc-1.1", pc_compat_1_2,


#define PC_COMPAT_1_0 \
        PC_COMPAT_1_1 \
        {\
            .driver   = TYPE_ISA_FDC,\
            .property = "check_media_rate",\
@@ -726,14 +722,10 @@ DEFINE_I440FX_MACHINE(v1_0, "pc-1.0", pc_compat_1_2,
                      pc_i440fx_1_0_machine_options);


#define PC_COMPAT_0_15 \
        PC_COMPAT_1_0

static void pc_i440fx_0_15_machine_options(MachineClass *m)
{
    pc_i440fx_1_0_machine_options(m);
    m->hw_version = "0.15";
    SET_MACHINE_COMPAT(m, PC_COMPAT_0_15);
}

DEFINE_I440FX_MACHINE(v0_15, "pc-0.15", pc_compat_1_2,
@@ -741,7 +733,6 @@ DEFINE_I440FX_MACHINE(v0_15, "pc-0.15", pc_compat_1_2,


#define PC_COMPAT_0_14 \
        PC_COMPAT_0_15 \
        {\
            .driver   = "virtio-blk-pci",\
            .property = "event_idx",\
@@ -780,7 +771,6 @@ DEFINE_I440FX_MACHINE(v0_14, "pc-0.14", pc_compat_1_2,


#define PC_COMPAT_0_13 \
        PC_COMPAT_0_14 \
        {\
            .driver   = TYPE_PCI_DEVICE,\
            .property = "command_serr_enable",\
@@ -817,7 +807,6 @@ DEFINE_I440FX_MACHINE(v0_13, "pc-0.13", pc_compat_0_13,


#define PC_COMPAT_0_12 \
        PC_COMPAT_0_13 \
        {\
            .driver   = "virtio-serial-pci",\
            .property = "max_ports",\
@@ -852,7 +841,6 @@ DEFINE_I440FX_MACHINE(v0_12, "pc-0.12", pc_compat_0_13,


#define PC_COMPAT_0_11 \
        PC_COMPAT_0_12 \
        {\
            .driver   = "virtio-blk-pci",\
            .property = "vectors",\
@@ -883,7 +871,6 @@ DEFINE_I440FX_MACHINE(v0_11, "pc-0.11", pc_compat_0_13,


#define PC_COMPAT_0_10 \
    PC_COMPAT_0_11 \
    {\
        .driver   = "virtio-blk-pci",\
        .property = "class",\
+0 −4
Original line number Diff line number Diff line
@@ -108,10 +108,6 @@ static inline DeviceState *milkymist_tmu2_create(hwaddr base,
    int nelements;
    int ver_major, ver_minor;

    if (display_type == DT_NOGRAPHIC) {
        return NULL;
    }

    /* check that GLX will work */
    d = XOpenDisplay(NULL);
    if (d == NULL) {
+3 −1
Original line number Diff line number Diff line
@@ -167,7 +167,9 @@ milkymist_init(MachineState *machine)
    milkymist_memcard_create(0x60004000);
    milkymist_ac97_create(0x60005000, irq[4], irq[5], irq[6], irq[7]);
    milkymist_pfpu_create(0x60006000, irq[8]);
    if (machine->enable_graphics) {
        milkymist_tmu2_create(0x60007000, irq[9]);
    }
    milkymist_minimac2_create(0x60008000, 0x30000000, irq[10], irq[11]);
    milkymist_softusb_create(0x6000f000, irq[15],
            0x20000000, 0x1000, 0x20020000, 0x2000);
Loading