[PATCH] hw/riscv: virt: Move flash node to root

2021-08-06 Thread Bin Meng
The flash is not inside the SoC, so it's inappropriate to put it under the /soc node. Move it to root instead. Signed-off-by: Bin Meng --- hw/riscv/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 4a3cd2599a..89fb607c47 100644

Re: [PATCH v4 0/2] Add remote I2C device to support external I2C device

2021-08-06 Thread Corey Minyard
On Fri, Aug 06, 2021 at 11:49:16PM +, Shengtan Mao wrote: > This patch implements the remote I2C device. The remote I2C device allows an > external I2C device to communicate with the I2C controller in QEMU through the > remote I2C protocol. Users no longer have to directly modify QEMU to add

[PATCH v4 1/2] hw/i2c: add remote I2C device

2021-08-06 Thread Shengtan Mao
This patch adds the remote I2C device, which supports the usage of external I2C devices. Signed-off-by: Shengtan Mao --- hw/arm/Kconfig| 1 + hw/i2c/Kconfig| 4 + hw/i2c/meson.build| 1 + hw/i2c/remote-i2c.c | 117 ++

[PATCH v4 2/2] docs/specs: add remote i2c docs

2021-08-06 Thread Shengtan Mao
Change-Id: I4ef1e31c326dbb4f741bf65d9212ff10fc3c98c3 --- docs/specs/index.rst | 1 + docs/specs/remote-i2c.rst | 51 +++ 2 files changed, 52 insertions(+) create mode 100644 docs/specs/remote-i2c.rst diff --git a/docs/specs/index.rst

[PATCH v4 0/2] Add remote I2C device to support external I2C device

2021-08-06 Thread Shengtan Mao
This patch implements the remote I2C device. The remote I2C device allows an external I2C device to communicate with the I2C controller in QEMU through the remote I2C protocol. Users no longer have to directly modify QEMU to add new I2C devices and can instead implement the emulated device

[PATCH V6 24/27] chardev: cpr for simple devices

2021-08-06 Thread Steve Sistare
Set QEMU_CHAR_FEATURE_CPR for devices that trivially support cpr. char-stdio is slightly less trivial. Allow the gdb server by closing it on exec. Signed-off-by: Steve Sistare --- chardev/char-mux.c | 1 + chardev/char-null.c| 1 + chardev/char-serial.c | 1 + chardev/char-stdio.c |

[PATCH V6 27/27] cpr: only-cpr-capable option

2021-08-06 Thread Steve Sistare
Add the only-cpr-capable option, which causes qemu to exit with an error if any devices that are not capable of cpr are added. This guarantees that a cpr-exec operation will not fail with an unsupported device error. Signed-off-by: Steve Sistare --- MAINTAINERS | 1 +

[PATCH V6 23/27] chardev: cpr framework

2021-08-06 Thread Steve Sistare
Add QEMU_CHAR_FEATURE_CPR for devices that support cpr. Add the chardev reopen-on-cpr option for devices that can be closed on cpr and reopened after exec. cpr is allowed only if either QEMU_CHAR_FEATURE_CPR or reopen-on-cpr is set for all chardevs in the configuration. Signed-off-by: Steve

[PATCH V6 19/27] vfio-pci: cpr part 1 (fd and dma)

2021-08-06 Thread Steve Sistare
Enable vfio-pci devices to be saved and restored across an exec restart of qemu. At vfio creation time, save the value of vfio container, group, and device descriptors in cpr state. In cpr-save and cpr-exec, suspend the use of virtual addresses in DMA mappings with VFIO_DMA_UNMAP_FLAG_VADDR,

[PATCH] vmxnet3: add stub for encapsulation offload

2021-08-06 Thread Alexander Bulekov
Encapsulation offload (offload mode 1) is a valid mode present in the kernel that isn't implemented in QEMU, yet. https://lore.kernel.org/lkml/20200528015426.8285-4-dos...@vmware.com/ Add a stub for this mode, to avoid the guest-triggerable assertion. Resolves:

[PATCH V6 22/27] vhost: reset vhost devices for cpr

2021-08-06 Thread Steve Sistare
A vhost device is implicitly preserved across re-exec because its fd is not closed, and the value of the fd is specified on the command line for the new qemu to find. However, new qemu issues an VHOST_RESET_OWNER ioctl, which fails because the device already has an owner. To fix, reset the owner

[Bug 1939179] [NEW] qemu-ga fsfreeze crashes the kernel

2021-08-06 Thread Arthur Lyubochenya
Public bug reported: Hello, Still required your attention, duplicate from: https://bugs.launchpad.net/bugs/1807073 https://bugs.launchpad.net/bugs/1813045 We use mainly Cloudlinux, Debian and Centos. We experienced many crashes on our qemu instances based on Cloudlinux during a snapshot. The

[PATCH V6 15/27] cpr: restart HMP interfaces

2021-08-06 Thread Steve Sistare
cpr-save mode may be "restart" cpr-exec Call qmp_cpr_exec(). Arguments: command : command line to execute, with space-separated arguments Signed-off-by: Steve Sistare --- hmp-commands.hx | 21 - include/monitor/hmp.h | 1 + monitor/hmp-cmds.c| 11

[PATCH V6 21/27] vfio-pci: cpr part 3 (intx)

2021-08-06 Thread Steve Sistare
Preserve vfio INTX state across cpr restart. Preserve VFIOINTx fields as follows: pin : Recover this from the vfio config in kernel space interrupt : Preserve its eventfd descriptor across exec. unmask : Ditto route.irq : This could perhaps be recovered in vfio_pci_post_load by

[PATCH V6 17/27] pci: export functions for cpr

2021-08-06 Thread Steve Sistare
Export msix_is_pending, msix_init_vector_notifiers, and pci_update_mappings for use by cpr. No functional change. Signed-off-by: Steve Sistare --- hw/pci/msix.c | 20 ++-- hw/pci/pci.c | 3 +-- include/hw/pci/msix.h | 5 + include/hw/pci/pci.h | 1 + 4

[PATCH V6 01/27] memory: qemu_check_ram_volatile

2021-08-06 Thread Steve Sistare
Add a function that returns an error if any ram_list block represents volatile memory. Signed-off-by: Steve Sistare --- include/exec/memory.h | 8 softmmu/memory.c | 26 ++ 2 files changed, 34 insertions(+) diff --git a/include/exec/memory.h

[PATCH V6 25/27] chardev: cpr for pty

2021-08-06 Thread Steve Sistare
Save and restore pty descriptors across cpr-save and cpr-load. Signed-off-by: Steve Sistare --- chardev/char-pty.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/chardev/char-pty.c b/chardev/char-pty.c index a2d1e7c..721cee9 100644 --- a/chardev/char-pty.c

[PATCH V6 16/27] hostmem-memfd: cpr for memory-backend-memfd

2021-08-06 Thread Steve Sistare
Preserve memory-backend-memfd memory objects during cpr. Signed-off-by: Steve Sistare --- backends/hostmem-memfd.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c index 3fc85c3..5097a05 100644 ---

[PATCH V6 14/27] cpr: restart mode

2021-08-06 Thread Steve Sistare
Provide the cpr-save restart mode, which preserves the guest VM across a restart of the qemu process. After cpr-save, the caller passes qemu command-line arguments to cpr-exec, which directly exec's the new qemu binary. The arguments must include -S so new qemu starts in a paused state. The

[PATCH V6 26/27] chardev: cpr for sockets

2021-08-06 Thread Steve Sistare
Save accepted socket fds before cpr-save, and look for them after cpr-load. in the environment after cpr-load. Reject cpr-exec if a socket enables the TLS or websocket option. Allow a monitor socket by closing it on exec. Signed-off-by: Mark Kanda Signed-off-by: Steve Sistare ---

[PATCH V6 10/27] machine: memfd-alloc option

2021-08-06 Thread Steve Sistare
Allocate anonymous memory using memfd_create if the memfd-alloc machine option is set. Signed-off-by: Steve Sistare --- hw/core/machine.c | 19 +++ include/hw/boards.h | 1 + qemu-options.hx | 6 ++ softmmu/physmem.c | 47

[PATCH V6 12/27] vl: helper to request re-exec

2021-08-06 Thread Steve Sistare
Add a qemu_system_exec_request() hook that causes the main loop to exit and re-exec qemu using the specified arguments. Signed-off-by: Steve Sistare --- include/sysemu/runstate.h | 1 + softmmu/runstate.c| 21 + 2 files changed, 22 insertions(+) diff --git

[PATCH V6 20/27] vfio-pci: cpr part 2 (msi)

2021-08-06 Thread Steve Sistare
Finish cpr for vfio-pci MSI/MSI-X devices by preserving eventfd's and vector state. Signed-off-by: Steve Sistare --- hw/vfio/pci.c | 108 +- 1 file changed, 107 insertions(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index

[PATCH V6 18/27] vfio-pci: refactor for cpr

2021-08-06 Thread Steve Sistare
Export vfio_address_spaces and vfio_listener_skipped_section. Add optional name arg to vfio_add_kvm_msi_virq. Refactor vector use into a helper vfio_vector_init. All for use by cpr in a subsequent patch. No functional change. Signed-off-by: Steve Sistare --- hw/vfio/common.c | 4

[PATCH V6 07/27] cpr: reboot HMP interfaces

2021-08-06 Thread Steve Sistare
cpr-save Call qmp_cpr_save(). Arguments: filename : save vmstate to filename mode: must be "reboot" cpr-load Call qmp_cpr_load(). Arguments: filename : load vmstate from filename Signed-off-by: Mark Kanda Signed-off-by: Steve Sistare --- hmp-commands.hx | 31

[PATCH V6 09/27] oslib: qemu_clear_cloexec

2021-08-06 Thread Steve Sistare
Define qemu_clear_cloexec, analogous to qemu_set_cloexec. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Steve Sistare --- include/qemu/osdep.h | 1 + util/oslib-posix.c | 9 + util/oslib-win32.c | 4 3 files changed, 14 insertions(+) diff --git a/include/qemu/osdep.h

[PATCH V6 08/27] memory: flat section iterator

2021-08-06 Thread Steve Sistare
Add an iterator over the sections of a flattened address space. Signed-off-by: Steve Sistare --- include/exec/memory.h | 31 +++ softmmu/memory.c | 20 2 files changed, 51 insertions(+) diff --git a/include/exec/memory.h

[PATCH V6 13/27] cpr: preserve extra state

2021-08-06 Thread Steve Sistare
cpr must save state that is needed after qemu is restarted, when devices are realized. Thus the extra state cannot be saved in the cpr-load vmstate file, as objects must already exist before that file can be loaded. Instead, define auxilliary state structures and vmstate descriptions, not

[PATCH V6 06/27] cpr: reboot mode

2021-08-06 Thread Steve Sistare
Provide the cpr-save and cpr-load functions for live update. These save and restore VM state, with minimal guest pause time, so that qemu may be updated to a new version in between. cpr-save stops the VM and saves vmstate to an ordinary file. It supports any type of guest image and block

[PATCH V6 05/27] vl: start on wakeup request

2021-08-06 Thread Steve Sistare
If qemu starts and loads a VM in the suspended state, then a later wakeup request will set the state to running, which is not sufficient to initialize the vm, as vm_start was never called during this invocation of qemu. See qemu_system_wakeup_request(). Define the start_on_wakeup_requested()

[PATCH V6 04/27] migration: simplify savevm

2021-08-06 Thread Steve Sistare
Use qemu_file_open to simplify a few functions in savevm.c. No functional change. Signed-off-by: Steve Sistare --- migration/savevm.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 7b7b64b..bdd6ef8 100644

[PATCH V6 11/27] qapi: list utility functions

2021-08-06 Thread Steve Sistare
Generalize strList_from_comma_list() to take any delimiter character, rename as strList_from_string(), and move it to qapi/util.c. Also add strList_from_string() and QAPI_LIST_LENGTH(). No functional change. Signed-off-by: Steve Sistare --- include/qapi/util.h | 28

[PATCH V6 03/27] migration: qemu file wrappers

2021-08-06 Thread Steve Sistare
Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix files and file descriptors. Signed-off-by: Steve Sistare --- migration/qemu-file-channel.c | 36 migration/qemu-file-channel.h | 6 ++ 2 files changed, 42 insertions(+) diff --git

[PATCH V6 00/27] Live Update

2021-08-06 Thread Steve Sistare
Provide the cpr-save, cpr-exec, and cpr-load commands for live update. These save and restore VM state, with minimal guest pause time, so that qemu may be updated to a new version in between. cpr-save stops the VM and saves vmstate to an ordinary file. It supports any type of guest image and

[PATCH V6 02/27] migration: fix populate_vfio_info

2021-08-06 Thread Steve Sistare
Include CONFIG_DEVICES so that populate_vfio_info is instantiated for CONFIG_VFIO. Signed-off-by: Steve Sistare --- migration/target.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/migration/target.c b/migration/target.c index 907ebf0..4390bf0 100644 ---

Re: [PATCH-for-6.2 v2 3/5] target/mips: Convert Vr54xx MACC* opcodes to decodetree

2021-08-06 Thread Richard Henderson
On 8/6/21 11:05 AM, Philippe Mathieu-Daudé wrote: +/* + * Helpers for implementing sets of trans_* functions. + * Defer the implementation of NAME to FUNC, with optional extra arguments. + */ +#define TRANS(NAME, FUNC, ...) \ +static bool trans_##NAME(DisasContext *ctx, arg_##NAME *a) \ +

[PATCH for-6.2 07/12] [automated] Use DECLARE_*CHECKER* macros when possible

2021-08-06 Thread Eduardo Habkost
Converting existing QOM types to OBJECT_DECLARE_TYPE is not always trivial (due to inconsistent type/macro naming schemes), but at least converting existing manual QOM type checking macros to use DECLARE_*CHECKER* is a simpler process, and should at least discourage people from defining new QOM

Re: [PATCH 2/7] net/vmnet: add new netdevs to qapi/net

2021-08-06 Thread Eric Blake
On Thu, Jun 17, 2021 at 05:32:41PM +0300, Vladislav Yaroshchuk wrote: > Created separate netdev per each vmnet operating mode > because they use quite different settings. Especially since > macOS 11.0 (vmnet.framework API gets lots of updates) > > Three new netdevs are added: > - vmnet-host > -

[PATCH for-6.2 12/12] [automated] Use OBJECT_DECLARE_SIMPLE_TYPE when possible

2021-08-06 Thread Eduardo Habkost
Replace typedef + DECLARE_INSTANCE_CHECKER with equivalent OBJECT_DECLARE_SIMPLE_TYPE macro. Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost --- Cc: Thomas Huth Cc: Paul Burton

Re: [PATCH 1/7] net/vmnet: dependencies setup, initial preparations

2021-08-06 Thread Eric Blake
On Thu, Jun 17, 2021 at 05:32:40PM +0300, Vladislav Yaroshchuk wrote: > Add 'vmnet' customizable option and 'vmnet.framework' probe into > configure; I'm sorry no one else has taken time to review this yet; thanks for your ping. I'm not the network maintainer, and I don't develop on Mac, so I'm

[PATCH for-6.2 09/12] npcm7xx_otp: Use DECLARE_CLASS_CHECKERS

2021-08-06 Thread Eduardo Habkost
Use DECLARE_CLASS_CHECKERS instead of defining the NPCM7XX_OTP_CLASS and NPCM7XX_OTP_GET_CLASS macros manually. These changes had to be done manually because the typedef and the existing macro definitions were in different files. Signed-off-by: Eduardo Habkost --- Cc: Havard Skinnemoen Cc:

[PATCH for-6.2 10/12] [automated] Use DECLARE_OBJ_CHECKERS when possible

2021-08-06 Thread Eduardo Habkost
This automatically convert DECLARE_INSTANCE_CHECKER/DECLARE_CLASS_CHECKER pairs to DECLARE_OBJ_CHECKERS. Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=AddDeclareObjCheckers $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost --- Cc: Havard Skinnemoen

[PATCH for-6.2 11/12] [automated] Use OBJECT_DECLARE_TYPE when possible

2021-08-06 Thread Eduardo Habkost
Replace typedefs + DECLARE_OBJ_CHECKERS with equivalent OBJECT_DECLARE_TYPE macro. Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=AddObjectDeclareType $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost --- Cc: John Snow Cc: Kevin Wolf Cc: Max Reitz Cc:

[PATCH for-6.2 03/12] scripts/codeconverter: Update to latest version

2021-08-06 Thread Eduardo Habkost
I'm not documenting every single change in the codeconverter script because most of that code will be deleted once we finish the QOM code conversion. This patch updates the script to the latest version that was used to perform changes in the QOM code. Signed-off-by: Eduardo Habkost ---

[PATCH for-6.2 06/12] [automated] Split QOM "typedef struct T { ... } T" declarations

2021-08-06 Thread Eduardo Habkost
Automatically split struct definition and typedef declaration in separate declarations, using a codeconverter rule. The rule will only touch declarations of structs/typedefs actually used by QOM types. This will make automated changes to use OBJECT_DECLARE* macros easier to implement, because

[PATCH for-6.2 08/12] npcm7xx_clk: Use DECLARE_INSTANCE_CHECKER

2021-08-06 Thread Eduardo Habkost
Use DECLARE_INSTANCE_CHECKER instead of defining the NPCM7XX_CLOCK_PLL, NPCM7XX_CLOCK_SEL, and NPCM7XX_CLOCK_DIVIDER macros manually. These changes had to be done manually because the codeconverter script isn't smart enough to figure out that the typedefs exist in a separate header.

[PATCH for-6.2 01/12] accel: Rename TYPE_ACCEL to TYPE_ACCEL_BASE

2021-08-06 Thread Eduardo Habkost
The ACCEL name conflicts with a Windows API typedef name, and it is difficult to work around this because windows.h needs to be included by osdep.h. This prevents us from replacing the existing ACCEL macro with an inline function generated by OBJECT_DEFINE_TYPE. Work around the conflict by

[PATCH for-6.2 05/12] [automated] Move QOM typedefs and add missing includes

2021-08-06 Thread Eduardo Habkost
Some typedefs and macros are defined after the type check macros. This makes it difficult to automatically replace their definitions with OBJECT_DECLARE_TYPE. Patch generated using: $ ./scripts/codeconverter/converter.py -i --pattern=MoveSymbols \ $(git grep -l '' -- '*.[ch]') which will:

[PATCH for-6.2 04/12] [automated] Add struct names to typedefs used by QOM types

2021-08-06 Thread Eduardo Habkost
Anonymous structs on QOM typedefs make the code harder to convert to OBJECT_DEFINE* macros, as the macros expect the struct name to exist. Use a codeconverter rule to automatically add names to the structs used in QOM typedefs. Generated using: $ ./scripts/codeconverter/converter.py -i \

[PATCH for-6.2 02/12] qom: Use DEVICE_*CLASS instead of OBJECT_*CLASS

2021-08-06 Thread Eduardo Habkost
There are multiple functions where OBJECT_GET_CLASS or OBJECT_CLASS_CHECK are being used directly for DeviceClass/TYPE_DEVICE, instead of the DEVICE_GET_CLASS or DEVICE_CLASS wrappers. There's no reason to not use the wrappers, so use them. Signed-off-by: Eduardo Habkost --- Cc: "Michael S.

[PATCH for-6.2 00/12] qom: Get rid of all manual usage of OBJECT_CHECK & friends

2021-08-06 Thread Eduardo Habkost
This series gets rid of all manual usage of OBJECT_CHECK, OBJECT_CLASS_CHECK, and OBJECT_GET_CLASS. All type check macros defined manually are replaced with DEFINE_*CHECKER* or OBJECT_DECLARE* macros. All manual usage of OBJECT_CHECK/OBJECT_CLASS_CHECK/OBJECT_GET_CLASS is manually replaced with

Re: [PATCH] qapi: Fix crash on redefinition with a different condition

2021-08-06 Thread Eric Blake
On Fri, Aug 06, 2021 at 02:05:10PM +0200, Markus Armbruster wrote: > QAPISchema._make_implicit_object_type() asserts that when an implicit > object type is used multiple times, @ifcond is the same for all uses. > It will be for legitimate uses, i.e. simple union branch wrapper > types. A comment

Re: [PATCH] target/mips: Remove JR opcode unused arguments

2021-08-06 Thread Philippe Mathieu-Daudé
On 7/31/21 12:55 AM, Philippe Mathieu-Daudé wrote: > JR opcode (Jump Register) only takes 1 argument, $rs. > JALR (Jump And Link Register) takes 3: $rs, $rd and $hint. > > Commit 6af0bf9c7c3 added their processing into decode_opc() as: > > case 0x08 ... 0x09: /* Jumps */ >

[PATCH-for-6.2 v2 4/5] target/mips: Convert Vr54xx MUL* opcodes to decodetree

2021-08-06 Thread Philippe Mathieu-Daudé
Convert the following Integer Multiply-Accumulate opcodes: * MULHIMultiply and move HI * MULHIU Unsigned multiply and move HI * MULS Multiply, negate, and move LO * MULSHI Multiply, negate, and move HI * MULSHIU Unsigned multiply, negate, and move HI * MULSU

[PATCH-for-6.2 v2 2/5] target/mips: Introduce decodetree structure for NEC Vr54xx extension

2021-08-06 Thread Philippe Mathieu-Daudé
The decoder is called but doesn't decode anything. This will ease reviewing the next commit. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210801235926.3178085-3-f4...@amsat.org> Reviewed-by: Richard Henderson --- target/mips/tcg/translate.h| 1 + target/mips/tcg/vr54xx.decode

[PATCH-for-6.2 v2 5/5] target/mips: Convert Vr54xx MSA* opcodes to decodetree

2021-08-06 Thread Philippe Mathieu-Daudé
Convert the following Integer Multiply-Accumulate opcodes: * MSAC Multiply, negate, accumulate, and move LO * MSACHI Multiply, negate, accumulate, and move HI * MSACHIU Unsigned multiply, negate, accumulate, and move HI * MSACUUnsigned multiply, negate, accumulate,

[PATCH-for-6.2 v2 3/5] target/mips: Convert Vr54xx MACC* opcodes to decodetree

2021-08-06 Thread Philippe Mathieu-Daudé
Convert the following Integer Multiply-Accumulate opcodes: * MACC Multiply, accumulate, and move LO * MACCHI Multiply, accumulate, and move HI * MACCHIU Unsigned multiply, accumulate, and move HI * MACCUUnsigned multiply, accumulate, and move LO Since all opcodes

[PATCH-for-6.2 v2 1/5] target/mips: Extract NEC Vr54xx helpers to vr54xx_helper.c

2021-08-06 Thread Philippe Mathieu-Daudé
Extract NEC Vr54xx helpers from op_helper.c to a new file: 'vr54xx_helper.c'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20201120210844.2625602-14-f4...@amsat.org> --- target/mips/tcg/op_helper.c | 118 --

[PATCH-for-6.2 v2 0/5] target/mips: Convert NEC Vr54xx to decodetree

2021-08-06 Thread Philippe Mathieu-Daudé
Series fully reviewed. Trivial conversion, few more lines moved out of the huge translate.c. Since v1: - Use TRANS() macro from ppc/translate.c, per rth's comment: https://www.mail-archive.com/qemu-devel@nongnu.org/msg827660.html Philippe Mathieu-Daudé (5): target/mips: Extract NEC Vr54xx

Re: [PATCH v2 2/7] docs/devel: create "Developing QEMU" subsection

2021-08-06 Thread John Snow
On Fri, Aug 6, 2021 at 12:42 PM Philippe Mathieu-Daudé wrote: > On 8/6/21 6:40 PM, Philippe Mathieu-Daudé wrote: > > On 8/6/21 5:51 PM, John Snow wrote: > >> Signed-off-by: John Snow > >> Reviewed-by: Alex Bennée > >> Reviewed-by: Peter Maydell > >> --- > >> docs/devel/index.rst

Re: [PATCH-for-6.2 0/4] target/mips: Decodetree housekeeping

2021-08-06 Thread Philippe Mathieu-Daudé
On 8/2/21 1:41 AM, Philippe Mathieu-Daudé wrote: > Minor cleanups while looking at converting more opcodes to decodetree. > > Philippe Mathieu-Daudé (4): > target/mips: Simpify PREF opcode > target/mips: Decode vendor extensions before MIPS ISAs > target/mips: Merge 32-bit/64-bit release6

Re: [PATCH for-6.2 v3 11/12] mirror: Do not clear .cancelled

2021-08-06 Thread Eric Blake
On Fri, Aug 06, 2021 at 11:38:58AM +0200, Max Reitz wrote: > Clearing .cancelled before leaving the main loop when the job has been > soft-cancelled is no longer necessary since job_is_cancelled() only > returns true for jobs that have been force-cancelled. > > Therefore, this only makes a

Re: [PATCH for-6.2 v3 10/12] mirror: Stop active mirroring after force-cancel

2021-08-06 Thread Eric Blake
On Fri, Aug 06, 2021 at 11:38:57AM +0200, Max Reitz wrote: > Once the mirror job is force-cancelled (job_is_cancelled() is true), we > should not generate new I/O requests. This applies to active mirroring, > too, so stop it once the job is cancelled. > > (We must still forward all I/O requests

Re: [PATCH for-6.2 v3 09/12] mirror: Check job_is_cancelled() earlier

2021-08-06 Thread Eric Blake
On Fri, Aug 06, 2021 at 11:38:56AM +0200, Max Reitz wrote: > We must check whether the job is force-cancelled early in our main loop, > most importantly before any `continue` statement. For example, we used > to have `continue`s before our current checking location that are > triggered by

Re: [PATCH for-6.2 v3 08/12] mirror: Use job_is_cancelled()

2021-08-06 Thread Eric Blake
On Fri, Aug 06, 2021 at 11:38:55AM +0200, Max Reitz wrote: > mirror_drained_poll() returns true whenever the job is cancelled, > because "we [can] be sure that it won't issue more requests". However, > this is only true for force-cancelled jobs, so use job_is_cancelled(). > > Signed-off-by: Max

Re: [PATCH for-6.2 v3 07/12] job: Add job_cancel_requested()

2021-08-06 Thread Eric Blake
On Fri, Aug 06, 2021 at 11:38:54AM +0200, Max Reitz wrote: > Most callers of job_is_cancelled() actually want to know whether the job > is on its way to immediate termination. For example, we refuse to pause > jobs that are cancelled; but this only makes sense for jobs that are > really actually

Re: [Qemu-devel] [PATCH] acpi: Add emulated sleep button

2021-08-06 Thread Annie.li
Hello Igor, This is an old patch, but it does what we need. I am getting a little bit lost about not implementing fixed hardware sleep button, can you please clarify? thank you! On 7/20/2017 10:59 AM, Igor Mammedov wrote: On Thu, 20 Jul 2017 11:31:26 +0200 Stefan Fritsch wrote: From: Stefan

Re: [PATCH v3 06/10] virtiofsd: Let lo_inode_open() return a TempFd

2021-08-06 Thread Vivek Goyal
On Fri, Jul 30, 2021 at 05:01:30PM +0200, Max Reitz wrote: > Strictly speaking, this is not necessary, because lo_inode_open() will > always return a new FD owned by the caller, so TempFd.owned will always > be true. > > However, auto-cleanup is nice, and in some cases this plays nicely with > an

Re: [PATCH for-6.2 v3 05/12] job: @force parameter for job_cancel_sync{, _all}()

2021-08-06 Thread Eric Blake
On Fri, Aug 06, 2021 at 11:38:52AM +0200, Max Reitz wrote: > Callers should be able to specify whether they want job_cancel_sync() to > force-cancel the job or not. > > In fact, almost all invocations do not care about consistency of the > result and just want the job to terminate as soon as

Re: [RFC PATCH v0 1/2] spapr: Add H_REG_SNS hcall

2021-08-06 Thread Fabiano Rosas
Bharata B Rao writes: > Add support for H_REG_SNS hcall so that asynchronous page > fault mechanism can be supported on PowerKVM guests. > > This hcall essentially issues KVM_PPC_SET_SNS to let the > host map and pin the memory containing the Subvention > Notification Structure. It also claims

Re: [PATCH for-6.2 v3 04/12] job: Force-cancel jobs in a failed transaction

2021-08-06 Thread Eric Blake
On Fri, Aug 06, 2021 at 11:38:51AM +0200, Max Reitz wrote: > When a transaction is aborted, no result matters, and so all jobs within > should be force-cancelled. > > Signed-off-by: Max Reitz > --- > job.c | 7 ++- > 1 file changed, 6 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake

Re: [PATCH for-6.2 v3 01/12] job: Context changes in job_completed_txn_abort()

2021-08-06 Thread Eric Blake
On Fri, Aug 06, 2021 at 11:38:48AM +0200, Max Reitz wrote: > Finalizing the job may cause its AioContext to change. This is noted by > job_exit(), which points at job_txn_apply() to take this fact into > account. > > However, job_completed() does not necessarily invoke job_txn_apply() > (through

Re: [PATCH 0/7] Add vmnet.framework based network backend

2021-08-06 Thread Vladislav Yaroshchuk
ping https://patchew.org/QEMU/20210617143246.55336-1-yaroshchuk2...@gmail.com/ чт, 17 июн. 2021 г. в 17:33, Vladislav Yaroshchuk : > macOS provides networking API for VMs called vmnet.framework. > I tried to add it as a network backend. All three modes are supported: > > -shared: > allows the

Re: [PATCH v3 04/10] virtiofsd: Add lo_inode_fd() helper

2021-08-06 Thread Vivek Goyal
On Fri, Jul 30, 2021 at 05:01:28PM +0200, Max Reitz wrote: [..] > @@ -1335,12 +1359,18 @@ static void lo_mknod_symlink(fuse_req_t req, > fuse_ino_t parent, > return; > } > > +res = lo_inode_fd(dir, _fd); > +if (res < 0) { > +saverr = -res; > +goto out; > +

[RFC PATCH] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35

2021-08-06 Thread Ani Sinha
commit d7346e614f4ec ("acpi: x86: pcihp: add support hotplug on multifunction bridges") added ACPI hotplug descriptions for cold plugged bridges for functions other than 0. For all other devices, the ACPI hotplug descriptions are limited to function 0 only. This change adds unit tests for this

[RFC PATCH] tests/acpi/pcihp: add unit tests for hotplug on multifunction

2021-08-06 Thread Ani Sinha
Hi Igor : This is the new unit test which I wanted to add for your change related to adding multifunction hotplug support. This is not the final patchset. I wanted to run this by you first to make sure things are looking good before sending out the patch series for this unit test with blobs etc

Re: [PATCH v6 10/10] ACPI ERST: step 6 of bios-tables-test

2021-08-06 Thread Eric DeVolder
Well, I discovered today that running "make check" again resulted in bios table mismatches. In looking into this further, I think I might finally have an understanding as to how this is all to work. My bios-tables-test-allowed-diff for step 1 now looks like: "tests/data/acpi/pc/DSDT.acpierst",

Re: [PATCH v2 2/7] docs/devel: create "Developing QEMU" subsection

2021-08-06 Thread Philippe Mathieu-Daudé
On 8/6/21 6:40 PM, Philippe Mathieu-Daudé wrote: > On 8/6/21 5:51 PM, John Snow wrote: >> Signed-off-by: John Snow >> Reviewed-by: Alex Bennée >> Reviewed-by: Peter Maydell >> --- >> docs/devel/index.rst | 6 +- >> docs/devel/section-development.rst | 12 >> 2

Re: [PATCH v2 2/7] docs/devel: create "Developing QEMU" subsection

2021-08-06 Thread Philippe Mathieu-Daudé
On 8/6/21 5:51 PM, John Snow wrote: > Signed-off-by: John Snow > Reviewed-by: Alex Bennée > Reviewed-by: Peter Maydell > --- > docs/devel/index.rst | 6 +- > docs/devel/section-development.rst | 12 > 2 files changed, 13 insertions(+), 5 deletions(-) > create

Re: [PATCH v3] hw/acpi: add an assertion check for non-null return from acpi_get_i386_pci_host

2021-08-06 Thread Philippe Mathieu-Daudé
On 8/6/21 4:01 PM, Philippe Mathieu-Daudé wrote: > On 8/6/21 12:52 PM, Ani Sinha wrote: >> On Fri, 6 Aug 2021, Igor Mammedov wrote: >>> On Thu, 5 Aug 2021 19:42:35 +0530 (IST) >>> Ani Sinha wrote: On Thu, 5 Aug 2021, Ani Sinha wrote: > On Thu, 5 Aug 2021, Ani Sinha wrote: >> On Thu,

[PATCH v2 6/7] docs/devel: create "QEMU API" section

2021-08-06 Thread John Snow
Signed-off-by: John Snow --- docs/devel/index.rst | 4 +--- docs/devel/section-api.rst | 10 ++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 docs/devel/section-api.rst diff --git a/docs/devel/index.rst b/docs/devel/index.rst index b146ce00f7a..9f9e96204fc

Re: [PATCH v2 6/7] docs/devel: create "QEMU API" section

2021-08-06 Thread Peter Maydell
On Fri, 6 Aug 2021 at 16:51, John Snow wrote: > > Signed-off-by: John Snow > --- > docs/devel/index.rst | 4 +--- > docs/devel/section-api.rst | 10 ++ > 2 files changed, 11 insertions(+), 3 deletions(-) > create mode 100644 docs/devel/section-api.rst > > diff --git

[PATCH v2 2/7] docs/devel: create "Developing QEMU" subsection

2021-08-06 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- docs/devel/index.rst | 6 +- docs/devel/section-development.rst | 12 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 docs/devel/section-development.rst diff

[PATCH v2 7/7] docs/devel: create "Miscellaneous Topics" subsection

2021-08-06 Thread John Snow
The hallmark of any truly great taxonomical reorganization: the bin of leftover bits and pieces that didn't neatly fit elsewhere. Signed-off-by: John Snow Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- docs/devel/index.rst| 7 +-- docs/devel/section-misc.rst | 13

[PATCH v2 4/7] docs/devel: create TCG subsection

2021-08-06 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- docs/devel/index.rst | 6 +- docs/devel/section-tcg.rst | 12 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 docs/devel/section-tcg.rst diff --git

[PATCH v2 1/7] docs/devel: create "Community & Governance" subsection

2021-08-06 Thread John Snow
Plonk the Code of Conduct and Conflict Resolution Policy guides into a new "Community & Governance" subsection. Signed-off-by: John Snow Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- docs/devel/index.rst| 3 +-- docs/devel/section-community-governance.rst | 9

[PATCH v2 5/7] docs/devel: create "Subsystem APIs" subsection

2021-08-06 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- docs/devel/index.rst | 10 +- docs/devel/section-subsystems.rst | 16 2 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 docs/devel/section-subsystems.rst

[PATCH v2 0/7] docs/devel: Organize devel manual into further subsections

2021-08-06 Thread John Snow
It's a bit cluttered. On my way to converting the QAPI/QMP documents to ReST I thought it could do with another organizational level to help make sense of things a bit more quickly. V2: - Move decodetree into TCG subsection - Rebase, add QOM/QAPI/QMP docs into API subsection John Snow (7):

[PATCH v2 3/7] docs/devel: create "Testing & Debugging" subsection

2021-08-06 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- docs/devel/index.rst | 6 +- docs/devel/section-testing-debugging.rst | 12 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644

Re: [PATCH 1/6] docs/about/removed-features: Document removed CLI options from QEMU v2.12

2021-08-06 Thread Paolo Bonzini
On 06/08/21 17:10, Thomas Huth wrote: + +``-no-kvm-pit`` (removed in 2.12) +' + +There is no replacement, since this was just a dummy option that has been +ignored. The same effect (plus also disabling the KVM IOAPIC) can be obtained with "-machine

Re: [PATCH 3/6] docs/about/removed-features: Document removed CLI options from QEMU v3.1

2021-08-06 Thread Paolo Bonzini
On 06/08/21 17:10, Thomas Huth wrote: +``-balloon`` (removed in 3.1) +' + +The ``-balloon option`` has been replaced by ``-device virtio-balloon``. Maybe the ``-balloon virtio`` option? While ``-balloon none`` was a no-op and had no replacement. Paolo

Re: [PATCH 1/6] docs/about/removed-features: Document removed CLI options from QEMU v2.12

2021-08-06 Thread Paolo Bonzini
On 06/08/21 17:10, Thomas Huth wrote: + +``-no-kvm-pit`` (removed in 2.12) +' + +There is no replacement, since this was just a dummy option that has been +ignored. The same effect (plus also disabling the KVM IOAPIC) can be obtained with "-M

Re: [PATCH v3 03/10] virtiofsd: Use lo_inode_open() instead of openat()

2021-08-06 Thread Vivek Goyal
On Fri, Jul 30, 2021 at 05:01:27PM +0200, Max Reitz wrote: > The xattr functions want a non-O_PATH FD, so they reopen the lo_inode.fd > with the flags they need through /proc/self/fd. > > Similarly, lo_opendir() needs an O_RDONLY FD. Instead of the > /proc/self/fd trick, it just uses openat(fd,

Re: [PATCH] meson: fix logic for gnutls check

2021-08-06 Thread Paolo Bonzini
On 06/08/21 16:49, Alyssa Ross wrote: The logic before was if not get_option('gnutls').auto() or have_system Which is equivalent to if get_option('gnutls').enabled() or get_option('gnutls').disabled() or have_system This means that the check for gnutls is performed even if

Re: [PATCH] vhost-user: add missing space in error message

2021-08-06 Thread Laurent Vivier
Le 06/08/2021 à 16:39, Alyssa Ross a écrit : > This would previously give error messages like > >> Received unexpected msg type.Expected 0 received 1 > > Signed-off-by: Alyssa Ross > --- > hw/virtio/vhost-user.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

[PATCH 4/6] docs/about/removed-features: Document removed HMP commands from QEMU v2.12

2021-08-06 Thread Thomas Huth
These HMP commands had been removed/replaced in QEMU v2.12. Still, some people might want to update from older versions to the recent QEMU version, so we should give some recommendations for the replacements in our documentation. Signed-off-by: Thomas Huth --- docs/about/removed-features.rst |

[PATCH 5/6] docs/about/removed-features: Document removed devices from older QEMU versions

2021-08-06 Thread Thomas Huth
These devices had been removed/replaced in QEMU v2.12 and v4.0. Signed-off-by: Thomas Huth --- docs/about/removed-features.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index 568a2c725b..ffb82c4a99 100644

[PATCH 2/6] docs/about/removed-features: Document removed CLI options from QEMU v3.0

2021-08-06 Thread Thomas Huth
These CLI options had been removed/replaced in QEMU v3.0. Still, some people might want to update from older versions to the recent QEMU version, so we should give some recommendations for the replacements in our documentation. Signed-off-by: Thomas Huth --- docs/about/removed-features.rst | 35

[PATCH 6/6] docs/about/removed-features: Document removed machines from older QEMU versions

2021-08-06 Thread Thomas Huth
These machines had been removed in the QEMU v2.6 up to 4.0 time frame. Signed-off-by: Thomas Huth --- docs/about/removed-features.rst | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst index

[PATCH 3/6] docs/about/removed-features: Document removed CLI options from QEMU v3.1

2021-08-06 Thread Thomas Huth
These CLI options had been removed/replaced in QEMU v3.1. Still, some people might want to update from older versions to the recent QEMU version, so we should give some recommendations for the replacements in our documentation. Signed-off-by: Thomas Huth --- docs/about/removed-features.rst | 66

  1   2   3   >