[Qemu-devel] [PATCH v7 0/4] Add subcommand compare for qemu-img

2012-12-17 Thread mrezanin
From: Miroslav Rezanina This is seventh version of patch adding compare subcommand that compares two images. Compare has following criteria: - only data part is compared - unallocated sectors are not read - in case of different image size, exceeding part of bigger disk has to be zeroed/unall

[Qemu-devel] [PATCH v7 4/4] Add qemu-img compare documentation

2012-12-17 Thread mrezanin
From: Miroslav Rezanina Adding documentation for new qemu-img subcommand compare. Signed-off-by: Miroslav Rezanina --- qemu-img.c| 7 ++- qemu-img.texi | 32 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 8

[Qemu-devel] [PATCH v7 2/4] qemu-img: Add "Quiet mode" option

2012-12-17 Thread mrezanin
From: Miroslav Rezanina There can be need to turn output to stdout off. This patch adds a -q option that enable "Quiet mode". In Quiet mode, only errors are printed out. Signed-off-by: Miroslav Rezanina --- block.c | 11 +++--- block.h | 2 +- blockdev.c | 6 ++--

[Qemu-devel] [PATCH v7 1/4] block: Add synchronous wrapper for bdrv_co_is_allocated_above

2012-12-17 Thread mrezanin
From: Miroslav Rezanina There's no synchronous wrapper for bdrv_co_is_allocated_above function so it's not possible to check for sector allocation in image with backing file. This patch add missing synchronous wrapper. Signed-off-by: Miroslav Rezanina --- block.c | 39

[Qemu-devel] [PATCH v7 3/4] qemu-img: Add compare subcommand

2012-12-17 Thread mrezanin
From: Miroslav Rezanina This patch adds new qemu-img subcommand that compare content of two disk images. Signed-off-by: Miroslav Rezanina --- qemu-img-cmds.hx | 6 ++ qemu-img.c | 268 ++- 2 files changed, 273 insertions(+), 1 deletio

[Qemu-devel] [PATCHv2] Make usb-bt-dongle configurable

2013-09-03 Thread mrezanin
From: Miroslav Rezanina Use usb_legacy_register handling to create bt-dongle device. This allows to disable usb-bt-dongle device using CONFIG_BLUETOOTH option. Signed-off-by: Miroslav Rezanina --- hw/bt/core.c | 25 hw/bt/hci.c| 51 +++

[Qemu-devel] [PATCHv3 0/2] Make usb-bt-dongle configurable

2013-09-03 Thread mrezanin
From: Miroslav Rezanina There's group of options allowing enable/disable usb devices. However, CONFIG_USB_BLUETOOTH can't be removed as there's dependency in vl.c file. This serie allow CONFIG_USB_BLUETOOTH to be disabled. v3: - split patch to two parts v2: - patch rewritten to use usb_lega

[Qemu-devel] [PATCHv3 1/2] Preparation for usb-bt-dongle conditional build

2013-09-03 Thread mrezanin
From: Miroslav Rezanina To allow disable usb-bt-dongle device using CONFIG_BLUETOOTH option, some of functions in vl.c file has to be made accessible in dev-bluetooth.c. This is pure code moving. Signed-off-by: Miroslav Rezanina --- hw/bt/core.c| 23 +++ hw/bt/hci.c | 4

[Qemu-devel] [PATCHv3 2/2] Remove dev-bluetooth.c dependency from vl.c

2013-09-03 Thread mrezanin
From: Miroslav Rezanina Use usb_legacy_register handling to create bt-dongle device and remove code dependency from vl.c so CONFIG_USB_BLUETOOTH can be disabled. Signed-off-by: Miroslav Rezanina --- hw/usb/Makefile.objs | 3 --- hw/usb/dev-bluetooth.c | 10 +- include/hw/usb.h

[Qemu-devel] [PATCH] Prevent segmentation fault in case of relative resolve of uri

2014-09-09 Thread mrezanin
From: Miroslav Rezanina It was possible to call strcmp with NULL argument, that can cause segmentation fault. Properly checking parameters to prevent this situation. Signed-off-by: Miroslav Rezanina --- util/uri.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/uri.c

[Qemu-devel] [PATCH v6] vl.c: Output error on invalid machine type

2014-02-05 Thread mrezanin
From: Miroslav Rezanina Output error message using qemu's error_report() function when user provides the invalid machine type on the command line. This also saves time to find what issue is when you downgrade from one version of qemu to another that doesn't support required machine type yet (the

[Qemu-devel] [PATCH] Move hpet_find function from hpet.c to pc.c

2013-12-11 Thread mrezanin
From: Miroslav Rezanina Function hpet_find could not be used for checking hpet availability becouse it was not build when hpet was disabled. To allow proper use of this function, moving it from hw/timer/hpet.c to hw/i386/pc.c. Signed-off-by: Miroslav Rezanina --- hw/i386/pc.c| 5 +

[Qemu-devel] [PATCH v7] vl.c: Output error on invalid machine type

2014-03-14 Thread mrezanin
From: Miroslav Rezanina Output error message using qemu's error_report() function when user provides the invalid machine type on the command line. This also saves time to find what issue is when you downgrade from one version of qemu to another that doesn't support required machine type yet (the

[Qemu-devel] [PATCH] qemu-doc.texi: Replace remaining obsolete -M option

2014-03-14 Thread mrezanin
From: Miroslav Rezanina When -M option was deprecated (commit 80f52a6) and removed from documentation, two occurrencies were not updated corectly. Fixing them. Signed-off-by: Miroslav Rezanina --- qemu-doc.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-doc.te

[Qemu-devel] [PATCHv2] Prevent segmentation fault in case of relative resolve of uri

2015-02-09 Thread mrezanin
From: Miroslav Rezanina It was possible to call strcmp with NULL argument, that can cause segmentation fault. Properly checking parameters to prevent this situation. Signed-off-by: Miroslav Rezanina --- v2: - instead of adding NULL checks to strcmp call refactor whole NULL checking path. Th

[Qemu-devel] [PATCH] net: fix insecure temporary file creation in SLiRP

2015-06-01 Thread mrezanin
From: Miroslav Rezanina Qemu's user mode networking stack(-net user) is vulnerable to a predictable temporary file creation flaw. This patch uses mkdtemp(3) routine to fix it. Fixes CVE-2015-4037. Signed-off-by: P J P Signed-off-by: Miroslav Rezanina --- [1] http://seclists.org/oss-sec/2015/q

[Qemu-devel] [PATCH] Enforce stack protector usage

2014-07-02 Thread mrezanin
From: Miroslav Rezanina If --enable-stack-protector is used is used, configure script try to use --fstack-protector-strong. In case it's not supported, --fstack-protector-all is enabled. If both protectors are not supported, configure does not use any protector at all without any notification. T

[Qemu-devel] [PATCH] Whitelist sysinfo call

2016-03-07 Thread mrezanin
From: Miroslav Rezanina Newer version of nss-softokn libraries (> 3.16.2.3) use sysinfo call so qemu using rbd image hang after start when run in sandbox mode. To allow using rbd images in sandbox mode we have to whitelist it. Signed-off-by: Miroslav Rezanina --- qemu-seccomp.c | 1 + 1 file

[Qemu-devel] [PATCH] parallel: Allow to disable CONFIG_PARALLEL

2015-05-05 Thread mrezanin
From: Miroslav Rezanina Disabling CONFIG_PARALLEL cause build failure as commit 07dc788 factored out initialization to parallel_hds_isa_init that is not build. Make calling parallel_hds_isa_init depending on CONFIG_PARALLEL so it can be correctly disabled. Signed-off-by: Miroslav Rezanina ---

[Qemu-devel] [PATCHv2] parallel: Allow to disable CONFIG_PARALLEL

2015-05-10 Thread mrezanin
From: Miroslav Rezanina Disabling CONFIG_PARALLEL cause build failure as commit 07dc788 factored out initialization to parallel_hds_isa_init function in hw/char/parallel.c that is not build. Stub file is added to be able to disable CONFIG_PARALLEL. This file is used in targets using parallel_h

[Qemu-devel] [PATCHv3 0/2] parallel: Allow to disable CONFIG_PARALLEL

2015-05-11 Thread mrezanin
From: Miroslav Rezanina There's few uncoditional calls to functions in hw/char/parallel.c so disabling CONFIG_PARALLEL can cause build failure. This series allow building with CONFIG_PARALLEL disabled. In addition, it changes behavior so the run of "qemu -parallel" will abort in case target expec

[Qemu-devel] [PATCHv3 1/2] Move parallel_hds_isa_init to hw/isa/isa-bus.c

2015-05-11 Thread mrezanin
From: Miroslav Rezanina Disabling CONFIG_PARALLEL cause removing parallel_hds_isa_init defined in parallel.c. This function is called during initialization of some boards so disabling CONFIG_PARALLEL cause build failure. This patch moves parallel_hds_isa_init to hw/isa/isa-bus.c so it is include

[Qemu-devel] [PATCHv3 2/2] stubs: Provide parallel_mm_init stub version

2015-05-11 Thread mrezanin
From: Miroslav Rezanina mips build fail with link error in case PARALLEL_CONFIG is disabled as hw/mips/mips_jazz.c calls parallel_mm_init. Due to dependecies to content of parallel.c we can't simply move it to hw/isa/isa-devices.c. This patch adds stubs/parallel.c file that contains stub version

[Qemu-devel] [PATCHv4] Move parallel_hds_isa_init to hw/isa/isa-bus.c

2015-05-13 Thread mrezanin
From: Miroslav Rezanina Disabling CONFIG_PARALLEL cause removing parallel_hds_isa_init defined in parallel.c. This function is called during initialization of some boards so disabling CONFIG_PARALLEL cause build failure. This patch moves parallel_hds_isa_init to hw/isa/isa-bus.c so it is include

[PATCH] Fix build without CONFIG_XEN_EMU

2023-03-08 Thread mrezanin
From: Miroslav Rezanina Upstream commit ddf0fd9ae1 "hw/xen: Support HVM_PARAM_CALLBACK_TYPE_GSI callback" added kvm_xen_maybe_deassert_callback usage to target/i386/kvm/kvm.c file without conditional preprocessing check. This breaks any build not using CONFIG_XEN_EMU. Protect call by condition

[PATCH] configure: Use -mlittle-endian instead of -mlittle for ppc64

2022-01-19 Thread mrezanin
From: Miroslav Rezanina GCC options -mlittle and -mlittle-endian are equivalent on ppc64 architecture. However, clang supports only -mlittle-endian option. Use longer form in configure to properly support both GCC and clang compiler. Signed-off-by: Miroslav Rezanina --- configure | 2 +- 1 fi

[PATCH] Add missing pixman dependecy

2022-11-09 Thread mrezanin
From: Miroslav Rezanina Commit cfead31326 'acpi: pc: vga: use AcpiDevAmlIf interface to build VGA device descriptors' added a new file - acpi-vga.c. This file (indirectly) includes pixman.h file so we need to ensure pixman is available when file is compiled. Signed-off-by: Miroslav Rezanina -

[PATCH 2/4] tulip: Remove unused variable

2022-11-09 Thread mrezanin
From: Miroslav Rezanina Variable n used in tulip_idblock_crc function is only incremented but never read. This causes 'Unused but set variable' warning on Clang 15.0.1 compiler. Removing the variable to prevent the warning. Signed-off-by: Miroslav Rezanina --- hw/net/tulip.c | 4 +--- 1 file

[PATCH 3/4] qemu-img: remove unused variable

2022-11-09 Thread mrezanin
From: Miroslav Rezanina Variable block_count used in img_dd function is only incremented but never read. This causes 'Unused but set variable' warning on Clang 15.0.1 compiler. Removing the variable to prevent the warning. Signed-off-by: Miroslav Rezanina --- qemu-img.c | 4 ++-- 1 file chang

[PATCH 0/4] Removal of several unused variables causing

2022-11-09 Thread mrezanin
From: Miroslav Rezanina When trying to run qemu build using clang 15.0.1 compiler with --enable-werror option, several 'Unused but set variable' warnings was breaking the build. These variables show similar pattern - they are only incremented but final value of the variable is never used. Remo

[PATCH 1/4] rtl8139: Remove unused variable

2022-11-09 Thread mrezanin
From: Miroslav Rezanina Variable send_count used in rtl8139_cplus_transmit_one function is only incremented but never read. This causes 'Unused but set variable' warning on Clang 15.0.1 compiler. Removing the variable to prevent the warning. Signed-off-by: Miroslav Rezanina --- hw/net/rtl8139

[PATCH 4/4] host-libusb: Remove unused variable

2022-11-09 Thread mrezanin
From: Miroslav Rezanina Variable unconnected used in usb_host_auto_check function is only incremented but never read as line where it is read was disabled since introducing the code. This causes 'Unused but set variable' warning on Clang 15.0.1 compiler. Removing the variable and disabled code t

[Qemu-devel] [PATCH] Use CONFIG_VHOST_USER_SCSI to enable vhost-scsi-pci

2018-03-05 Thread mrezanin
From: Miroslav Rezanina Currently, "defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)" is used to enable/disable vhost-scsi-pci build as this condition is used to enable/disable CONFIG_VHOST_USER_SCSI too. However, when CONFIG_VHOST_USER_SCSI is manually disable vhost-scsi-pci is still registe

[PATCH 0/2] Prevent uninitialized warnings

2020-01-21 Thread mrezanin
From: Miroslav Rezanina Using -Wmaybe-uninitialized when optimalization is enabled can cause several warnings during build. This will break build in case -Werror is used. This series fixes two cases of this warnings that can happen during build of QEMU. Miroslav Rezanina (2): test-logging: F

[PATCH 2/2] aspeed/i2c: Prevent uninitialized warning

2020-01-21 Thread mrezanin
From: Miroslav Rezanina Compiler reports uninitialized warning for cmd_flags variable. Adding NULL initialization to prevent this warning. Signed-off-by: Miroslav Rezanina --- hw/i2c/aspeed_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/

[PATCH 1/2] test-logging: Fix -Werror=maybe-uninitialized warning

2020-01-21 Thread mrezanin
From: Miroslav Rezanina Checking for uninitialized variables raises warning for file path variables in test_logfile_write and test_logfile_lock functions. To suppress this warning, initialize varibles to NULL. This is safe change as result of g_build_filename is stored to them before any usage.

[PATCH] configure: Do not use default_feature for EXESUF

2021-03-31 Thread mrezanin
From: Miroslav Rezanina Commit "c87ea11631 configure: add --without-default-features" use default_feature to set default values for configure option. This value is used for EXESUF too. However, EXESUF is not option to be tested, it is just append to any binary name so using --without-default-fea

[PATCH] Add missing initialization for g_autofree variables

2021-03-12 Thread mrezanin
From: Miroslav Rezanina When declaring g_autofree variable without inicialization, compiler will raise "may be used uninitialized in this function" warning due to automatic free handling. This usage can cause gfree using unknown. Such behavior can be dangerous and exploitable. Add inicialization

[PATCH] Use identical prototype for tcg_out_vec_op and tcg_out_op function

2021-03-12 Thread mrezanin
From: Miroslav Rezanina There are two different versions of prototype for tcg_out_op and tcg_out_vec_op functions: 1) using const TCGArg *args and const int *const_args arguments 2) using const TCGArg args[TCG_MAX_OP_ARGS] and const int const_args[TCG_MAX_OP_ARGS] aguments. This duality cau

[PATCH v2] Add missing initialization for g_autofree variables

2021-03-15 Thread mrezanin
From: Miroslav Rezanina When declaring g_autofree variable without inicialization, compiler will raise "may be used uninitialized in this function" warning due to automatic free handling. This is mentioned in docs/devel/style.rst (quote from section "Automatic memory deallocation"): * Variabl

[PATCH v3] Add missing initialization for g_autofree variables

2021-03-15 Thread mrezanin
From: Miroslav Rezanina When declaring g_autofree variable without inicialization, compiler will raise "may be used uninitialized in this function" warning due to automatic free handling. This is mentioned in docs/devel/style.rst (quote from section "Automatic memory deallocation"): * Variabl

[RHEL7 qemu-kvm PATCH 0/3] Fixing several GCC 11 warnings

2021-01-11 Thread mrezanin
From: Miroslav Rezanina Compiling qemu using GCC 11 we got several new warnings. To allow build with --enable-werror, we need to solve issues generating these warnings. Signed-of-by: Miroslav Rezanina Miroslav Rezanina (3): Fix net.c warning on GCC 11 s390x: Fix vm name copy length Fix t

[RHEL7 qemu-kvm PATCH 2/3] s390x: Fix vm name copy length

2021-01-11 Thread mrezanin
From: Miroslav Rezanina There are two cases when vm name is copied but closing \0 can be lost in case name is too long (>=256 characters). Updating length to copy so there is space for closing \0. Signed-off-by: Miroslav Rezanina --- target/s390x/kvm.c | 2 +- target/s390x/misc_helper

[RHEL7 qemu-kvm PATCH 3/3] Fix tcg_out_op argument mismatch warning

2021-01-11 Thread mrezanin
From: Miroslav Rezanina There's prototype mismatch between tcg/tcg.c and tcg/aarch/tcg-target.c.inc: tcg.c: static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, const int *const_args); tcg-target.c.inc: static void tcg_out_op(TCGContext *

[RHEL7 qemu-kvm PATCH 1/3] Fix net.c warning on GCC 11

2021-01-11 Thread mrezanin
From: Miroslav Rezanina When building qemu with GCC 11, compiling eth.c file produce following warning: warning: array subscript 'struct ip6_ext_hdr_routing[0]' is partly outside array bounds of 'struct ip6_ext_hdr[1]' [-Warray-bounds] This caused by retyping from ip6_ext_hdr to ip6_ext_hdr