[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

[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

[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 ---

[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

[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.

[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

[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] 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

[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

[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"): *

[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"): *

[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

[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

[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

[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 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 +-

[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

[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 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:

[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

[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

[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-devel] [PATCH] net: fix insecure temporary file creation in SLiRP

2015-06-01 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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 p...@fedoraproject.org Signed-off-by: Miroslav Rezanina

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

2015-05-13 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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

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

2015-05-12 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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

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

2015-05-12 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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

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

2015-05-12 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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

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

2015-05-10 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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

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

2015-05-05 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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:

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

2015-02-09 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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 mreza...@redhat.com --- v2: - instead of adding NULL checks to strcmp call

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

2014-09-09 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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 mreza...@redhat.com --- util/uri.c | 3 ++- 1 file changed, 2 insertions(+),

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

2014-07-02 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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

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

2014-03-14 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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

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

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

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

2014-02-05 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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

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

2013-12-11 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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

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

2013-09-03 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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 mreza...@redhat.com --- hw/bt/core.c | 25 hw/bt/hci.c

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

2013-09-03 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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

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

2013-09-03 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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 mreza...@redhat.com --- hw/bt/core.c| 23

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

2013-09-03 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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 mreza...@redhat.com --- hw/usb/Makefile.objs | 3 --- hw/usb/dev-bluetooth.c

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

2012-12-17 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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

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

2012-12-17 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com Adding documentation for new qemu-img subcommand compare. Signed-off-by: Miroslav Rezanina mreza...@redhat.com --- qemu-img.c| 7 ++- qemu-img.texi | 32 2 files changed, 38 insertions(+), 1 deletion(-) diff

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

2012-12-17 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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 mreza...@redhat.com --- block.c | 11 +++--- block.h |

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

2012-12-17 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com 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 mreza...@redhat.com ---

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

2012-12-17 Thread mrezanin
From: Miroslav Rezanina mreza...@redhat.com This patch adds new qemu-img subcommand that compare content of two disk images. Signed-off-by: Miroslav Rezanina mreza...@redhat.com --- qemu-img-cmds.hx | 6 ++ qemu-img.c | 268 ++- 2