~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to hw/isa/isa-bus.c

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
        qdev_init_nofail(dev);
56
56
    }
57
57
 
58
 
    isabus = FROM_QBUS(ISABus, qbus_create(TYPE_ISA_BUS, dev, NULL));
 
58
    isabus = ISA_BUS(qbus_create(TYPE_ISA_BUS, dev, NULL));
59
59
    isabus->address_space_io = address_space_io;
60
60
    return isabus;
61
61
}
76
76
 */
77
77
qemu_irq isa_get_irq(ISADevice *dev, int isairq)
78
78
{
79
 
    assert(!dev || DO_UPCAST(ISABus, qbus, dev->qdev.parent_bus) == isabus);
 
79
    assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) == isabus);
80
80
    if (isairq < 0 || isairq > 15) {
81
81
        hw_error("isa irq %d invalid", isairq);
82
82
    }
115
115
       actually handled e.g. the FDC device.  */
116
116
    isa_init_ioport(dev, start);
117
117
 
118
 
    portio_list_init(piolist, pio_start, opaque, name);
 
118
    portio_list_init(piolist, OBJECT(dev), pio_start, opaque, name);
119
119
    portio_list_add(piolist, isabus->address_space_io, start);
120
120
}
121
121
 
122
 
static int isa_qdev_init(DeviceState *qdev)
123
 
{
124
 
    ISADevice *dev = ISA_DEVICE(qdev);
125
 
    ISADeviceClass *klass = ISA_DEVICE_GET_CLASS(dev);
126
 
 
127
 
    if (klass->init) {
128
 
        return klass->init(dev);
129
 
    }
130
 
 
131
 
    return 0;
132
 
}
133
 
 
134
122
static void isa_device_init(Object *obj)
135
123
{
136
124
    ISADevice *dev = ISA_DEVICE(obj);
147
135
        hw_error("Tried to create isa device %s with no isa bus present.",
148
136
                 name);
149
137
    }
150
 
    dev = qdev_create(&bus->qbus, name);
 
138
    dev = qdev_create(BUS(bus), name);
151
139
    return ISA_DEVICE(dev);
152
140
}
153
141
 
159
147
        hw_error("Tried to create isa device %s with no isa bus present.",
160
148
                 name);
161
149
    }
162
 
    dev = qdev_try_create(&bus->qbus, name);
 
150
    dev = qdev_try_create(BUS(bus), name);
163
151
    return ISA_DEVICE(dev);
164
152
}
165
153
 
168
156
    ISADevice *dev;
169
157
 
170
158
    dev = isa_create(bus, name);
171
 
    qdev_init_nofail(&dev->qdev);
 
159
    qdev_init_nofail(DEVICE(dev));
172
160
    return dev;
173
161
}
174
162
 
204
192
    }
205
193
}
206
194
 
207
 
static int isabus_bridge_init(SysBusDevice *dev)
208
 
{
209
 
    /* nothing */
210
 
    return 0;
211
 
}
212
 
 
213
195
static void isabus_bridge_class_init(ObjectClass *klass, void *data)
214
196
{
215
197
    DeviceClass *dc = DEVICE_CLASS(klass);
216
 
    SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
217
198
 
218
 
    k->init = isabus_bridge_init;
219
199
    dc->fw_name = "isa";
220
200
    dc->no_user = 1;
221
201
}
230
210
static void isa_device_class_init(ObjectClass *klass, void *data)
231
211
{
232
212
    DeviceClass *k = DEVICE_CLASS(klass);
233
 
    k->init = isa_qdev_init;
234
213
    k->bus_type = TYPE_ISA_BUS;
235
214
}
236
215
 
253
232
 
254
233
static char *isabus_get_fw_dev_path(DeviceState *dev)
255
234
{
256
 
    ISADevice *d = (ISADevice*)dev;
 
235
    ISADevice *d = ISA_DEVICE(dev);
257
236
    char path[40];
258
237
    int off;
259
238