Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Markus Armbruster
Claudio Fontana writes: > On 9/22/22 16:36, Markus Armbruster wrote: >> Claudio Fontana writes: >> >>> On 9/22/22 15:20, Markus Armbruster wrote: Claudio Fontana writes: [...] > I think it would be better to completely make the return value separate > from the

Re: [PATCH] include/hw/riscv/sifive_e.h: Fix the type of parent_obj of SiFiveEState.

2022-09-22 Thread Alistair Francis
On Thu, Sep 22, 2022 at 6:12 PM Tommy Wu wrote: > > To the maintainers: > > Thank Alistair and Jim for the review. > Bernhard Beschow sent the same patch : > https://lists.gnu.org/archive/html/qemu-riscv/2022-09/msg00126.html > > It seems that this simple patch is helpful. Could you help us to

Re: [PATCH 2/2] target/riscv: rvv-1.0: vf[w]redsum distinguish between ordered/unordered

2022-09-22 Thread Alistair Francis
On Thu, Aug 18, 2022 at 1:43 AM Yang Liu wrote: > > Starting with RVV1.0, the original vf[w]redsum_vs instruction was renamed > to vf[w]redusum_vs. The distinction between ordered and unordered is also > more consistent with other instructions, although there is no difference > in implementation

Re: [PATCH 1/2] target/riscv: rvv-1.0: Simplify vfwredsum code

2022-09-22 Thread Alistair Francis
On Thu, Aug 18, 2022 at 1:57 AM Yang Liu wrote: > > Remove duplicate code by wrapping vfwredsum_vs's OP function. > > Signed-off-by: Yang Liu Reviewed-by: Alistair Francis Alistair > --- > target/riscv/vector_helper.c | 56 +++- > 1 file changed, 10

Re: [PATCH v2 0/8] target/riscv: Improve RISC-V Debug support

2022-09-22 Thread Alistair Francis
On Fri, Sep 9, 2022 at 11:48 PM Bin Meng wrote: > > This patchset refactors RISC-V Debug support to allow more types of > triggers to be extended. > > The initial support of type 6 trigger, which is similar to type 2 > trigger with additional functionality, is also introduced in this > patchset.

Re: [PATCH v2 07/39] tests: Avoid using hardcoded /tmp in test cases

2022-09-22 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Tue, Sep 20, 2022 at 2:47 PM Bin Meng wrote: > >> From: Bin Meng >> >> Lots of test cases were written to use hardcoded /tmp directory for >> temporary files. To avoid this, we update them to use g_dir_make_tmp() >> or g_file_open_tmp() when appropriate.

Re: [PATCH v2] RISC-V: Add support for Ztso

2022-09-22 Thread Alistair Francis
On Sat, Sep 17, 2022 at 6:12 PM Palmer Dabbelt wrote: > > The Ztso extension was recently frozen, this adds it as a CPU property > and adds various fences throughout the port in order to allow TSO > targets to function on weaker hosts. We need no fences for AMOs as > they're already SC, the

Re: [RFC] hw/registerfields: add `FIELDx_1CLEAR()` macro

2022-09-22 Thread Alistair Francis
On Thu, Sep 1, 2022 at 11:03 AM Wilfred Mallawa wrote: > > From: Wilfred Mallawa > > Adds a helper macro that implements the `rw1c` > behaviour. > > Ex: > uint32_t data = FIELD32_1CLEAR(val, REG, FIELD); > > if the specified `FIELD` is set (single/multi bit all fields) > then the respective

Re: [PATCH v2] disas/riscv.c: rvv: Add disas support for vector instructions

2022-09-22 Thread Alistair Francis
On Fri, Aug 26, 2022 at 1:26 PM Yang Liu wrote: > > Tested with https://github.com/ksco/rvv-decoder-tests > > Expected checkpatch errors for consistency and brevity reasons: > > ERROR: line over 90 characters > ERROR: trailing statements should be on next line > ERROR: braces {} are necessary for

[PULL 10/12] hw/riscv: opentitan: Expose the resetvec as a SoC property

2022-09-22 Thread Alistair Francis
From: Alistair Francis On the OpenTitan hardware the resetvec is fixed at the start of ROM. In QEMU we don't run the ROM code and instead just jump to the next stage. This means we need to be a little more flexible about what the resetvec is. This patch allows us to set the resetvec from the

Re: [PATCH 1/4] hw/watchdog: wdt_ibex_aon.c: Implement the watchdog for the OpenTitan

2022-09-22 Thread Alistair Francis
On Fri, Sep 9, 2022 at 8:04 AM Tyler Ng wrote: > > > > On Thu, Sep 8, 2022 at 4:52 AM Alistair Francis wrote: >> >> On Fri, Sep 2, 2022 at 3:29 AM Tyler Ng wrote: >> > >> > This commit adds most of an implementation of the OpenTitan Always-On >> > Timer. The documentation for this timer is

[PULL 09/12] hw/riscv: opentitan: Fixup resetvec

2022-09-22 Thread Alistair Francis
From: Alistair Francis The resetvec for the OpenTitan machine ended up being set to an out of date value, so let's fix that and bump it to the correct start address (after the boot ROM) Fixes: bf8803c64d75 "hw/riscv: opentitan: bump opentitan version" Signed-off-by: Alistair Francis

[PULL 12/12] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-22 Thread Alistair Francis
From: Bernhard Beschow SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to inherit from TYPE_MACHINE. This is an inconsistency which can cause undefined behavior such as memory corruption. Change SiFiveEState to inherit from MachineState since it is registered as a machine.

[PULL 11/12] target/riscv: Check the correct exception cause in vector GDB stub

2022-09-22 Thread Alistair Francis
From: Frank Chang After RISCVException enum is introduced, riscv_csrrw_debug() returns RISCV_EXCP_NONE to indicate there's no error. RISC-V vector GDB stub should check the result against RISCV_EXCP_NONE instead of value 0. Otherwise, 'E14' packet would be incorrectly reported for vector CSRs

[PULL 07/12] target/riscv: remove fixed numbering from GDB xml feature files

2022-09-22 Thread Alistair Francis
From: Andrew Burgess The fixed register numbering in the various GDB feature files for RISC-V only exists because these files were originally copied from the GDB source tree. However, the fixed numbering only exists in the GDB source tree so that GDB, when it connects to a target that doesn't

[PULL 05/12] target/riscv: fix csr check for cycle{h}, instret{h}, time{h}, hpmcounter3-31{h}

2022-09-22 Thread Alistair Francis
From: Weiwei Li - modify check for mcounteren to work in all less-privilege mode - modify check for scounteren to work only when S mode is enabled - distinguish the exception type raised by check for scounteren between U and VU mode Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang

[PULL 06/12] target/riscv: remove fflags, frm, and fcsr from riscv-*-fpu.xml

2022-09-22 Thread Alistair Francis
From: Andrew Burgess While testing some changes to GDB's handling for the RISC-V registers fcsr, fflags, and frm, I spotted that QEMU includes these registers twice in the target description it sends to GDB, once in the fpu feature, and once in the csr feature. Right now things basically work

Re: Re: [PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-22 Thread Jason Wang
On Fri, Sep 23, 2022 at 11:55 AM ho...@yusur.tech wrote: > > On Thu, 22 Sep 2022 09:34:41 +0800 Jason Wang wrote: > > > >On Thu, Sep 22, 2022 at 1:58 AM Raphael Norwitz > > wrote: > >> > >> If I read your response on the other thread correctly, this change is > >> intended > >> > >> to

[PULL 08/12] target/riscv: Set the CPU resetvec directly

2022-09-22 Thread Alistair Francis
From: Alistair Francis Instead of using our properties to set a config value which then might be used to set the resetvec (depending on your timing), let's instead just set the resetvec directly in the env struct. This allows us to set the reset vec from the command line with: -global

Re: Re: [PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-22 Thread ho...@yusur.tech
On Thu, 22 Sep 2022 09:34:41 +0800 Jason Wang wrote: >On Thu, Sep 22, 2022 at 1:58 AM Raphael Norwitz > wrote: >> >> If I read your response on the other thread correctly, this change is >> intended >> >> to prioritize the MAC address exposed by DPDK over the one provided by the >> >> QEMU

[PULL 04/12] target/riscv: Remove sideleg and sedeleg

2022-09-22 Thread Alistair Francis
From: Rahul Pathak sideleg and sedeleg csrs are not part of riscv isa spec anymore, these csrs were part of N extension which is removed from the riscv isa specification. These commits removed all traces of these csrs from riscv spec (https://github.com/riscv/riscv-isa-manual) - commit

[PULL 02/12] hw/ssi: ibex_spi: update reg addr

2022-09-22 Thread Alistair Francis
From: Wilfred Mallawa Updates the `EVENT_ENABLE` register to offset `0x34` as per OpenTitan spec [1]. [1] https://docs.opentitan.org/hw/ip/spi_host/doc/#Reg_event_enable Signed-off-by: Wilfred Mallawa Reviewed-by: Alistair Francis Message-Id:

[PULL 03/12] docs/system: clean up code escape for riscv virt platform

2022-09-22 Thread Alistair Francis
From: Alex Bennée The example code is rendered slightly mangled due to missing code block. Properly escape the code block and add shell prompt and qemu to fit in with the other examples on the page. Signed-off-by: Alex Bennée Reviewed-by: Alistair Francis Message-Id:

[PULL 01/12] hw/ssi: ibex_spi: fixup typos in ibex_spi_host

2022-09-22 Thread Alistair Francis
From: Wilfred Mallawa This patch fixes up minor typos in ibex_spi_host Signed-off-by: Wilfred Mallawa Reviewed-by: Alistair Francis Reviewed-by: Andrew Jones Message-Id: <20220823061201.132342-2-wilfred.mall...@opensource.wdc.com> Signed-off-by: Alistair Francis --- hw/ssi/ibex_spi_host.c

Re: [PATCH] hw/riscv/sifive_e: Fix inheritance of SiFiveEState

2022-09-22 Thread Alistair Francis
On Thu, Sep 22, 2022 at 5:56 PM Bernhard Beschow wrote: > > SiFiveEState inherits from SysBusDevice while it's TypeInfo claims it to > inherit from TYPE_MACHINE. This is an inconsistency which can cause > undefined behavior such as memory corruption. > > Change SiFiveEState to inherit from

[PULL 00/12] riscv-to-apply queue

2022-09-22 Thread Alistair Francis
From: Alistair Francis The following changes since commit 6160d8ff81fb9fba70f5dad88d43ffd0fa44984c: Merge tag 'edgar/xilinx-next-2022-09-21.for-upstream' of https://github.com/edgarigl/qemu into staging (2022-09-22 13:24:28 -0400) are available in the Git repository at:

Re: [PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-22 Thread 陈浩
On 2022/9/22 18:19, Michael S. Tsirkin wrote: On Thu, Sep 22, 2022 at 11:02:56AM +0100, Alex Bennée wrote: "Michael S. Tsirkin" writes: On Wed, Sep 21, 2022 at 07:23:12PM +0100, Alex Bennée wrote: chenh writes: From: Hao Chen When use dpdk-vdpa tests vdpa device. You need to specify

Re: [PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-22 Thread Jason Wang
On Fri, Sep 23, 2022 at 11:33 AM 陈浩 wrote: > > > On 2022/9/22 17:56, Michael S. Tsirkin wrote: > > On Thu, Sep 22, 2022 at 09:34:41AM +0800, Jason Wang wrote: > >> On Thu, Sep 22, 2022 at 1:58 AM Raphael Norwitz > >> wrote: > >>> If I read your response on the other thread correctly, this change

[PATCH v1 1/3] hw/loongarch: Add memmap for LoongArch virt machine

2022-09-22 Thread Xiaojuan Yang
Using memmap table for loongarch virt machine type, this method comes from arm/riscv architectures. Signed-off-by: Xiaojuan Yang --- hw/loongarch/acpi-build.c | 46 ++-- hw/loongarch/fw_cfg.c | 5 +- hw/loongarch/virt.c | 138 ++--

Re: [PATCH v2] hw/virtio/vhost-user: support obtain vdpa device's mac address automatically

2022-09-22 Thread 陈浩
On 2022/9/22 17:56, Michael S. Tsirkin wrote: On Thu, Sep 22, 2022 at 09:34:41AM +0800, Jason Wang wrote: On Thu, Sep 22, 2022 at 1:58 AM Raphael Norwitz wrote: If I read your response on the other thread correctly, this change is intended to prioritize the MAC address exposed by DPDK over

[PATCH v1 3/3] hw/intc: Fix LoongArch ipi device emulation

2022-09-22 Thread Xiaojuan Yang
In ipi_send function, it should not to set irq before writing data to dest cpu iocsr space, as the irq will trigger after data writing. Signed-off-by: Xiaojuan Yang --- hw/intc/loongarch_ipi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/intc/loongarch_ipi.c b/hw/intc/loongarch_ipi.c

[PATCH v1 0/3] Add memmap and fix bugs for LoongArch

2022-09-22 Thread Xiaojuan Yang
This series add memmap table and fix extioi, ipi device emulation for LoongArch virt machine. Changes for v1: 1. Add memmap table for LoongArch virt machine 2. Fix LoongArch extioi function 3. Fix LoongArch ipi device emulation Thanks for your reviewing. Xiaojuan Yang (3): hw/loongarch: Add

[PATCH v1 2/3] hw/intc: Fix LoongArch extioi function

2022-09-22 Thread Xiaojuan Yang
1.When cpu read or write extioi COREISR reg, it should access the reg belonged to itself, so the index of 's->coreisr' is current cpu number. 2.Remove the unused extioi system memory region and we only support the extioi iocsr memory region now. Signed-off-by: Xiaojuan Yang ---

Re: [PATCH] hw/net: npcm7xx_emc: set MAC in register space

2022-09-22 Thread Jason Wang
On Thu, Sep 22, 2022 at 8:35 PM Peter Maydell wrote: > > On Thu, 22 Sept 2022 at 00:47, Patrick Venture wrote: > > > > The MAC address set from Qemu wasn't being saved into the register space. > > > > Reviewed-by: Hao Wu > > Signed-off-by: Patrick Venture > > > @@ -112,6 +115,18 @@ static void

Re: [PATCH 0/7] nsis: gitlab-ci: Improve QEMU Windows installer packaging

2022-09-22 Thread Bin Meng
Hi Stefan, On Wed, Sep 21, 2022 at 8:24 PM Thomas Huth wrote: > > On 21/09/2022 14.18, Bin Meng wrote: > > Hi, > > > > On Thu, Sep 8, 2022 at 9:28 PM Bin Meng wrote: > >> > >> At present packaging the required DLLs of QEMU executables is a > >> manual process, and error prone. > >> > >> Improve

Re: [PATCH v2 01/39] tests: Change to use g_mkdir()

2022-09-22 Thread Bin Meng
On Fri, Sep 23, 2022 at 3:32 AM Marc-André Lureau wrote: > > Hi > > On Tue, Sep 20, 2022 at 1:48 PM Bin Meng wrote: >> >> From: Bin Meng >> >> Commit 413bebc04603 ("tests: Use g_mkdir_with_parents()") replaces >> the mkdir() call in the test codes with glib's g_mkdir_with_parents(), >> but the

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-09-22 Thread Kirill A . Shutemov
On Mon, Sep 19, 2022 at 11:12:46AM +0200, David Hildenbrand wrote: > > diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h > > index 6325d1d0e90f..9d066be3d7e8 100644 > > --- a/include/uapi/linux/magic.h > > +++ b/include/uapi/linux/magic.h > > @@ -101,5 +101,6 @@ > > #define

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-09-22 Thread Kirill A . Shutemov
On Thu, Sep 22, 2022 at 07:49:18PM +, Sean Christopherson wrote: > On Thu, Sep 22, 2022, Wang, Wei W wrote: > > On Thursday, September 15, 2022 10:29 PM, Chao Peng wrote: > > > +int inaccessible_get_pfn(struct file *file, pgoff_t offset, pfn_t *pfn, > > > + int *order) > > >

Re: [PATCH] KVM: dirty ring: Add memory barrier when marking pfn collected

2022-09-22 Thread Gavin Shan
On 9/23/22 7:35 AM, Peter Xu wrote: Following commit 4802bf910eee9, add the other missing barrier when marking the PFN as collected. This will also be required just like 4802bf910eee9 on weak ordering architectures like aarch64. Cc: Marc Zyngier Cc: Gavin Shan Cc: Paolo Bonzini

Re: [PATCH v4 15/22] tests/qtest: add a timeout for subprocess_run_one_test

2022-09-22 Thread Philippe Mathieu-Daudé via
On 2/8/22 11:50, Alex Bennée wrote: Hangs have been observed in the tests and currently we don't timeout if a subprocess hangs. Rectify that. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth --- v3 - expand timeout to 180 at Thomas' suggestion v4 - fix merge conflict with earlier

Re: [PATCH v4 06/22] include/hw: document vhost_dev feature life-cycle

2022-09-22 Thread Philippe Mathieu-Daudé via
On 2/8/22 11:49, Alex Bennée wrote: Try and explicitly document the various state of feature bits as related to the vhost_dev structure. Importantly the backend_features can advertise things like VHOST_USER_F_PROTOCOL_FEATURES which is never exposed to the driver and is only present in the

Re: [PATCH v4 09/22] hw/virtio: add some vhost-user trace events

2022-09-22 Thread Philippe Mathieu-Daudé via
On 2/8/22 11:49, Alex Bennée wrote: These are useful for tracing the lifetime of vhost-user connections. Signed-off-by: Alex Bennée --- hw/virtio/vhost.c | 6 ++ hw/virtio/trace-events | 4 2 files changed, 10 insertions(+) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 07/22] hw/virtio: fix some coding style issues

2022-09-22 Thread Philippe Mathieu-Daudé via
On 2/8/22 11:49, Alex Bennée wrote: Signed-off-by: Alex Bennée Acked-by: Jason Wang --- hw/virtio/vhost-user.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 02/22] hw/virtio: gracefully handle unset vhost_dev vdev

2022-09-22 Thread Philippe Mathieu-Daudé via
On 2/8/22 11:49, Alex Bennée wrote: I've noticed asserts firing because we query the status of vdev after a vhost connection is closed down. Rather than faulting on the NULL indirect just quietly reply false. Signed-off-by: Alex Bennée Message-Id:

Re: [PATCH v4 01/22] hw/virtio: incorporate backend features in features

2022-09-22 Thread Philippe Mathieu-Daudé via
On 2/8/22 11:49, Alex Bennée wrote: There are some extra bits used over a vhost-user connection which are hidden from the device itself. We need to set them here to ensure we enable things like the protocol extensions. Currently net/vhost-user.c has it's own inscrutable way of persisting this

Re: [PATCH] KVM: dirty ring: Add memory barrier when marking pfn collected

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 23:35, Peter Xu wrote: Following commit 4802bf910eee9, add the other missing barrier when marking the PFN as collected. This will also be required just like 4802bf910eee9 on weak ordering architectures like aarch64. Cc: Marc Zyngier Cc: Gavin Shan Cc: Paolo Bonzini Signed-off-by:

Re: [PATCH v1 9/9] gdbstub: move guest debug support check to ops

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 16:58, Alex Bennée wrote: This removes the final hard coding of kvm_enabled() in gdbstub and moves the check to an AccelOps. Signed-off-by: Alex Bennée Cc: Mads Ynddal --- accel/kvm/kvm-cpus.h | 1 + gdbstub/internals.h| 1 + include/sysemu/accel-ops.h | 1 +

Re: [PATCH v1 7/9] gdbstub: move sstep flags probing into AccelClass

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 16:58, Alex Bennée wrote: The support of single-stepping is very much dependent on support from the accelerator we are using. To avoid special casing in gdbstub move the probing out to an AccelClass function so future accelerators can put their code there. Signed-off-by: Alex Bennée

Re: [PATCH v2 3/3] hw/timer: ibex_timer.c: Add support for writes to mtime

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 17:58, Tyler Ng wrote: 1. Adds fields to hold the value of mtime in timer_upper0 and timer_lower0. 2. Changes the read and write functions to use the mtime fields. 3. Updates the value of mtime in update_mtime() by extrapolating the time elapsed. This will need to change if/when the

Re: [PATCH v2 2/3] hw/intc: sifive_plic.c: Fix interrupt priority index.

2022-09-22 Thread Philippe Mathieu-Daudé via
On 22/9/22 17:58, Tyler Ng wrote: Fixes a bug in which the index of the interrupt priority is off by 1. For example, using an IRQ number of 3 with a priority of 1 is supposed to set plic->source_priority[2] = 1, but instead it sets plic->source_priority[3] = 1. When an interrupt is claimed to

[PATCH] KVM: dirty ring: Add memory barrier when marking pfn collected

2022-09-22 Thread Peter Xu
Following commit 4802bf910eee9, add the other missing barrier when marking the PFN as collected. This will also be required just like 4802bf910eee9 on weak ordering architectures like aarch64. Cc: Marc Zyngier Cc: Gavin Shan Cc: Paolo Bonzini Signed-off-by: Peter Xu --- accel/kvm/kvm-all.c

Re: [PATCH v4] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Gerd Hoffmann
On Thu, Sep 22, 2022 at 02:38:02PM +0200, Paolo Bonzini wrote: > On Thu, Sep 22, 2022 at 2:21 PM Gerd Hoffmann wrote: > > No. This will basically inform the guest that host-phys-bits has been > > enabled (and pass the number of bits). So the firmware can make use of > > the available address

Re: [PATCH v2 38/39] tests/qtest: Enable qtest build on Windows

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 3:37 PM Bin Meng wrote: > From: Bin Meng > > Now that we have fixed various test case issues as seen when running > on Windows, let's enable the qtest build on Windows. > > Signed-off-by: Bin Meng > --- > > Changes in v2: > - new patch: "tests/qtest: Enable qtest

Re: [PATCH v2 35/39] tests/qtest: migration-test: Skip running some TLS cases for win32

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 3:11 PM Bin Meng wrote: > From: Bin Meng > > Some migration test cases use TLS to communicate, but they fail on > Windows with the following error messages: > > qemu-system-x86_64: TLS handshake failed: Insufficient credentials for > that request. >

Re: [PATCH v2 33/39] io/channel-watch: Drop the unnecessary cast

2022-09-22 Thread Marc-André Lureau
On Tue, Sep 20, 2022 at 2:56 PM Bin Meng wrote: > From: Bin Meng > > There is no need to do a type cast on ssource->socket as it is > already declared as a SOCKET. > > Suggested-by: Marc-André Lureau > Signed-off-by: Bin Meng > Reviewed-by: Marc-André Lureau --- > > Changes in v2: > - new

Re: [PATCH v2 25/39] chardev/char-file: Add FILE_SHARE_WRITE when openning the file for win32

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 2:33 PM Bin Meng wrote: > From: Xuzhou Cheng > > The combination of GENERIC_WRITE and FILE_SHARE_READ options does > not allow the same file to be opened again by CreateFile() from > another QEMU process with the same options when the previous QEMU > process still

Re: [PATCH v2 22/39] tests/qtest: migration-test: Disable IO redirection for win32

2022-09-22 Thread Marc-André Lureau
On Tue, Sep 20, 2022 at 3:04 PM Bin Meng wrote: > From: Bin Meng > > On Windows the QEMU executable is created via CreateProcess() and > IO redirection does not work, so don't bother adding IO redirection > to the command line. > > Signed-off-by: Bin Meng > --- > > Changes in v2: > - Change

Re: [PATCH v2 24/39] tests/qtest: virtio-net-failover: Disable migration tests for win32

2022-09-22 Thread Marc-André Lureau
On Tue, Sep 20, 2022 at 3:28 PM Bin Meng wrote: > From: Xuzhou Cheng > > These tests use the exec migration protocol, which is unsupported > on Windows as of today. Disable these tests for now. > > Signed-off-by: Xuzhou Cheng > Signed-off-by: Bin Meng > Reviewed-by: Marc-André Lureau >

Re: [PATCH v2 20/39] tests/qtest: {ahci, ide}-test: Use relative path for temporary files for win32

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 1:50 PM Bin Meng wrote: > From: Bin Meng > > These test cases uses "blkdebug:path/to/config:path/to/image" for > testing. On Windows, absolute file paths contain the delimiter ':' > which causes the blkdebug filename parser fail to parse filenames. > > Signed-off-by:

Re: [PATCH v2 19/39] tests/qtest: Support libqtest to build and run on Windows

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 1:36 PM Bin Meng wrote: > From: Bin Meng > > At present the libqtest codes were written to depend on several > POSIX APIs, including fork(), kill() and waitpid(). Unfortunately > these APIs are not available on Windows. > > This commit implements the corresponding

Re: [PATCH v2 18/39] tests/qtest: libqtest: Install signal handler via signal()

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 2:32 PM Bin Meng wrote: > From: Bin Meng > > At present the codes uses sigaction() to install signal handler with > a flag SA_RESETHAND. Such usage can be covered by the signal() API > that is a simplified interface to the general sigaction() facility. > > Update to

Re: [PATCH v2 16/39] tests/qtest: Use send/recv for socket communication

2022-09-22 Thread Marc-André Lureau
On Tue, Sep 20, 2022 at 2:23 PM Bin Meng wrote: > From: Xuzhou Cheng > > Socket communication in the libqtest and libqmp codes uses read() > and write() which work on any file descriptor on *nix, and sockets > in *nix are an example of a file descriptor. > > However sockets on Windows do not

Re: [PATCH v4] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Paolo Bonzini
On Thu, Sep 22, 2022 at 7:13 PM Jim Mattson wrote: > > Treating 40 as invalid and continue to use the current conservative > > heuristic, otherwise treat phys-bits as valid might work. Obvious > > corner case is that it'll not catch broken manual configurations > >

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-09-22 Thread Sean Christopherson
On Thu, Sep 22, 2022, Wang, Wei W wrote: > On Thursday, September 15, 2022 10:29 PM, Chao Peng wrote: > > +int inaccessible_get_pfn(struct file *file, pgoff_t offset, pfn_t *pfn, > > +int *order) > > Better to remove "order" from this interface? Hard 'no'. > Some callers

Re: [PATCH v2 07/39] tests: Avoid using hardcoded /tmp in test cases

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 2:47 PM Bin Meng wrote: > From: Bin Meng > > Lots of test cases were written to use hardcoded /tmp directory for > temporary files. To avoid this, we update them to use g_dir_make_tmp() > or g_file_open_tmp() when appropriate. > > Signed-off-by: Bin Meng > --- > >

Re: [PATCH v2 08/39] block/vvfat: Unify the mkdir() call

2022-09-22 Thread Marc-André Lureau
On Tue, Sep 20, 2022 at 2:58 PM Bin Meng wrote: > From: Bin Meng > > There is a difference in the mkdir() call for win32 and non-win32 > platforms, and currently is handled in the codes with #ifdefs. > > glib provides a portable g_mkdir() API and we can use it to unify > the codes without

Re: [PATCH v2 03/39] block: Unify the get_tmp_filename() implementation

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 2:17 PM Bin Meng wrote: > From: Bin Meng > > At present get_tmp_filename() has platform specific implementations > to get the directory to use for temporary files. Switch over to use > g_get_tmp_dir() which works on all supported platforms. > > As discussed in v1,

Re: [PATCH v2 02/39] tests/qtest: i440fx-test: Rewrite create_blob_file() to be portable

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 12:56 PM Bin Meng wrote: > From: Bin Meng > > Previously request_{bios, pflash} cases were skipped on win32, mainly > due to create_blob_file() calling mmap() which does not exist on win32. > This rewirtes create_blob_file() to be portable, so that we can enable >

Re: [PATCH 2/5] migration: Fix race on qemu_file_shutdown()

2022-09-22 Thread Peter Xu
On Thu, Sep 22, 2022 at 05:58:25PM +0100, Daniel P. Berrangé wrote: > On Tue, Sep 20, 2022 at 06:37:57PM -0400, Peter Xu wrote: > > In qemu_file_shutdown(), there's a possible race if with current order of > > operation. There're two major things to do: > > > > (1) Do real shutdown() (e.g.

Re: [PATCH v2 01/39] tests: Change to use g_mkdir()

2022-09-22 Thread Marc-André Lureau
Hi On Tue, Sep 20, 2022 at 1:48 PM Bin Meng wrote: > From: Bin Meng > > Commit 413bebc04603 ("tests: Use g_mkdir_with_parents()") replaces > the mkdir() call in the test codes with glib's g_mkdir_with_parents(), > but the exact portable replacement for mkdir() should be g_mkdir(). > > I

Re: [PATCH 3/5] migration: Disallow xbzrle with postcopy

2022-09-22 Thread Peter Xu
On Thu, Sep 22, 2022 at 04:56:21PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > It's not supported since the 1st day, as ram_load_postcopy does not handle > > RAM_SAVE_FLAG_XBZRLE. Mark it disabled explicitly. > > We've already got a check in ram_save_page: >

Re: [PULL v1 0/1] Xilinx queue

2022-09-22 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/2] Hexagon target update

2022-09-22 Thread Stefan Hajnoczi
Applied, thanks. This pull request did not show up in the patches tool (https://github.com/stefanha/patches) that I use. If I miss a pull request from you in the future, please feel free to ping me after 48 hours. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any

[PULL 1/1] virtiofsd: use g_date_time_get_microsecond to get subsecond

2022-09-22 Thread Stefan Hajnoczi
From: Yusuke Okada The "%f" specifier in g_date_time_format() is only available in glib 2.65.2 or later. If combined with older glib, the function returns null and the timestamp displayed as "(null)". For backward compatibility, g_date_time_get_microsecond should be used to retrieve subsecond.

Inscrutable CI jobs (avocado & Travis s390 check-tcg)

2022-09-22 Thread Stefan Hajnoczi
QEMU's avocado and Travis s390x check-tcg CI jobs fail often and I don't know why. I think it's due to timeouts but maybe there is something buried in the logs that I missed. I waste time skimming through logs when merging qemu.git pull requests and electricity is wasted on tests that don't

[PULL 36/39] configure: Add './' on front of glob of */config-devices.mak.d

2022-09-22 Thread Peter Maydell
Shellcheck warns that in rm -f */config-devices.mak.d the glob might expand to something with a '-' in it, which would then be misinterpreted as an option to rm. Fix this by adding './'. Signed-off-by: Peter Maydell Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé

[PULL 0/1] Block patches

2022-09-22 Thread Stefan Hajnoczi
The following changes since commit 6338c30111d596d955e6bc933a82184a0b910c43: Merge tag 'm68k-for-7.2-pull-request' of https://github.com/vivier/qemu-m68k into staging (2022-09-21 13:12:36 -0400) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git

Re: [PATCH v4 2/3] module: add Error arguments to module_load_one and module_load_qom_one

2022-09-22 Thread Kevin Wolf
Am 22.09.2022 um 17:27 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 22.09.2022 um 14:42 hat Markus Armbruster geschrieben: > > [...] > > >> If you have callers that need to distinguish between not found, found > >> but bad, found and good, then return three distinct values.

[PULL 26/39] hw/net/e1000e_core: Use definition to avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé The compiler isn't clever enough to figure 'min_buf_size' is a constant, so help it by using a definitions instead. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Jason Wang Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id:

[PULL 24/39] chardev/baum: Avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Reviewed-by: Samuel Thibault Signed-off-by: Peter Maydell Message-id:

Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions

2022-09-22 Thread David Hildenbrand
On 22.09.22 17:55, Thomas Huth wrote: On 22/09/2022 17.38, David Hildenbrand wrote: From: "Jason A. Donenfeld" In order to fully support MSA_EXT_5, we have to support the SHA-512 special instructions. So implement those. The implementation began as something TweetNacl-like, and then was

[PULL 32/39] tests/unit/test-vmstate: Avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id: 20220819153931.3147384-12-peter.mayd...@linaro.org ---

Re: [PATCH] Revert "intel_iommu: Fix irqchip / X2APIC configuration checks"

2022-09-22 Thread Peter Xu
On Thu, Sep 22, 2022 at 03:46:17PM +0200, Igor Mammedov wrote: > On Wed, 21 Sep 2022 12:12:27 -0400 > Peter Xu wrote: > > > It's true that when vcpus<=255 we don't require the length of 32bit APIC > > IDs. However here since we already have EIM=ON it means the hypervisor > > will declare the VM

Re: [PATCH v4] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Jim Mattson
On Thu, Sep 22, 2022 at 7:16 AM Gerd Hoffmann wrote: > > On Thu, Sep 22, 2022 at 02:38:02PM +0200, Paolo Bonzini wrote: > > On Thu, Sep 22, 2022 at 2:21 PM Gerd Hoffmann wrote: > > > No. This will basically inform the guest that host-phys-bits has been > > > enabled (and pass the number of

Re: [PATCH v8.1 1/2] target/s390x: support SHA-512 extensions

2022-09-22 Thread Jason A. Donenfeld
On Thu, Sep 22, 2022 at 5:55 PM Thomas Huth wrote: > > On 22/09/2022 17.38, David Hildenbrand wrote: > > From: "Jason A. Donenfeld" > > > > In order to fully support MSA_EXT_5, we have to support the SHA-512 > > special instructions. So implement those. > > > > The implementation began as

[PULL 25/39] io/channel-websock: Replace strlen(const_str) by sizeof(const_str) - 1

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé The combined_key[... QIO_CHANNEL_WEBSOCK_GUID_LEN ...] array in qio_channel_websock_handshake_send_res_ok() expands to a call to strlen(QIO_CHANNEL_WEBSOCK_GUID), and the compiler doesn't realize the string is const, so consider combined_key[] being a variable-length

[PULL 30/39] hw/usb/hcd-ohci: Use definition to avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé The compiler isn't clever enough to figure 'width' is a constant, so help it by using a definitions instead. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id:

[PULL 39/39] configure: Avoid use of 'local' as it is non-POSIX

2022-09-22 Thread Peter Maydell
We use the non-POSIX 'local' keyword in just two places in configure; rewrite to avoid it. In do_compiler(), just drop the 'local' keyword. The variable 'compiler' is only used elsewhere in the do_compiler_werror() function, which already uses the variable as a normal non-local one. In

[PULL 20/39] hw/acpi: Add ospm_status hook implementation for acpi-ged

2022-09-22 Thread Peter Maydell
From: Keqian Zhu Setup an ARM virtual machine of machine virt and execute qmp "query-acpi-ospm-status" causes segmentation fault with following dumpstack: #1 0xab64235c in qmp_query_acpi_ospm_status (errp=errp@entry=0xf030) at ../monitor/qmp-cmds.c:312 #2 0xabfc4e20

[PULL 27/39] hw/ppc/pnv: Avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson Signed-off-by: Peter Maydell Reviewed-by: Peter Maydell Reviewed-by: Daniel Henrique Barboza Message-id:

[PULL 18/39] target/arm: Add secure parameter to get_phys_addr_pmsav7

2022-09-22 Thread Peter Maydell
From: Richard Henderson Remove the use of regime_is_secure from get_phys_addr_pmsav7, using the new parameter instead. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-19-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter

Re: [PATCH 2/5] migration: Fix race on qemu_file_shutdown()

2022-09-22 Thread Daniel P . Berrangé
On Tue, Sep 20, 2022 at 06:37:57PM -0400, Peter Xu wrote: > In qemu_file_shutdown(), there's a possible race if with current order of > operation. There're two major things to do: > > (1) Do real shutdown() (e.g. shutdown() syscall on socket) > (2) Update qemufile's last_error > > We must

[PULL 31/39] ui/curses: Avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id: 20220819153931.3147384-11-peter.mayd...@linaro.org --- ui/curses.c | 2 +- 1

[PULL 09/39] target/arm: Use GetPhysAddrResult in get_phys_addr_pmsav8

2022-09-22 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-9-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/ptw.c | 28 ++-- 1 file changed, 14

[PULL 29/39] hw/i386/multiboot: Avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Use autofree heap allocation instead of variable-length array on the stack. Replace the snprintf() call by g_strdup_printf(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id:

[PULL 04/39] target/arm: Use GetPhysAddrResult in get_phys_addr_lpae

2022-09-22 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-4-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/ptw.c | 69 ++-- 1 file

Re: [PATCH] Revert "intel_iommu: Fix irqchip / X2APIC configuration checks"

2022-09-22 Thread Peter Xu
On Thu, Sep 22, 2022 at 09:32:54AM +0800, Jason Wang wrote: > > +if (!kvm_enable_x2apic()) { > > +error_setg(errp, "eim=on requires support on the KVM side" > > + "(X2APIC_API, first shipped in v4.7)"); > > +return false; > > +} >

[PULL 22/39] chardev/baum: Replace magic values by X_MAX / Y_MAX definitions

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé Replace '84' magic value by the X_MAX definition, and '1' by Y_MAX. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Reviewed-by: Samuel Thibault Signed-off-by: Peter Maydell Message-id: 20220819153931.3147384-2-peter.mayd...@linaro.org ---

[PULL 05/39] target/arm: Use GetPhysAddrResult in get_phys_addr_v6

2022-09-22 Thread Peter Maydell
From: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20220822152741.1617527-5-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/ptw.c | 30 ++ 1 file changed, 14

[PULL 23/39] chardev/baum: Use definitions to avoid dynamic stack allocation

2022-09-22 Thread Peter Maydell
From: Philippe Mathieu-Daudé We know 'x * y' will be at most 'X_MAX * Y_MAX' (which is not a big value, it is actually 84). Instead of having the compiler use variable-length array, declare an array able to hold the maximum 'x * y'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André

  1   2   3   4   >