Re: [PATCH v1 3/8] s390/sclp: rework sclp boundary and length checks

2020-05-13 Thread Cornelia Huck
On Tue, 12 May 2020 10:55:56 -0400 Collin Walling wrote: > On 5/12/20 3:21 AM, David Hildenbrand wrote: > > On 09.05.20 01:08, Collin Walling wrote: > >> +static bool check_sufficient_sccb_len(SCCB *sccb, int size) > > > > "has_sufficient_sccb_len" ? > > > >> +{ > >> +MachineState *m

[PATCH v2] i386/kvm: fix a use-after-free when vcpu plug/unplug

2020-05-13 Thread Pan Nengyuan
When we hotplug vcpus, cpu_update_state is added to vm_change_state_head in kvm_arch_init_vcpu(). But it forgot to delete in kvm_arch_destroy_vcpu() after unplug. Then it will cause a use-after-free access. This patch delete it in kvm_arch_destroy_vcpu() to fix that. Reproducer: virsh setvcpu

Re: [PATCH v1 7/8] s390/kvm: header sync for diag318

2020-05-13 Thread Cornelia Huck
On Fri, 8 May 2020 19:08:22 -0400 Collin Walling wrote: > Signed-off-by: Collin Walling > --- > linux-headers/asm-s390/kvm.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h > index 0138ccb0d8..b661feafdc 100644 > --- a/

Re: [PATCH] qemu-nbd: Close inherited stderr

2020-05-13 Thread Raphael Pour
On 5/12/20 3:57 PM, Eric Blake wrote: > Wouldn't it just be simpler to not dup in the first place? > > diff --git i/qemu-nbd.c w/qemu-nbd.c > index 4aa005004ebd..6ba2544feb3a 100644 > --- i/qemu-nbd.c > +++ w/qemu-nbd.c > @@ -916,7 +916,9 @@ int main(int argc, char **argv) > } else if (pi

[Bug 1878348] [NEW] --static build fails in v5.0 (since 5010cec2bc87dafab39b3913c8ca91f88df9c540)

2020-05-13 Thread Christophe Lyon
Public bug reported: Hi, Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu fails when configured with --static (eg ../configure --target- list=x86_64-softmmu,x86_64-linux-user --enable-debug --static). On ubuntu 16.04, it fails to find -lffi and -lselinux. After I apt-get ins

Re: [PATCH v1 2/8] s390/sclp: check sccb len before filling in data

2020-05-13 Thread Janosch Frank
On 5/12/20 6:01 PM, Cornelia Huck wrote: > On Mon, 11 May 2020 17:02:06 +0200 > David Hildenbrand wrote: > >> On 11.05.20 16:50, Janosch Frank wrote: >>> On 5/11/20 4:44 PM, David Hildenbrand wrote: On 11.05.20 16:36, Janosch Frank wrote: > On 5/9/20 1:08 AM, Collin Walling wrote:

Re: [PATCH v1 1/1] target/microblaze: Add MFS Rd,EDR translation

2020-05-13 Thread Luc Michel
On 5/12/20 4:36 PM, Edgar E. Iglesias wrote: > From: Tong Ho > > This is to fix cpu-abort with 'qemu: fatal: unknown mfs reg d' > (in the default case) when microblaze guest issues 'MFS Rd,EDR' > instruction. > > Since embeddedsw release 2019.2, XPlm_ExceptionHandler() issues > the instruction o

Re: [PATCH 1/3] target/mips: Support variable page size

2020-05-13 Thread Aleksandar Markovic
сре, 8. апр 2020. у 11:07 Huacai Chen је написао/ла: > > Traditionally, MIPS use 4KB page size, but Loongson prefer 16KB page > size in system emulator. So, let's define TARGET_PAGE_BITS_VARY and > TARGET_PAGE_BITS_MIN to support variable page size. > > Cc: Jiaxun Yang > Signed-off-by: Huacai Che

Re: [PATCH 2/3] mips/mips_fulong2e: Set preferred page size to 16KB

2020-05-13 Thread Aleksandar Markovic
сре, 8. апр 2020. у 11:08 Huacai Chen је написао/ла: > > Loongson processor prefers 16KB page size in system emulator, so let's > define mc->minimum_page_bits to 14. > > Cc: Jiaxun Yang > Signed-off-by: Huacai Chen > --- Huacai, thanks for the efforts regarding this series! I will very likely a

Re: [PATCH v1 2/8] s390/sclp: check sccb len before filling in data

2020-05-13 Thread Cornelia Huck
On Wed, 13 May 2020 09:43:37 +0200 Janosch Frank wrote: > On 5/12/20 6:01 PM, Cornelia Huck wrote: > > On Mon, 11 May 2020 17:02:06 +0200 > > David Hildenbrand wrote: > > > >> On 11.05.20 16:50, Janosch Frank wrote: > >>> On 5/11/20 4:44 PM, David Hildenbrand wrote: > On 11.05.20 1

Re: [PATCH 2/3] mips/mips_fulong2e: Set preferred page size to 16KB

2020-05-13 Thread Huacai Chen
Hi, Aleksandar, On Wed, May 13, 2020 at 3:56 PM Aleksandar Markovic wrote: > > сре, 8. апр 2020. у 11:08 Huacai Chen је написао/ла: > > > > Loongson processor prefers 16KB page size in system emulator, so let's > > define mc->minimum_page_bits to 14. > > > > Cc: Jiaxun Yang > > Signed-off-by: H

Re: Qemu, VNC and non-US keymaps

2020-05-13 Thread B3r3n
Hello Daniel, Ok, TigerVNC, added -shared=1 to behave the same as TightVNC, works greatly, Thanks ! But funny thing, I saw you were part of exchanges on that topic, noVNC totally fails now. Despite my keyboard isnt changed, debian VM is just in QWERTY as if noVNC only send keysyms. If you

Re: [PATCH RESEND v6 01/36] memory: alloc RAM from file at offset

2020-05-13 Thread Stefan Hajnoczi
On Tue, May 12, 2020 at 07:56:33AM -0400, Jag Raman wrote: > > > > On May 12, 2020, at 4:48 AM, Daniel P. Berrangé wrote: > > > > On Wed, Apr 22, 2020 at 09:13:36PM -0700, elena.ufimts...@oracle.com wrote: > >> From: Jagannathan Raman > >> > >> Allow RAM MemoryRegion to be created from an off

Re: [PATCH v2 2/2] net: Drop the NetLegacy structure, always use Netdev instead

2020-05-13 Thread Thomas Huth
On 12/05/2020 17.51, Eric Blake wrote: > On 5/12/20 10:13 AM, Thomas Huth wrote: > +++ b/qapi/net.json @@ -453,7 +453,7 @@    #    'l2tpv3' - since 2.1    ##    { 'union': 'Netdev', -  'base': { 'id': 'str', 'type': 'NetClientDriver' }, +  'base': { '*id': 's

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-13 Thread Daniel P . Berrangé
On Tue, May 12, 2020 at 07:58:17PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Tue, May 12, 2020 at 11:32:06AM +0200, Lukas Straub wrote: > > > On Mon, 11 May 2020 16:46:45 +0100 > > > "Dr. David Alan Gilbert" wrote: > > > > > > > * Daniel P.

Re: [PATCH RESEND v6 12/36] multi-process: add functions to synchronize proxy and remote endpoints

2020-05-13 Thread Stefan Hajnoczi
On Tue, May 12, 2020 at 08:28:39AM -0400, Jag Raman wrote: > > On May 12, 2020, at 6:21 AM, Stefan Hajnoczi wrote: > > On Wed, Apr 22, 2020 at 09:13:47PM -0700, elena.ufimts...@oracle.com wrote: > >> +uint64_t wait_for_remote(int efd) > >> +{ > >> +struct pollfd pfd = { .fd = efd, .events = PO

Re: Qemu, VNC and non-US keymaps

2020-05-13 Thread Daniel P . Berrangé
On Wed, May 13, 2020 at 10:38:52AM +0200, B3r3n wrote: > Hello Daniel, > > Ok, TigerVNC, added -shared=1 to behave the same as TightVNC, works greatly, > Thanks ! > > But funny thing, I saw you were part of exchanges on that topic, noVNC > totally fails now. > Despite my keyboard isnt changed, de

Re: [PATCH v3 7/9] qcow2: Expose bitmaps' size during measure

2020-05-13 Thread Max Reitz
On 12.05.20 21:39, Eric Blake wrote: > On 5/12/20 6:10 AM, Max Reitz wrote: > > >>> This does not break old code since previously we always reported only >>> guest visible content >>> here, but it changes the semantics, and now you cannot allocate >>> "required" size, you need >>> to allocate "re

Re: [PATCH 1/2] linux-user: add do_setsockopt SOL_CAN_RAW CAN_RAW_FILTER support

2020-05-13 Thread Laurent Vivier
Le 12/05/2020 à 23:05, Tomas Krcka a écrit : > Am Di., 12. Mai 2020 um 22:09 Uhr schrieb Laurent Vivier : >> >> Le 06/05/2020 à 15:21, Tomas Krcka a écrit : >>> Signed-off-by: Tomas Krcka >>> --- >>> linux-user/syscall.c | 34 ++ >>> 1 file changed, 34 insertions(+

Re: Qemu, VNC and non-US keymaps

2020-05-13 Thread B3r3n
Hello Daniel, I guess it is time for me to commit suicide...when you dont think about the basics : software version :-( Was 1.0.4, moved to 1.1.0, no issue DONT BECOME OLD ! :-) thanks! At 10:42 13/05/2020, Daniel P. Berrangé wrote: On Wed, May 13, 2020 at 10:38:52AM +0200, B3r3n wrote: >

Re: [PATCH v4 3/4] tests/qtest: Introduce tests for Xilinx ZynqMP CAN controller

2020-05-13 Thread Thomas Huth
On 12/05/2020 22.15, Vikram Garhwal wrote: > The QTests perform five tests on the Xilinx ZynqMP CAN controller: > Tests the CAN controller in loopback, sleep and snoop mode. > Tests filtering of incoming CAN messages. > > Signed-off-by: Vikram Garhwal > --- > tests/qtest/Makefile.include

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-13 Thread Dima Stepanov
On Wed, May 13, 2020 at 11:00:38AM +0800, Jason Wang wrote: > > On 2020/5/12 下午5:08, Dima Stepanov wrote: > >On Tue, May 12, 2020 at 11:26:11AM +0800, Jason Wang wrote: > >>On 2020/5/11 下午5:11, Dima Stepanov wrote: > >>>On Mon, May 11, 2020 at 11:05:58AM +0800, Jason Wang wrote: > On 2020/4/30

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-13 Thread Dima Stepanov
On Wed, May 13, 2020 at 11:20:50AM +0800, Jason Wang wrote: > > On 2020/5/12 下午5:35, Dima Stepanov wrote: > >On Tue, May 12, 2020 at 11:32:50AM +0800, Jason Wang wrote: > >>On 2020/5/11 下午5:25, Dima Stepanov wrote: > >>>On Mon, May 11, 2020 at 11:15:53AM +0800, Jason Wang wrote: > On 2020/4/30

Re: [PATCH 2/6] migration/colo.c: Use cpu_synchronize_all_states()

2020-05-13 Thread Dr. David Alan Gilbert
* Lukas Straub (lukasstra...@web.de) wrote: > cpu_synchronize_all_pre_loadvm() marks all vcpus as dirty, so the > registers are loaded from CPUState before we continue running > the vm. However if we failover during checkpoint, CPUState is not > initialized and the registers are loaded with garbage

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-13 Thread Dima Stepanov
On Wed, May 13, 2020 at 01:56:18PM +0800, Jason Wang wrote: > > On 2020/5/13 下午12:15, Michael S. Tsirkin wrote: > >On Tue, May 12, 2020 at 12:35:30PM +0300, Dima Stepanov wrote: > >>On Tue, May 12, 2020 at 11:32:50AM +0800, Jason Wang wrote: > >>>On 2020/5/11 下午5:25, Dima Stepanov wrote: > On

[PATCH v5 11/15] copy-on-read: Support preadv/pwritev_part functions

2020-05-13 Thread Andrey Shinkevich
Add support for the recently introduced functions bdrv_co_preadv_part() and bdrv_co_pwritev_part() to the COR-filter driver. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/block/copy-on-

[PATCH v5 10/15] copy-on-read: Support change filename functions

2020-05-13 Thread Andrey Shinkevich
The COR-filter driver should support a redirecting function to refresh filenames. Otherwise, a file name of the filter will be copied instead of the one of a data node. It is also true for the function bdrv_change_backing_file(). Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 18 +++

[PATCH v5 04/15] block: Add chain helper functions

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz Add some helper functions for skipping filters in a chain of block nodes. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block.c | 55 +++ include/block/block_int.h | 3 +++ 2 files changed,

[PATCH v5 03/15] block: Add child access functions

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz There are BDS children that the general block layer code can access, namely bs->file and bs->backing. Since the introduction of filters and external data files, their meaning is not quite clear. bs->backing can be a COW source, or it can be an R/W-filtered child; bs->file can be

[PATCH v5 05/15] block: Include filters when freezing backing chain

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz In order to make filters work in backing chains, the associated functions must be able to deal with them and freeze all filter links, be they COW or R/W filter links. In the process, rename these functions to reflect that they now act on generalized chains of filter nodes instead

[PATCH v5 13/15] qapi: add filter-node-name to block-stream

2020-05-13 Thread Andrey Shinkevich
Provide the possibility to pass the 'filter-node-name' parameter to the block-stream job as it is done for the commit block job. That will be needed for further iotests implementations. Signed-off-by: Andrey Shinkevich --- block/monitor/block-hmp-cmds.c | 4 ++-- block/stream.c |

[PATCH v5 08/15] block: Use CAFs when working with backing chains

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz Use child access functions when iterating through backing chains so filters do not break the chain. Signed-off-by: Max Reitz --- block.c | 40 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/block.c b/block.c index 459412

[PATCH v5 01/15] block: Mark commit and mirror as filter drivers

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz The commit and mirror block nodes are filters, so they should be marked as such. (Strictly speaking, BDS.is_filter's documentation states that a filter's child must be bs->file. The following patch will relax this restriction, however.) Signed-off-by: Max Reitz Reviewed-by: Al

[PATCH v5 02/15] copy-on-read: Support compressed writes

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/copy-on-read.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/copy-on-read.c b/block/copy-on-read.c index 242d3ff..c4fa468 100644 --- a/block/copy-on-read.c +++ b/block/copy-on-

[PATCH v5 15/15] block: apply COR-filter to block-stream jobs

2020-05-13 Thread Andrey Shinkevich
The patch completes the series with the COR-filter insertion to any block-stream operation. It also makes changes to the iotests 030 and 141.out. Signed-off-by: Andrey Shinkevich --- block/stream.c | 83 -- tests/qemu-iotests/030 | 8 +

[PATCH v5 07/15] commit: Deal with filters when blocking intermediate nodes

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz This includes some permission limiting (for example, we only need to take the RESIZE permission if the base is smaller than the top). Signed-off-by: Max Reitz Signed-off-by: Andrey Shinkevich --- block/commit.c | 75 ++ 1

[PATCH v5 06/15] block: Use CAFs in block status functions

2020-05-13 Thread Andrey Shinkevich
From: Max Reitz Use the child access functions in the block status inquiry functions as appropriate. Signed-off-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/block/io.c b/block/io

[PATCH v5 09/15] block: prepare block-stream for using COR-filter

2020-05-13 Thread Andrey Shinkevich
This patch is the first one in the series where the COR-filter node will be hard-coded for using in the block-stream job. The block jobs may be run in parallel. Exclude conflicts with filter nodes used for a concurrent job while checking for the blocked operations. It incurs changes in the iotests

[PATCH v5 12/15] copy-on-read: add filter append/drop functions

2020-05-13 Thread Andrey Shinkevich
Provide API for the COR-filter insertion/removal. Also, drop the filter child permissions for an inactive state when the filter node is being removed. Signed-off-by: Andrey Shinkevich --- block/copy-on-read.c | 102 +++ block/copy-on-read.h | 36 +

[PATCH v5 14/15] iotests: prepare 245 for using filter in block-stream

2020-05-13 Thread Andrey Shinkevich
The preliminary patch modifies the test 245 to prepare the block-stream job for using COR-filter. The filter breaks the backing chain being connected to the underlying node by file child link. Signed-off-by: Andrey Shinkevich --- tests/qemu-iotests/245 | 10 +++--- 1 file changed, 7 insertio

[PATCH] iotests/030: Reduce run time by unthrottling job earlier

2020-05-13 Thread Kevin Wolf
test_overlapping_3() throttles its active commit job so it can be sure the job is still busy when it checks that you can't start a conflicting streaming job. However, it only sets the commit job back to full speed when it is ready, which takes a few seconds while it's throttled. We can already res

[PATCH v5 00/15] Apply COR-filter to the block-stream permanently

2020-05-13 Thread Andrey Shinkevich
With this series, all the block-stream COR operations pass through the COR-filter. The patches 01-08/15 are taken from the series "block: Deal with filters" by Max Reitz, the full version of that can be found in the branches: https://git.xanclic.moe/XanClic/qemu child-access-functions-v6

Re: [PATCH] ppc/pnv: Add definitions for interrupts occurring in power-saving mode

2020-05-13 Thread David Gibson
On Mon, May 11, 2020 at 10:58:22AM +0200, Cédric Le Goater wrote: > If an interrupt occurred when the thread was in power-saving mode, > bits [42:45] of SRR1 indicate the exception that caused exit from > power-saving mode. > > bits [46:47] of SRR1 indicate the power-saving mode in which the > thr

Re: [PATCH] block/replication.c: Avoid cancelling the job twice

2020-05-13 Thread Kevin Wolf
Am 11.05.2020 um 09:08 hat Lukas Straub geschrieben: > If qemu in colo secondary mode is stopped, it crashes because > s->backup_job is canceled twice: First with job_cancel_sync_all() > in qemu_cleanup() and then in replication_stop(). > > Fix this by assigning NULL to s->backup_job when the job

Re: [PATCH v2] i386/kvm: fix a use-after-free when vcpu plug/unplug

2020-05-13 Thread Igor Mammedov
On Wed, 13 May 2020 09:26:30 -0400 Pan Nengyuan wrote: > When we hotplug vcpus, cpu_update_state is added to vm_change_state_head > in kvm_arch_init_vcpu(). But it forgot to delete in kvm_arch_destroy_vcpu() > after > unplug. Then it will cause a use-after-free access. This patch delete it in >

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-13 Thread Kevin Wolf
Am 12.05.2020 um 11:43 hat Daniel P. Berrangé geschrieben: > On Tue, May 12, 2020 at 11:32:06AM +0200, Lukas Straub wrote: > > On Mon, 11 May 2020 16:46:45 +0100 > > "Dr. David Alan Gilbert" wrote: > > > > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > > ... > > > > That way if QE

Re: [PATCH v2 3/4] mirror: Make sure that source and target size match

2020-05-13 Thread Vladimir Sementsov-Ogievskiy
12.05.2020 21:48, Kevin Wolf wrote: Am 12.05.2020 um 19:15 hat Vladimir Sementsov-Ogievskiy geschrieben: 11.05.2020 16:58, Kevin Wolf wrote: If the target is shorter than the source, mirror would copy data until it reaches the end of the target and then fail with an I/O error when trying to wri

Re: [PATCH 2/3] mips/mips_fulong2e: Set preferred page size to 16KB

2020-05-13 Thread Aleksandar Markovic
сре, 13. мај 2020. у 10:25 Huacai Chen је написао/ла: > > Hi, Aleksandar, > > On Wed, May 13, 2020 at 3:56 PM Aleksandar Markovic > wrote: > > > > сре, 8. апр 2020. у 11:08 Huacai Chen је написао/ла: > > > > > > Loongson processor prefers 16KB page size in system emulator, so let's > > > define

Re: [RFC v4 6/6] hmp: add x-debug-virtio commands

2020-05-13 Thread Dr. David Alan Gilbert
* Laurent Vivier (lviv...@redhat.com) wrote: > This patch implements HMP version of the virtio QMP commands > > Signed-off-by: Laurent Vivier Reviewed-by: Dr. David Alan Gilbert With a thought below > --- > Makefile| 2 +- > Makefile.target | 7 +- > docs/syst

[PATCH 11/12] target/mips: fpu: Refactor conversion from ieee to mips exception flags

2020-05-13 Thread Aleksandar Markovic
The original coversion function is used for regular and MSA floating point instructions handling. Since there are some nuanced differences between regular and MSA floatin point excetion handling, provide two instances of the conversion function, rather than just a common one. Inline both of these f

[PATCH 00/12] target/mips: FPU and other cleanups and improvements

2020-05-13 Thread Aleksandar Markovic
This series contains mostly cosmetic FPU cleanups aimed to make source code recognition easier for tools like gdb, gcov, calgrind, and others. There is also a patch that refactors conversion from ieee to mips fp exception flags. This refactoring will improve the performance of almost all fp-relate

[PATCH 01/12] target/mips: fpu: Demacro ADD.

2020-05-13 Thread Aleksandar Markovic
This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/target

[PATCH 02/12] target/mips: fpu: Demacro SUB.

2020-05-13 Thread Aleksandar Markovic
This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/target/

[PATCH 06/12] target/mips: fpu: Demacro MADD.

2020-05-13 Thread Aleksandar Markovic
This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 41 +++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/targ

[PATCH 03/12] target/mips: fpu: Demacro MUL.

2020-05-13 Thread Aleksandar Markovic
This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/target/

[PATCH 10/12] target/mips: fpu: Remove now unused UNFUSED_FMA and FLOAT_FMA macros

2020-05-13 Thread Aleksandar Markovic
After demacroing ., these macros are not needed anymore. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 50 1 file changed, 50 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 927bac24ac..e8e50e4bc0 1

[PATCH 12/12] hw/mips: Convert Malta "ifdef 0"-ed code to comments

2020-05-13 Thread Aleksandar Markovic
The checkpatch complain about "#ifdef 0". Convert corresponding dead code to comments. In future, these cases could be converted to some no-nonsense logging/tracing. Signed-off-by: Aleksandar Markovic CC: Philippe Mathieu-Daudé --- hw/mips/mips_malta.c | 20 1 file changed,

[PATCH 04/12] target/mips: fpu: Demacro DIV.

2020-05-13 Thread Aleksandar Markovic
This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/target/

[PATCH 07/12] target/mips: fpu: Demacro MSUB.

2020-05-13 Thread Aleksandar Markovic
This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/targ

[PATCH 05/12] target/mips: fpu: Remove now unused macro FLOAT_BINOP

2020-05-13 Thread Aleksandar Markovic
After demacroing ., this macro is not needed anymore. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 39 --- 1 file changed, 39 deletions(-) diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 2759c9989d..a3a39681f8 10064

[PATCH 08/12] target/mips: fpu: Demacro NMADD.

2020-05-13 Thread Aleksandar Markovic
This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 44 +++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/targ

[PATCH 0/1] e1000e: Added ICR clearing by corresponding IMS bit.

2020-05-13 Thread andrew
From: Andrew Melnychenko Added E1000_ICR_ASSERTED check. Andrew Melnychenko (1): e1000e: Added ICR clearing by corresponding IMS bit. hw/net/e1000e_core.c | 9 + hw/net/trace-events | 1 + 2 files changed, 10 insertions(+) -- 2.26.2

[PATCH 09/12] target/mips: fpu: Demacro NMSUB.

2020-05-13 Thread Aleksandar Markovic
This is just a cosmetic change to enable tools like gcov, gdb, callgrind, etc. to better display involved source code. Signed-off-by: Aleksandar Markovic --- target/mips/fpu_helper.c | 44 +++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/targ

Re: [PATCH 0/5] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-05-13 Thread Dr. David Alan Gilbert
* Kevin Wolf (kw...@redhat.com) wrote: > Am 12.05.2020 um 11:43 hat Daniel P. Berrangé geschrieben: > > On Tue, May 12, 2020 at 11:32:06AM +0200, Lukas Straub wrote: > > > On Mon, 11 May 2020 16:46:45 +0100 > > > "Dr. David Alan Gilbert" wrote: > > > > > > > * Daniel P. Berrangé (berra...@red

[PATCH 1/1] e1000e: Added ICR clearing by corresponding IMS bit.

2020-05-13 Thread andrew
From: Andrew Melnychenko Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1707441 Added ICR clearing if there is IMS bit - according to the note by section 13.3.27 of the 8257X developers manual. Signed-off-by: Andrew Melnychenko --- hw/net/e1000e_core.c | 9 + hw/net/trace-events

[PATCH 0/1] e1000e: Added ICR clearing by corresponding IMS bit.

2020-05-13 Thread andrew
From: Andrew Melnychenko Added E1000_ICR_ASSERTED check. Andrew Melnychenko (1): e1000e: Added ICR clearing by corresponding IMS bit. hw/net/e1000e_core.c | 10 ++ hw/net/trace-events | 1 + 2 files changed, 11 insertions(+) -- 2.26.2

[PATCH v4 05/34] block: Add BdrvChildRole to BdrvChild

2020-05-13 Thread Max Reitz
For now, it is always set to 0. Later patches in this series will ensure that all callers pass an appropriate combination of flags. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- include/block/block.h | 2 ++ include/block/block_int.h | 2 ++ block.c | 11 ++

[PATCH 1/1] e1000e: Added ICR clearing by corresponding IMS bit.

2020-05-13 Thread andrew
From: Andrew Melnychenko Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1707441 Added ICR clearing if there is IMS bit - according to the note by section 13.3.27 of the 8257X developers manual. Signed-off-by: Andrew Melnychenko --- hw/net/e1000e_core.c | 10 ++ hw/net/trace-event

[PATCH v4 02/34] block: Add BlockDriver.is_format

2020-05-13 Thread Max Reitz
We want to unify child_format and child_file at some point. One of the important things that set format drivers apart from other drivers is that they do not expect other format nodes under them (except in the backing chain), i.e. we must not probe formats inside of formats. That means we need som

[PATCH v4 01/34] block: Mark commit, mirror, blkreplay as filters

2020-05-13 Thread Max Reitz
The commit, mirror, and blkreplay block nodes are filters, so they should be marked as such. Signed-off-by: Max Reitz --- block/blkreplay.c | 1 + block/commit.c| 2 ++ block/mirror.c| 2 ++ 3 files changed, 5 insertions(+) diff --git a/block/blkreplay.c b/block/blkreplay.c index c96ac8

[PATCH v4 00/34] block: Introduce real BdrvChildRole

2020-05-13 Thread Max Reitz
Based-on: <20200429141126.85159-1-mre...@redhat.com> (“block: Do not call BlockDriver.bdrv_make_empty() directly”) Branch: https://github.com/XanClic/qemu.git child-role-v4 Branch: https://git.xanclic.moe/XanClic/qemu.git child-role-v4 v1: https://lists.nongnu.org/archive/html/qemu-block/2019-11/

[PATCH v4 03/34] block: Rename BdrvChildRole to BdrvChildClass

2020-05-13 Thread Max Reitz
This structure nearly only contains parent callbacks for child state changes. It cannot really reflect a child's role, because different roles may overlap (as we will see when real roles are introduced), and because parents can have custom callbacks even when the child fulfills a standard role. S

[PATCH v4 04/34] block: Add BdrvChildRole and BdrvChildRoleBits

2020-05-13 Thread Max Reitz
This mask will supplement BdrvChildClass when it comes to what role (or combination of roles) a child takes for its parent. It consists of BdrvChildRoleBits values (which is an enum). Because empty enums are not allowed, let us just start with it filled. Signed-off-by: Max Reitz --- include/bl

[PATCH v4 06/34] block: Pass BdrvChildRole to bdrv_child_perm()

2020-05-13 Thread Max Reitz
For now, all callers pass 0 and no callee evaluates this value. Later patches will change both. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- include/block/block_int.h | 5 - block.c | 22 -- block/backup-top.c | 3 ++- block/blkd

[PATCH v4 10/34] block: Add generic bdrv_inherited_options()

2020-05-13 Thread Max Reitz
After the series this patch belongs to, we want to have a common BdrvChildClass that encompasses all of child_file, child_format, and child_backing. Such a single class needs a single .inherit_options() implementation, and this patch introduces it. The next patch will show how the existing implem

[PATCH v4 07/34] block: Pass BdrvChildRole to .inherit_options()

2020-05-13 Thread Max Reitz
For now, all callers (effectively) pass 0 and no callee evaluates thie value. Later patches will change both. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- include/block/block_int.h | 3 ++- block.c | 40 +++ block/block-backend.c

[PATCH v4 09/34] block: Rename bdrv_inherited_options()

2020-05-13 Thread Max Reitz
The other two .inherit_options implementations specify exactly for what case they are used in their name, so do it for this one as well. (The actual intention behind this patch is to follow it up with a generic bdrv_inherited_options() that works for all three cases.) Signed-off-by: Max Reitz Re

[PATCH v4 14/34] block: Add child_of_bds

2020-05-13 Thread Max Reitz
Any current user of child_file, child_format, and child_backing can and should use this generic BdrvChildClass instead, as it can handle all of these cases. However, to be able to do so, the users must pass the appropriate BdrvChildRole when the child is created/attached. (The following commits w

[PATCH v4 13/34] block: Unify bdrv_child_cb_detach()

2020-05-13 Thread Max Reitz
Make bdrv_child_cb_detach() call bdrv_backing_detach() for children with a COW role (and drop the reverse call from bdrv_backing_detach()), so it can be used for any child (with a proper role set). Because so far no child has a proper role set, we need a temporary new callback for child_backing.de

[PATCH v4 19/34] block: Add bdrv_default_perms()

2020-05-13 Thread Max Reitz
This callback can be used by BDSs that use child_of_bds with the appropriate BdrvChildRole for their children. Also, make bdrv_format_default_perms() use it for child_of_bds children (just a temporary solution until we can drop bdrv_format_default_perms() altogether). Signed-off-by: Max Reitz --

[PATCH v4 15/34] block: Distinguish paths in *_format_default_perms

2020-05-13 Thread Max Reitz
bdrv_format_default_perms() has one code path for backing files, and one for storage files. We want to pull them out into own functions, so make sure they are completely distinct before so the next patches will be a bit cleaner. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block.c | 19

[PATCH v4 08/34] block: Pass parent_is_format to .inherit_options()

2020-05-13 Thread Max Reitz
We plan to unify the generic .inherit_options() functions. The resulting common function will need to decide whether to force-enable format probing, force-disable it, or leave it as-is. To make this decision, it will need to know whether the parent node is a format node or not (because we never w

[PATCH v4 25/34] block: Make format drivers use child_of_bds

2020-05-13 Thread Max Reitz
Commonly, they need to pass the BDRV_CHILD_IMAGE set as the BdrvChildRole; but there are exceptions for drivers with external data files (qcow2 and vmdk). Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/bochs.c | 4 ++-- block/cloop.c | 4 ++-- block/crypto.c| 4 ++--

[PATCH v4 17/34] block: Pull out bdrv_default_perms_for_storage()

2020-05-13 Thread Max Reitz
Right now, bdrv_format_default_perms() is used by format parents (generally). We want to switch to a model where most parents use a single BdrvChildClass, which then decides the permissions based on the child role. To do so, we have to split bdrv_format_default_perms() into separate functions for e

[PATCH v4 22/34] block: Drop child_format

2020-05-13 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- include/block/block_int.h | 1 - block.c | 29 - 2 files changed, 30 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 3a9dda9be7..4b09fa1124 100644 --- a/incl

[PATCH v4 12/34] block: Unify bdrv_child_cb_attach()

2020-05-13 Thread Max Reitz
Make bdrv_child_cb_attach() call bdrv_backing_attach() for children with a COW role (and drop the reverse call from bdrv_backing_attach()), so it can be used for any child (with a proper role set). Because so far no child has a proper role set, we need a temporary new callback for child_backing.at

[PATCH v4 28/34] tests: Use child_of_bds instead of child_file

2020-05-13 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/test-bdrv-drain.c | 29 + tests/test-bdrv-graph-mod.c | 6 -- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c index 15393a0140..91567

[PATCH v4 18/34] block: Relax *perms_for_storage for data children

2020-05-13 Thread Max Reitz
We can be less restrictive about pure data children than those with metadata on them, so let bdrv_default_perms_for_storage() handle metadata children differently from pure data children. As explained in the code, the restrictions on metadata children are strictly stricter than those for pure data

[PATCH v4 11/34] block: Use bdrv_inherited_options()

2020-05-13 Thread Max Reitz
Let child_file's, child_format's, and child_backing's .inherit_options() implementations fall back to bdrv_inherited_options() to show that it would really work for all of these cases, if only the parents passed the appropriate BdrvChildRole and parent_is_format values. (Also, make bdrv_open_inher

[PATCH v4 24/34] block: Drop child_backing

2020-05-13 Thread Max Reitz
Signed-off-by: Max Reitz --- include/block/block_int.h | 1 - block.c | 60 ++- 2 files changed, 3 insertions(+), 58 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 4b09fa1124..0781d43af5 100644 --- a/in

[PATCH v4 30/34] block: Make bdrv_filter_default_perms() static

2020-05-13 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- include/block/block_int.h | 10 -- block.c | 17 +++-- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 0781d43af5..6fc5f0d333 10

[PATCH v4 27/34] block: Use child_of_bds in remaining places

2020-05-13 Thread Max Reitz
Replace child_file by child_of_bds in all remaining places (excluding tests). Signed-off-by: Max Reitz --- block.c | 3 ++- block/backup-top.c | 4 ++-- block/blklogwrites.c | 4 ++-- block/raw-format.c | 15 +-- 4 files changed, 19 insertions(+), 7 deletions(-)

[PATCH v4 16/34] block: Pull out bdrv_default_perms_for_cow()

2020-05-13 Thread Max Reitz
Right now, bdrv_format_default_perms() is used by format parents (generally). We want to switch to a model where most parents use a single BdrvChildClass, which then decides the permissions based on the child role. To do so, we have to split bdrv_format_default_perms() into separate functions for e

[PATCH v4 21/34] block: Switch child_format users to child_of_bds

2020-05-13 Thread Max Reitz
Both users (quorum and blkverify) use child_format for not-really-filtered children, so the appropriate BdrvChildRole in both cases is DATA. (Note that this will cause bdrv_inherited_options() to force-allow format probing.) Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/blkverify.

[PATCH v4 29/34] block: Use bdrv_default_perms()

2020-05-13 Thread Max Reitz
bdrv_default_perms() can decide which permission profile to use based on the BdrvChildRole, so block drivers do not need to select it explicitly. The blkverify driver now no longer shares the WRITE permission for the image to verify. We thus have to adjust two places in test-block-iothread not to

[PATCH v4 26/34] block: Make filter drivers use child_of_bds

2020-05-13 Thread Max Reitz
Note that some filters have secondary children, namely blkverify (the image to be verified) and blklogwrites (the log). This patch does not touch those children. Note that for blkverify, the filtered child should not be format-probed. While there is nothing enforcing this here, in practice, it wi

[PATCH v4 20/34] raw-format: Split raw_read_options()

2020-05-13 Thread Max Reitz
Split raw_read_options() into one function that actually just reads the options, and another that applies them. This will allow us to detect whether the user has specified any options before attaching the file child (so we can decide on its role based on the options). Signed-off-by: Max Reitz Re

[PATCH v4 31/34] block: Drop bdrv_format_default_perms()

2020-05-13 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- include/block/block_int.h | 11 --- block.c | 19 --- 2 files changed, 30 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 6fc5f0d333..e791c40496 100644 --- a/incl

[PATCH v4 32/34] block: Drop child_file

2020-05-13 Thread Max Reitz
Signed-off-by: Max Reitz --- include/block/block_int.h | 1 - block.c | 39 ++- tests/test-bdrv-drain.c | 8 +++- 3 files changed, 5 insertions(+), 43 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h ind

[PATCH v4 23/34] block: Make backing files child_of_bds children

2020-05-13 Thread Max Reitz
Make all parents of backing files pass the appropriate BdrvChildRole. By doing so, we can switch their BdrvChildClass over to the generic child_of_bds, which will do the right thing when given a correct BdrvChildRole. Signed-off-by: Max Reitz --- block.c | 26

  1   2   3   4   5   >