[RFC v2 04/13] vhost: Add x-vhost-enable-shadow-vq qmp

2021-03-15 Thread Eugenio Pérez
Command to enable shadow virtqueue looks like: { "execute": "x-vhost-enable-shadow-vq", "arguments": { "name": "dev0", "enable": true } } Signed-off-by: Eugenio Pérez --- qapi/net.json | 22 ++ hw/virtio/vhost.c | 6 ++ 2 files changed, 28 insertions(+) diff

[RFC v2 07/13] vhost: Avoid re-set masked notifier in shadow vq

2021-03-15 Thread Eugenio Pérez
Since all the shadow virtqueue device is done in software, we can avoid the write syscall. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-shadow-virtqueue.c

[RFC v2 03/13] vhost: Add VhostShadowVirtqueue

2021-03-15 Thread Eugenio Pérez
Vhost shadow virtqueue (SVQ)is an intermediate jump for virtqueue notifications and buffers, allowing qemu to track them. While qemu is forwarding the buffers and virtqueue changes, is able to commit the memory it's being dirtied, the same way regular qemu's VirtIO devices do. This commit only

[RFC v2 02/13] vhost: Save masked_notifier state

2021-03-15 Thread Eugenio Pérez
It will be used to configure shadow virtqueue. Shadow virtqueue will relay the device->guest notifications, so vhost need to be able to tell the masking status. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost.h | 1 + hw/virtio/vhost.c | 2 ++ 2 files changed, 3 insertions(+)

[RFC v2 10/13] vhost: add vhost_kernel_set_vring_enable

2021-03-15 Thread Eugenio Pérez
This method is already present in vhost-user. This commit adapts it to vhost-net, so SVQ can use. vhost_kernel_set_enable stops the device, so qemu can ask for its status (next available idx the device was going to consume). When SVQ starts it can resume consuming the guest's driver ring, without

[RFC v2 05/13] vhost: Route guest->host notification through shadow virtqueue

2021-03-15 Thread Eugenio Pérez
Shadow virtqueue notifications forwarding is disabled when vhost_dev stops, so code flow follows usual cleanup. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 7 ++ include/hw/virtio/vhost.h | 4 + hw/virtio/vhost-shadow-virtqueue.c | 113

[RFC v2 01/13] virtio: Add virtio_queue_is_host_notifier_enabled

2021-03-15 Thread Eugenio Pérez
This allows shadow virtqueue code to assert the queue status before making changes. Signed-off-by: Eugenio Pérez --- include/hw/virtio/virtio.h | 1 + hw/virtio/virtio.c | 5 + 2 files changed, 6 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h

[RFC v2 00/13] vDPA software assisted live migration

2021-03-15 Thread Eugenio Pérez
This series enable shadow virtqueue for vhost-net devices. This is a new method of vhost devices migration: Instead of relay on vhost device's dirty logging capability, SW assisted LM intercepts dataplane, forwarding the descriptors between VM and device. Is intended for vDPA devices with no

Re: [PATCH] Hexagon (target/hexagon) fix typo in comment

2021-03-15 Thread Richard Henderson
On 3/14/21 10:55 PM, Taylor Simpson wrote: Signed-of-by: Taylor Simpson --- target/hexagon/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Queued. r~

Re: [PATCH 0/7] block/nbd: decouple reconnect from drain

2021-03-15 Thread Vladimir Sementsov-Ogievskiy
15.03.2021 09:06, Roman Kagan wrote: The reconnection logic doesn't need to stop while in a drained section. Moreover it has to be active during the drained section, as the requests that were caught in-flight with the connection to the server broken can only usefully get drained if the

Re: [PATCH] Hexagon (target/hexagon) change DECODE_MAPPED_REG operand name to OPNUM

2021-03-15 Thread Richard Henderson
On 3/14/21 10:54 PM, Taylor Simpson wrote: Address feedback from Richard Henderson < Signed-off-by: Taylor Simpson --- target/hexagon/decode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Queued. r~

Re: [PATCH] Hexagon (target/hexagon) remove unnecessary checks in find_iclass_slots

2021-03-15 Thread Richard Henderson
On 3/14/21 10:53 PM, Taylor Simpson wrote: Address feedback from Richard Henderson < Signed-off-by: Taylor Simpson --- target/hexagon/iclass.c | 4 1 file changed, 4 deletions(-) Queued. r~

Re: [PATCH] Hexagon (target/hexagon) translation changes

2021-03-15 Thread Richard Henderson
On 3/14/21 10:53 PM, Taylor Simpson wrote: Change cpu_ldl_code to translator_ldl Don't end the TB after every packet when HEX_DEBUG is on Make gen_check_store_width a simple call Address feedback from Richard Henderson < Signed-off-by: Taylor Simpson --- target/hexagon/translate.c | 26

[PATCH] migration: Move populate_vfio_info() into a separate file

2021-03-15 Thread Thomas Huth
The CONFIG_VFIO switch only works in target specific code. Since migration/migration.c is common code, the #ifdef does not have the intended behavior here. Move the related code to a separate file now which gets compiled via specific_ss instead. Fixes: 3710586caa ("qapi: Add VFIO devices

Re: [PULL 0/4] AVR patches for 2021-03-15

2021-03-15 Thread Peter Maydell
> > are available in the Git repository at: > > https://github.com/philmd/qemu.git tags/avr-20210315 > > for you to fetch changes up to 56b90e60c4019b08012bd8bd1459efc00b055577: > > target/avr: Fix inte

Re: [PULL 3/5] meson: bump submodule to 0.57.1

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 6:39 PM, Paolo Bonzini wrote: > The main advantage of 0.57 is that it fixes > https://github.com/mesonbuild/meson/pull/7900, thus avoiding unnecessary > rebuilds after running meson. > > Signed-off-by: Paolo Bonzini > --- > meson | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PULL 0/1] Fix qemu_strtosz regression

2021-03-15 Thread Richard Henderson
at: https://gitlab.com/rth7680/qemu.git tags/pull-misc-20210315 for you to fetch changes up to 7625a1ed013a042748753750c9d9b1a33c9cd8e0: utils: Use fixed-point arithmetic in qemu_strtosz (2021-03-15 12:47:08 -0600) Fix qemu_strtosz

Re: [PATCH 1/2] Fix the segment fault when calling yank_register_instance

2021-03-15 Thread Marc-André Lureau
Hi On Mon, Mar 15, 2021 at 9:22 PM Li Zhang wrote: > From: Li Zhang > > When executing the QMP commands "chardev-change" to change the > backend device to socket, it will cause a segment fault because > it assumes chr->label as non-NULL in function yank_register_instance. > The function

Re: [PATCH v5 01/13] hw/block/nvme: fix zone management receive reporting too many zones

2021-03-15 Thread Klaus Jensen
On Mar 14 19:31, Dmitry Fomichev wrote: > LGTM, > Reviewed-by: Dmitry Fomichev > Thanks Dmitry! If you could give [10/13], [11/13] and [12/13] a look-see as well that would be awesome :) - k signature.asc Description: PGP signature

[PULL 0/1] Fix qemu_strtosz regression

2021-03-15 Thread Richard Henderson
-20210315 for you to fetch changes up to 7625a1ed013a042748753750c9d9b1a33c9cd8e0: utils: Use fixed-point arithmetic in qemu_strtosz (2021-03-15 12:47:08 -0600) Fix qemu_strtosz testsuite failures for i686

[PATCH v4 11/17] target/ppc: Put LPCR[GTSE] in hflags

2021-03-15 Thread Richard Henderson
Because this bit was not in hflags, the privilege check for tlb instructions was essentially random. Recompute hflags when storing to LPCR. Signed-off-by: Richard Henderson --- target/ppc/cpu.h | 1 + target/ppc/helper_regs.c | 3 +++ target/ppc/mmu-hash64.c | 3 +++

[PATCH v4 15/17] hw/ppc/spapr_rtas: Update hflags after setting msr

2021-03-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- hw/ppc/spapr_rtas.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 8a79f9c628..6ec3e71757 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -51,6 +51,7 @@ #include "target/ppc/mmu-hash64.h"

Re: [PULL 1/1] utils: Use fixed-point arithmetic in qemu_strtosz

2021-03-15 Thread Eric Blake
On 3/15/21 1:51 PM, Richard Henderson wrote: > Once we've parsed the fractional value, extract it into an integral > 64-bit fraction. Perform the scaling with integer arithmetic, and > simplify the overflow detection. > > Reviewed-by: Eric Blake > Message-Id:

[PATCH v4 10/17] target/ppc: Create helper_scv

2021-03-15 Thread Richard Henderson
Perform the test against FSCR_SCV at runtime, in the helper. This means we can remove the incorrect set against SCV in ppc_tr_init_disas_context and do not need to add an HFLAGS bit. Signed-off-by: Richard Henderson --- target/ppc/helper.h | 1 + target/ppc/excp_helper.c | 9 +

[PATCH v4 13/17] target/ppc: Remove env->immu_idx and env->dmmu_idx

2021-03-15 Thread Richard Henderson
We weren't recording MSR_GS in hflags, which means that BookE memory accesses were essentially random vs Guest State. Instead of adding this bit directly, record the completed mmu indexes instead. This makes it obvious that we are recording exactly the information that we need. This also means

[PATCH v4 07/17] target/ppc: Disconnect hflags from MSR

2021-03-15 Thread Richard Henderson
Copying flags directly from msr has drawbacks: (1) msr bits mean different things per cpu, (2) msr has 64 bits on 64 cpus while tb->flags has only 32 bits. Create a enum to define these bits. Document the origin of each bit. This fixes the truncation of env->hflags to tb->flags, because we no

[PULL 1/1] utils: Use fixed-point arithmetic in qemu_strtosz

2021-03-15 Thread Richard Henderson
Once we've parsed the fractional value, extract it into an integral 64-bit fraction. Perform the scaling with integer arithmetic, and simplify the overflow detection. Reviewed-by: Eric Blake Message-Id: <20210315155835.1970210-2-richard.hender...@linaro.org> Signed-off-by: Richard Henderson

[PATCH v4 09/17] target/ppc: Put dbcr0 single-step bits into hflags

2021-03-15 Thread Richard Henderson
Because these bits were not in hflags, the code generated for single-stepping on BookE was essentially random. Recompute hflags when storing to dbcr0. Signed-off-by: Richard Henderson --- target/ppc/helper_regs.c | 20 +++- target/ppc/misc_helper.c | 3 +++

[PATCH v4 06/17] target/ppc: Fix comment for MSR_FE{0,1}

2021-03-15 Thread Richard Henderson
As per hreg_compute_hflags: We 'forget' FE0 & FE1: we'll never generate imprecise exceptions remove the hflags marker from the respective comments. Signed-off-by: Richard Henderson --- target/ppc/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/cpu.h

[PULL 0/1] Fix qemu_strtosz regression

2021-03-15 Thread Richard Henderson
-20210315 for you to fetch changes up to 7625a1ed013a042748753750c9d9b1a33c9cd8e0: utils: Use fixed-point arithmetic in qemu_strtosz (2021-03-15 12:47:08 -0600) Fix qemu_strtosz testsuite failures for i686

[PATCH v4 08/17] target/ppc: Reduce env->hflags to uint32_t

2021-03-15 Thread Richard Henderson
It will be stored in tb->flags, which is also uint32_t, so let's use the correct size. Signed-off-by: Richard Henderson --- target/ppc/cpu.h | 4 ++-- target/ppc/misc_helper.c | 2 +- target/ppc/translate.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v4 05/17] target/ppc: Retain hflags_nmsr only for migration

2021-03-15 Thread Richard Henderson
We have eliminated all normal uses of hflags_nmsr. We need not even compute it except when we want to migrate. Rename the field to emphasize this. Remove the fixme comment for migrating access_type. This value is only ever used with the current executing instruction, and is never live when the

[PATCH v4 16/17] linux-user/ppc: Fix msr updates for signal handling

2021-03-15 Thread Richard Henderson
In save_user_regs, there are two bugs where we OR in a bit number instead of the bit, clobbering the low bits of MSR. However: The MSR_VR and MSR_SPE bits control the availability of the insns. If the bits were not already set in MSR, then any attempt to access those registers would result in

[PATCH v4 04/17] target/ppc: Do not call hreg_compute_mem_idx after ppc_store_msr

2021-03-15 Thread Richard Henderson
In ppc_store_msr we call hreg_compute_hflags, which itself calls hreg_compute_mem_idx. Rely on ppc_store_msr to update everything required by the msr update. Signed-off-by: Richard Henderson --- target/ppc/machine.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git

[PATCH v4 14/17] hw/ppc/pnv_core: Update hflags after setting msr

2021-03-15 Thread Richard Henderson
Signed-off-by: Richard Henderson --- hw/ppc/pnv_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/ppc/pnv_core.c b/hw/ppc/pnv_core.c index bd2bf2e044..8c2a15a0fb 100644 --- a/hw/ppc/pnv_core.c +++ b/hw/ppc/pnv_core.c @@ -29,6 +29,7 @@ #include "hw/ppc/pnv_xscom.h"

[PATCH v4 17/17] target/ppc: Validate hflags with CONFIG_DEBUG_TCG

2021-03-15 Thread Richard Henderson
Verify that hflags was updated correctly whenever we change cpu state that is used by hflags. Signed-off-by: Richard Henderson --- target/ppc/cpu.h | 5 + target/ppc/helper_regs.c | 29 +++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git

[PATCH v4 01/17] target/ppc: Move helper_regs.h functions out-of-line

2021-03-15 Thread Richard Henderson
Move the functions to a new file, helper_regs.c. Note int_helper.c was relying on helper_regs.h to indirectly include qemu/log.h. Signed-off-by: Richard Henderson --- target/ppc/helper_regs.h | 184 ++-- target/ppc/helper_regs.c | 197

[PATCH v4 12/17] target/ppc: Remove MSR_SA and MSR_AP from hflags

2021-03-15 Thread Richard Henderson
Nothing within the translator -- or anywhere else for that matter -- checks MSR_SA or MSR_AP on the 602. This may be a mistake. However, for the moment, we need not record these bits in hflags. This allows us to simplify HFLAGS_VSX computation by moving it to overlap with MSR_VSX.

Re: [PATCH v3 1/3] target/arm: Add support for FEAT_TLBIRANGE

2021-03-15 Thread Richard Henderson
On 3/15/21 12:34 PM, Rebecca Cran wrote: On 3/10/21 12:24 PM, Richard Henderson wrote: On 3/9/21 6:29 PM, Rebecca Cran wrote: +void tlb_flush_page_range_by_mmuidx(CPUState *cpu, target_ulong addr, +    unsigned int num_pages, uint16_t idxmap) I am not keen on

[PATCH v4 00/17] target/ppc: Fix truncation of env->hflags

2021-03-15 Thread Richard Henderson
Changes for v4: * Use hregs_recompute_hflags for hw/ppc/ reset. -- Incorporate Cedric's feedback. Changes for v3: * Fixes for linux-user, signal handling and startup. -- Oops, the directory in which I did testing for v2 had a reduced set of targets. Changes for v2: * Do not put

[PATCH v4 03/17] target/ppc: Properly sync cpu state with new msr in cpu_load_old

2021-03-15 Thread Richard Henderson
Match cpu_post_load in using ppc_store_msr to set all of the cpu state implied by the value of msr. Do not restore hflags or hflags_nmsr, as we recompute them in ppc_store_msr. Signed-off-by: Richard Henderson --- target/ppc/machine.c | 13 +++-- 1 file changed, 11 insertions(+), 2

[PATCH v4 02/17] target/ppc: Move 601 hflags adjustment to hreg_compute_hflags

2021-03-15 Thread Richard Henderson
Keep all hflags computation in one place, as this will be especially important later. Introduce a new POWERPC_FLAG_HID0_LE bit to indicate when LE should be taken from HID0. This appears to be set if and only if POWERPC_FLAG_RTC_CLK is set, but we're not short of bits and having both names will

[PULL 01/11] tests/qtest: Only run fuzz-megasas-test if megasas device is available

2021-03-15 Thread Alexander Bulekov
From: Philippe Mathieu-Daudé This test fails when QEMU is built without the megasas device, restrict it to its availability. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- MAINTAINERS | 1 + tests/qtest/fuzz-megasas-test.c | 49

[PULL 10/11] fuzz: configure a sparse-mem device, by default

2021-03-15 Thread Alexander Bulekov
The generic-fuzzer often provides randomized DMA addresses to virtual-devices. For a 64-bit address-space, the chance of these randomized addresses coinciding with RAM regions, is fairly small. Even though the fuzzer's instrumentation eventually finds valid addresses, this can take some-time, and

[PULL 09/11] memory: add a sparse memory device for fuzzing

2021-03-15 Thread Alexander Bulekov
For testing, it can be useful to simulate an enormous amount of memory (e.g. 2^64 RAM). This adds an MMIO device that acts as sparse memory. When something writes a nonzero value to a sparse-mem address, we allocate a block of memory. For now, since the only user of this device is the fuzzer, we

[PULL 00/11] 20210315 patches

2021-03-15 Thread Alexander Bulekov
/20210315-pull-request for you to fetch changes up to fc7c6fae7e36d2aa19b66dea5f9663cebeefb504: fuzz: move some DMA hooks (2021-03-15 12:49:28 -0400) Pull request * Add new and fix existing generic-fuzz configs * Add

[PULL 03/11] MAINTAINERS: Cover fuzzer reproducer tests within 'Device Fuzzing'

2021-03-15 Thread Alexander Bulekov
From: Philippe Mathieu-Daudé When we started to commit the fuzzer QTest reproducers to fuzz-test.c in commit d8dd1095019 ("qtest: add fuzz test case"), we forgot to add the corresponding MAINTAINERS entry. Do it now. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth ---

[PULL 11/11] fuzz: move some DMA hooks

2021-03-15 Thread Alexander Bulekov
For the sparse-mem device, we want the fuzzer to populate entire DMA reads from sparse-mem, rather than hooking into the individual MMIO memory_region_dispatch_read operations. Otherwise, the fuzzer will treat each sequential read separately (and populate it with a separate pattern). Work around

[PULL 08/11] fuzz: add a am53c974 generic-fuzzer config

2021-03-15 Thread Alexander Bulekov
Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny --- tests/qtest/fuzz/generic_fuzz_configs.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h b/tests/qtest/fuzz/generic_fuzz_configs.h index 2454c627ff..8b8c7ac553 100644 ---

[PULL 02/11] tests/qtest: Only run fuzz-virtio-scsi when virtio-scsi is available

2021-03-15 Thread Alexander Bulekov
From: Philippe Mathieu-Daudé This test fails when QEMU is built without the virtio-scsi device, restrict it to its availability. Reviewed-by: Michael S. Tsirkin Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- MAINTAINERS | 1 +

[PULL 05/11] fuzz: don't leave orphan llvm-symbolizers around

2021-03-15 Thread Alexander Bulekov
I noticed that with a sufficiently small timeout, the fuzzer fork-server sometimes locks up. On closer inspection, the issue appeared to be caused by entering our SIGALRM handler, while libfuzzer is in it's crash handlers. Because libfuzzer relies on pipe communication with an external child

[PULL 06/11] fuzz: add a script to build reproducers

2021-03-15 Thread Alexander Bulekov
Currently, bash and C crash reproducers are be built manually. This is a problem, as we want to integrate reproducers into the tree, for regression testing. This patch adds a script that converts a sequence of QTest commands into a pasteable Bash reproducer, or a libqtest-based C program. This

Re: [PATCH 0/6] pc: support user provided NIC naming/indexing

2021-03-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210315180102.3008391-1-imamm...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210315180102.3008391-1-imamm...@redhat.com Subject: [PATCH 0/6] pc: support user

[PULL 07/11] fuzz: add instructions for building reproducers

2021-03-15 Thread Alexander Bulekov
We have several scripts that help build reproducers, but no documentation for how they should be used. Add some documentation Signed-off-by: Alexander Bulekov Reviewed-by: Darren Kenny --- docs/devel/fuzzing.rst | 45 ++ 1 file changed, 45 insertions(+)

Re: [PATCH v2 10/13] block: remove 'encryption_key_missing' flag from QAPI

2021-03-15 Thread Eric Blake
On 3/15/21 12:45 PM, Daniel P. Berrangé wrote: > This has been hardcoded to "false" since 2.10.0, since secrets required > to unlock block devices are now always provided upfront instead of using up front > interactive prompts. > > Reviewed-by: Thomas Huth > Signed-off-by: Daniel P. Berrangé

Re: [PATCH v1 06/14] plugins: expand the callback typedef kernel-docs

2021-03-15 Thread Alex Bennée
Aaron Lindsay writes: > On Mar 12 17:28, Alex Bennée wrote: >> Signed-off-by: Alex Bennée > > One nit below, but otherwise: > > Reviewed-by: Aaron Lindsay > >> --- >> include/qemu/qemu-plugin.h | 25 ++--- >> 1 file changed, 22 insertions(+), 3 deletions(-) >> >> diff

Re: [PATCH v2 03/13] monitor: remove 'query-events' QMP command

2021-03-15 Thread Eric Blake
On 3/15/21 12:45 PM, Daniel P. Berrangé wrote: > The code comment suggests removing QAPIEvent_(str|lookup) symbols too, > however, these are both auto-generated as standard for any enum in > QAPI. As such it they'll exist whether we use them or not. > > Reviewed-by: Thomas Huth > Signed-off-by:

Re: [RFC PATCH] docs/devel: expand style section of memory management

2021-03-15 Thread Daniel P . Berrangé
On Mon, Mar 15, 2021 at 05:54:17PM +, Alex Bennée wrote: > > Daniel P. Berrangé writes: > > > On Mon, Mar 15, 2021 at 06:04:10PM +0100, Thomas Huth wrote: > >> On 15/03/2021 17.57, Peter Maydell wrote: > >> > On Mon, 15 Mar 2021 at 16:53, Alex Bennée wrote: > >> > > -Prefer g_new(T, n)

[PULL 04/11] fuzz: fix the pro100 generic-fuzzer config

2021-03-15 Thread Alexander Bulekov
The device-type names for the pro100 network cards, are i8255.. We were matching "eepro", which catches the PCI PIO/MMIO regions for those devices, however misses the actual PCI device, which we use to map the BARs, before fuzzing. Fix that Signed-off-by: Alexander Bulekov Reviewed-by: Philippe

Re: [PATCH v3 1/3] target/arm: Add support for FEAT_TLBIRANGE

2021-03-15 Thread Rebecca Cran
On 3/10/21 12:24 PM, Richard Henderson wrote: On 3/9/21 6:29 PM, Rebecca Cran wrote: +void tlb_flush_page_range_by_mmuidx(CPUState *cpu, target_ulong addr, +    unsigned int num_pages, uint16_t idxmap) I am not keen on this interface.  I think you should take

[PATCH v3 2/4] block: check for sys/disk.h

2021-03-15 Thread Joelle van Dyne
Some BSD platforms do not have this header. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Joelle van Dyne --- meson.build | 1 + block.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index

Re: test failures for cross-i386-user

2021-03-15 Thread Eric Blake
On 3/15/21 12:58 PM, Claudio Fontana wrote: > Hello Eric, > > I am seeing some test failures after todays' rebase on latest master for the > "cross-i386-user", while on Friday it was ok: > > https://gitlab.com/hw-claudio/qemu/-/jobs/1098390932 > > Running test test-cutils > ** >

Re: [RFC PATCH] configure: Poison (almost) all target-specific #defines

2021-03-15 Thread Eric Blake
On 3/15/21 8:54 AM, Thomas Huth wrote: > We are generating a lot of target-specific defines in the *-config-devices.h > and *-config-target.h files. Using them in common code is wrong and leads > to very subtle bugs since a "#ifdef CONFIG_SOMETHING" is not working there > as expected. To avoid

[PULL 11/13] usb/storage move usb-storage device to separate source file

2021-03-15 Thread Gerd Hoffmann
Pure code motion, no functional change. Signed-off-by: Gerd Hoffmann Message-Id: <20210312090425.772900-4-kra...@redhat.com> --- hw/usb/dev-storage-classic.c | 156 +++ hw/usb/dev-storage.c | 135 -- hw/usb/meson.build

Re: [PATCH] utils: Reduce chance of rounding inaccuracy in qemu_strtosz.

2021-03-15 Thread Eric Blake
On 3/15/21 8:18 AM, Richard Henderson wrote: > On 3/15/21 5:33 AM, Eric Blake wrote: >> On 3/13/21 3:48 PM, Richard Henderson wrote: >>> On 3/11/21 2:07 PM, Eric Blake wrote: +    /* + * Add in a fudge-factor (2^53 when double is IEEE format) for + * all scales

[PULL 05/13] usb: Document the missing -usbdevice options

2021-03-15 Thread Gerd Hoffmann
From: Thomas Huth There are some more -usbdevice options that have never been mentioned in the documentation. Now that we removed -usbdevice from the list of deprecated features again, we should document them properly. While we're at it, also sort them alphabetically. Signed-off-by: Thomas

Re: [PATCH v7 0/3] vnc: support reload x509 certificates

2021-03-15 Thread Gerd Hoffmann
On Mon, Mar 15, 2021 at 09:16:06PM +0800, Zihao Chang wrote: > This series supports reload x509 certificates for vnc > 1. Support reload x509 certificates. > 2. Support reload vnc certificates. > 3. Add new qmp display-reload and implement reload x509 certificates > for vnc. > > Example: >

[PATCH v3 0/4] Disable unsupported features on iOS hosts

2021-03-15 Thread Joelle van Dyne
These patches disables code that cannot be compiled or run on iOS by adding feature/header detection at configure time. Only the first patch still needs to be reviewed, thanks! v3: * Add braces in if statement in third patch v2: * Broken merge where config_host['CONFIG_SMBD_COMMAND'] was

[PULL 01/13] hw/usb/bus: Remove the "full-path" property

2021-03-15 Thread Gerd Hoffmann
From: Thomas Huth This property was only required for the pc-1.0 and earlier machine types. Since these have been removed now, we can delete the property as well. Signed-off-by: Thomas Huth Message-Id: <20210302120152.118042-1-th...@redhat.com> Signed-off-by: Gerd Hoffmann ---

[PATCH v3 4/4] slirp: feature detection for smbd

2021-03-15 Thread Joelle van Dyne
Replace Windows specific macro with a more generic feature detection macro. Allows slirp smb feature to be disabled manually as well. Acked-by: Samuel Thibault Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Joelle van Dyne --- configure | 26 +++--- meson.build | 2

[PULL 02/13] usb: remove support for -usbdevice parameters

2021-03-15 Thread Gerd Hoffmann
From: Paolo Bonzini No device needs them anymore and in fact they're undocumented. Remove the code. The only change in behavior is that "-usbdevice braille:hello" now reports an error, which is a bugfix. Signed-off-by: Paolo Bonzini Cc: Gerd Hoffmann Signed-off-by: Thomas Huth Message-Id:

[PULL 10/13] usb/storage: move usb-bot device to separate source file

2021-03-15 Thread Gerd Hoffmann
Pure code motion, no functional change. Signed-off-by: Gerd Hoffmann Message-Id: <20210312090425.772900-3-kra...@redhat.com> --- hw/usb/dev-storage-bot.c | 63 hw/usb/dev-storage.c | 42 --- hw/usb/meson.build | 1 + 3

[PATCH v3 3/4] block: detect DKIOCGETBLOCKCOUNT/SIZE before use

2021-03-15 Thread Joelle van Dyne
iOS hosts do not have these defined so we fallback to the default behaviour. Co-authored-by: Warner Losh Reviewed-by: Peter Maydell Signed-off-by: Joelle van Dyne --- block/file-posix.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git

[PATCH 4/6] acpi: add aml_to_decimalstring() and aml_call6() helpers

2021-03-15 Thread Igor Mammedov
it will be used by follow up patches Signed-off-by: Igor Mammedov --- include/hw/acpi/aml-build.h | 3 +++ hw/acpi/aml-build.c | 28 2 files changed, 31 insertions(+) diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h index

[PULL 09/13] usb/storage: move declarations to usb/msd.h header

2021-03-15 Thread Gerd Hoffmann
In preparation for splitting the usb-storage.c file move declarations to the new usb/msd.h header file. Signed-off-by: Gerd Hoffmann Message-Id: <20210312090425.772900-2-kra...@redhat.com> --- include/hw/usb/msd.h | 54 hw/usb/dev-storage.c | 48

[PULL 13/13] usb/storage: clear csw on reset

2021-03-15 Thread Gerd Hoffmann
Stale data in csw (specifically residue) can confuse the state machine and allows the guest trigger an assert(). So clear csw on reset to avoid this happening in case the guest resets the device in the middle of a request. Buglink: https://bugs.launchpad.net/qemu/+bug/1523811 Signed-off-by: Gerd

[PATCH v3 1/4] block: feature detection for host block support

2021-03-15 Thread Joelle van Dyne
On Darwin (iOS), there are no system level APIs for directly accessing host block devices. We detect this at configure time. Signed-off-by: Joelle van Dyne --- meson.build | 6 +- qapi/block-core.json | 10 +++--- block/file-posix.c | 33 ++--- 3

[PATCH 1/6] tests: acpi: temporary whitelist DSDT changes

2021-03-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..fddcfc061f 100644 ---

[PULL 06/13] hw/southbridge: Add missing Kconfig dependency VT82C686 on USB_UHCI

2021-03-15 Thread Gerd Hoffmann
From: Philippe Mathieu-Daudé The VT82C686 south bridge provides a USB UHCI bus via a PCI function. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan Message-Id: <20210309190802.830969-2-f4...@amsat.org> Signed-off-by: Gerd Hoffmann --- hw/isa/Kconfig | 1 + 1 file changed, 1

[PULL 03/13] usb: remove '-usbdevice u2f-key'

2021-03-15 Thread Gerd Hoffmann
From: Paolo Bonzini It never worked. Signed-off-by: Paolo Bonzini Cc: Gerd Hoffmann Signed-off-by: Thomas Huth Message-Id: <20210310173323.1422754-3-th...@redhat.com> Signed-off-by: Gerd Hoffmann --- hw/usb/u2f.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/usb/u2f.c

[PULL 12/13] usb/storage: add kconfig symbols

2021-03-15 Thread Gerd Hoffmann
Add new kconfig symbols so usb-storage and usb-bot can be enabled or disabled individually at build time. Signed-off-by: Gerd Hoffmann Message-Id: <20210312090425.772900-5-kra...@redhat.com> --- hw/usb/Kconfig | 13 - hw/usb/meson.build | 4 ++-- 2 files changed, 14

[PATCH 2/6] pci: introduce apci-index property for PCI device

2021-03-15 Thread Igor Mammedov
In x86/ACPI world, linux distros are using predictable network interface naming since systemd v197. Which on QEMU based VMs results into path based naming scheme, that names network interfaces based on PCI topology. With itm on has to plug NIC in exactly the same bus/slot, which was used when

[PULL 04/13] usb: Un-deprecate -usbdevice (except for -usbdevice audio which gets removed)

2021-03-15 Thread Gerd Hoffmann
From: Thomas Huth When trying to remove the -usbdevice option, there were complaints that "-usbdevice braille" is still a very useful shortcut for some people. Thus we never remove this option. Since it's not such a big burden to keep it around, and it's also convenient in the sense that you

[PULL 00/13] Usb 20210315 patches

2021-03-15 Thread Gerd Hoffmann
The following changes since commit 6157b0e19721aadb4c7fdcfe57b2924af6144b14: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.0-pull-= request' into staging (2021-03-14 17:47:49 +) are available in the Git repository at: git://git.kraxel.org/qemu tags/usb-20210315

[PULL 08/13] hw/usb: Extract VT82C686 UHCI PCI function into a new unit

2021-03-15 Thread Gerd Hoffmann
From: Philippe Mathieu-Daudé Extract the VT82C686 PCI UHCI function into a new unit so it is only build when the VT82C686 south bridge is selected. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210309190802.830969-4-f4...@amsat.org> Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c

Re: [Virtio-fs] [PATCH 3/3] virtiofsd: Don't allow empty filenames

2021-03-15 Thread Vivek Goyal
On Mon, Mar 15, 2021 at 11:06:30AM +0100, Greg Kurz wrote: > On Sun, 14 Mar 2021 19:36:04 -0400 > Vivek Goyal wrote: > > > On Fri, Mar 12, 2021 at 03:10:03PM +0100, Greg Kurz wrote: > > > POSIX.1-2017 clearly stipulates that empty filenames aren't > > > allowed ([1] and [2]). Since virtiofsd is

Re: [PATCH 6/9] migration: Replaced qemu_mutex_lock calls with QEMU_LOCK_GUARD

2021-03-15 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Mahmoud Mandour (ma.mando...@gmail.com) wrote: > > Replaced various qemu_mutex_lock calls and their respective > > qemu_mutex_unlock calls with QEMU_LOCK_GUARD macro. This simplifies > > the code by eliminating the respective

Re: [PULL 13/18] hw/core: implement a guest-loader to support static hypervisor guests

2021-03-15 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 3/15/21 5:59 PM, Christian Borntraeger wrote: >> On 15.03.21 17:51, Philippe Mathieu-Daudé wrote: >> >>> diff --git a/hw/core/Kconfig b/hw/core/Kconfig >>> index fdf03514d7d..9397503656d 100644 >>> --- a/hw/core/Kconfig >>> +++ b/hw/core/Kconfig >>> @@

[PULL 07/13] hw/usb/hcd-uhci: Expose generic prototypes to local header

2021-03-15 Thread Gerd Hoffmann
From: Philippe Mathieu-Daudé Extract generic UHCI prototypes into a new "hcd-uhci.h" local header so we can reuse them in other units. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210309190802.830969-3-f4...@amsat.org> Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.h | 93

[PATCH v2 13/13] block: remove support for using "file" driver with block/char devices

2021-03-15 Thread Daniel P . Berrangé
The 'host_device' and 'host_cdrom' drivers must be used instead. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrangé --- block/file-posix.c | 17 ++--- docs/system/deprecated.rst | 7 --- docs/system/removed-features.rst | 7 +++

[PATCH 3/6] pci: acpi: ensure that acpi-index is unique

2021-03-15 Thread Igor Mammedov
it helps to avoid device naming conflicts when guest OS is configured to use acpi-index for naming. Spec ialso says so: PCI Firmware Specification Revision 3.2 4.6.7. _DSM for Naming a PCI or PCI Express Device Under Operating Systems " Instance number must be unique under \_SB scope. This

[PATCH 6/6] tests: acpi: update expected blobs

2021-03-15 Thread Igor Mammedov
expected changes are: * larger BNMR operation region * new PIDX field and method to fetch acpi-index * PDSM method that implements PCI device _DSM + per device _DSM that calls PDSM @@ -221,10 +221,11 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC", 0x0001) B0EJ,

[PATCH 5/6] pci: acpi: add _DSM method to PCI devices

2021-03-15 Thread Igor Mammedov
Implement _DSM according to: PCI Firmware Specification 3.1 4.6.7. DSM for Naming a PCI or PCI Express Device Under Operating Systems and wire it up to cold and hot-plugged PCI devices. Feature depends on ACPI hotplug being enabled (as that provides PCI devices descriptions in

[PATCH v2 12/13] block: remove 'dirty-bitmaps' field from 'BlockInfo' struct

2021-03-15 Thread Daniel P . Berrangé
The same data is available in the 'BlockDeviceInfo' struct. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Daniel P. Berrangé --- block/qapi.c| 5 - docs/system/deprecated.rst | 13 -

[PATCH 0/6] pc: support user provided NIC naming/indexing

2021-03-15 Thread Igor Mammedov
Changes since rfc: * make sure that acpi-index unique * use dedicated MMIO register for it * drop syntetic acpi-label field in _DSM * add more comments Series implements support for 'onboard' naming scheme for network interfaces (1), which is based on PCI firmware spec and lets user to

test failures for cross-i386-user

2021-03-15 Thread Claudio Fontana
Hello Eric, I am seeing some test failures after todays' rebase on latest master for the "cross-i386-user", while on Friday it was ok: https://gitlab.com/hw-claudio/qemu/-/jobs/1098390932 Running test test-cutils ** ERROR:../tests/unit/test-cutils.c:2290:test_qemu_strtosz_metric: assertion

Re: [RFC PATCH] docs/devel: expand style section of memory management

2021-03-15 Thread Alex Bennée
Daniel P. Berrangé writes: > On Mon, Mar 15, 2021 at 06:04:10PM +0100, Thomas Huth wrote: >> On 15/03/2021 17.57, Peter Maydell wrote: >> > On Mon, 15 Mar 2021 at 16:53, Alex Bennée wrote: >> > > -Prefer g_new(T, n) instead of g_malloc(sizeof(T) ``*`` n) for the >> > > following >> > > +Care

Re: [PATCH 1/8] bsd-user/elfload.c: Replaced calls to malloc/free with GLib variants

2021-03-15 Thread Alex Bennée
Mahmoud Mandour writes: > Given this is start-up code I think you could use g_new instead of > g_try_new. As it will abort on no memory you can avoid the early return > check bellow. Also is elf_phdata never persists beyond this function you > could use g_autofree (and use g_steal_pointer

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-15 Thread Eric Blake
On 3/11/21 5:11 PM, Philippe Mathieu-Daudé wrote: > Introduce the 'query-accels' QMP command which returns a list > of built-in accelerators names. accelerator names > > - Accelerator is an QAPI enum of all existing accelerators, is a QAPI enum > > - AcceleratorInfo is a QAPI structure

[PATCH v2 11/13] block: remove dirty bitmaps 'status' field

2021-03-15 Thread Daniel P . Berrangé
The same information is available via the 'recording' and 'busy' fields. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Daniel P. Berrangé --- block/dirty-bitmap.c | 38 docs/system/deprecated.rst | 7 - docs/system/removed-features.rst | 7 +

<    1   2   3   4   5   6   >