/qemu/tests/qtest/ |
H A D | test-x86-cpuid-compat.c | 1 #include "qemu/osdep.h" 6 #include "libqtest-single.h" 15 resp = qmp("{'execute': 'query-cpus-fast', 'arguments': {}}"); in get_cpu0_qom_path() 20 path = g_strdup(qdict_get_str(cpu0, "qom-path")); in get_cpu0_qom_path() 27 QDict *resp = qmp("{ 'execute': 'qom-get'," in qom_get() 59 qtest_start(args->cmdline); in test_cpuid_prop() 61 value = qobject_to(QNum, qom_get(path, args->property)); in test_cpuid_prop() 63 g_assert_cmpint(val, ==, args->expected_value); in test_cpuid_prop() 81 cmdline = g_strdup_printf("-cpu %s", cpu); in add_cpuid_test() 90 cmdline = g_strdup_printf("-machine %s %s", machine, cmdline); in add_cpuid_test() [all …]
|
H A D | bios-tables-test.c | 10 * See the COPYING file in the top-level directory. 17 * 2. list any changed files in tests/qtest/bios-tables-test-allowed-diff.h 20 * Contributor or ACPI Maintainer (steps 4-7 need to be redone to resolve conflicts 23 * After 1-3 above tests will pass but ignore differences with the expected files. 24 * You will also notice that tests/qtest/bios-tables-test-allowed-diff.h lists 31 * output. If not - disassemble them yourself in any way you like. 32 * Look at the differences - make sure they make sense and match what the 38 * $(SRC_PATH)/tests/data/acpi/rebuild-expected-aml.sh 48 * tests/qtest/bios-tables-test-allowed-diff.h is empty - this will ensure 52 * - patch 1: list changed files in tests/qtest/bios-tables-test-allowed-diff.h. [all …]
|
H A D | readconfig-test.c | 2 * Validate -readconfig 7 * See the COPYING file in the top-level directory. 10 #include "qemu/osdep.h" 13 #include "qapi/qapi-visit-machine.h" 14 #include "qapi/qapi-visit-qom.h" 15 #include "qapi/qapi-visit-ui.h" 18 #include "qapi/qobject-input-visitor.h" 20 #include "qemu/units.h" 26 int cfgfd = -1; in qtest_init_with_config() 31 cfgfd = g_file_open_tmp("readconfig-test-XXXXXX", &cfgpath, &error); in qtest_init_with_config() [all …]
|
/qemu/docs/system/ |
H A D | cpu-models-x86.rst.inc | 1 Recommendations for KVM CPU model configuration on x86 hosts 5 CPU models on x86 hosts. The goals are to maximise performance, while 10 Two ways to configure CPU models with QEMU / KVM 18 unsafe when this mode is used as libvirt / QEMU cannot guarantee a 24 QEMU comes with a number of predefined named CPU models, that 34 model". This uses the QEMU "Named model" feature, automatically picking 50 can be satisfied by the QEMU CPU models. Note that the table only 51 lists the long term stable CPU model versions (eg Haswell-v4). 56 .. _ABI compatibility levels: https://gitlab.com/x86-psABIs/x86-64-ABI/ 58 .. csv-table:: x86-64 ABI compatibility levels [all …]
|
H A D | introduction.rst | 7 --------------------------- 9 QEMU's system emulation provides a virtual model of a machine (CPU, 14 .. list-table:: Supported Accelerators 15 :header-rows: 1 17 * - Accelerator 18 - Host OS 19 - Host Architectures 20 * - KVM 21 - Linux 22 - Arm (64 bit only), MIPS, PPC, RISC-V, s390x, x86 [all …]
|
H A D | bootindex.rst | 4 QEMU can tell QEMU-aware guest firmware (like the x86 PC BIOS) 6 A simple way to set this order is to use the ``-boot order=`` option, 9 on the QEMU command line. 19 not support ``-boot order=``; on those machines you must always 23 a short-form option like ``-hda`` or ``-cdrom``, so to use 25 into long-form ``-drive`` and ``-device`` option pairs. 28 ------- 30 Let's assume we have a QEMU machine with two NICs (virtio, e1000) and two 33 .. parsed-literal:: 35 |qemu_system| -drive file=disk1.img,if=none,id=disk1 \\ [all …]
|
H A D | target-riscv.rst | 1 .. _RISC-V-System-emulator: 3 RISC-V System emulator 6 QEMU can emulate both 32-bit and 64-bit RISC-V CPUs. Use the 7 ``qemu-system-riscv64`` executable to simulate a 64-bit RISC-V machine, 8 ``qemu-system-riscv32`` executable to simulate a 32-bit RISC-V machine. 10 QEMU has generally good support for RISC-V guests. It has support for 12 RISC-V hardware is much more widely varying than x86 hardware. RISC-V 13 CPUs are generally built into "system-on-chip" (SoC) designs created by 23 ---------------------- 25 For QEMU's RISC-V system emulation, you must specify which board [all …]
|
H A D | target-arm.rst | 1 .. _ARM-System-emulator: 4 ------------------- 6 QEMU can emulate both 32-bit and 64-bit Arm CPUs. Use the 7 ``qemu-system-aarch64`` executable to simulate a 64-bit Arm machine. 8 You can use either ``qemu-system-arm`` or ``qemu-system-aarch64`` 9 to simulate a 32-bit Arm machine: in general, command lines that 10 work for ``qemu-system-arm`` will behave the same when used with 11 ``qemu-system-aarch64``. 13 QEMU has generally good support for Arm guests. It has support for 15 Arm hardware is much more widely varying than x86 hardware. Arm CPUs [all …]
|
/qemu/scripts/ |
H A D | cpu-x86-uarch-abi.py | 3 # SPDX-License-Identifier: GPL-2.0-or-later 9 from qemu.qmp.legacy import QEMUMonitorProtocol 13 print("syntax: %s QMP-SOCK\n\n" % __file__ + 14 "Where QMP-SOCK points to a QEMU process such as\n\n" + 15 " # qemu-system-x86_64 -qmp unix:/tmp/qmp,server,nowait " + 16 "-display none -accel kvm", file=sys.stderr) 21 [ # x86-64 baseline 31 [ # x86-64-v2 33 "lahf-lm", 40 [ # x86-64-v3 [all …]
|
H A D | update-linux-headers.sh | 1 #!/bin/sh -e 3 # Update Linux kernel headers QEMU requires from a specified kernel tree. 11 # See the COPYING file in the top-level directory. 15 # - linux-headers/ for files that are required for compiling for a 21 # - include/standard-headers/ for files that are used for guest 26 # sanitize the headers to remove any use of Linux-specifics such as 29 tmpdir=$(mktemp -d) 35 if [ -z "$linux" ] || ! [ -d "$linux" ]; then 37 usage: update-kernel-headers.sh LINUX_PATH [OUTPUT_PATH] 40 OUTPUT_PATH output directory, usually the qemu source tree (default: $PWD) [all …]
|
H A D | update-syscalltbl.sh | 2 arch/alpha/kernel/syscalls/syscall.tbl,linux-user/alpha/syscall.tbl \ 3 arch/arm/tools/syscall.tbl,linux-user/arm/syscall.tbl \ 4 scripts/syscall.tbl,linux-user/aarch64/syscall_64.tbl \ 5 scripts/syscall.tbl,linux-user/hexagon/syscall.tbl \ 6 scripts/syscall.tbl,linux-user/loongarch64/syscall.tbl \ 7 arch/m68k/kernel/syscalls/syscall.tbl,linux-user/m68k/syscall.tbl \ 8 arch/microblaze/kernel/syscalls/syscall.tbl,linux-user/microblaze/syscall.tbl \ 9 arch/mips/kernel/syscalls/syscall_n32.tbl,linux-user/mips64/syscall_n32.tbl \ 10 arch/mips/kernel/syscalls/syscall_n64.tbl,linux-user/mips64/syscall_n64.tbl \ 11 arch/mips/kernel/syscalls/syscall_o32.tbl,linux-user/mips/syscall_o32.tbl \ [all …]
|
/qemu/docs/ |
H A D | bypass-iommu.txt | 10 passthrough devices with no-iommu mode and devices go through vIOMMU in 25 the 'q35' machine type on x86 architecture and the 'virt' machine type 31 qemu -device pxb-pcie,bus_nr=0x10,addr=0x1,bypass_iommu=true 33 qemu -machine virt,iommu=smmuv3,default_bus_bypass_iommu=true 34 (3) X86 default root bus bypass iommu: 35 qemu -machine q35,default_bus_bypass_iommu=true 37 2. Here is the detailed qemu command line for 'virt' machine with PXB on 40 qemu-system-aarch64 \ 41 -machine virt,kernel_irqchip=on,iommu=smmuv3,default_bus_bypass_iommu=true \ 42 -device pxb-pcie,bus_nr=0x10,id=pci.10,bus=pcie.0,addr=0x3.0x1 \ [all …]
|
/qemu/docs/devel/ |
H A D | uefi-vars.rst | 8 The traditional approach for UEFI Variable storage in qemu guests is 17 by the firmware. On x86 this has been implemented using System 18 Management Mode (SMM) in qemu and kvm, which again is the same 36 The ``uefi-vars`` device implements the UEFI virtual device. It comes 37 in ``uefi-vars-x86`` and ``uefi-vars-sysbus`` flavours. The device 52 because we have to reimplement some edk2 functionality in qemu. 55 --------------- 59 qemu-system-x86_64 \ 60 -device uefi-vars-x86,jsonfile=/path/to/vars.json 63 ---------------- [all …]
|
H A D | tcg.rst | 7 QEMU is a dynamic translator. When it first encounters a piece of code, 9 are very complicated and highly CPU dependent. QEMU uses some tricks 13 QEMU's dynamic translation backend is called TCG, for "Tiny Code 14 Generator". For more information, please take a look at :ref:`tcg-ops-ref`. 17 details of QEMU's dynamic translator. 20 ----------------------- 29 to other aspects of the CPU state. For example, on x86, if the SS, 34 --------------------- 36 After each translated basic block is executed, QEMU uses the simulated 42 main loop. That’s where QEMU looks for the next TB to execute, [all …]
|
/qemu/tests/tcg/i386/ |
H A D | Makefile.target | 8 config-cc.mak: Makefile 9 $(quiet-@)( \ 10 $(call cc-option,-fno-pie, CROSS_CC_HAS_I386_NOPIE)) 3> config-cc.mak 12 -include config-cc.mak 16 SKIP_I386_TESTS=test-i386-ssse3 test-avx test-3dnow test-mmx test-flags 17 X86_64_TESTS:=$(filter test-i386-adcox test-i386-bmi2 $(SKIP_I386_TESTS), $(ALL_X86_TESTS)) 19 test-i386-sse-exceptions: CFLAGS += -msse4.1 -mfpmath=sse 20 run-test-i386-sse-exceptions: QEMU_OPTS += -cpu max 22 test-i386-pcmpistri: CFLAGS += -msse4.2 23 run-test-i386-pcmpistri: QEMU_OPTS += -cpu max [all …]
|
/qemu/hw/i386/xen/ |
H A D | xen-pvh.c | 2 * QEMU Xen PVH x86 Machine 7 * SPDX-License-Identifier: GPL-2.0-or-later 10 #include "qemu/osdep.h" 11 #include "qemu/error-report.h" 16 #include "hw/xen/xen-pvh-common.h" 32 Object *cpu = object_new(ms->cpu_type); in xen_pvh_cpu_new() 35 object_property_set_uint(cpu, "apic-id", apic_id, &error_fatal); in xen_pvh_cpu_new() 48 xp->cpu = g_malloc(sizeof xp->cpu[0] * ms->smp.max_cpus); in xen_pvh_init() 49 for (i = 0; i < ms->smp.max_cpus; i++) { in xen_pvh_init() 50 xp->cpu[i] = xen_pvh_cpu_new(ms, i); in xen_pvh_init() [all …]
|
/qemu/.gitlab/issue_templates/ |
H A D | bug.md | 1 <!-- 2 This is the upstream QEMU issue tracker. 5 to reproduce the problem with the latest qemu.git master built from 6 source. See https://www.qemu.org/download/#source for instructions on 9 QEMU generally supports the last two releases advertised on 10 https://www.qemu.org/. Problems with distro-packaged versions of QEMU 13 See https://www.qemu.org/contribute/report-a-bug/ for additional 17 https://www.qemu.org/contribute/security-process/ 18 --> 21 - Operating system: <!-- Windows 10 21H1, Fedora 37, etc. --> [all …]
|
/qemu/docs/about/ |
H A D | deprecated.rst | 7 introduced into QEMU. In the event that a feature needs to be removed, 11 generate warnings on the console when QEMU starts up, or if activated via a 16 supported for a period of 6 years, equivalent to 18 QEMU releases. All 18 initial 3 years (9 QEMU releases) has passed, and will then be deleted after 21 for pre-existing VM deployments. They should be scheduled for updating to a 23 should exclusively use a non-deprecated machine type, with use of the most 24 recent version highly recommended. Non-versioned machine types follow the 31 -------------------------------------- 33 Short-form boolean options (since 6.0) 43 The replacement for the ``nodelay`` short-form boolean option is ``nodelay=on`` [all …]
|
/qemu/hw/i386/ |
H A D | x86-iommu-stub.c | 2 * Stubs for X86 IOMMU emulation 22 #include "qemu/osdep.h" 23 #include "hw/i386/x86-iommu.h"
|
H A D | x86-iommu.c | 2 * QEMU emulation of common X86 IOMMU 20 #include "qemu/osdep.h" 22 #include "hw/i386/x86-iommu.h" 23 #include "hw/qdev-properties.h" 26 #include "qemu/error-report.h" 35 notifier->iec_notify = fn; in x86_iommu_iec_register_notifier() 36 notifier->private = data; in x86_iommu_iec_register_notifier() 38 QLIST_INSERT_HEAD(&iommu->iec_notifiers, notifier, list); in x86_iommu_iec_register_notifier() 48 QLIST_FOREACH(notifier, &iommu->iec_notifiers, list) { in x86_iommu_iec_notify_all() 49 if (notifier->iec_notify) { in x86_iommu_iec_notify_all() [all …]
|
/qemu/docs/user/ |
H A D | main.rst | 1 .. _user-mode: 3 QEMU User space emulator 7 --------------------------- 11 - Linux (referred as qemu-linux-user) 13 - BSD (referred as qemu-bsd-user) 16 -------- 18 QEMU user space emulation has the following notable features: 21 QEMU includes a generic system call translator. This means that the 23 32/64-bit mismatches between hosts and targets. IOCTLs can be 27 QEMU can redirect to the running program all signals coming from the [all …]
|
/qemu/tests/unit/ |
H A D | test-crypto-afsplit.c | 2 * QEMU Crypto anti-forensic splitter 4 * Copyright (c) 2015-2016 Red Hat, Inc. 21 #include "qemu/osdep.h" 56 "\x86\xaa\x89\x7f\x1f\x9f\xdb\x86" 62 "\xba\x3d\xc6\x4a\x28\xfa\xe2\x86" 112 return 'a' + (i - 10); in hex() 133 size_t splitlen = data->blocklen * data->stripes; in test_afsplit() 135 uint8_t *key = g_new0(uint8_t, data->blocklen); in test_afsplit() 138 /* First time we round-trip the key */ in test_afsplit() 139 qcrypto_afsplit_encode(data->hash, in test_afsplit() [all …]
|
H A D | test-crypto-der.c | 2 * QEMU Crypto akcipher algorithms 22 #include "qemu/osdep.h" 50 "\x68\x8d\x2a\xf7\xcb\xcc\x09\x21\x86\xcc\x98\x21\xc4\x7c\xa4\x09" 66 "\xf4\xc6\xf0\x32\x15\x1a\xe8\xaf\x5a\xca\x3a\xd3\x3e\xf6\xde\x86" 90 "\x4d\xc0\x4e\x90\x2c\x28\xb9\xcc\x22\x74\xf2\xd5\xff\x4d\x86\xf6" 95 "\x23\x8a\x48\x50\x1d\x33\x6a\x86\x46\x69\xed\x54\x65\x6b\x9e\xab" 154 "\xcb\xc8\x86\x0e\x66\x3c\xf7\x5a\x44\x13\xb8\xef\xea\x1d\x7b\xa6" 171 "\x2a\x86\x48\xce\x3d\x03\x01\x07" 175 "\xc3\xf6\x2c\xf3\x13\x6a\x00\xc2\xc9\x3e\x87\x7f\x86\x39\xe6\xae" 226 g_assert(value == checker->exp_value); in checker_callback() [all …]
|
/qemu/hw/watchdog/ |
H A D | wdt_i6300esb.c | 22 #include "qemu/osdep.h" 24 #include "qemu/module.h" 25 #include "qemu/timer.h" 65 #define ESB_UNLOCK2 0x86 /* Step 2 to unlock reset registers */ 73 * performed depends on the -watchdog-action 74 * param passed on QEMU command line. 95 int unlock_state; /* Guest writes 0x80, 0x86 to unlock the 97 * states 0 -> 1 -> 2 when this happens. 110 * (hence it starts counting down) or has been keep-alived. in OBJECT_DECLARE_SIMPLE_TYPE() 116 if (!d->enabled) in OBJECT_DECLARE_SIMPLE_TYPE() [all …]
|
/qemu/qapi/ |
H A D | misc-i386.json | 1 # -*- Mode: Python -*- 4 # SPDX-License-Identifier: GPL-2.0-or-later 7 # @rtc-reset-reinjection: 11 # for example QEMU guest agent's guest-set-time command. 13 # Use of this command is only applicable for x86 machines with an RTC, 19 # .. qmp-example:: 21 # -> { "execute": "rtc-reset-reinjection" } 22 # <- { "return": {} } 24 { 'command': 'rtc-reset-reinjection' } 29 # An enumeration of SEV state information used during @query-sev. [all …]
|