/qemu/ |
H A D | qemu-keymap.c | 10 * See the COPYING file in the top-level directory. 33 /* ------------------------------------------------------------------------ */ 62 struct xkb_state *state = data; in walk_map() local 70 * map xkb keycode -> QKeyCode in walk_map() 74 evdev = code - 8; in walk_map() 77 xkb_state_update_mask(state, 0, 0, 0, 0, 0, 0); in walk_map() 78 kbase = xkb_state_key_get_one_sym(state, code); in walk_map() 80 fprintf(outfile, "# evdev %d (0x%x): no evdev -> QKeyCode mapping" in walk_map() 92 xkb_state_update_mask(state, 0, 0, 0, 0, 0, 0); in walk_map() 93 kbase = xkb_state_key_get_one_sym(state, code); in walk_map() [all …]
|
/qemu/hw/ppc/ |
H A D | spapr_drc.c | 10 * See the COPYING file in the top-level directory. 20 #include "qapi/qapi-events-qdev.h" 22 #include "qemu/error-report.h" 24 #include "hw/pci-host/spapr.h" /* spapr_phb_remove_pci_device_cb callback */ 30 #define DRC_CONTAINER_PATH "dr-connector" 32 #define DRC_INDEX_ID_MASK ((1ULL << DRC_INDEX_TYPE_SHIFT) - 1) 38 return 1 << drck->typeshift; in spapr_drc_type() 46 * unique. this is how we encode the DRC type on bare-metal in spapr_drc_index() 49 return (drck->typeshift << DRC_INDEX_TYPE_SHIFT) in spapr_drc_index() 50 | (drc->id & DRC_INDEX_ID_MASK); in spapr_drc_index() [all …]
|
/qemu/hw/i2c/ |
H A D | smbus_slave.c | 26 do { printf("smbus(%02x): " fmt , dev->i2c.address, ## __VA_ARGS__); } while (0) 44 SMBUS_CONFUSED = -1 52 if (sc->quick_cmd) { in smbus_do_quick_cmd() 53 sc->quick_cmd(dev, recv); in smbus_do_quick_cmd() 61 DPRINTF("Command %d len %d\n", dev->data_buf[0], dev->data_len); in smbus_do_write() 62 if (sc->write_data) { in smbus_do_write() 63 sc->write_data(dev, dev->data_buf, dev->data_len); in smbus_do_write() 73 switch (dev->mode) { in smbus_i2c_event() 76 dev->mode = SMBUS_WRITE_DATA; in smbus_i2c_event() 79 default: in smbus_i2c_event() [all …]
|
/qemu/qga/ |
H A D | main.c | 11 * See the COPYING file in the top-level directory. 21 #include "qemu/help-texts.h" 22 #include "qobject/json-parser.h" 25 #include "guest-agent-core.h" 26 #include "qga-qapi-init-commands.h" 33 #include "qemu-version.h" 37 #include "qga/service-win32.h" 38 #include "qga/vss-win32.h" 40 #include "commands-common.h" 46 #define QGA_VIRTIO_PATH_DEFAULT "/dev/virtio-ports/org.qemu.guest_agent.0" [all …]
|
/qemu/hw/block/ |
H A D | m25p80.c | 26 #include "system/block-backend.h" 29 #include "hw/qdev-properties.h" 30 #include "hw/qdev-properties-system.h" 36 #include "qemu/error-report.h" 46 /* Fields for FlashPartInfo->flags */ 178 /* Atmel -- some are (confusingly) marketed as "DataFlash" */ 194 * Atmel EEPROMS - it is assumed, that don't care bit in command 197 { INFO("at25128a-nonjedec", 0x0, 0, 1, 131072, EEPROM) }, 198 { INFO("at25256a-nonjedec", 0x0, 0, 1, 262144, EEPROM) }, 200 /* EON -- en25xxx */ [all …]
|
/qemu/docs/devel/testing/ |
H A D | blkdebug.rst | 5 Copyright (C) 2014-2015 Red Hat Inc 8 the COPYING file in the top-level directory. 10 The ``blkdebug`` block driver is a rule-based error injection engine. It can be 17 ---------- 27 ----- 35 follows the same .ini-like format used by QEMU's ``-readconfig`` option, and 41 [inject-error] 47 ``/usr/include/asm-generic/errno-base.h`` for errno values. 51 $ qemu-system-x86_64 52 -drive if=none,cache=none,file=blkdebug:blkdebug.conf:test.img,id=drive0 \ [all …]
|
/qemu/hw/sd/ |
H A D | sd.c | 5 * eMMC emulation defined in "JEDEC Standard No. 84-A43" 9 * Copyright (c) 2018 Philippe Mathieu-Daudé <f4bug@amsat.org> 40 #include "system/block-backend.h" 45 #include "hw/qdev-properties.h" 46 #include "hw/qdev-properties-system.h" 47 #include "qemu/error-report.h" 50 #include "qemu/guest-random.h" 52 #include "sdmmc-internal.h" 69 sd_r1b = -1, 70 sd_illegal = -2, [all …]
|
/qemu/hw/gpio/ |
H A D | pca9554.c | 6 * SPDX-License-Identifier: GPL-2.0-or-later 13 #include "hw/qdev-properties.h" 41 uint8_t config = s->regs[PCA9554_CONFIG]; in pca9554_update_pin_input() 42 uint8_t output = s->regs[PCA9554_OUTPUT]; in pca9554_update_pin_input() 48 uint8_t old_value = s->regs[PCA9554_INPUT] & bit_mask; in pca9554_update_pin_input() 53 s->regs[PCA9554_INPUT] &= ~bit_mask; in pca9554_update_pin_input() 60 if (s->ext_state[i] == PCA9554_PIN_LOW) { in pca9554_update_pin_input() 61 s->regs[PCA9554_INPUT] &= ~bit_mask; in pca9554_update_pin_input() 63 s->regs[PCA9554_INPUT] |= bit_mask; in pca9554_update_pin_input() 66 default: in pca9554_update_pin_input() [all …]
|
H A D | pca9552.c | 4 * https://www.nxp.com/docs/en/application-note/AN264.pdf 6 * Copyright (c) 2017-2018, IBM Corporation. 7 * Copyright (c) 2020 Philippe Mathieu-Daudé 10 * later. See the COPYING file in the top-level directory. 17 #include "hw/qdev-properties.h" 57 return extract32(s->regs[reg], shift, 2); in pca955x_pin_get_config() 63 return (s->regs[PCA9552_INPUT1] << 8) | s->regs[PCA9552_INPUT0]; in pca955x_pins_get_status() 81 for (i = 0; i < k->pin_count; i++) { in pca955x_display_pins_status() 89 trace_pca955x_gpio_status(s->description, buf); in pca955x_display_pins_status() 92 for (i = 0; i < k->pin_count; i++) { in pca955x_display_pins_status() [all …]
|
/qemu/qapi/ |
H A D | migration.json | 1 # -*- Mode: Python -*- 28 # @normal-bytes: number of normal bytes sent (since 1.2) 30 # @dirty-pages-rate: number of pages dirtied by second by the guest 35 # @dirty-sync-count: number of times that dirty ram was synchronized 38 # @postcopy-requests: The number of page requests received from the 41 # @page-size: The number of bytes per page for the various page-based 44 # @multifd-bytes: The number of bytes sent through multifd (since 3.0) 46 # @pages-per-second: the number of memory pages transferred per second 49 # @precopy-bytes: The number of bytes sent in the pre-copy phase 52 # @downtime-bytes: The number of bytes sent while the guest is paused [all …]
|
H A D | block-core.json | 1 # -*- Mode: Python -*- 20 # @vm-state-size: size of the VM state 22 # @date-sec: UTC date of the snapshot in seconds 24 # @date-nsec: fractional part in nano seconds to be used with date-sec 26 # @vm-clock-sec: VM clock relative to boot in seconds 28 # @vm-clock-nsec: fractional part in nano seconds to be used with 29 # vm-clock-sec 32 # record/replay is enabled. Used for "time-traveling" to match 34 # counter may be obtained through @query-replay command 40 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int', [all …]
|
/qemu/migration/ |
H A D | colo.c | 2 * COarse-grain LOck-stepping Virtual Machines for Non-stop Service (COLO) 10 * later. See the COPYING file in the top-level directory. 16 #include "qapi/qapi-commands-migration.h" 18 #include "qemu-file.h" 21 #include "io/channel-buffer.h" 23 #include "qemu/error-report.h" 24 #include "qemu/main-loop.h" 29 #include "net/colo-compare.h" 32 #include "qapi/qapi-events-migration.h" 50 return (s->state == MIGRATION_STATUS_COLO); in migration_in_colo_state() [all …]
|
/qemu/qobject/ |
H A D | qjson.c | 10 * See the COPYING.LIB file in the top-level directory. 16 #include "qobject/json-parser.h" 17 #include "qobject/json-writer.h" 36 assert(!s->result || !s->err); in consume_json() 38 if (s->result) { in consume_json() 39 qobject_unref(s->result); in consume_json() 40 s->result = NULL; in consume_json() 41 error_setg(&s->err, "Expecting at most one JSON value"); in consume_json() 43 if (s->err) { in consume_json() 48 s->result = json; in consume_json() [all …]
|
/qemu/hw/intc/ |
H A D | grlib_irqmp.c | 6 * SPDX-License-Identifier: MIT 8 * Copyright (c) 2010-2024 AdaCore 33 #include "hw/qdev-properties.h" 56 #define MP_STATUS_CPU_STATUS_MASK ((1 << IRQMP_MAX_CPU)-2) 71 IRQMPState *state; member 90 static void grlib_irqmp_check_irqs(IRQMPState *state) in grlib_irqmp_check_irqs() argument 94 assert(state != NULL); in grlib_irqmp_check_irqs() 95 assert(state->parent != NULL); in grlib_irqmp_check_irqs() 97 for (i = 0; i < state->parent->ncpus; i++) { in grlib_irqmp_check_irqs() 98 uint32_t pend = (state->pending | state->force[i]) & state->mask[i]; in grlib_irqmp_check_irqs() [all …]
|
/qemu/hw/audio/ |
H A D | gusemu_hal.c | 2 * GUSEMU32 - bus interface part 4 * Copyright (C) 2000-2007 Tibor "TS" Schütz 38 unsigned int gus_read(GUSEmuState * state, int port, int size) in gus_read() argument 43 gusptr = state->gusdatapos; in gus_read() 76 /* case 1-5: */ /* general purpose emulation regs */ in gus_read() 80 default:; in gus_read() 90 /* case 0x20D: */ /* SB2xD is write only -> 2xE writes to it*/ in gus_read() 95 GUS_irqrequest(state, state->gusirq, 1); in gus_read() 119 if (state->gusdma >= 4) in gus_read() 126 GUS_irqclear(state, state->gusirq); in gus_read() [all …]
|
/qemu/hw/misc/ |
H A D | npcm7xx_mft.c | 19 #include "hw/qdev-clock.h" 20 #include "hw/qdev-properties.h" 28 #include "qemu/error-report.h" 36 * Some of the registers can only accessed via 16-bit ops and some can only 37 * be accessed via 8-bit ops. However we mark all of them using REG16 to 119 s->regs[i] = 0; in npcm7xx_mft_reset() 127 * Both iclr and ictrl are 8-bit regs. (See npcm7xx_mft_check_mem_op) in npcm7xx_mft_clear_interrupt() 129 s->regs[R_NPCM7XX_MFT_ICTRL] &= ~iclr; in npcm7xx_mft_clear_interrupt() 136 * Otherwise return -1. 148 return tgt - 1; in npcm7xx_mft_compare() [all …]
|
H A D | i2c-echo.c | 7 * the COPYING file in the top-level directory. 13 #include "qemu/main-loop.h" 18 #define TYPE_I2C_ECHO "i2c-echo" 32 enum i2c_echo_state state; member 41 I2CEchoState *state = opaque; in i2c_echo_bh() local 43 switch (state->state) { in i2c_echo_bh() 48 if (i2c_start_send_async(state->bus, state->data[0])) { in i2c_echo_bh() 52 state->pos++; in i2c_echo_bh() 53 state->state = I2C_ECHO_STATE_ACK; in i2c_echo_bh() 57 if (state->pos > 2) { in i2c_echo_bh() [all …]
|
/qemu/hw/tpm/ |
H A D | tpm_spapr.c | 12 * COPYING file in the top-level directory. 17 #include "qemu/error-report.h" 19 #include "hw/qdev-properties.h" 39 /* 0x81-0x83: CRQ message response */ 74 uint8_t state; member 96 tpm_util_show_buffer(s->buffer, s->be_buffer_size, "To TPM"); in tpm_spapr_tpm_send() 98 s->state = SPAPR_VTPM_STATE_EXECUTION; in tpm_spapr_tpm_send() 99 s->cmd = (TPMBackendCmd) { in tpm_spapr_tpm_send() 101 .in = s->buffer, in tpm_spapr_tpm_send() 102 .in_len = MIN(tpm_cmd_get_size(s->buffer), s->be_buffer_size), in tpm_spapr_tpm_send() [all …]
|
H A D | tpm_tis_i2c.c | 2 * tpm_tis_i2c.c - QEMU's TPM TIS I2C Device 10 * See the COPYING file in the top-level directory. 54 TPMState state; /* not a QOM object */ member 99 return tpm_tis_pre_save(&i2cst->state); in tpm_tis_i2c_pre_save() 106 if (i2cst->offset >= 1) { in tpm_tis_i2c_post_load() 107 tpm_tis_i2c_to_tis_reg(i2cst, i2cst->data[0]); in tpm_tis_i2c_post_load() 114 .name = "tpm-tis-i2c", 119 VMSTATE_BUFFER(state.buffer, TPMStateI2C), 120 VMSTATE_UINT16(state.rw_offset, TPMStateI2C), 121 VMSTATE_UINT8(state.active_locty, TPMStateI2C), [all …]
|
/qemu/hw/usb/ |
H A D | core.c | 39 USBDevice *udev = port->dev; in usb_pick_speed() 43 if ((udev->speedmask & (1 << speeds[i])) && in usb_pick_speed() 44 (port->speedmask & (1 << speeds[i]))) { in usb_pick_speed() 45 udev->speed = speeds[i]; in usb_pick_speed() 53 USBDevice *dev = port->dev; in usb_attach() 56 assert(dev->attached); in usb_attach() 57 assert(dev->state == USB_STATE_NOTATTACHED); in usb_attach() 59 port->ops->attach(port); in usb_attach() 60 dev->state = USB_STATE_ATTACHED; in usb_attach() 66 USBDevice *dev = port->dev; in usb_detach() [all …]
|
/qemu/docs/devel/migration/ |
H A D | main.rst | 7 QEMU has code to load/save the state of the guest that it is running. 8 These are two complementary operations. Saving the state just does 9 that, saves the state for each device that the guest is running. 11 state of each device. 14 two times. I.e. it can only restore the state in one guest that has 25 because some guests run with a lot of state (specially RAM), and it 26 can take a while to move all state from one machine to another. Live 27 migration allows the guest to continue running while the state is 28 transferred. Only while the last part of the state is transferred has 41 - tcp migration: do the migration using tcp sockets [all …]
|
/qemu/gdbstub/ |
H A D | system.c | 2 * gdb server stub - system specific bits 7 * Copyright (c) 2003-2005 Fabrice Bellard 10 * SPDX-License-Identifier: LGPL-2.0-or-later 15 #include "qemu/error-report.h" 21 #include "exec/tb-flush.h" 22 #include "system/accel-ops.h" 31 #include "chardev/char-fe.h" 36 /* System emulation specific state */ 53 * Return the GDB index for a given vCPU state. 60 return cpu->cpu_index + 1; in gdb_get_cpu_index() [all …]
|
/qemu/include/hw/xen/interface/io/ |
H A D | blkif.h | 1 /* SPDX-License-Identifier: MIT */ 5 * Unified block-device I/O interface for Xen guest OSes. 7 * Copyright (c) 2003-2004, Keir Fraser 18 * Front->back notifications: When enqueuing a new request, sending a 20 * hold-off mechanism provided by the ring macros). Backends must set 23 * Back->front notifications: When enqueuing a new response, sending a 25 * hold-off mechanism provided by the ring macros). Frontends must set 47 * Any specified default value is in effect if the corresponding XenBus node 56 * See the XenBus state transition diagram below for details on when XenBus 63 *------------------ Backend Device Identification (PRIVATE) ------------------ [all …]
|
/qemu/hw/s390x/ |
H A D | s390-pci-inst.c | 10 * your option) any later version. See the COPYING file in the top-level 18 #include "qemu/error-report.h" 22 #include "hw/s390x/s390-pci-inst.h" 23 #include "hw/s390x/s390-pci-bus.h" 24 #include "hw/s390x/s390-pci-kvm.h" 25 #include "hw/s390x/s390-pci-vfio.h" 32 if (iommu->dma_limit) { in inc_dma_avail() 33 iommu->dma_limit->avail++; in inc_dma_avail() 39 if (iommu->dma_limit) { in dec_dma_avail() 40 iommu->dma_limit->avail--; in dec_dma_avail() [all …]
|
/qemu/hw/arm/ |
H A D | stellaris.c | 13 #include "hw/core/split-irq.h" 23 #include "system/address-spaces.h" 29 #include "hw/watchdog/cmsdk-apb-watchdog.h" 32 #include "hw/timer/stellaris-gptm.h" 33 #include "hw/qdev-clock.h" 76 #define DEV_CAP(_dc, _cap) extract32(board->dc##_dc, DC##_dc##_##_cap, 1) 92 #define TYPE_STELLARIS_SYS "stellaris-sys" 113 /* Properties (all read-only registers) */ 127 qemu_set_irq(s->irq, (s->int_status & s->int_mask) != 0); in ssys_update() 178 uint32_t did0 = s->did0; in ssys_board_class() [all …]
|