/qemu/tests/qemu-iotests/ |
H A D | common.pattern | 20 local start=$1 21 local size=$2 22 local step=$3 23 local count=$4 26 echo "alloc $(( start + (i - 1) * step )) $size" 35 local op=$1 36 local start=$2 37 local size=$3 38 local step=$4 39 local count=$5 [all …]
|
H A D | common.rc | 4 # Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. 24 HOSTOS=$(uname -s) 25 arch=$(uname -m) 40 if ! command -v gsed >/dev/null 2>&1; then 41 if sed --version 2>&1 | grep -v 'not GNU sed' | grep 'GNU sed' > /dev/null; 59 command dd --help | grep noxfer > /dev/null 2>&1 61 if [ "$?" -eq 0 ] 82 local img=$1 ofs=$2 len=$3 val=$4 str='' 84 while ((len--)); do 96 local img=$1 ofs=$2 len=$3 val=$4 [all …]
|
H A D | common.qemu | 30 QEMU_FIFO_IN="${QEMU_TEST_DIR}/qmp-in-$$" 31 QEMU_FIFO_OUT="${QEMU_TEST_DIR}/qmp-out-$$" 53 # If $mismatch_only is set, only non-matching responses will 56 # If $capture_events is non-empty, then any QMP event names it lists 71 # is not set) or ${QEMU_STATUS[$1]} is set to -1 (otherwise). 74 local h=${1} 77 if [ -z "${success_or_failure}" ]; then 88 read_timeout="-t ${QEMU_COMM_TIMEOUT}" 89 if [ -n "${GDB_OPTIONS}" ]; then 95 if [ -n "$capture_events" ]; then [all …]
|
H A D | 038 | 57 local offset=$1 58 local sectors=$2 59 local op=$3 60 local pattern=0 61 local cur_sec=0 63 for i in $(seq 0 $((sectors - 1))); do 67 echo "$op -P $pattern $((cur_sec * 64))k 64k" 75 _make_test_img -b "$TEST_IMG.base" -F $IMGFMT 6G 83 echo aio_write -P 0x80 2020k 80k 87 echo aio_write -P $((0x81 + i)) $((i * 128))k 64k [all …]
|
H A D | 037 | 60 local offset=$1 61 local sectors=$2 62 local op=$3 63 local pattern=0 64 local cur_sec=0 66 for ((i=0;i<=$((sectors - 1));i++)); do 70 echo "$op -P $pattern $((cur_sec * 512)) 512" 78 _make_test_img -b "$TEST_IMG.base" -F $IMGFMT 6G 82 $QEMU_IO -c "write -P 0x77 0 2k" "$TEST_IMG" | _filter_qemu_io 83 $QEMU_IO -c "write -P 0x88 6k 2k" "$TEST_IMG" | _filter_qemu_io [all …]
|
H A D | 109 | 52 local raw_img="$1" 53 local source_img="$2" 54 local qmp_format="$3" 55 local qmp_event="$4" 57 _launch_qemu -drive file="${source_img}",format=raw,cache=${CACHEMODE},aio=${AIOMODE},id=src 61 "{'execute':'drive-mirror', 'arguments':{ 70 _send_qemu_cmd $QEMU_HANDLE '{"execute":"query-block-jobs"}' "return" 82 _make_test_img $(du -b "$TEST_IMG.src" | cut -f1) | _filter_img_create_size 88 $QEMU_IO -c 'read -P 0 0 512' "$TEST_IMG" | _filter_qemu_io 93 $QEMU_IMG compare -f raw -F raw "$TEST_IMG" "$TEST_IMG.src" [all …]
|
/qemu/.gitlab-ci.d/ |
H A D | qemu-project.yml | 2 # https://gitlab.com/qemu-project/qemu/-/pipelines 9 - $RUNNER_TAG 12 - local: '/.gitlab-ci.d/base.yml' 13 - local: '/.gitlab-ci.d/stages.yml' 14 - local: '/.gitlab-ci.d/opensbi.yml' 15 - local: '/.gitlab-ci.d/containers.yml' 16 - local: '/.gitlab-ci.d/crossbuilds.yml' 17 - local: '/.gitlab-ci.d/buildtest.yml' 18 - local: '/.gitlab-ci.d/static_checks.yml' 19 - local: '/.gitlab-ci.d/custom-runners.yml' [all …]
|
H A D | custom-runners.yml | 10 # gitlab-runner. To avoid problems that gitlab-runner can cause while 20 GIT_FETCH_EXTRA_FLAGS: --no-tags --prune --quiet 22 name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" 26 - build/build.ninja 27 - build/meson-logs 29 junit: build/meson-logs/testlog.junit.xml 32 - local: '/.gitlab-ci.d/custom-runners/ubuntu-22.04-s390x.yml' 33 - local: '/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch64.yml' 34 - local: '/.gitlab-ci.d/custom-runners/ubuntu-22.04-aarch32.yml'
|
/qemu/ui/ |
H A D | vnc-jobs.c | 31 #include "vnc-jobs.h" 33 #include "qemu/main-loop.h" 41 * - jobs queue lock: for each operation on the queue (push, pop, isEmpty?) 42 * - VncDisplay global lock: mainly used for framebuffer updates to avoid 45 * - VncState::output lock: used to make sure the output buffer is not corrupted 53 * and copy its output buffer in vs->output. 74 qemu_mutex_lock(&queue->mutex); in vnc_lock_queue() 79 qemu_mutex_unlock(&queue->mutex); in vnc_unlock_queue() 86 assert(vs->magic == VNC_MAGIC); in vnc_job_new() 87 job->vs = vs; in vnc_job_new() [all …]
|
/qemu/net/ |
H A D | dgram.c | 4 * Copyright (c) 2003-2008 Fabrice Bellard 32 #include "qemu/error-report.h" 36 #include "qemu/main-loop.h" 55 qemu_set_fd_handler(s->fd, in net_dgram_update_fd_handler() 56 s->read_poll ? net_dgram_send : NULL, in net_dgram_update_fd_handler() 57 s->write_poll ? net_dgram_writable : NULL, in net_dgram_update_fd_handler() 63 s->read_poll = enable; in net_dgram_read_poll() 69 s->write_poll = enable; in net_dgram_write_poll() 79 qemu_flush_queued_packets(&s->nc); in net_dgram_writable() 89 if (s->dest_addr) { in net_dgram_receive() [all …]
|
/qemu/tests/docker/dockerfiles/ |
H A D | fedora-rust-nightly.docker | 1 # THIS FILE WAS AUTO-GENERATED 3 # $ lcitool dockerfile --layers all fedora-40 qemu 5 # https://gitlab.com/libvirt/libvirt-ci 9 RUN dnf install -y nosync && \ 11 if test -d /usr/lib64\n\ 19 nosync dnf update -y && \ 20 nosync dnf install -y \ 21 SDL2-devel \ 22 SDL2_image-devel \ 23 alsa-lib-devel \ [all …]
|
/qemu/contrib/ivshmem-client/ |
H A D | ivshmem-client.c | 6 * top-level directory. 15 #include "ivshmem-client.h" 19 if ((client)->verbose) { \ 46 ret = recvmsg(client->sock_fd, &msg, 0); in ivshmem_client_read_one_msg() 50 return -1; in ivshmem_client_read_one_msg() 54 return -1; in ivshmem_client_read_one_msg() 58 *fd = -1; in ivshmem_client_read_one_msg() 62 if (cmsg->cmsg_len != CMSG_LEN(sizeof(int)) || in ivshmem_client_read_one_msg() 63 cmsg->cmsg_level != SOL_SOCKET || in ivshmem_client_read_one_msg() 64 cmsg->cmsg_type != SCM_RIGHTS) { in ivshmem_client_read_one_msg() [all …]
|
/qemu/.gitlab-ci.d/cirrus/ |
H A D | freebsd-14.vars | 1 # THIS FILE WAS AUTO-GENERATED 3 # $ lcitool variables freebsd-14 qemu 5 # https://gitlab.com/libvirt/libvirt-ci 7 CCACHE='/usr/local/bin/ccache' 10 MAKE='/usr/local/bin/gmake' 11 NINJA='/usr/local/bin/ninja' 13 PIP3='/usr/local/bin/pip' 14 …-lib bash bison bzip2 ca_root_nss capstone4 ccache4 cmocka ctags curl cyrus-sasl dbus diffutils dt… 16 PYTHON='/usr/local/bin/python3'
|
/qemu/include/qemu/ |
H A D | coroutine-tls.h | 2 * QEMU Thread Local Storage for coroutines 6 * SPDX-License-Identifier: LGPL-2.1-or-later 9 * See the COPYING.LIB file in the top-level directory. 11 * It is forbidden to access Thread Local Storage in coroutines because 13 * re-entry. Coroutines can run in more than one thread through the course of 19 * ..code-block:: c 28 * aio_notify(current_aio_context); // <-- may be stale after yielding! 31 * This header provides macros for safely defining variables in Thread Local 34 * ..code-block:: c 43 * aio_notify(get_current_aio_context()); // <-- safe [all …]
|
/qemu/tests/vm/generated/ |
H A D | freebsd.json | 2 "ccache": "/usr/local/bin/ccache", 5 "make": "/usr/local/bin/gmake", 6 "ninja": "/usr/local/bin/ninja", 8 "pip3": "/usr/local/bin/pip", 10 "alsa-lib", 20 "cyrus-sasl", 25 "fusefs-libs3", 32 "gtk-vnc", 34 "json-c", 38 "libjpeg-turbo", [all …]
|
/qemu/tests/lcitool/ |
H A D | refresh | 3 # Re-generate container recipes 7 # https://gitlab.com/libvirt/libvirt-ci 13 # the top-level directory. 28 lcitool_path = Path(self_dir, "libvirt-ci", "bin", "lcitool") 30 lcitool_cmd = [lcitool_path, "--data-dir", self_dir] 63 " id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi\n" 70 cmd.extend(["--cross", cross]) 82 filename = Path(src_dir, ".gitlab-ci.d", "cirrus", target + ".vars") 83 cmd = lcitool_cmd + ["variables", "--format", "shell", target, "qemu"] 89 cmd = lcitool_cmd + ["variables", "--format", "json", target, "qemu"] [all …]
|
/qemu/hw/timer/ |
H A D | exynos4210_mct.c | 4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. 31 * | <-------------------------------------------------------------- | 32 * | --------------------------------------------frc---------------> | 37 * | -------------> | 47 * local timer contains two counters: TCNT and ICNT. TCNT == 0 -> ICNT--. 121 #define GET_G_COMP_IDX(offset) (((offset) - G_COMP0_L) / 0x10) 122 #define GET_G_COMP_ADD_INCR_IDX(offset) (((offset) - G_COMP0_ADD_INCR) / 0x10) 145 #define GET_L_TIMER_IDX(offset) ((((offset) & 0xF00) - L0_TCNTB) / 0x100) 147 (((offset) - (L0_TCNTB + 0x100 * (lt_i))) >> 2) 208 /* local timer */ [all …]
|
/qemu/migration/ |
H A D | rdma.c | 4 * Copyright IBM, Corp. 2010-2013 5 * Copyright Red Hat, Inc. 2015-2016 13 * later. See the COPYING file in the top-level directory. 23 #include "migration-stats.h" 24 #include "qemu-file.h" 26 #include "qemu/error-report.h" 27 #include "qemu/main-loop.h" 52 * This is only for non-live state being migrated. 78 * A work request ID is 64-bits and we split up these bits 81 * bits 0-15 : type of control message, 2^16 [all …]
|
/qemu/hw/i386/ |
H A D | acpi-common.c | 3 * Copyright (C) 2008-2010 Kevin O'Connor <kevin@koconnor.net> 28 #include "hw/acpi/aml-build.h" 32 #include "acpi-build.h" 33 #include "acpi-common.h" 38 uint32_t apic_id = apic_ids->cpus[uid].arch_id; in pc_madt_cpu_entry() 39 /* Flags – Local APIC Flags */ in pc_madt_cpu_entry() 40 uint32_t flags = apic_ids->cpus[uid].cpu != NULL || force_enabled ? in pc_madt_cpu_entry() 50 /* Rev 1.0b, Table 5-13 Processor Local APIC Structure */ in pc_madt_cpu_entry() 57 /* Rev 4.0, 5.2.12.12 Processor Local x2APIC Structure */ in pc_madt_cpu_entry() 103 const CPUArchIdList *apic_ids = mc->possible_cpu_arch_ids(MACHINE(x86ms)); in acpi_build_madt() [all …]
|
/qemu/tests/qtest/ |
H A D | netdev-socket.c | 6 * SPDX-License-Identifier: GPL-2.0-or-later 12 #include "../unit/socket-helpers.h" 16 #include "qapi/qobject-input-visitor.h" 17 #include "qapi/qapi-visit-sockets.h" 51 return -1; in inet_get_free_port_socket_ipv4() 56 return -1; in inet_get_free_port_socket_ipv4() 72 return -1; in inet_get_free_port_socket_ipv6() 77 return -1; in inet_get_free_port_socket_ipv6() 95 if (port[i] == -1) { in inet_get_free_port_multiple() 125 qts0 = qtest_initf("-nodefaults -M none " in test_stream_inet_ipv4() [all …]
|
H A D | ipmi-kcs-test.c | 2 * IPMI KCS test cases, using the local interface. 27 #include "libqtest-single.h" 76 --count; in kcs_wait_ibf() 85 --count; in kcs_wait_obf() 201 retries--; in kcs_abort() 209 retries--; in kcs_abort() 273 cmdline = g_strdup_printf("-device ipmi-bmc-sim,id=bmc0" in main() 274 " -device isa-ipmi-kcs,bmc=bmc0"); in main() 278 qtest_add_func("/ipmi/local/kcs_base", test_kcs_base); in main() 279 qtest_add_func("/ipmi/local/kcs_abort", test_kcs_abort); in main() [all …]
|
/qemu/target/ppc/translate/ |
H A D | storage-ctrl-impl.c.inc | 24 #include "mmu-book3s-v3.h" 33 gen_helper_SLBIE(tcg_env, cpu_gpr[a->rb]); 47 gen_helper_SLBIEG(tcg_env, cpu_gpr[a->rb]); 61 gen_helper_SLBIA(tcg_env, tcg_constant_i32(a->ih)); 75 gen_helper_SLBIAG(tcg_env, cpu_gpr[a->rs], tcg_constant_i32(a->l)); 89 gen_helper_SLBMTE(tcg_env, cpu_gpr[a->rb], cpu_gpr[a->rt]); 103 gen_helper_SLBMFEV(cpu_gpr[a->rt], tcg_env, cpu_gpr[a->rb]); 117 gen_helper_SLBMFEE(cpu_gpr[a->rt], tcg_env, cpu_gpr[a->rb]); 136 if (unlikely(ctx->pr)) { 140 gen_helper_SLBFEE(cpu_gpr[a->rt], tcg_env, [all …]
|
/qemu/include/hw/xen/interface/ |
H A D | event_channel.h | 1 /* SPDX-License-Identifier: MIT */ 7 * Copyright (c) 2003-2004, K A Fraser. 26 * guests must check the value of the bit after re-enabling event 41 * @cmd == EVTCHNOP_* (event-channel operation). 42 * @args == struct evtchn_* Operation-specific extra arguments (NULL if none). 93 * the local event channel pending. 96 * handler) is as follows: (Re-enable the event channel for subsequent 114 * EVTCHNOP_bind_virq: Bind a local event channel to VIRQ <irq> on specified 117 * 1. Virtual IRQs are classified as per-vcpu or global. See the VIRQ list 120 * re-bound via EVTCHNOP_bind_vcpu. [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 63 *------------------ Backend Device Identification (PRIVATE) ------------------ 78 * physical-device 85 * physical-device-path [all …]
|
/qemu/tests/unit/ |
H A D | test-xs-node.c | 7 * See the COPYING file in the top-level directory. 45 printf("->%p(%d, '%s'): '%.*s'%s%s\n", n, n->ref, n->name, in dump_ref() 46 (int)(n->content ? n->content->len : strlen("<empty>")), in dump_ref() 47 n->content ? (char *)n->content->data : "<empty>", in dump_ref() 48 n->modified_in_tx ? " MODIFIED" : "", in dump_ref() 49 n->deleted_in_tx ? " DELETED" : ""); in dump_ref() 51 if (n->children) { in dump_ref() 52 g_hash_table_foreach(n->children, (void *)dump_ref, in dump_ref() 63 g_assert(!s->nr_domu_watches); in xs_impl_delete() 65 err = xs_impl_rm(s, DOMID_QEMU, XBT_NULL, "/local"); in xs_impl_delete() [all …]
|