/qemu/tests/qemu-iotests/ |
H A D | 232 | 4 # Test for auto-read-only 51 if ! test -t 0; then 52 while read cmd; do 57 ) | $QEMU -nographic -monitor stdio -nodefaults "$@" 69 echo "info block -n" | run_qemu "$@" | grep -e "(file" -e "QEMU_PROG" 76 if [ -n "$TEST_IMG_FILE" ]; then 80 chmod a-w $TEST_IMG 87 echo "=== -drive with read-write image: read-only/auto-read-only combinations ===" 90 run_qemu_info_block -drive driver=file,file="$TEST_IMG",if=none,read-only=on,auto-read-only=off 91 run_qemu_info_block -drive driver=file,file="$TEST_IMG",if=none,read-only=on,auto-read-only=on [all …]
|
H A D | 232.out | 4 === -drive with read-write image: read-only/auto-read-only combinations === 6 NODE_NAME: TEST_DIR/t.IMGFMT (file, read-only) 7 NODE_NAME: TEST_DIR/t.IMGFMT (file, read-only) 8 NODE_NAME: TEST_DIR/t.IMGFMT (file, read-only) 18 === -drive with read-only image: read-only/auto-read-only combinations === 20 NODE_NAME: TEST_DIR/t.IMGFMT (file, read-only) 21 NODE_NAME: TEST_DIR/t.IMGFMT (file, read-only) 22 NODE_NAME: TEST_DIR/t.IMGFMT (file, read-only) 24 QEMU_PROG: -drive driver=file,file=TEST_DIR/t.IMGFMT,if=none,read-only=off,auto-read-only=off: Coul… 28 QEMU_PROG: -drive driver=file,file=TEST_DIR/t.IMGFMT,if=none,auto-read-only=off: Could not open 'TE… [all …]
|
H A D | 153.out | 2 == readonly=off,force-share=on should be rejected == 3 QEMU_PROG: -drive if=none,file=null-co://,readonly=off,force-share=on: force-share=on can only be u… 14 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=none,: Failed to get "write" lock 17 == Launching another QEMU, opts: 'read-only=on' == 18 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=none,read-only=on: Failed to get shared "write" lock 21 == Launching another QEMU, opts: 'read-only=on,force-share=on' == 25 _qemu_io_wrapper -c read 0 512 TEST_DIR/t.qcow2 26 qemu-io: can't open device TEST_DIR/t.qcow2: Failed to get "write" lock 29 _qemu_io_wrapper -r -c read 0 512 TEST_DIR/t.qcow2 30 qemu-io: can't open device TEST_DIR/t.qcow2: Failed to get shared "write" lock [all …]
|
H A D | 247 | 4 # Test for auto-read-only with commit block job 50 echo "=== Try commit to backing file with auto-read-only ===" 60 {"execute":"block-commit", 61 "arguments":{"device":"format-4", "top-node": "format-2", "base-node":"format-0", "job-id":"job0"}} 69 ) | $QEMU -qmp stdio -nographic -nodefaults \ 70 -blockdev file,node-name=file-0,filename=$TEST_IMG.0,auto-read-only=on \ 71 -blockdev $IMGFMT,node-name=format-0,file=file-0,read-only=on \ 72 -blockdev file,node-name=file-1,filename=$TEST_IMG.1,auto-read-only=on \ 73 -blockdev $IMGFMT,node-name=format-1,file=file-1,read-only=on,backing=format-0 \ 74 -blockdev file,node-name=file-2,filename=$TEST_IMG.2,auto-read-only=on \ [all …]
|
H A D | 187.out | 4 Start from read-only 6 qemu-io: Block node is read-only 9 qemu-io: Block node is read-only 11 Start from read-write 15 qemu-io: Block node is read-only
|
H A D | 293.out | 6 read 4096/4096 bytes at offset 0 16 read 4096/4096 bytes at offset 0 18 read 4096/4096 bytes at offset 0 20 read 4096/4096 bytes at offset 0 22 read 4096/4096 bytes at offset 0 26 qemu-io: can't open: Invalid password, cannot unlock any keyslot 29 qemu-io: can't open: Invalid password, cannot unlock any keyslot 38 qemu-img: Can't add a keyslot - all keyslots are in use 41 read 4096/4096 bytes at offset 0 43 read 4096/4096 bytes at offset 0 [all …]
|
H A D | 249 | 4 # Test that a backing image is put back in read-only mode after 5 # block-commit (both when it fails and when it succeeds). 51 # Create the images: base <- int <- active 53 TEST_IMG="$TEST_IMG.int" _make_test_img -b "$TEST_IMG.base" -F $IMGFMT 54 _make_test_img -b "$TEST_IMG.int" -F $IMGFMT 57 # none0: base (read-only) 58 # none1: base <- int <- active 59 _launch_qemu -drive if=none,file="${TEST_IMG}.base",node-name=base,read-only=on \ 60 -drive if=none,file="${TEST_IMG}",backing.node-name=int,backing.backing=base 67 echo '=== Send a write command to a drive opened in read-only mode (1)' [all …]
|
H A D | 153 | 50 if $QEMU_IMG_PROG info --image-opts "driver=file,locking=on,filename=$TEST_IMG" 2>&1 | 51 grep -q 'falling back to POSIX file'; then 72 if ! test -t 0; then 73 while read cmd; do 78 ) | $QEMU -nographic -monitor stdio -serial none "$@" 1>/dev/null 84 $(for i in $@; do echo "-drive if=none,file=$i"; done) 2>&1 \ 88 echo "== readonly=off,force-share=on should be rejected ==" 89 _run_qemu_with_images null-co://,readonly=off,force-share=on 91 for opts1 in "" "read-only=on" "read-only=on,force-share=on"; do 98 _make_test_img -b "${TEST_IMG}.base" -F $IMGFMT [all …]
|
H A D | 070.out | 3 === Verify open image read-only fails, due to dirty log === 4 qemu-io: can't open device TEST_DIR/iotest-dirtylog-10G-4M.vhdx: VHDX image file 'TEST_DIR/iotest-d… 6 qemu-img check -r all 'TEST_DIR/iotest-dirtylog-10G-4M.vhdx' 8 read 18874368/18874368 bytes at offset 0 10 === Verify qemu-img check -r all replays log === 18 === Verify open image read-only succeeds after log replay === 19 read 18874368/18874368 bytes at offset 0 23 image: TEST_DIR/test-disk2vhd.IMGFMT
|
H A D | 133.out | 5 === Check that node-name can't be changed === 7 qemu-io: Cannot change the option 'node-name' 8 qemu-io: Cannot change the option 'node-name' 9 qemu-io: Cannot change the option 'node-name' 11 === Check that unchanged node-name is okay === 16 qemu-io: Cannot change the option 'driver' 17 qemu-io: Cannot change the option 'driver' 18 qemu-io: Cannot change the option 'driver' 23 === Check that reopening works with non-string options === 25 format name: null-co [all …]
|
H A D | 012 | 4 # Make sure we can open read-only images 47 test -z "$TEST_IMG_FILE" && TEST_IMG_FILE=$TEST_IMG 53 echo "== mark image read-only" 54 chmod a-w "$TEST_IMG_FILE" 57 echo "== read from read-only image" 58 $QEMU_IO -r -c "read 0 512" "$TEST_IMG" | _filter_qemu_io 62 rm -f $seq.full
|
H A D | 012.out | 4 == mark image read-only 6 == read from read-only image 7 read 512/512 bytes at offset 0
|
H A D | 249.out | 8 === Send a write command to a drive opened in read-only mode (1) 10 { 'execute': 'human-monitor-command', 11 'arguments': {'command-line': 'qemu-io none0 "aio_write 0 2k"'}} 12 {"return": "Block node is read-onlyrn"} 14 === Run block-commit on base using an invalid filter node name 16 { 'execute': 'block-commit', 17 'arguments': {'job-id': 'job0', 'device': 'none1', 'top-node': 'int', 18 'filter-node-name': '1234'}} 21 {"error": {"class": "GenericError", "desc": "Invalid node-name: '1234'"}} 23 === Send a write command to a drive opened in read-only mode (2) [all …]
|
H A D | 051.out | 7 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=,if=none,id=drive0 8 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=,if=none,id=drive0: Block format '… 10 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on,if=none,id=drive0 11 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on,if=none,id=drive0: Block format… 13 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234,if=none,id=drive0 14 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234,if=none,id=drive0: Block form… 16 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo,if=none,id=drive0 17 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo,if=none,id=drive0: Block forma… 22 Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt= 23 QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=: Block protocol 'file' doesn… [all …]
|
H A D | 070 | 46 # If the log was not replayed, it would only extend to 0xc000000 51 # This image was created with qemu-img, however it was verified using 52 # Hyper-V to properly replay the logs and give the same post-replay 54 _use_sample_img iotest-dirtylog-10G-4M.vhdx.bz2 57 echo "=== Verify open image read-only fails, due to dirty log ===" 58 $QEMU_IO -r -c "read -pP 0xa5 0 18M" "$TEST_IMG" 2>&1 | _filter_testdir \ 62 $QEMU_IO -c "read -pP 0xa5 0 18M" "$TEST_IMG" | _filter_qemu_io 65 _use_sample_img iotest-dirtylog-10G-4M.vhdx.bz2 67 echo "=== Verify qemu-img check -r all replays log ===" 68 $QEMU_IMG check -r all "$TEST_IMG" 2>&1 | _filter_testdir | _filter_qemu [all …]
|
/qemu/include/hw/i2c/ |
H A D | pmbus_device.h | 6 * SPDX-License-Identifier: GPL-2.0-or-later 21 PMBUS_PAGE_PLUS_WRITE = 0x05, /* Block Write-only */ 22 PMBUS_PAGE_PLUS_READ = 0x06, /* Block Read-only */ 26 PMBUS_STORE_DEFAULT_CODE = 0x13, /* Write-only Byte */ 27 PMBUS_RESTORE_DEFAULT_CODE = 0x14, /* Write-only Byte */ 30 PMBUS_STORE_USER_CODE = 0x17, /* Write-only Byte */ 31 PMBUS_RESTORE_USER_CODE = 0x18, /* Write-only Byte */ 32 PMBUS_CAPABILITY = 0x19, /* Read-Only byte */ 33 PMBUS_QUERY = 0x1A, /* Write-Only */ 34 PMBUS_SMBALERT_MASK = 0x1B, /* Block read, Word write */ [all …]
|
/qemu/include/standard-headers/linux/ |
H A D | virtio_mmio.h | 42 /* Magic value ("virt" string) - Read Only */ 45 /* Virtio device version - Read Only */ 48 /* Virtio device ID - Read Only */ 51 /* Virtio vendor ID - Read Only */ 55 * (32 bits per set) - Read Only */ 58 /* Device (host) features set selector - Write Only */ 62 * (32 bits per set) - Write Only */ 65 /* Activated features set selector - Write Only */ 69 #ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */ 71 /* Guest's memory page size in bytes - Write Only */ [all …]
|
H A D | virtio_pci.h | 42 #include "standard-headers/linux/types.h" 43 #include "standard-headers/linux/kernel.h" 47 /* A 32-bit r/o bitmask of the features supported by the host */ 50 /* A 32-bit r/w bitmask of features activated by the guest */ 53 /* A 32-bit r/w PFN for the currently selected queue */ 56 /* A 16-bit r/o queue size for the currently selected queue */ 59 /* A 16-bit r/w queue selector */ 62 /* A 16-bit r/w queue notifier */ 65 /* An 8-bit device status register. */ 68 /* An 8-bit r/o interrupt status register. Reading the value will return the [all …]
|
/qemu/hw/i2c/ |
H A D | pmbus_device.c | 6 * SPDX-License-Identifier: GPL-2.0-or-later 25 /* X = (Y * 10^-R - b) / m */ in pmbus_direct_mode2data() 26 uint32_t x = (value / pow(10, c.R) - c.b) / c.m; in pmbus_direct_mode2data() 32 /* L = D * 2^(-e) */ in pmbus_data2linear_mode() 34 return value << (-exp); in pmbus_data2linear_mode() 43 return value >> (-exp); in pmbus_linear_mode2data() 50 if (pmdev->out_buf_len + len > SMBUS_DATA_MAX_LEN) { in pmbus_send() 56 for (int i = len - 1; i >= 0; i--) { in pmbus_send() 57 pmdev->out_buf[i + pmdev->out_buf_len] = data[len - i - 1]; in pmbus_send() 59 pmdev->out_buf_len += len; in pmbus_send() [all …]
|
/qemu/docs/specs/ |
H A D | acpi_pci_hotplug.rst | 1 QEMU<->ACPI BIOS PCI hotplug interface 7 ACPI GPE block (IO ports 0xafe0-0xafe3, byte access) 8 ---------------------------------------------------- 13 PCI slot injection notification pending (IO port 0xae00-0xae03, 4-byte access) 14 ------------------------------------------------------------------------------ 18 Read by ACPI BIOS GPE.1 handler to notify OS of injection 19 events. Read-only. 21 PCI slot removal notification (IO port 0xae04-0xae07, 4-byte access) 22 -------------------------------------------------------------------- 26 Read by ACPI BIOS GPE.1 handler to notify OS of removal [all …]
|
/qemu/include/block/ |
H A D | block-common.h | 27 #include "qapi/qapi-types-block-core.h" 31 * co_wrapper{*}: Function specifiers used by block-coroutine-wrapper.py 34 * generated by scripts/block-coroutine-wrapper.py 36 * Usage: read docs/devel/block-coroutine-wrapper.rst 39 * - co_wrapper functions can be called by only non-coroutine context, because 41 * - co_wrapper_mixed functions can be called by both coroutine and 42 * non-coroutine context. 43 * - co_wrapper_bdrv_rdlock are co_wrapper functions but automatically take and 45 * - co_wrapper_mixed_bdrv_rdlock are co_wrapper_mixed functions but 58 * no_co_wrapper: Function specifier used by block-coroutine-wrapper.py [all …]
|
/qemu/hw/nvram/ |
H A D | npcm7xx_otp.c | 27 /* Each module has 4 KiB of register space. Only a fraction of it is used. */ 30 /* 32-bit register indices. */ 62 * struct NPCM7xxOTPClass - OTP module class. 66 * The two OTP modules (key-storage and fuse-array) have slightly different 96 uint8_t *dst = &s->array[offset]; in npcm7xx_otp_array_write() 98 while (len-- > 0) { in npcm7xx_otp_array_write() 106 /* Common register read handler for both OTP classes. */ 116 value = s->regs[reg]; in npcm7xx_otp_read() 121 "%s: read from write-only FCTL register\n", in npcm7xx_otp_read() 122 DEVICE(s)->canonical_path); in npcm7xx_otp_read() [all …]
|
/qemu/qapi/ |
H A D | block.json | 1 # -*- Mode: Python -*- 8 { 'include': 'block-core.json' } 39 # @rechs: Same as @large, but first convert a 16-head geometry to 40 # 15-head, by proportionally scaling up the number of 84 # @query-pr-managers: 94 { 'command': 'query-pr-managers', 'returns': ['PRManagerInfo'], 95 'allow-preconfig': true } 114 # - If @device is not a valid block device, DeviceNotFound 120 # .. qmp-example:: 122 # -> { "execute": "eject", "arguments": { "id": "ide1-0-1" } } [all …]
|
/qemu/include/hw/gpio/ |
H A D | pca9552_regs.h | 4 * Copyright (c) 2017-2018, IBM Corporation. 7 * later. See the COPYING file in the top-level directory. 15 #define PCA9552_INPUT0 0 /* read only input register 0 */ 16 #define PCA9552_INPUT1 1 /* read only input register 1 */ 17 #define PCA9552_PSC0 2 /* read/write frequency prescaler 0 */ 18 #define PCA9552_PWM0 3 /* read/write PWM register 0 */ 19 #define PCA9552_PSC1 4 /* read/write frequency prescaler 1 */ 20 #define PCA9552_PWM1 5 /* read/write PWM register 1 */ 21 #define PCA9552_LS0 6 /* read/write LED0 to LED3 selector */ 22 #define PCA9552_LS1 7 /* read/write LED4 to LED7 selector */ [all …]
|
/qemu/hw/block/ |
H A D | xen_blkif.h | 9 * the elements common to all protocols only. This way we get a 10 * compiler-checkable way to use common struct elements, so we can 25 blkif_vdev_t handle; /* only for read/write requests */ 27 blkif_sector_t sector_number; /* start sector idx on disk (r/w only) */ 33 blkif_vdev_t handle; /* only for read/write requests */ 35 blkif_sector_t sector_number; /* start sector idx on disk (r/w only) */ 51 blkif_vdev_t handle; /* only for read/write requests */ 53 blkif_sector_t sector_number; /* start sector idx on disk (r/w only) */ 59 blkif_vdev_t handle; /* only for read/write requests */ 61 blkif_sector_t sector_number; /* start sector idx on disk (r/w only) */ [all …]
|