Home
last modified time | relevance | path

Searched refs:dev (Results 76 – 100 of 1515) sorted by relevance

12345678910>>...61

/qemu/hw/scsi/
H A Dscsi-bus.c40 if (dev->channel == channel && dev->id == id) { in do_scsi_device_find()
300 if (dev->id != -1 && dev->id > bus->info->max_target) { in scsi_bus_check_address()
304 if (dev->lun != -1 && dev->lun > bus->info->max_lun) { in scsi_bus_check_address()
309 if (dev->id != -1 && dev->lun != -1) { in scsi_bus_check_address()
311 if (!scsi_bus_is_address_free(bus, dev->channel, dev->id, dev->lun, &d)) { in scsi_bus_check_address()
339 dev->id = id; in scsi_qdev_realize()
349 dev->lun = lun; in scsi_qdev_realize()
358 dev->vmsentry = qdev_add_vm_change_state_handler(DEVICE(dev), in scsi_qdev_realize()
384 DeviceState *dev; in scsi_bus_legacy_add_drive() local
569 if (dev->channel == channel && dev->id == id && dev->lun != 0 && in scsi_target_emulate_report_luns()
[all …]
H A Dvhost-scsi-common.c43 ret = vhost_dev_enable_notifiers(&vsc->dev, vdev); in vhost_scsi_common_start()
55 vsc->dev.acked_features = vdev->guest_features; in vhost_scsi_common_start()
57 ret = vhost_dev_prepare_inflight(&vsc->dev, vdev); in vhost_scsi_common_start()
65 ret = vhost_dev_get_inflight(&vsc->dev, in vhost_scsi_common_start()
81 ret = vhost_dev_start(&vsc->dev, vdev, true); in vhost_scsi_common_start()
91 for (i = 0; i < vsc->dev.nvqs; i++) { in vhost_scsi_common_start()
92 vhost_virtqueue_mask(&vsc->dev, vdev, vsc->dev.vq_index + i, false); in vhost_scsi_common_start()
100 vhost_dev_disable_notifiers(&vsc->dev, vdev); in vhost_scsi_common_start()
111 vhost_dev_stop(&vsc->dev, vdev, true); in vhost_scsi_common_stop()
121 vhost_dev_disable_notifiers(&vsc->dev, vdev); in vhost_scsi_common_stop()
[all …]
/qemu/hw/pci-host/
H A Dgpex-acpi.c48 aml_append(dev, dev_gsi); in acpi_dsdt_add_pci_route_table()
52 static void acpi_dsdt_add_pci_osc(Aml *dev) in acpi_dsdt_add_pci_osc() argument
104 aml_append(dev, method); in acpi_dsdt_add_pci_osc()
125 aml_append(dev, method); in acpi_dsdt_add_pci_osc()
131 Aml *method, *crs, *dev, *rbuf; in acpi_dsdt_add_gpex() local
194 aml_append(scope, dev); in acpi_dsdt_add_gpex()
199 dev = aml_device("%s", "PCI0"); in acpi_dsdt_add_gpex()
212 aml_append(dev, method); in acpi_dsdt_add_gpex()
266 acpi_dsdt_add_pci_osc(dev); in acpi_dsdt_add_gpex()
279 aml_append(dev, dev_res0); in acpi_dsdt_add_gpex()
[all …]
/qemu/subprojects/libvhost-user/
H A Dlibvhost-user.h478 bool vu_init(VuDev *dev,
494 void vu_deinit(VuDev *dev);
513 bool vu_dispatch(VuDev *dev);
532 VuVirtq *vu_get_queue(VuDev *dev, int qidx);
544 void vu_set_queue_handler(VuDev *dev, VuVirtq *vq,
617 bool vu_queue_enabled(VuDev *dev, VuVirtq *vq);
635 bool vu_queue_empty(VuDev *dev, VuVirtq *vq);
644 void vu_queue_notify(VuDev *dev, VuVirtq *vq);
646 void vu_config_change_msg(VuDev *dev);
707 void vu_queue_fill(VuDev *dev, VuVirtq *vq,
[all …]
/qemu/system/
H A Dbootdevice.c39 DeviceState *dev; member
142 if (dev == NULL) { in del_boot_device_path()
148 i->dev == dev) { in del_boot_device_path()
175 node->dev = dev; in add_boot_device_path()
213 if (dev) { in get_boot_device_path()
219 if (dev) { in get_boot_device_path()
287 DeviceState *dev; member
337 prop->dev = dev; in device_add_bootindex_property()
353 DeviceState *dev; member
376 node->dev = dev; in add_boot_device_lchs()
[all …]
/qemu/hw/ide/
H A Dich.c94 static void pci_ich9_reset(DeviceState *dev) in pci_ich9_reset() argument
96 AHCIPCIState *d = ICH9_AHCI(dev); in pci_ich9_reset()
113 d = ICH9_AHCI(dev); in pci_ich9_ahci_realize()
117 ahci_realize(&d->ahci, DEVICE(dev), pci_get_address_space(dev)); in pci_ich9_ahci_realize()
123 pci_config_set_interrupt_pin(dev->config, 1); in pci_ich9_ahci_realize()
128 d->ahci.irq = pci_allocate_irq(dev); in pci_ich9_ahci_realize()
135 sata_cap_offset = pci_add_capability(dev, PCI_CAP_ID_SATA, in pci_ich9_ahci_realize()
142 sata_cap = dev->config + sata_cap_offset; in pci_ich9_ahci_realize()
157 static void pci_ich9_uninit(PCIDevice *dev) in pci_ich9_uninit() argument
160 d = ICH9_AHCI(dev); in pci_ich9_uninit()
[all …]
/qemu/include/hw/
H A Dsysbus.h70 void sysbus_init_mmio(SysBusDevice *dev, MemoryRegion *memory);
71 MemoryRegion *sysbus_mmio_get_region(SysBusDevice *dev, int n);
72 void sysbus_init_irq(SysBusDevice *dev, qemu_irq *p);
73 void sysbus_pass_irq(SysBusDevice *dev, SysBusDevice *target);
77 bool sysbus_has_irq(SysBusDevice *dev, int n);
78 bool sysbus_has_mmio(SysBusDevice *dev, unsigned int n);
80 bool sysbus_is_irq_connected(SysBusDevice *dev, int n);
81 qemu_irq sysbus_get_connected_irq(SysBusDevice *dev, int n);
82 void sysbus_mmio_map(SysBusDevice *dev, int n, hwaddr addr);
85 void sysbus_mmio_unmap(SysBusDevice *dev, int n);
[all …]
/qemu/hw/xen/
H A Dxen_pt_load_rom.c16 void *pci_assign_dev_load_option_rom(PCIDevice *dev, in pci_assign_dev_load_option_rom() argument
26 Object *owner = OBJECT(dev); in pci_assign_dev_load_option_rom()
29 if (dev->romfile || !dev->rom_bar) { in pci_assign_dev_load_option_rom()
56 if (dev->romsize != -1) { in pci_assign_dev_load_option_rom()
57 if (st.st_size > dev->romsize) { in pci_assign_dev_load_option_rom()
63 dev->romsize = st.st_size; in pci_assign_dev_load_option_rom()
67 memory_region_init_ram(&dev->rom, owner, name, dev->romsize, &error_abort); in pci_assign_dev_load_option_rom()
68 ptr = memory_region_get_ram_ptr(&dev->rom); in pci_assign_dev_load_option_rom()
69 memset(ptr, 0xff, dev->romsize); in pci_assign_dev_load_option_rom()
79 pci_register_bar(dev, PCI_ROM_SLOT, 0, &dev->rom); in pci_assign_dev_load_option_rom()
[all …]
/qemu/hw/arm/
H A Dhighbank.c139 sysbus_init_mmio(dev, &s->iomem); in highbank_regs_init()
181 DeviceState *dev = NULL; in calxeda_init() local
251 dev = qdev_new("l2x0"); in calxeda_init()
252 busdev = SYS_BUS_DEVICE(dev); in calxeda_init()
264 busdev = SYS_BUS_DEVICE(dev); in calxeda_init()
275 pic[n] = qdev_get_gpio_in(dev, n); in calxeda_init()
278 dev = qdev_new("sp804"); in calxeda_init()
281 busdev = SYS_BUS_DEVICE(dev); in calxeda_init()
288 busdev = SYS_BUS_DEVICE(dev); in calxeda_init()
302 if (dev) { in calxeda_init()
[all …]
H A Dsbsa-ref.c310 return PFLASH_CFI01(dev); in sbsa_flash_create1()
323 DeviceState *dev = DEVICE(flash); in sbsa_flash_map1() local
419 DeviceState *dev; in create_its() local
421 dev = qdev_new(itsclass); in create_its()
584 DeviceState *dev; in create_ahci() local
588 dev = qdev_new("sysbus-ahci"); in create_ahci()
594 sysahci = SYSBUS_AHCI(dev); in create_ahci()
615 DeviceState *dev; in create_smmu() local
643 DeviceState *dev; in create_pcie() local
647 dev = qdev_new(TYPE_GPEX_HOST); in create_pcie()
[all …]
/qemu/hw/intc/
H A Dapic_common.c42 if (dev) { in cpu_set_apic_base()
55 if (dev) { in cpu_get_apic_base()
69 if (!dev) { in cpu_is_apic_enabled()
73 s = APIC_COMMON(dev); in cpu_is_apic_enabled()
83 if (!dev) { in cpu_set_apic_tpr()
87 s = APIC_COMMON(dev); in cpu_set_apic_tpr()
98 if (!dev) { in cpu_get_apic_tpr()
102 s = APIC_COMMON(dev); in cpu_get_apic_tpr()
202 if (!dev) { in apic_init_reset()
205 s = APIC_COMMON(dev); in apic_init_reset()
[all …]
/qemu/hw/char/
H A Dipoctal232.c102 CharBackend dev; member
260 IPOctalState *dev = IPOCTAL(ip); in io_read() local
318 update_irq(dev, block); in io_read()
326 IPOctalState *dev = IPOCTAL(ip); in io_write() local
357 write_cr(dev, channel, reg); in io_write()
393 update_irq(dev, block); in io_write()
431 update_irq(dev, addr); in int_read()
432 return dev->irq_vector; in int_read()
463 dev->irq_vector = val; in mem_write8()
503 update_irq(dev, block); in hostdev_receive()
[all …]
/qemu/hw/ppc/
H A Dsam460ex.c285 DeviceState *dev; in sam460ex_init() local
306 dev = qdev_new(TYPE_PPC4xx_PLB); in sam460ex_init()
308 object_unref(OBJECT(dev)); in sam460ex_init()
361 object_unref(OBJECT(dev)); in sam460ex_init()
369 i2c = PPC4xx_I2C(dev)->bus; in sam460ex_init()
382 dev = qdev_new(TYPE_PPC4xx_EBC); in sam460ex_init()
384 object_unref(OBJECT(dev)); in sam460ex_init()
400 object_unref(OBJECT(dev)); in sam460ex_init()
401 sbdev = SYS_BUS_DEVICE(dev); in sam460ex_init()
420 dev = qdev_new("sysbus-ohci"); in sam460ex_init()
[all …]
/qemu/hw/hyperv/
H A Dhyperv_testdev.c64 static void sint_route_create(HypervTestDev *dev, in sint_route_create() argument
181 QLIST_FOREACH(conn, &dev->msg_conns, le) { in msg_conn_destroy()
229 QLIST_FOREACH(conn, &dev->evt_conns, le) { in evt_conn_destroy()
259 sint_route_create(dev, vp_index, sint); in hv_test_dev_write()
271 msg_conn_destroy(dev, conn_id); in hv_test_dev_write()
277 evt_conn_destroy(dev, conn_id); in hv_test_dev_write()
295 HypervTestDev *dev = HYPERV_TEST_DEV(d); in hv_test_dev_realizefn() local
298 QLIST_INIT(&dev->sint_routes); in hv_test_dev_realizefn()
299 QLIST_INIT(&dev->msg_conns); in hv_test_dev_realizefn()
300 QLIST_INIT(&dev->evt_conns); in hv_test_dev_realizefn()
[all …]
/qemu/tests/qtest/
H A Dtco-test.c45 QPCIDevice *dev; member
53 g_free(d->dev); in test_end()
69 g_assert(d->dev != NULL); in test_init()
71 qpci_device_enable(d->dev); in test_init()
76 qpci_config_writeb(d->dev, ICH9_LPC_ACPI_CTRL, 0x80); in test_init()
88 val = qpci_io_readw(d->dev, d->tco_io_bar, TCO1_CNT); in stop_tco()
104 qpci_io_writew(d->dev, d->tco_io_bar, TCO_RLD, 4); in load_tco()
182 val = qpci_io_readw(d.dev, d.tco_io_bar, TCO1_STS); in test_tco_timeout()
188 qpci_io_writew(d.dev, d.tco_io_bar, TCO1_STS, val); in test_tco_timeout()
189 val = qpci_io_readw(d.dev, d.tco_io_bar, TCO1_STS); in test_tco_timeout()
[all …]
H A Dac97-test.c20 QPCIDevice dev; member
28 return &ac97->dev; in ac97_get_driver()
40 qpci_device_init(&ac97->dev, bus, addr); in ac97_create()
53 QPCIDevice *dev = &ac97->dev; in ac97_playback_upsample() local
56 qpci_device_enable(dev); in ac97_playback_upsample()
57 bar0 = qpci_iomap(dev, 0, NULL); in ac97_playback_upsample()
59 qpci_io_writew(dev, bar0, 0x2c, 0x1); in ac97_playback_upsample()
69 QPCIDevice *dev = &ac97->dev; in ac97_record_downsample() local
72 qpci_device_enable(dev); in ac97_record_downsample()
73 bar0 = qpci_iomap(dev, 0, NULL); in ac97_record_downsample()
[all …]
/qemu/hw/misc/
H A Dimx6ul_ccm.c333 freq = imx6ul_analog_get_pll2_clk(dev) * 18 in imx6ul_analog_get_pll2_pfd0_clk()
373 freq = imx6ul_analog_get_osc_clk(dev); in imx6ul_ccm_get_periph_clk2_sel_clk()
456 freq = imx6ul_ccm_get_periph_sel_clk(dev) in imx6ul_ccm_get_ahb_clk()
468 freq = imx6ul_ccm_get_ahb_clk(dev) in imx6ul_ccm_get_ipg_clk()
482 freq = imx6ul_ccm_get_ipg_clk(dev); in imx6ul_ccm_get_per_sel_clk()
485 freq = imx6ul_analog_get_osc_clk(dev); in imx6ul_ccm_get_per_sel_clk()
500 freq = imx6ul_ccm_get_per_sel_clk(dev) in imx6ul_ccm_get_per_clk()
511 IMX6ULCCMState *s = IMX6UL_CCM(dev); in imx6ul_ccm_get_clock_frequency()
536 static void imx6ul_ccm_reset(DeviceState *dev) in imx6ul_ccm_reset() argument
538 IMX6ULCCMState *s = IMX6UL_CCM(dev); in imx6ul_ccm_reset()
[all …]
/qemu/hw/acpi/
H A Dgeneric_event_device.c46 Aml *dev = aml_device("%s", name); in build_ged_aml() local
56 aml_append(dev, aml_name_decl("_CRS", crs)); in build_ged_aml()
66 aml_append(dev, field); in build_ged_aml()
139 aml_append(dev, evt); in build_ged_aml()
141 aml_append(table, dev); in build_ged_aml()
146 Aml *dev = aml_device(ACPI_POWER_BUTTON_DEVICE); in acpi_dsdt_add_power_button() local
148 aml_append(dev, aml_name_decl("_UID", aml_int(0))); in acpi_dsdt_add_power_button()
149 aml_append(scope, dev); in acpi_dsdt_add_power_button()
233 nvdimm_acpi_plug_cb(hotplug_dev, dev); in acpi_ged_device_plug_cb()
376 DeviceState *dev = DEVICE(obj); in acpi_ged_initfn() local
[all …]
/qemu/hw/microblaze/
H A Dpetalogix_ml605_mmu.c74 DeviceState *dev, *dma, *eth0; in petalogix_ml605_init() local
113 dev = qdev_new("xlnx.xps-intc"); in petalogix_ml605_init()
117 sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, in petalogix_ml605_init()
120 irq[i] = qdev_get_gpio_in(dev, i); in petalogix_ml605_init()
128 dev = qdev_new("xlnx.xps-timer"); in petalogix_ml605_init()
129 qdev_prop_set_uint32(dev, "one-timer-only", 0); in petalogix_ml605_init()
175 dev = qdev_new("xlnx.xps-spi"); in petalogix_ml605_init()
177 busdev = SYS_BUS_DEVICE(dev); in petalogix_ml605_init()
188 dev = qdev_new("n25q128"); in petalogix_ml605_init()
190 qdev_prop_set_drive_err(dev, "drive", in petalogix_ml605_init()
[all …]
/qemu/hw/core/
H A Dqdev-hotplug.c16 HotplugHandler *qdev_get_machine_hotplug_handler(DeviceState *dev) in qdev_get_machine_hotplug_handler() argument
26 return mc->get_hotplug_handler(machine, dev); in qdev_get_machine_hotplug_handler()
33 bool qdev_hotplug_allowed(DeviceState *dev, Error **errp) in qdev_hotplug_allowed() argument
43 return mc->hotplug_allowed(machine, dev, errp); in qdev_hotplug_allowed()
50 HotplugHandler *qdev_get_bus_hotplug_handler(DeviceState *dev) in qdev_get_bus_hotplug_handler() argument
52 if (dev->parent_bus) { in qdev_get_bus_hotplug_handler()
53 return dev->parent_bus->hotplug_handler; in qdev_get_bus_hotplug_handler()
58 HotplugHandler *qdev_get_hotplug_handler(DeviceState *dev) in qdev_get_hotplug_handler() argument
62 if (hotplug_ctrl == NULL && dev->parent_bus) { in qdev_get_hotplug_handler()
63 hotplug_ctrl = qdev_get_bus_hotplug_handler(dev); in qdev_get_hotplug_handler()
[all …]
/qemu/hw/usb/
H A Ddev-serial.c93 USBDevice dev; member
192 USBDevice *dev = USB_DEVICE(s); in usb_serial_set_flow_control() local
522 if (!s->dev.attached) { in usb_serial_can_read()
591 usb_desc_create_serial(dev); in usb_serial_realize()
592 usb_desc_init(dev); in usb_serial_realize()
593 dev->auto_attach = 0; in usb_serial_realize()
608 usb_serial_handle_reset(dev); in usb_serial_realize()
611 !dev->attached) { in usb_serial_realize()
619 USBDevice *dev; in usb_braille_init() local
627 dev = usb_new("usb-braille"); in usb_braille_init()
[all …]
/qemu/include/hw/pci/
H A Dpci_device.h27 void (*realize)(PCIDevice *dev, Error **errp);
51 PCIDevice *dev; member
203 static inline uint16_t pci_get_bdf(PCIDevice *dev) in pci_get_bdf() argument
205 return PCI_BUILD_BDF(pci_bus_num(pci_get_bus(dev)), dev->devfn); in pci_get_bdf()
208 uint16_t pci_requester_id(PCIDevice *dev);
213 return &dev->bus_master_as; in pci_get_address_space()
252 return pci_dma_rw(dev, addr, buf, len, in pci_dma_read()
271 return pci_dma_rw(dev, addr, (void *) buf, len, in pci_dma_write()
276 static inline MemTxResult ld##_l##_pci_dma(PCIDevice *dev, \
283 static inline MemTxResult st##_s##_pci_dma(PCIDevice *dev, \
[all …]
/qemu/hw/virtio/
H A Dvdpa-dev.c53 VirtIODevice *vdev = VIRTIO_DEVICE(dev); in vhost_vdpa_device_realize()
102 v->dev.nvqs = v->num_queues; in vhost_vdpa_device_realize()
104 v->dev.vqs = vqs; in vhost_vdpa_device_realize()
105 v->dev.vq_index = 0; in vhost_vdpa_device_realize()
106 v->dev.vq_index_end = v->dev.nvqs; in vhost_vdpa_device_realize()
107 v->dev.backend_features = 0; in vhost_vdpa_device_realize()
153 for (i = 0; i < v->dev.nvqs; i++) { in vhost_vdpa_device_realize()
163 vhost_dev_cleanup(&v->dev); in vhost_vdpa_device_realize()
187 g_free(s->dev.vqs); in vhost_vdpa_device_unrealize()
188 vhost_dev_cleanup(&s->dev); in vhost_vdpa_device_unrealize()
[all …]
H A Dvirtio-balloon.c502 VirtQueue *vq = dev->free_page_vq; in get_free_page_hints()
506 while (dev->block_iothread) { in get_free_page_hints()
507 qemu_cond_wait(&dev->free_page_cond, &dev->free_page_lock); in get_free_page_hints()
553 VirtIOBalloon *dev = opaque; in virtio_ballloon_get_free_page_hints() local
555 VirtQueue *vq = dev->free_page_vq; in virtio_ballloon_get_free_page_hints()
664 virtio_balloon_free_page_stop(dev); in virtio_balloon_free_page_hint_notify()
755 uint32_t oldactual = dev->actual; in virtio_balloon_set_config()
760 if (dev->actual != oldactual) { in virtio_balloon_set_config()
764 dev->poison_val = 0; in virtio_balloon_set_config()
775 f |= dev->host_features; in virtio_balloon_get_features()
[all …]
/qemu/contrib/vhost-user-input/
H A Dmain.c27 VugDev dev; member
41 VuDev *dev = &vi->dev.parent; in vi_input_send() local
42 VuVirtq *vq = vu_get_queue(dev, 0); in vi_input_send()
139 VuInput *vi = container_of(dev, VuInput, dev.parent); in vi_handle_sts()
165 vi_panic(VuDev *dev, const char *msg) in vi_panic() argument
174 VuInput *vi = container_of(dev, VuInput, dev.parent); in vi_queue_set_started()
183 started = vu_queue_started(dev, vu_get_queue(dev, 0)) && in vi_queue_set_started()
184 vu_queue_started(dev, vu_get_queue(dev, 1)); in vi_queue_set_started()
215 VuInput *vi = container_of(dev, VuInput, dev.parent); in vi_get_config()
234 VuInput *vi = container_of(dev, VuInput, dev.parent); in vi_set_config()
[all …]

12345678910>>...61