[PATCH 03/10] hw/ide/:split some lines containing more than 80 characters

2020-10-20 Thread Gan Qixin
By using scripts/checkpatch.pl, it is found that many files in hw/ide/ contain lines with more than 80 characters. Signed-off-by: Gan Qixin --- hw/ide/ahci.c | 10 ++ hw/ide/atapi.c | 9 + hw/ide/cmd646.c | 3 ++- hw/ide/core.c | 21 ++--- hw/ide/piix.c |

[PATCH 01/10] hw/virtio/:split some lines containing more than 80 characters

2020-10-20 Thread Gan Qixin
By using scripts/checkpatch.pl, it is found that many files in hw/virtio/ contain lines with more than 80 characters. Signed-off-by: Gan Qixin --- hw/virtio/vhost-backend.c | 3 ++- hw/virtio/vhost-user-fs.c | 6 -- hw/virtio/vhost-user.c | 10 +- hw/virtio/virtio-balloon.c |

[PATCH 00/10] Fix line over 80 characters warning

2020-10-20 Thread Gan Qixin
Hi all, I used scripts/checkpatch.pl to find that many files in the hw directory contain lines with more than 80 characters. Therefore, I splited some lines to fix this warning. Thanks, Gan Qixin Gan Qixin (10): hw/virtio/:split some lines containing more than 80 characters hw/core/:spl

[PATCH 04/10] hw/intc/:split some lines containing more than 80 characters

2020-10-20 Thread Gan Qixin
By using scripts/checkpatch.pl, it is found that many files in hw/intc/ contain lines with more than 80 characters. Signed-off-by: Gan Qixin --- hw/intc/apic.c | 3 ++- hw/intc/arm_gic.c| 5 +++-- hw/intc/arm_gic_common.c | 3 ++- hw/intc/ioapic.c | 3 ++- hw/intc/xics.

[PATCH 05/10] hw/misc/:split some lines containing more than 80 characters

2020-10-20 Thread Gan Qixin
By using scripts/checkpatch.pl, it is found that many files in hw/misc/ contain lines with more than 80 characters. Signed-off-by: Gan Qixin --- hw/misc/aspeed_sdmc.c | 10 ++ hw/misc/bcm2835_mphi.c | 3 ++- hw/misc/edu.c | 3 ++- hw/misc/omap_gpmc.c| 3 ++- hw/misc/omap

[PATCH 09/10] hw/input/:split some lines containing more than 80 characters

2020-10-20 Thread Gan Qixin
By using scripts/checkpatch.pl, it is found that many files in hw/input/ contain lines with more than 80 characters. Signed-off-by: Gan Qixin --- hw/input/hid.c | 3 ++- hw/input/milkymist-softusb.c | 16 ++-- hw/input/pxa2xx_keypad.c | 3 ++- hw/input/virtio-inpu

[PATCH 02/10] hw/core/:split some lines containing more than 80 characters

2020-10-20 Thread Gan Qixin
By using scripts/checkpatch.pl, it is found that many files in hw/core/ contain lines with more than 80 characters. Signed-off-by: Gan Qixin --- hw/core/bus.c| 3 ++- hw/core/loader.c | 17 +++-- hw/core/machine-hmp-cmds.c | 6 -- hw/co

[PATCH 10/10] hw/riscv/:split some lines containing more than 80 characters

2020-10-20 Thread Gan Qixin
By using scripts/checkpatch.pl, it is found that many files in hw/riscv/ contain lines with more than 80 characters. Signed-off-by: Gan Qixin --- hw/riscv/opentitan.c | 6 -- hw/riscv/sifive_e.c | 6 -- hw/riscv/sifive_u.c | 12 3 files changed, 16 insertions(+), 8 delet

Re: [PULL 0/4] xen queue 2020-10-20

2020-10-20 Thread Peter Maydell
available in the Git repository at: > > https://xenbits.xen.org/git-http/people/aperard/qemu-dm.git > tags/pull-xen-20201020 > > for you to fetch changes up to 8959e0a63a3a681a31ff8397d9345a88e6d905bf: > > hw/xen: Set suppres

[PATCH 07/10] hw/pci-host/:split some lines containing more than 80 characters

2020-10-20 Thread Gan Qixin
By using scripts/checkpatch.pl, it is found that many files in hw/pci-host/ contain lines with more than 80 characters. Signed-off-by: Gan Qixin --- hw/pci-host/gpex-acpi.c | 18 -- hw/pci-host/pam.c | 4 ++-- hw/pci-host/ppce500.c | 8 +--- hw/pci-host/q35.c

[PATCH 08/10] hw/char/:split some lines containing more than 80 characters

2020-10-20 Thread Gan Qixin
By using scripts/checkpatch.pl, it is found that many files in hw/char/ contain lines with more than 80 characters. Signed-off-by: Gan Qixin --- hw/char/ibex_uart.c | 12 +--- hw/char/omap_uart.c | 3 +- hw/char/parallel.c | 12 +--- hw/char/serial.c

Re: [PATCH 00/10] Fix line over 80 characters warning

2020-10-20 Thread Daniel P . Berrangé
On Tue, Oct 20, 2020 at 04:30:13AM +0800, Gan Qixin wrote: > Hi all, > I used scripts/checkpatch.pl to find that many files in the hw directory > contain lines with more than 80 characters. Therefore, I splited some lines to > fix this warning. Do we really need to still fix ourselves to a 80

Re: [PATCH v7 05/11] hw/block/nvme: Support Zoned Namespace Command Set

2020-10-20 Thread Klaus Jensen
On Oct 19 11:17, Dmitry Fomichev wrote: > diff --git a/hw/block/nvme-ns.c b/hw/block/nvme-ns.c > index 974aea33f7..fedfad595c 100644 > --- a/hw/block/nvme-ns.c > +++ b/hw/block/nvme-ns.c > @@ -133,6 +320,12 @@ static Property nvme_ns_props[] = { > DEFINE_PROP_UINT32("nsid", NvmeNamespace, para

Re: [PATCH 00/10] Fix line over 80 characters warning

2020-10-20 Thread Peter Maydell
On Tue, 20 Oct 2020 at 12:03, Gan Qixin wrote: > > Hi all, > I used scripts/checkpatch.pl to find that many files in the hw directory > contain lines with more than 80 characters. Therefore, I splited some lines to > fix this warning. I personally have come round to the idea that we should in

[PATCH v4 2/2] util/oslib: Assert qemu_try_memalign() alignment is a power of 2

2020-10-20 Thread Philippe Mathieu-Daudé
qemu_try_memalign() expects a power of 2 alignment: - posix_memalign(3): The address of the allocated memory will be a multiple of alignment, which must be a power of two and a multiple of sizeof(void *). - _aligned_malloc() The alignment value, which must be an integer power of 2. Signe

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Peng Liang
On 10/19/2020 6:35 PM, Philippe Mathieu-Daudé wrote: > On 10/19/20 11:34 AM, Peng Liang wrote: >> VMStateDescription.fields should be end with VMSTATE_END_OF_LIST(). >> However, microbit_i2c_vmstate doesn't follow it.  Let's change it. > > It might be easy to add a Coccinelle script to avoid futur

Re: [PATCH v4 1/2] util/oslib-win32: Use _aligned_malloc for qemu_try_memalign

2020-10-20 Thread Philippe Mathieu-Daudé
On 10/20/20 1:17 PM, Philippe Mathieu-Daudé wrote: From: Richard Henderson We do not need or want to be allocating page sized quanta. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Weil Message-Id: <20201018164836.1149452-1-richard.hender...@linaro.

[PATCH v4 0/2] util/oslib: qemu_try_memalign() improvements

2020-10-20 Thread Philippe Mathieu-Daudé
- Use _aligned_malloc for qemu_try_memalign on win32 - Assert qemu_try_memalign() alignment is a power of 2 Supersedes: <20201018164836.1149452-1-richard.hender...@linaro.org> Philippe Mathieu-Daudé (1): util/oslib: Assert qemu_try_memalign() alignment is a power of 2 Richard Henderson (1):

[PATCH v4 1/2] util/oslib-win32: Use _aligned_malloc for qemu_try_memalign

2020-10-20 Thread Philippe Mathieu-Daudé
From: Richard Henderson We do not need or want to be allocating page sized quanta. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Weil Message-Id: <20201018164836.1149452-1-richard.hender...@linaro.org> --- util/oslib-win32.c | 11 --- 1 file

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Philippe Mathieu-Daudé
On 10/20/20 1:17 PM, Peng Liang wrote: On 10/19/2020 6:35 PM, Philippe Mathieu-Daudé wrote: On 10/19/20 11:34 AM, Peng Liang wrote: VMStateDescription.fields should be end with VMSTATE_END_OF_LIST(). However, microbit_i2c_vmstate doesn't follow it.  Let's change it. It might be easy to add a

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Peter Maydell
On Tue, 20 Oct 2020 at 12:17, Peng Liang wrote: > > On 10/19/2020 6:35 PM, Philippe Mathieu-Daudé wrote: > > On 10/19/20 11:34 AM, Peng Liang wrote: > >> VMStateDescription.fields should be end with VMSTATE_END_OF_LIST(). > >> However, microbit_i2c_vmstate doesn't follow it. Let's change it. > >

Re: [PATCH] ati: mask x y display parameter values

2020-10-20 Thread BALATON Zoltan via
Hello, On Tue, 20 Oct 2020, P J P wrote: +-- On Mon, 19 Oct 2020, BALATON Zoltan wrote --+ | On Mon, 19 Oct 2020, P J P wrote: | >dst_x = ... (s->regs.dst_x(=0) + 1 - s->regs.dst_width(=16383)) | >dst_y = ... (s->regs.dst_y(=0) + 1 - s->regs.dst_height(=16383)) | > | > ati_2d_blt | >

Re: [RFC 5/5] block/nvme: Align iov's va and size on host page size

2020-10-20 Thread Philippe Mathieu-Daudé
On 10/15/20 1:52 PM, Eric Auger wrote: Make sure iov's va and size are properly aligned on the host page size. Signed-off-by: Eric Auger Reviewed-by: Philippe Mathieu-Daudé --- block/nvme.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/block/nvme.c b/

Re: [PATCH v3 5/5] tools/virtiofsd: xattr name mappings: Simple 'map'

2020-10-20 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Oct 14, 2020 at 07:02:09PM +0100, Dr. David Alan Gilbert (git) wrote: > > +static XattrMapEntry *parse_xattrmap_map(const char *rule, > > + XattrMapEntry *map, > > +

Re: [RFC 2/5] block/nvme: Change size and alignment of IDENTIFY response buffer

2020-10-20 Thread Philippe Mathieu-Daudé
On 10/20/20 12:59 PM, Philippe Mathieu-Daudé wrote: On 10/15/20 1:52 PM, Eric Auger wrote: In preparation of 64kB host page support, let's change the size and alignment of the IDENTIFY command response buffer so that the VFIO DMA MAP succeeds. We align on the host page size. Signed-off-by: Eric

Re: [PATCH] hw/pci-host/grackle: Verify PIC link is properly set

2020-10-20 Thread BALATON Zoltan via
On Tue, 20 Oct 2020, Markus Armbruster wrote: Mark Cave-Ayland writes: One thing I have thought about is being able to mark a link property as mandatory so if a value hasn't been set before realize then you A non-null value, I presume. Do you mean something like distinguish between NULL an

[PATCH v2 2/2] qemu-img: add support for rate limit in qemu-img convert

2020-10-20 Thread Zhengui li
From: Zhengui Currently, there is no rate limit for qemu-img convert. This may cause the task of qemu-img convert to consume all the bandwidth of the storage. This will affect the IO performance of other processes and virtual machines under shared storage. So we add support for offline rate limit

[PATCH v2 1/2] qemu-img: add support for offline rate limit in qemu-img commit

2020-10-20 Thread Zhengui li
From: Zhengui Currently, there is no rate limit for qemu-img commit. This may cause the task of qemu-img commit to consume all the bandwidth of the storage. This will affect the IO performance of other processes and virtual machines under shared storage. So we add support for offline rate limit i

Re: Plans to bring QMP 'x-blockdev-reopen' out of experimental?

2020-10-20 Thread Alberto Garcia
On Tue 20 Oct 2020 10:23:33 AM CEST, Kevin Wolf wrote: >> >https://lists.gnu.org/archive/html/qemu-block/2020-02/msg00601.html >> >> I forgot to add, we still don't support changing bs->file with this >> command, so I guess that would be one blocker? >> >> There's no other way of inserting fi

Re: [PULL v3 2/6] tests/9pfs: change qtest name prefix to synth

2020-10-20 Thread Christian Schoenebeck
On Dienstag, 20. Oktober 2020 12:00:57 CEST Greg Kurz wrote: > On Tue, 20 Oct 2020 11:43:18 +0200 > > Christian Schoenebeck wrote: > > On Dienstag, 20. Oktober 2020 09:36:10 CEST Philippe Mathieu-Daudé wrote: > > > On 10/8/20 8:34 PM, Christian Schoenebeck wrote: > > > > All existing 9pfs test ca

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Peng Liang
On 10/20/2020 7:27 PM, Philippe Mathieu-Daudé wrote: > On 10/20/20 1:17 PM, Peng Liang wrote: >> On 10/19/2020 6:35 PM, Philippe Mathieu-Daudé wrote: >>> On 10/19/20 11:34 AM, Peng Liang wrote: VMStateDescription.fields should be end with VMSTATE_END_OF_LIST(). However, microbit_i2c_vmsta

Re: [PATCH v2 1/2] qemu-img: add support for offline rate limit in qemu-img commit

2020-10-20 Thread Alberto Garcia
On Tue 20 Oct 2020 01:39:05 PM CEST, Zhengui li wrote: > From: Zhengui > > Currently, there is no rate limit for qemu-img commit. This may > cause the task of qemu-img commit to consume all the bandwidth > of the storage. This will affect the IO performance of other processes > and virtual machine

Re: [PATCH v2 2/2] qemu-img: add support for rate limit in qemu-img convert

2020-10-20 Thread Alberto Garcia
On Tue 20 Oct 2020 01:39:06 PM CEST, Zhengui li wrote: > +static void set_rate_limit(BlockBackend *blk, int64_t rate_limit) > +{ > +ThrottleConfig cfg; > + > +throttle_config_init(&cfg); > +cfg.buckets[THROTTLE_BPS_WRITE].avg = rate_limit; > + > +blk_io_limits_enable(blk, CONVERT_T

Re: [PATCH] microbit_i2c: Fix coredump when dump-vmstate

2020-10-20 Thread Peng Liang
On 10/20/2020 7:27 PM, Peter Maydell wrote: > On Tue, 20 Oct 2020 at 12:17, Peng Liang wrote: >> >> On 10/19/2020 6:35 PM, Philippe Mathieu-Daudé wrote: >>> On 10/19/20 11:34 AM, Peng Liang wrote: VMStateDescription.fields should be end with VMSTATE_END_OF_LIST(). However, microbit_i2c_v

RE: [PATCH 00/10] Fix line over 80 characters warning

2020-10-20 Thread ganqixin
> -Original Message- > From: Daniel P. Berrangé [mailto:berra...@redhat.com] > Sent: Tuesday, October 20, 2020 7:14 PM > To: ganqixin > Cc: qemu-devel@nongnu.org; qemu-triv...@nongnu.org; lviv...@redhat.com; > peter.mayd...@linaro.org; Zhanghailiang ; > m...@redhat.com; f4...@amsat.org;

RE: [PATCH 00/10] Fix line over 80 characters warning

2020-10-20 Thread ganqixin
> -Original Message- > From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Sent: Tuesday, October 20, 2020 7:15 PM > To: ganqixin > Cc: QEMU Developers ; QEMU Trivial > ; Michael S. Tsirkin ; Philippe > Mathieu-Daudé ; Laurent Vivier ; > David Gibson ; Alistair Francis > ; Chenqun (k

Re: [PATCH v7 10/11] hw/block/nvme: Separate read and write handlers

2020-10-20 Thread Keith Busch
On Tue, Oct 20, 2020 at 10:28:22AM +0200, Klaus Jensen wrote: > On Oct 19 11:17, Dmitry Fomichev wrote: > > With ZNS support in place, the majority of code in nvme_rw() has > > become read- or write-specific. Move these parts to two separate > > handlers, nvme_read() and nvme_write() to make the co

Re: [PATCH v3 12/13] block/qcow2: simplify qcow2_co_invalidate_cache()

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
19.10.2020 16:06, Kevin Wolf wrote: Am 16.10.2020 um 19:10 hat Vladimir Sementsov-Ogievskiy geschrieben: qcow2_do_open correctly sets errp on each failure path. So, we can simplify code in qcow2_co_invalidate_cache() and drop explicit error propagation. qcow2_update_options_prepare() can retur

Re: roms/efirom, tests/uefi-test-tools: update edk2's own submodules first

2020-10-20 Thread Olaf Hering
Am Tue, 20 Oct 2020 11:16:18 +0200 schrieb Olaf Hering : > > + cd edk2/BaseTools && git submodule update --init --force After looking further, there are more bugs: configure has a --with-git knob, which this patch ignores. configure has a --enable-git-update knob, which this patch should most

Re: [PATCH 3/6] hw/timer: Adding watchdog for NPCM7XX Timer.

2020-10-20 Thread Peter Maydell
On Fri, 9 Oct 2020 at 00:22, Havard Skinnemoen wrote: > > From: Hao Wu > > The watchdog is part of NPCM7XX's timer module. Its behavior is > controlled by the WTCR register in the timer. > > When enabled, the watchdog issues an interrupt signal after a pre-set > amount of cycles, and issues a res

Re: [PATCH 4/6] hw/misc: Add npcm7xx random number generator

2020-10-20 Thread Peter Maydell
On Fri, 9 Oct 2020 at 00:22, Havard Skinnemoen wrote: > > The RNG module returns a byte of randomness when the Data Valid bit is > set. > > This implementation ignores the prescaler setting, and loads a new value > into RNGD every time RNGCS is read while the RNG is enabled and random > data is av

[PATCH v4 02/14] block: use return status of bdrv_append()

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
Now bdrv_append returns status and we can drop all the local_err things around it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 6 ++ block/backup-top.c | 23 +++ block/commit.c | 6 ++ block/mirror.c

[PATCH v4 00/14] block: deal with errp: part I

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
v4: 01: - use -EPERM on bdrv_attach_child failure - "ret = 0" above "out:" - drop r-bs 02: - use "ret = ...; if (ret < 0) { ... }" pattern - use g_assert_cmpint - drop r-bs 14: new Vladimir Sementsov-Ogievskiy (14): block: return status from bdrv_append and friends block: use r

[PATCH v4 08/14] block/qcow2: qcow2_get_specific_info(): drop error propagation

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
Don't use error propagation in qcow2_get_specific_info(). For this refactor qcow2_get_bitmap_info_list, its current interface is rather weird. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia --- block/qcow2.h| 4 ++-- block/qcow2-bitmap.c

[PATCH v4 04/14] blockdev: fix drive_backup_prepare() missed error

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
We leak local_err and don't report failure to the caller. It's definitely wrong, let's fix. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia --- blockdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.

[PATCH v4 07/14] blockjob: return status from block_job_set_speed()

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
Better to return status together with setting errp. It allows to avoid error propagation in the caller. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia --- include/block/blockjob.h | 2 +- blockjob.c | 18 -- 2 files

[PATCH v4 01/14] block: return status from bdrv_append and friends

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
The recommended use of qemu error api assumes returning status together with setting errp and avoid void functions with errp parameter. Let's improve bdrv_append and some friends to reduce error-propagation overhead in further patches. Choose int return status, because bdrv_replace_node() has call

[PATCH v4 03/14] block: check return value of bdrv_open_child and drop error propagation

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
This patch is generated by cocci script: @@ symbol bdrv_open_child, errp, local_err; expression file; @@ file = bdrv_open_child(..., -&local_err +errp ); - if (local_err) + if (!file) { ... - error_propagate(err

[PATCH v4 06/14] block/mirror: drop extra error propagation in commit_active_start()

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
Let's check return value of mirror_start_job to check for failure instead of local_err. Rename ret to job, as ret is usually integer variable. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia --- block/mirror.c | 12 +--- 1 file changed, 5

[PATCH v4 14/14] block/qcow2: refactor qcow2_update_options_prepare error paths

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
Keep setting ret close to setting errp and don't merge different error paths into one. This way it's more obvious that we don't return error without setting errp. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff

[PATCH v4 05/14] block: drop extra error propagation for bdrv_set_backing_hd

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
bdrv_set_backing_hd now returns status, let's use it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia --- block.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/block.c b/block.c index 46d4ad0ea6..0ee36c1869 100644 --- a

[PATCH v4 09/14] block/qcow2-bitmap: improve qcow2_load_dirty_bitmaps() interface

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
It's recommended for bool functions with errp to return true on success and false on failure. Non-standard interfaces don't help to understand the code. The change is also needed to reduce error propagation. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Gre

[PATCH v4 11/14] block/qcow2: read_cache_sizes: return status value

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
It's better to return status together with setting errp. It allows to reduce error propagation. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Greg Kurz Reviewed-by: Alberto Garcia --- block/qcow2.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --gi

Re: [PATCH 0/6] Additional NPCM7xx features, devices and tests

2020-10-20 Thread Peter Maydell
On Fri, 9 Oct 2020 at 00:22, Havard Skinnemoen wrote: > > This is an update to the initial NPCM7xx patch series adding > > - A timer test that found several issues that were fixed in the final > version > of the series (see > https://www.mail-archive.com/qemu-devel@nongnu.org/msg739516.

[PATCH v4 10/14] block/qcow2-bitmap: return status from qcow2_store_persistent_dirty_bitmaps

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
It's better to return status together with setting errp. It makes possible to avoid error propagation. While being here, put ERRP_GUARD() to fix error_prepend(errp, ...) usage inside qcow2_store_persistent_dirty_bitmaps() (see the comment above ERRP_GUARD() definition in include/qapi/error.h) Sig

[PATCH v4 12/14] block/qcow2: simplify qcow2_co_invalidate_cache()

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
qcow2_do_open correctly sets errp on each failure path. So, we can simplify code in qcow2_co_invalidate_cache() and drop explicit error propagation. Add ERRP_GUARD() as mandated by the documentation in include/qapi/error.h so that error_prepend() is actually called even if errp is &error_fatal. S

[RFC PATCH v2 00/13] hw/arm/virt: Introduce cpu and cache topology support

2020-10-20 Thread Ying Fang
An accurate cpu topology may help improve the cpu scheduler's decision making when dealing with multi-core system. So cpu topology description is helpful to provide guest with the right view. Cpu cache information may also have slight impact on the sched domain, and even userspace software may chec

[RFC PATCH v2 02/13] hw/arm/virt: Remove unused variable

2020-10-20 Thread Ying Fang
From: Andrew Jones We no longer use the smp_cpus virtual machine state variable. Remove it. Signed-off-by: Andrew Jones --- hw/arm/virt.c | 2 -- include/hw/arm/virt.h | 1 - 2 files changed, 3 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 0069fa1298..ea24b576c6 100644

[PATCH v4 13/14] block/qed: bdrv_qed_do_open: deal with errp

2020-10-20 Thread Vladimir Sementsov-Ogievskiy
Set errp always on failure. Generic bdrv_open_driver supports driver functions which can return negative value and forget to set errp. That's a strange thing.. Let's improve bdrv_qed_do_open to not behave this way. This allows to simplify code in bdrv_qed_co_invalidate_cache(). Signed-off-by: Vlad

[RFC PATCH v2 01/13] hw/arm/virt: Spell out smp.cpus and smp.max_cpus

2020-10-20 Thread Ying Fang
From: Andrew Jones Prefer to spell out the smp.cpus and smp.max_cpus machine state variables in order to make grepping easier and to avoid any confusion as to what cpu count is being used where. Signed-off-by: Andrew Jones --- hw/arm/virt-acpi-build.c | 8 +++ hw/arm/virt.c| 5

[RFC PATCH v2 10/13] target/arm/cpu: Add CPU cache description for arm

2020-10-20 Thread Ying Fang
Add the CPUCacheInfo structure to hold CPU cache information for ARM cpus. A classic three level cache topology is used here. The default cache capacity is given and userspace can overwrite these values. Signed-off-by: Ying Fang --- target/arm/cpu.c | 42 +

[RFC PATCH v2 11/13] hw/arm/virt: add fdt cache information

2020-10-20 Thread Ying Fang
Support devicetree CPU cache information descriptions Signed-off-by: Ying Fang --- hw/arm/virt.c | 92 +++ 1 file changed, 92 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index d23b941020..adcfa52854 100644 --- a/hw/arm/virt.c +++ b/hw

Re: [PATCH 6/6] hw/gpio: Add GPIO model for Nuvoton NPCM7xx

2020-10-20 Thread Peter Maydell
On Fri, 9 Oct 2020 at 00:22, Havard Skinnemoen wrote: > > The NPCM7xx chips have multiple GPIO controllers that are mostly > identical except for some minor differences like the reset values of > some registers. Each controller controls up to 32 pins. > > Each individual pin is modeled as a pair o

[RFC PATCH v2 06/13] hw/arm/virt: DT: add cpu-map

2020-10-20 Thread Ying Fang
From: Andrew Jones Support devicetree CPU topology descriptions. Signed-off-by: Andrew Jones Signed-off-by: Ying Fang --- hw/arm/virt.c | 40 +++- include/hw/arm/virt.h | 1 + 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/hw/arm/vi

[RFC PATCH v2 08/13] hw/acpi/aml-build: add processor hierarchy node structure

2020-10-20 Thread Ying Fang
Add the processor hierarchy node structures to build ACPI information for CPU topology. Three helpers are introduced: (1) build_socket_hierarchy for socket description structure (2) build_processor_hierarchy for processor description structure (3) build_smt_hierarchy for thread (logic processor) d

[RFC PATCH v2 12/13] hw/acpi/aml-build: build ACPI CPU cache hierarchy information

2020-10-20 Thread Ying Fang
To build cache information, An AcpiCacheInfo structure is defined to hold the Type 1 cache structure according to ACPI spec v6.3 5.2.29.2. A helper function build_cache_hierarchy is introduced to encode the cache information. Signed-off-by: Ying Fang --- hw/acpi/aml-build.c | 26

Re: [PATCH] ati: mask x y display parameter values

2020-10-20 Thread P J P
+-- On Tue, 20 Oct 2020, BALATON Zoltan wrote --+ | The card has 32 bit registers with values in them interpreted differently for | different regs. For dst_x|y lower 14 bits can be set and value should be | interpreted as -8192:8191 according to docs. I've got this wrong because all | guests I've t

[RFC PATCH v2 09/13] hw/arm/virt-acpi-build: add PPTT table

2020-10-20 Thread Ying Fang
Add the Processor Properties Topology Table (PPTT) to present CPU topology information to the guest. Signed-off-by: Andrew Jones Signed-off-by: Ying Fang --- hw/arm/virt-acpi-build.c | 42 1 file changed, 42 insertions(+) diff --git a/hw/arm/virt-acpi-b

[RFC PATCH v2 05/13] hw: add compat machines for 5.3

2020-10-20 Thread Ying Fang
Add 5.2 machine types for arm/i440fx/q35/s390x/spapr. Signed-off-by: Ying Fang --- hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 15 ++- hw/i386/pc_q35.c | 14 +-

Re: [Virtio-fs] [PATCH v3] virtiofsd: add container-friendly -o sandbox=chroot option

2020-10-20 Thread Vivek Goyal
On Mon, Oct 19, 2020 at 06:43:41PM +0900, Chirantan Ekbote wrote: > On Thu, Oct 8, 2020 at 5:55 PM Stefan Hajnoczi wrote: > > > > virtiofsd cannot run in a container because CAP_SYS_ADMIN is required to > > create namespaces. > > > > In crosvm we deal with this by also creating a user namespace,

Re: [PATCH] loads-stores.rst: add footnote that clarifies GETPC usage

2020-10-20 Thread Peter Maydell
On Thu, 15 Oct 2020 at 10:51, Emanuele Giuseppe Esposito wrote: > > Current documentation is not too clear on the GETPC usage. > In particular, when used outside the top level helper function > it causes unexpected behavior. > > Signed-off-by: Emanuele Giuseppe Esposito Applied to target-arm.n

[RFC PATCH v2 07/13] hw/arm/virt-acpi-build: distinguish possible and present cpus Message

2020-10-20 Thread Ying Fang
When building ACPI tables regarding CPUs we should always build them for the number of possible CPUs, not the number of present CPUs. We then ensure only the present CPUs are enabled. Signed-off-by: Andrew Jones Signed-off-by: Ying Fang --- hw/arm/virt-acpi-build.c | 17 - 1 fil

Re: [PATCH v3] migration/block-dirty-bitmap: fix uninitialized variable warning

2020-10-20 Thread Eric Blake
On 10/20/20 5:39 AM, Vladimir Sementsov-Ogievskiy wrote: > 20.10.2020 11:16, Laurent Vivier wrote: >> Le 20/10/2020 à 09:36, Chenqun (kuhn) a écrit : >>> Ping! >>> >>> Hello, >>> >>>    Maybe this patch, some people have any other suggestions?   Or, >>> maybe missed to queue? >> >> Hi, >> >> As we'

[RFC PATCH v2 03/13] hw/arm/virt: Replace smp_parse with one that prefers cores

2020-10-20 Thread Ying Fang
From: Andrew Jones The virt machine type has never used the CPU topology parameters, other than number of online CPUs and max CPUs. When choosing how to allocate those CPUs the default has been to assume cores. In preparation for using the other CPU topology parameters let's use an smp_parse that

[RFC PATCH v2 04/13] device_tree: Add qemu_fdt_add_path

2020-10-20 Thread Ying Fang
From: Andrew Jones qemu_fdt_add_path() works like qemu_fdt_add_subnode(), except it also adds any missing parent nodes. We also tweak an error message of qemu_fdt_add_subnode(). We'll make use of the new function in a coming patch. Signed-off-by: Andrew Jones --- device_tree.c

Re: [PATCH v3 1/8] migration: Do not use C99 // comments

2020-10-20 Thread Juan Quintela
Bihong Yu wrote: > Signed-off-by: Bihong Yu > Reviewed-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert > --- > migration/block.c | 2 +- > migration/rdma.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Juan Quintela

[RFC PATCH v2 13/13] hw/arm/virt-acpi-build: Enable CPU cache topology

2020-10-20 Thread Ying Fang
A helper struct AcpiCacheOffset is introduced to describe the offset of three level caches. The cache hierarchy is built according to ACPI spec v6.3 5.2.29.2. Let's enable CPU cache topology now. Signed-off-by: Ying Fang --- hw/acpi/aml-build.c | 19 +- hw/arm/virt-acpi-build

Re: [PATCH v3 3/8] migration: Add spaces around operator

2020-10-20 Thread Juan Quintela
Bihong Yu wrote: > Signed-off-by: Bihong Yu > Reviewed-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert > --- > migration/migration.c| 4 ++-- > migration/postcopy-ram.c | 2 +- > migration/ram.c | 2 +- > migration/savevm.c | 2 +- > migration/vmstate.c | 10 +

Re: [PATCH v3 6/8] migration: Do not initialise statics and globals to 0 or NULL

2020-10-20 Thread Juan Quintela
Bihong Yu wrote: > Signed-off-by: Bihong Yu > Reviewed-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

Re: [PATCH v3 2/8] migration: Don't use '#' flag of printf format

2020-10-20 Thread Juan Quintela
Bihong Yu wrote: > Signed-off-by: Bihong Yu > Reviewed-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert > --- > migration/block.c | 2 +- > migration/ram.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Juan Quintela

Re: [PATCH v3 5/8] migration: Add braces {} for if statement

2020-10-20 Thread Juan Quintela
Bihong Yu wrote: > Signed-off-by: Bihong Yu > Reviewed-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

Re: [PATCH v3 8/8] migration: Delete redundant spaces

2020-10-20 Thread Juan Quintela
Bihong Yu wrote: > Signed-off-by: Bihong Yu > Reviewed-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

Re: [PATCH 1/8] tests/9pfs: simplify fs_mkdir()

2020-10-20 Thread Greg Kurz
On Tue, 20 Oct 2020 01:13:23 +0200 Christian Schoenebeck wrote: > Split out walking a directory path to a separate new utility function > fs_walk_fid() and use that function in fs_mkdir(). > > The code difference saved this way is not much, but we'll use that new > fs_walk_fid() function in the

Re: [PATCH v3 4/8] migration: Open brace '{' following struct go on the same line

2020-10-20 Thread Juan Quintela
Bihong Yu wrote: > Signed-off-by: Bihong Yu > Reviewed-by: Chuan Zheng > Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

Re: [PATCH 1/8] tests/9pfs: simplify fs_mkdir()

2020-10-20 Thread Christian Schoenebeck
On Dienstag, 20. Oktober 2020 15:35:36 CEST Greg Kurz wrote: > On Tue, 20 Oct 2020 01:13:23 +0200 > > Christian Schoenebeck wrote: > > Split out walking a directory path to a separate new utility function > > fs_walk_fid() and use that function in fs_mkdir(). > > > > The code difference saved th

Re: [PATCH 1/2] hw/block/m25p80: Fix Numonyx dummy cycle register behavior

2020-10-20 Thread Francisco Iglesias
Hi Joe, On Tue, Sep 29, 2020 at 05:28:35PM -0700, Joe Komlodi wrote: > Numonyx chips determine the number of cycles to wait based on bits 7:4 in the > volatile configuration register. > > However, if these bits are 0x0 or 0xF, the number of dummy cycles to wait is > 10 on a QIOR or QIOR4 command,

Re: [PATCH v5] sev: add sev-inject-launch-secret

2020-10-20 Thread Eduardo Habkost
On Tue, Oct 20, 2020 at 11:03:51AM +0200, Paolo Bonzini wrote: > On 15/10/20 16:37, to...@linux.ibm.com wrote: > > -static void *gpa2hva(MemoryRegion **p_mr, hwaddr addr, Error **errp) > > +void *gpa2hva(MemoryRegion **p_mr, hwaddr addr, uint64_t size, Error > > **errp) > > { > > MemoryRegio

RE: [PATCH v3 04/10] usb/xhci: fixup xhci kconfig deps

2020-10-20 Thread Sai Pavan Boddu
Hi, > -Original Message- > From: Gerd Hoffmann > Sent: Tuesday, October 20, 2020 1:19 PM > To: qemu-devel@nongnu.org > Cc: Sergio Lopez ; Sai Pavan Boddu ; > Igor Mammedov ; Michael S. Tsirkin > ; Marcel Apfelbaum ; > Paolo Bonzini ; Thomas Huth ; > Richard Henderson ; Gerd Hoffmann ; > E

RE: [PATCH v3 02/10] usb/xhci: add include/hw/usb/xhci.h header file

2020-10-20 Thread Sai Pavan Boddu
Hi, > -Original Message- > From: Gerd Hoffmann > Sent: Tuesday, October 20, 2020 1:19 PM > To: qemu-devel@nongnu.org > Cc: Sergio Lopez ; Sai Pavan Boddu ; > Igor Mammedov ; Michael S. Tsirkin > ; Marcel Apfelbaum ; > Paolo Bonzini ; Thomas Huth ; > Richard Henderson ; Gerd Hoffmann ; > Ed

Re: [PATCH 1/8] tests/9pfs: simplify fs_mkdir()

2020-10-20 Thread Greg Kurz
On Tue, 20 Oct 2020 15:43:21 +0200 Christian Schoenebeck wrote: > On Dienstag, 20. Oktober 2020 15:35:36 CEST Greg Kurz wrote: > > On Tue, 20 Oct 2020 01:13:23 +0200 > > > > Christian Schoenebeck wrote: > > > Split out walking a directory path to a separate new utility function > > > fs_walk_fi

[PATCH v2] net: remove an assert call in eth_get_gso_type

2020-10-20 Thread P J P
From: Prasad J Pandit eth_get_gso_type() routine returns segmentation offload type based on L3 protocol type. It calls g_assert_not_reached if L3 protocol is unknown, making the following return statement unreachable. Remove the g_assert call, as it maybe triggered by a guest user. Reported-by:

Re: [PATCH v3 1/5] tools/virtiofsd: xattr name mappings: Add option

2020-10-20 Thread Vivek Goyal
On Wed, Oct 14, 2020 at 07:02:05PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add an option to define mappings of xattr names so that > the client and server filesystems see different views. > This can be used to have different SELinux mappings as > seen by th

Re: [PATCH 1/4] target/s390x: Improve cc computation for ADD LOGICAL

2020-10-20 Thread David Hildenbrand
On 17.10.20 04:28, Richard Henderson wrote: > The resulting cc is only dependent on the result and the > carry-out. So save those things rather than the inputs. > > Carry-out for 64-bit inputs is had via tcg_gen_add2_i64 directly > into cc_src. Carry-out for 32-bit inputs is had via extraction >

Re: About 'qemu-security' mailing list

2020-10-20 Thread P J P
+-- On Fri, 16 Oct 2020, P J P wrote --+ | * So ie. we need to: | | 1. Create/setup a regular non-encrypted 'qemu-security' list. | | 2. Invite representatives from user/downstream communities to subscribe to | it. | | 3. Collect & store their PGP public keys. Also create a key for t

Re: [PATCH 2/4] target/s390x: Improve ADD LOGICAL WITH CARRY

2020-10-20 Thread David Hildenbrand
On 17.10.20 04:28, Richard Henderson wrote: > Now that ADD LOGICAL outputs carry, we can use that as input directly. > It also means we can re-use CC_OP_ZC and produce an output carry > directly from ADD LOGICAL WITH CARRY. > > Signed-off-by: Richard Henderson > --- > target/s390x/internal.h

Re: [PATCH 3/4] target/s390x: Improve cc computation for SUBTRACT LOGICAL

2020-10-20 Thread David Hildenbrand
On 17.10.20 04:29, Richard Henderson wrote: > The resulting cc is only dependent on the result and the > borrow-out. So save those things rather than the inputs. > > Borrow-out for 64-bit inputs is had via tcg_gen_sub2_i64 directly > into cc_src. Borrow-out for 32-bit inputs is had via extractio

Re: [PATCH 4/4] target/s390x: Improve SUB LOGICAL WITH BORROW

2020-10-20 Thread David Hildenbrand
On 17.10.20 04:29, Richard Henderson wrote: > Now that SUB LOGICAL outputs carry, we can use that as input directly. > It also means we can re-use CC_OP_ZC and produce an output carry > directly from SUB LOGICAL WITH BORROW. > > Signed-off-by: Richard Henderson > --- > target/s390x/internal.h

RE: Question on Compression for Raw Image

2020-10-20 Thread Wang, Wei W
On Tuesday, October 20, 2020 4:01 PM, Kevin Wolf wrote: > Am 20.10.2020 um 03:31 hat Wang, Wei W geschrieben: > > Hi, > > > > Does anyone know the reason why raw-format.c doesn't have > compression > > support (but qcow has the supported added)? For example, raw image > > backup with compression,

Re: [PATCH v6 1/2] hw/watchdog: Implement SBSA watchdog device

2020-10-20 Thread Peter Maydell
On Thu, 15 Oct 2020 at 17:35, Shashi Mallela wrote: > > Generic watchdog device model has been implemented as per ARM BSAv0.9 Hmm, so the patch title, filenames, etc, refer to the SBSA, which is the Server Base System Architecture spec. Is the BSA a different spec ? We should be consistent with o

Re: [PATCH v6 2/2] hw/arm/sbsa-ref: add SBSA watchdog device

2020-10-20 Thread Peter Maydell
On Thu, 15 Oct 2020 at 17:35, Shashi Mallela wrote: > > Included the newly implemented SBSA generic watchdog device model into > SBSA platform > > Signed-off-by: Shashi Mallela > --- > hw/arm/sbsa-ref.c | 24 > 1 file changed, 24 insertions(+) > > diff --git a/hw/arm/sbs

<    1   2   3   4   5   >