Re: [PATCH for-7.2] replay: Fix declaration of replay_read_next_clock

2022-11-28 Thread Philippe Mathieu-Daudé
On 29/11/22 02:05, Richard Henderson wrote: Fixes the build with gcc 13: replay/replay-time.c:34:6: error: conflicting types for \ 'replay_read_next_clock' due to enum/integer mismatch; \ have 'void(ReplayClockKind)' [-Werror=enum-int-mismatch] 34 | void

Re: [PATCH 2/2] qga: map GLib log levels to system levels

2022-11-28 Thread Marc-André Lureau
On Tue, Nov 29, 2022 at 12:59 AM Andrey Drobyshev via wrote: > > This patch translates GLib-specific log levels to system ones, so that > they may be used by both *nix syslog() (as a "priority" argument) and > Windows ReportEvent() (as a "wType" argument). > > Currently the only codepath to write

Re: [PATCH 1/2] qga-win: add logging to Windows event log

2022-11-28 Thread Marc-André Lureau
Hi On Tue, Nov 29, 2022 at 12:59 AM Andrey Drobyshev via wrote: > > This commit allows QGA to write to Windows event log using Win32 API's > ReportEvent() [1], much like syslog() under *nix guests. > > In order to generate log message definitions we use a very basic message > text file [2], so

Re: [PATCH v14 4/5] hw/riscv: virt: Add PMU DT node to the device tree

2022-11-28 Thread Conor.Dooley
On 29/11/2022 07:08, Andrew Jones wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On Mon, Nov 28, 2022 at 09:10:03PM +, conor.doo...@microchip.com wrote: >> On 28/11/2022 20:41, Atish Kumar Patra wrote: >>> EXTERNAL EMAIL: Do not

Re: [RFC PATCH-for-7.2 v3 3/5] hw/display/qxl: Pass requested buffer size to qxl_phys2virt()

2022-11-28 Thread Gerd Hoffmann
> @@ -228,7 +230,8 @@ static void qxl_unpack_chunks(void *dest, size_t size, > PCIQXLDevice *qxl, > if (offset == size) { > return; > } > -chunk = qxl_phys2virt(qxl, chunk->next_chunk, group_id); > +chunk = qxl_phys2virt(qxl, chunk->next_chunk,

Re: [PATCH v14 4/5] hw/riscv: virt: Add PMU DT node to the device tree

2022-11-28 Thread Andrew Jones
On Mon, Nov 28, 2022 at 09:10:03PM +, conor.doo...@microchip.com wrote: > On 28/11/2022 20:41, Atish Kumar Patra wrote: > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > > content is safe > > > > On Mon, Nov 28, 2022 at 12:38 PM wrote: > >> > >> On 28/11/2022

Re: [PATCH for-7.2] replay: Fix declaration of replay_read_next_clock

2022-11-28 Thread Wilfred Mallawa
On Mon, 2022-11-28 at 17:05 -0800, Richard Henderson wrote: > Fixes the build with gcc 13: > > replay/replay-time.c:34:6: error: conflicting types for  \ >   'replay_read_next_clock' due to enum/integer mismatch; \ >   have 'void(ReplayClockKind)' [-Werror=enum-int-mismatch] >    34 | void

Re: [PATCH] MAINTAINERS: Add 9p test client to section "virtio-9p"

2022-11-28 Thread Wilfred Mallawa
On Mon, 2022-11-28 at 18:12 +0100, Christian Schoenebeck wrote: > The 9p test cases use a dedicated, lite-weight 9p client > implementation > (using virtio transport) under tests/qtest/libqos/ to communicate > with > QEMU's 9p server. > > It's already there for a long time. Let's officially

Re: [PATCH for-7.2] replay: Fix declaration of replay_read_next_clock

2022-11-28 Thread Pavel Dovgalyuk
Reviewed-by: Pavel Dovgalyuk On 29.11.2022 04:05, Richard Henderson wrote: Fixes the build with gcc 13: replay/replay-time.c:34:6: error: conflicting types for \ 'replay_read_next_clock' due to enum/integer mismatch; \ have 'void(ReplayClockKind)' [-Werror=enum-int-mismatch] 34 |

Re: [PATCH] MAINTAINERS: Add 9p test client to section "virtio-9p"

2022-11-28 Thread Greg Kurz
On Mon, 28 Nov 2022 18:12:04 +0100 Christian Schoenebeck wrote: > The 9p test cases use a dedicated, lite-weight 9p client implementation > (using virtio transport) under tests/qtest/libqos/ to communicate with > QEMU's 9p server. > > It's already there for a long time. Let's officially assign

Re: [PATCH v2] acpi/tests/avocado/bits: add SPDX license identifiers for bios bits tests

2022-11-28 Thread Ani Sinha
On Tue, Nov 29, 2022 at 10:37 AM Michael S. Tsirkin wrote: > > On Tue, Nov 29, 2022 at 08:02:15AM +0530, Ani Sinha wrote: > > > > > > On Fri, Nov 25, 2022 at 10:11 AM Ani Sinha wrote: > > > > Added the SPDX license identifiers for biosbits tests. > > Also added a comment on each of the

Re: [PATCH v3 7/7] hw/virtio: generalise CHR_EVENT_CLOSED handling

2022-11-28 Thread Michael S. Tsirkin
On Tue, Nov 29, 2022 at 05:18:58AM +, Raphael Norwitz wrote: > > On Nov 28, 2022, at 11:41 AM, Alex Bennée wrote: > > > > ..and use for both virtio-user-blk and virtio-user-gpio. This avoids > > the circular close by deferring shutdown due to disconnection until a > > later point.

Re: [PATCH v3 7/7] hw/virtio: generalise CHR_EVENT_CLOSED handling

2022-11-28 Thread Raphael Norwitz
> On Nov 28, 2022, at 11:41 AM, Alex Bennée wrote: > > ..and use for both virtio-user-blk and virtio-user-gpio. This avoids > the circular close by deferring shutdown due to disconnection until a > later point. virtio-user-blk already had this mechanism in place so The mechanism was originally

Re: [PATCH v2] acpi/tests/avocado/bits: add SPDX license identifiers for bios bits tests

2022-11-28 Thread Michael S. Tsirkin
On Tue, Nov 29, 2022 at 08:02:15AM +0530, Ani Sinha wrote: > > > On Fri, Nov 25, 2022 at 10:11 AM Ani Sinha wrote: > > Added the SPDX license identifiers for biosbits tests. > Also added a comment on each of the test scripts to indicate that they run > from within the biosbits

[PATCH] migration/dirtyrate: Show sample pages only in page-sampling mode

2022-11-28 Thread Zhenzhong Duan
The value of "Sample Pages" is confusing in mode other than page-sampling. See below: (qemu) calc_dirty_rate -b 10 520 (qemu) info dirty_rate Status: measuring Start Time: 11646834 (ms) Sample Pages: 520 (per GB) Period: 10 (sec) Mode: dirty-bitmap Dirty rate: (not ready) (qemu) info dirty_rate

[PATCH for 7.2? V2] vhost: fix vq dirty bitmap syncing when vIOMMU is enabled

2022-11-28 Thread Jason Wang
When vIOMMU is enabled, the vq->used_phys is actually the IOVA not GPA. So we need to translate it to GPA before the syncing otherwise we may hit the following crash since IOVA could be out of the scope of the GPA log size. This could be noted when using virtio-IOMMU with vhost using 1G memory.

Re: [PATCH] vhost: configure all host notifiers in a single MR transaction

2022-11-28 Thread Jason Wang
On Mon, Nov 28, 2022 at 5:08 PM Longpeng (Mike, Cloud Infrastructure Service Product Dept.) wrote: > > > > 在 2022/11/21 12:01, Jason Wang 写道: > > On Fri, Nov 18, 2022 at 10:49 PM Longpeng(Mike) > > wrote: > >> > >> From: Longpeng > >> > >> This allows the vhost device to batch the setup of all

[PATCH v7 9/9] disas/riscv.c: add disasm support for Zc*

2022-11-28 Thread Weiwei Li
Zcmp/Zcmt instructions will override disasm for c.fld*/c.fsd* instructions currently Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Acked-by: Alistair Francis --- disas/riscv.c | 287 +- 1 file changed, 286 insertions(+), 1 deletion(-)

[PATCH v7 7/9] target/riscv: add support for Zcmt extension

2022-11-28 Thread Weiwei Li
Add encode, trans* functions and helper functions support for Zcmt instrutions Add support for jvt csr Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.h| 4 ++

[PATCH v7 4/9] target/riscv: add support for Zcd extension

2022-11-28 Thread Weiwei Li
Separate c_fld/c_fsd from fld/fsd to add additional check for c.fld{sp}/c.fsd{sp} which is useful for zcmp/zcmt to reuse their encodings Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode

[PATCH v7 3/9] target/riscv: add support for Zcf extension

2022-11-28 Thread Weiwei Li
Separate c_flw/c_fsw from flw/fsw to add check for Zcf extension Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode | 8 target/riscv/insn_trans/trans_rvf.c.inc | 18

[PATCH v7 8/9] target/riscv: expose properties for Zc* extension

2022-11-28 Thread Weiwei Li
Expose zca,zcb,zcf,zcd,zcmp,zcmt properties Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 3d06b57416..5f03698b3b 100644

[PATCH v7 6/9] target/riscv: add support for Zcmp extension

2022-11-28 Thread Weiwei Li
Add encode, trans* functions for Zcmp instructions Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode| 18 +++ target/riscv/insn_trans/trans_rvzce.c.inc | 189

[PATCH v7 2/9] target/riscv: add support for Zca extension

2022-11-28 Thread Weiwei Li
Modify the check for C extension to Zca (C implies Zca) Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Reviewed-by: Wilfred Mallawa --- target/riscv/insn_trans/trans_rvi.c.inc | 4 ++-- target/riscv/translate.c

[PATCH v7 0/9] support subsets of code size reduction extension

2022-11-28 Thread Weiwei Li
This patchset implements RISC-V Zc* extension v1.0.0.RC5.7 version instructions. Specification: https://github.com/riscv/riscv-code-size-reduction/tree/main/Zc-specification The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-zce-upstream-v7 To test Zc* implementation,

[PATCH v7 5/9] target/riscv: add support for Zcb extension

2022-11-28 Thread Weiwei Li
Add encode and trans* functions support for Zcb instructions Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn16.decode| 24 ++ target/riscv/insn_trans/trans_rvzce.c.inc | 100

[PATCH v7 1/9] target/riscv: add cfg properties for Zc* extension

2022-11-28 Thread Weiwei Li
Add properties for Zca,Zcb,Zcf,Zcd,Zcmp,Zcmt extension Add check for these properties Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 43 +++ target/riscv/cpu.h

Re: [PATCH v2] acpi/tests/avocado/bits: add SPDX license identifiers for bios bits tests

2022-11-28 Thread Ani Sinha
On Fri, Nov 25, 2022 at 10:11 AM Ani Sinha wrote: > Added the SPDX license identifiers for biosbits tests. > Also added a comment on each of the test scripts to indicate that they run > from within the biosbits environment and hence are not subjected to the > regular > maintenance activities for

Re: [PATCH v6 2/9] target/riscv: add support for Zca extension

2022-11-28 Thread Wilfred Mallawa
On Tue, 2022-11-29 at 09:38 +0800, weiwei wrote: > > On 2022/11/29 07:06, Wilfred Mallawa wrote: >   > > On Mon, 2022-11-28 at 20:29 +0800, Weiwei Li wrote: > >   > > > Modify the check for C extension to Zca (C implies Zca) > > > > > > Signed-off-by: Weiwei Li > > > Signed-off-by: Junqiang

[PATCH] tests/tcg/s390x: Add sam.S

2022-11-28 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/sam.S | 67 + 2 files changed, 68 insertions(+) create mode 100644 tests/tcg/s390x/sam.S diff --git

Re: [PATCH 12/26] target/s390x: Move masking of psw.addr to cpu_get_tb_cpu_state

2022-11-28 Thread Ilya Leoshkevich
On Sat, Nov 05, 2022 at 09:27:07AM +1100, Richard Henderson wrote: > On 11/4/22 00:42, Ilya Leoshkevich wrote: > > On Wed, Oct 05, 2022 at 08:44:07PM -0700, Richard Henderson wrote: > > > Masking after the fact in s390x_tr_init_disas_context > > > provides incorrect information to tb_lookup. > > >

Re: [PATCH v6 2/9] target/riscv: add support for Zca extension

2022-11-28 Thread weiwei
On 2022/11/29 07:06, Wilfred Mallawa wrote: On Mon, 2022-11-28 at 20:29 +0800, Weiwei Li wrote: Modify the check for C extension to Zca (C implies Zca) Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis ---  

[PATCH for-7.2] replay: Fix declaration of replay_read_next_clock

2022-11-28 Thread Richard Henderson
Fixes the build with gcc 13: replay/replay-time.c:34:6: error: conflicting types for \ 'replay_read_next_clock' due to enum/integer mismatch; \ have 'void(ReplayClockKind)' [-Werror=enum-int-mismatch] 34 | void replay_read_next_clock(ReplayClockKind kind) |

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-28 Thread Michael Roth
On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: > From: "Kirill A. Shutemov" > > Introduce 'memfd_restricted' system call with the ability to create > memory areas that are restricted from userspace access through ordinary > MMU operations (e.g. read/write/mmap). The memory content is

Re: [PATCH v9 1/8] mm: Introduce memfd_restricted system call to create restricted user memory

2022-11-28 Thread Michael Roth
On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote: > From: "Kirill A. Shutemov" > > +static struct file *restrictedmem_file_create(struct file *memfd) > +{ > + struct restrictedmem_data *data; > + struct address_space *mapping; > + struct inode *inode; > + struct file

Re: [PATCH for-8.0 v2 12/13] target/s390x: Use tcg_gen_atomic_cmpxchg_i128 for CDSG

2022-11-28 Thread Richard Henderson
On 11/28/22 15:40, Ilya Leoshkevich wrote: On an s390x host we fall back to cpu_exec_step_atomic(), because in the configure test: int main(void) { unsigned __int128 x = 0, y = 0; __sync_val_compare_and_swap_16(, y, x); return 0; } x and y are

[PATCH] tests/tcg/s390x: Add cdsg.c

2022-11-28 Thread Ilya Leoshkevich
Add a simple test to prevent regressions. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 4 ++ tests/tcg/s390x/cdsg.c | 73 + 2 files changed, 77 insertions(+) create mode 100644 tests/tcg/s390x/cdsg.c diff --git

Re: [PATCH for-8.0 v2 13/13] target/s390x: Implement CC_OP_NZ in gen_op_calc_cc

2022-11-28 Thread Ilya Leoshkevich
On Fri, Nov 11, 2022 at 06:08:20PM +1000, Richard Henderson wrote: > This case is trivial to implement inline. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 3 +++ > 1 file changed, 3 insertions(+) Acked-by: Ilya Leoshkevich

Re: [PATCH for-8.0 v2 12/13] target/s390x: Use tcg_gen_atomic_cmpxchg_i128 for CDSG

2022-11-28 Thread Ilya Leoshkevich
On Fri, Nov 11, 2022 at 06:08:19PM +1000, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > target/s390x/helper.h| 2 -- > target/s390x/tcg/mem_helper.c| 52 --- > target/s390x/tcg/translate.c | 60 >

Re: [PATCH v6 2/9] target/riscv: add support for Zca extension

2022-11-28 Thread Wilfred Mallawa
On Mon, 2022-11-28 at 20:29 +0800, Weiwei Li wrote: > Modify the check for C extension to Zca (C implies Zca) > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang > Reviewed-by: Richard Henderson > Reviewed-by: Alistair Francis > --- >  target/riscv/insn_trans/trans_rvi.c.inc | 4 ++--

Re: [PATCH 1/2] qga-win: add logging to Windows event log

2022-11-28 Thread M M
> On 28. 11. 2022., at 21:54, Andrey Drobyshev via > wrote: > > This commit allows QGA to write to Windows event log using Win32 API's > ReportEvent() [1], much like syslog() under *nix guests. > > In order to generate log message definitions we use a very basic message > text file [2], so

Re: [PATCH for-8.0 v2 11/13] target/s390x: Use Int128 for passing float128

2022-11-28 Thread Ilya Leoshkevich
On Fri, Nov 11, 2022 at 06:08:18PM +1000, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > v2: Fix SPEC_in1_x1. > --- > target/s390x/helper.h| 32 ++-- > target/s390x/tcg/fpu_helper.c| 88 ++-- > target/s390x/tcg/translate.c

Re: [PATCH for-8.0 v2 10/13] target/s390x: Use Int128 for returning float128

2022-11-28 Thread Ilya Leoshkevich
On Fri, Nov 11, 2022 at 06:08:17PM +1000, Richard Henderson wrote: > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- > v2: Remove extraneous return_low128. > --- > target/s390x/helper.h| 22 +++--- > target/s390x/tcg/fpu_helper.c| 29

Re: [PATCH for-8.0 v2 04/13] target/s390x: Use a single return for helper_divs32/u32

2022-11-28 Thread Ilya Leoshkevich
On Fri, Nov 11, 2022 at 06:08:11PM +1000, Richard Henderson wrote: > Pack the quotient and remainder into a single uint64_t. > > Signed-off-by: Richard Henderson > --- > v2: Fix operand ordering; use tcg_extr32_i64. > --- > target/s390x/helper.h | 2 +- > target/s390x/tcg/int_helper.c

Re: [qemu-web PATCH v2] Add a blog post about zoned storage emulation

2022-11-28 Thread Stefan Hajnoczi
Cool, thanks for writing up your zoned block emulation work! Reviewed-by: Stefan Hajnoczi

Re: [PATCH v14 4/5] hw/riscv: virt: Add PMU DT node to the device tree

2022-11-28 Thread Conor.Dooley
On 28/11/2022 20:41, Atish Kumar Patra wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On Mon, Nov 28, 2022 at 12:38 PM wrote: >> >> On 28/11/2022 20:16, Atish Kumar Patra wrote: >>> On Thu, Nov 24, 2022 at 5:17 AM Conor Dooley >>>

Re: [PATCH v3 12/17] vfio/migration: Implement VFIO migration protocol v2

2022-11-28 Thread Alex Williamson
On Mon, 28 Nov 2022 16:56:39 -0400 Jason Gunthorpe wrote: > On Mon, Nov 28, 2022 at 01:36:30PM -0700, Alex Williamson wrote: > > On Mon, 28 Nov 2022 15:40:23 -0400 > > Jason Gunthorpe wrote: > > > > > On Mon, Nov 28, 2022 at 11:50:03AM -0700, Alex Williamson wrote: > > > > > > > There's a

[PATCH 1/2] qga-win: add logging to Windows event log

2022-11-28 Thread Andrey Drobyshev via
This commit allows QGA to write to Windows event log using Win32 API's ReportEvent() [1], much like syslog() under *nix guests. In order to generate log message definitions we use a very basic message text file [2], so that every QGA's message gets ID 1. The tools "windmc" and "windres"

[PATCH 2/2] qga: map GLib log levels to system levels

2022-11-28 Thread Andrey Drobyshev via
This patch translates GLib-specific log levels to system ones, so that they may be used by both *nix syslog() (as a "priority" argument) and Windows ReportEvent() (as a "wType" argument). Currently the only codepath to write to "syslog" domain is slog() function. However, this patch allows the

[PATCH 0/2] qga: improve "syslog" domain logging

2022-11-28 Thread Andrey Drobyshev via
These patches extend QGA logging interface, primarily under Windows guests. They enable QGA to write to Windows event log, much like syslog() on *nix. In addition we get rid of hardcoded log level used by ga_log(). Andrey Drobyshev (2): qga-win: add logging to Windows event log qga: map

[PATCH] po: Add Georgian translation

2022-11-28 Thread Temuri Doghonadze
Signed-off-by: Temuri Doghonadze --- po/LINGUAS | 1 + po/ka.po | 95 ++ 2 files changed, 96 insertions(+) create mode 100644 po/ka.po diff --git a/po/LINGUAS b/po/LINGUAS index 9b33a3659f..f3a9b1a802 100644 --- a/po/LINGUAS +++

Re: [PATCH v3 12/17] vfio/migration: Implement VFIO migration protocol v2

2022-11-28 Thread Jason Gunthorpe
On Mon, Nov 28, 2022 at 01:36:30PM -0700, Alex Williamson wrote: > On Mon, 28 Nov 2022 15:40:23 -0400 > Jason Gunthorpe wrote: > > > On Mon, Nov 28, 2022 at 11:50:03AM -0700, Alex Williamson wrote: > > > > > There's a claim here about added complexity that I'm not really seeing. > > > It looks

Re: [PATCH v14 4/5] hw/riscv: virt: Add PMU DT node to the device tree

2022-11-28 Thread Atish Kumar Patra
On Mon, Nov 28, 2022 at 12:38 PM wrote: > > On 28/11/2022 20:16, Atish Kumar Patra wrote: > > On Thu, Nov 24, 2022 at 5:17 AM Conor Dooley > > wrote: > >> > >> On Wed, Aug 24, 2022 at 03:17:00PM -0700, Atish Patra wrote: > >>> Qemu virt machine can support few cache events and cycle/instret

Re: [PATCH v14 4/5] hw/riscv: virt: Add PMU DT node to the device tree

2022-11-28 Thread Conor.Dooley
On 28/11/2022 20:16, Atish Kumar Patra wrote: > On Thu, Nov 24, 2022 at 5:17 AM Conor Dooley > wrote: >> >> On Wed, Aug 24, 2022 at 03:17:00PM -0700, Atish Patra wrote: >>> Qemu virt machine can support few cache events and cycle/instret counters. >>> It also supports counter overflow for these

Re: [PATCH v3 12/17] vfio/migration: Implement VFIO migration protocol v2

2022-11-28 Thread Alex Williamson
On Mon, 28 Nov 2022 15:40:23 -0400 Jason Gunthorpe wrote: > On Mon, Nov 28, 2022 at 11:50:03AM -0700, Alex Williamson wrote: > > > There's a claim here about added complexity that I'm not really seeing. > > It looks like we simply make an ioctl call here and scale our buffer > > based on the

Re: [PATCH 2/2] target/ppc: Check DEXCR on hash{st, chk} instructions

2022-11-28 Thread Daniel Henrique Barboza
On 11/24/22 02:51, Nicholas Miehlbradt wrote: Adds checks to the hashst and hashchk instructions to only execute if enabled by the relevant aspect in the DEXCR and HDEXCR. This behaviour is guarded behind TARGET_PPC64 since Power10 is currently the only implementation which has the DEXCR.

Re: [PATCH 1/2] target/ppc: Implement the DEXCR and HDEXCR

2022-11-28 Thread Daniel Henrique Barboza
On 11/24/22 02:51, Nicholas Miehlbradt wrote: Define the DEXCR and HDEXCR as special purpose registers. Each register occupies two SPR indicies, one which can be read in an unprivileged state and one which can be modified in the appropriate priviliged state, however both indicies refer to

[PATCH-for-7.2 v3 1/5] hw/display/qxl: Have qxl_log_command Return early if no log_cmd handler

2022-11-28 Thread Philippe Mathieu-Daudé
Only 3 command types are logged: no need to call qxl_phys2virt() for the other types. Using different cases will help to pass different structure sizes to qxl_phys2virt() in a pair of commits. Reviewed-by: Marc-André Lureau Signed-off-by: Philippe Mathieu-Daudé --- hw/display/qxl-logger.c | 11

[PATCH-for-8.0 v3 5/5] hw/display/qxl: Assert memory slot fits in preallocated MemoryRegion

2022-11-28 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/display/qxl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/qxl.c b/hw/display/qxl.c index 0b21626aad..6772849dec 100644 --- a/hw/display/qxl.c +++ b/hw/display/qxl.c @@ -1384,6 +1384,7 @@ static int qxl_add_memslot(PCIQXLDevice *d,

[RFC PATCH-for-7.2 v3 4/5] hw/display/qxl: Avoid buffer overrun in qxl_phys2virt (CVE-2022-4144)

2022-11-28 Thread Philippe Mathieu-Daudé
Have qxl_get_check_slot_offset() return false if the requested buffer size does not fit within the slot memory region. Similarly qxl_phys2virt() now returns NULL in such case, and qxl_dirty_one_surface() aborts. This avoids buffer overrun in the host pointer returned by

[RFC PATCH-for-7.2 v3 0/5] hw/display/qxl: Avoid buffer overrun in qxl_phys2virt()

2022-11-28 Thread Philippe Mathieu-Daudé
Since v2: - Do not abort checking guest-provided addresses (Stefan) - Handle chunked QEMUCursor (Gerd) Since v1: - Moved overrun check in qxl_get_check_slot_offset (Marc-André) memory_region_get_ram_ptr() returns a host pointer for a MemoryRegion. Sometimes we do offset calculation using this

[PATCH-for-7.2 v3 2/5] hw/display/qxl: Document qxl_phys2virt()

2022-11-28 Thread Philippe Mathieu-Daudé
Reviewed-by: Marc-André Lureau Signed-off-by: Philippe Mathieu-Daudé --- hw/display/qxl.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/display/qxl.h b/hw/display/qxl.h index e74de9579d..78b3a6c9ba 100644 --- a/hw/display/qxl.h +++ b/hw/display/qxl.h @@ -147,6

[RFC PATCH-for-7.2 v3 3/5] hw/display/qxl: Pass requested buffer size to qxl_phys2virt()

2022-11-28 Thread Philippe Mathieu-Daudé
Currently qxl_phys2virt() doesn't check for buffer overrun. In order to do so in the next commit, pass the buffer size as argument. For QXLCursor in qxl_render_cursor() -> qxl_cursor() we verify the size of the chunked data ahead, checking we can access 'sizeof(QXLCursor) + chunk->data_size'

Re: [PATCH v14 4/5] hw/riscv: virt: Add PMU DT node to the device tree

2022-11-28 Thread Atish Kumar Patra
On Thu, Nov 24, 2022 at 5:17 AM Conor Dooley wrote: > > On Wed, Aug 24, 2022 at 03:17:00PM -0700, Atish Patra wrote: > > Qemu virt machine can support few cache events and cycle/instret counters. > > It also supports counter overflow for these events. > > > > Add a DT node so that OpenSBI/Linux

Re: [PATCH v3 4/7] hw/virtio: ensure a valid host_feature set for virtio-user-gpio

2022-11-28 Thread Alex Bennée
Stefan Hajnoczi writes: > On Mon, 28 Nov 2022 at 11:42, Alex Bennée wrote: >> >> There was a disconnect here because vdev->host_features was set to >> random rubbish. This caused a weird negotiation between the driver and >> device that took no account of the features provided by the backend.

Re: [PATCH v3 12/17] vfio/migration: Implement VFIO migration protocol v2

2022-11-28 Thread Jason Gunthorpe
On Mon, Nov 28, 2022 at 11:50:03AM -0700, Alex Williamson wrote: > There's a claim here about added complexity that I'm not really seeing. > It looks like we simply make an ioctl call here and scale our buffer > based on the minimum of the returned device estimate or our upper > bound. I'm not

Re: [PATCH v2 for-8.0 0/5] scripts/make-release: Decrease size of the release tarballs

2022-11-28 Thread Paolo Bonzini
Il lun 28 nov 2022, 18:04 Daniel P. Berrangé ha scritto: > With my distro maintainer hat I would rather QEMU ship neither the > ROM source, nor the ROM binaries. > Annd since QEMU can finally cross compile its embedded firmware modules, too, it is now easier for distros not to use any prebuilt

Re: [PATCH] hw/arm/boot: set initrd parameters to 64bit in fdt

2022-11-28 Thread Peter Maydell
On Tue, 8 Nov 2022 at 02:35, Schspa Shi wrote: > > We use 32bit value for linux,initrd-[start/end], when we have > loader_start > 4GB, there will be a wrong initrd_start passed > to the kernel, and the kernel will report the following warning > To fix it, we can change it to u64 type. > >

Re: [PATCH v3 12/17] vfio/migration: Implement VFIO migration protocol v2

2022-11-28 Thread Alex Williamson
On Thu, 24 Nov 2022 14:41:00 +0200 Avihai Horon wrote: > On 20/11/2022 11:34, Avihai Horon wrote: > > > > On 17/11/2022 19:38, Alex Williamson wrote: > >> External email: Use caution opening links or attachments > >> > >> > >> On Thu, 17 Nov 2022 19:07:10 +0200 > >> Avihai Horon wrote: >

Re: [PATCH] virtiofsd: Add `sigreturn` to the seccomp whitelist

2022-11-28 Thread Dr. David Alan Gilbert
* Marc Hartmayer (mhart...@linux.ibm.com) wrote: > The virtiofsd currently crashes on s390x. This is because of a > `sigreturn` system call. See audit log below: > > type=SECCOMP msg=audit(1669382477.611:459): auid=4294967295 uid=0 gid=0 > ses=4294967295

Re: [PATCH v3 4/7] hw/virtio: ensure a valid host_feature set for virtio-user-gpio

2022-11-28 Thread Stefan Hajnoczi
On Mon, 28 Nov 2022 at 11:42, Alex Bennée wrote: > > There was a disconnect here because vdev->host_features was set to > random rubbish. This caused a weird negotiation between the driver and > device that took no account of the features provided by the backend. > To fix this we must set

Re: [PATCH for-8.0 1/9] hw/arm: Convert TYPE_ARM_SMMU to 3-phase reset

2022-11-28 Thread Eric Auger
Hi Peter, On 11/9/22 17:14, Peter Maydell wrote: > Convert the TYPE_ARM_SMMU device to 3-phase reset. The legacy method > doesn't do anything that's invalid in the hold phase, so the > conversion is simple and not a behaviour change. > > Note that we must convert this base class before we can

Re: [PATCH for-8.0 2/9] hw/arm: Convert TYPE_ARM_SMMUV3 to 3-phase reset

2022-11-28 Thread Eric Auger
Hi Peter, On 11/9/22 17:14, Peter Maydell wrote: > Convert the TYPE_ARM_SMMUV3 device to 3-phase reset. The legacy > reset method doesn't do anything that's invalid in the hold phase, so > the conversion only requires changing it to a hold phase method, and > using the 3-phase versions of the

Re: [PATCH] MAINTAINERS: Add 9p test client to section "virtio-9p"

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 18:12, Christian Schoenebeck wrote: The 9p test cases use a dedicated, lite-weight 9p client implementation (using virtio transport) under tests/qtest/libqos/ to communicate with QEMU's 9p server. It's already there for a long time. Let's officially assign it to 9p maintainers.

Re: [PATCH v2] vfio/pci: Verify each MSI vector to avoid invalid MSI vectors

2022-11-28 Thread Jason Gunthorpe
On Sat, Nov 26, 2022 at 11:15:14AM +, Marc Zyngier wrote: > > Physical hardware doesn't do this, virtual emulation shouldn't either. > > If you want to fix VFIO, be my guest. My rambling about the sorry > state of this has been in the kernel for 5 years (ed8703a506a8). We are talking about

Re: [RFC PATCH] migration: reduce time of loading non-iterable vmstate

2022-11-28 Thread Peter Xu
On Mon, Nov 28, 2022 at 05:42:43PM +0800, Chuang Xu wrote: > > On 2022/11/25 上午12:40, Peter Xu wrote: > > On Fri, Nov 18, 2022 at 04:36:48PM +0800, Chuang Xu wrote: > > > The duration of loading non-iterable vmstate accounts for a significant > > > portion of downtime (starting with the timestamp

[PATCH] MAINTAINERS: Add 9p test client to section "virtio-9p"

2022-11-28 Thread Christian Schoenebeck
The 9p test cases use a dedicated, lite-weight 9p client implementation (using virtio transport) under tests/qtest/libqos/ to communicate with QEMU's 9p server. It's already there for a long time. Let's officially assign it to 9p maintainers. Signed-off-by: Christian Schoenebeck ---

Re: [PATCH v3 2/7] include/hw: VM state takes precedence in virtio_device_should_start

2022-11-28 Thread Michael S. Tsirkin
On Mon, Nov 28, 2022 at 04:41:00PM +, Alex Bennée wrote: > The VM status should always preempt the device status for these > checks. This ensures the device is in the correct state when we > suspend the VM prior to migrations. This restores the checks to the > order they where in before the

Re: [PATCH v2 for-8.0 0/5] scripts/make-release: Decrease size of the release tarballs

2022-11-28 Thread Daniel P . Berrangé
On Mon, Nov 28, 2022 at 10:25:50AM +0100, Thomas Huth wrote: > Our release tarballs are huge - qemu-7.2.0-rc2.tar.xz has a size of 116 > MiB. If you look at the contents, approx. 80% of the size is used for the > firmware sources that we ship along to provide the sources for the ROM > binaries.

Re: [PATCH v2 for-8.0 5/5] scripts/make-release: Move roms into separate tarball

2022-11-28 Thread Alex Bennée
Thomas Huth writes: > Our current release tarballs are huge and caused already some trouble > with the server traffic in the past. However, the biggest chunk (~80%) > of the tarball is caused by the firmware sources - which most users > don't need anyway (assuming that they just want to

Re: [PATCH v2 for-8.0 4/5] roms: Add a README file with some basic information

2022-11-28 Thread Alex Bennée
Thomas Huth writes: > We're going to ship the contents of the "roms" folder as a separate > tarball, so we should have at least a short README in this folder > for this. > > Signed-off-by: Thomas Huth Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v2 for-8.0 3/5] scripts/make-release: Remove CI yaml and more git files from the tarball

2022-11-28 Thread Alex Bennée
Thomas Huth writes: > These files are of no use in a normal tarball and thus should not > be included here. > > Signed-off-by: Thomas Huth > --- > scripts/make-release | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/scripts/make-release b/scripts/make-release >

Re: [PATCH v2 for-8.0 0/5] scripts/make-release: Decrease size of the release tarballs

2022-11-28 Thread Stefan Hajnoczi
This is great. It will reduce qemu.org's network bandwidth consumption and make QEMU release tarballs nicer to use due to reduced size. I left a comment because I don't like patching the roms/ directory, but if I'm the only one who doesn't like it then feel free to keep that approach.

Re: [PATCH v2 for-8.0 2/5] scripts/make-release: Only clone single branches to speed up the script

2022-11-28 Thread Alex Bennée
Thomas Huth writes: > Using --single-branch and --depth 1 here helps to speed up the process > a little bit and helps to save some networking bandwidth. > > Signed-off-by: Thomas Huth Reviewed-by: Alex Bennée -- Alex Bennée

Re: [RFC PATCH-for-7.2 3/5] hw/display/qxl: Pass requested buffer size to qxl_phys2virt()

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 17:29, Philippe Mathieu-Daudé wrote: On 28/11/22 17:18, Philippe Mathieu-Daudé wrote: On 28/11/22 16:41, Philippe Mathieu-Daudé wrote: On 28/11/22 16:08, Gerd Hoffmann wrote: Also at least one code path (processing SPICE_CURSOR_TYPE_MONO in qxl_cursor) goes access chunk.data[]

Re: [PATCH v2 for-8.0 5/5] scripts/make-release: Move roms into separate tarball

2022-11-28 Thread Stefan Hajnoczi
On Mon, 28 Nov 2022 at 04:28, Thomas Huth wrote: > > Our current release tarballs are huge and caused already some trouble > with the server traffic in the past. However, the biggest chunk (~80%) > of the tarball is caused by the firmware sources - which most users > don't need anyway (assuming

Re: [PATCH v2 for-8.0 1/5] scripts/make-release: Add a simple help text for the script

2022-11-28 Thread Alex Bennée
Thomas Huth writes: > Print a simple help text if the script has been called with the > wrong amount of parameters. > > Signed-off-by: Thomas Huth Reviewed-by: Alex Bennée -- Alex Bennée

[PATCH v3 1/7] include/hw: attempt to document VirtIO feature variables

2022-11-28 Thread Alex Bennée
We have a bunch of variables associated with the device and the vhost backend which are used inconsistently throughout the code base. Lets start trying to bring some order by agreeing what each variable is for. Signed-off-by: Alex Bennée Cc: Stefano Garzarella Cc: "Michael S. Tsirkin" Cc:

[PATCH v3 2/7] include/hw: VM state takes precedence in virtio_device_should_start

2022-11-28 Thread Alex Bennée
The VM status should always preempt the device status for these checks. This ensures the device is in the correct state when we suspend the VM prior to migrations. This restores the checks to the order they where in before the refactoring moved things around. While we are at it lets improve our

[PATCH v3 3/7] tests/qtests: override "force-legacy" for gpio virtio-mmio tests

2022-11-28 Thread Alex Bennée
The GPIO device is a VIRTIO_F_VERSION_1 devices but running with a legacy MMIO interface we miss out that feature bit causing confusion. For the GPIO test force the mmio bus to support non-legacy so we can properly test it. Signed-off-by: Alex Bennée Resolves:

[PATCH v3 6/7] hw/virtio: add started_vu status field to vhost-user-gpio

2022-11-28 Thread Alex Bennée
As per the fix to vhost-user-blk in f5b22d06fb (vhost: recheck dev state in the vhost_migration_log routine) we really should track the connection and starting separately. Signed-off-by: Alex Bennée --- include/hw/virtio/vhost-user-gpio.h | 10 ++ hw/virtio/vhost-user-gpio.c |

[PATCH v3 4/7] hw/virtio: ensure a valid host_feature set for virtio-user-gpio

2022-11-28 Thread Alex Bennée
There was a disconnect here because vdev->host_features was set to random rubbish. This caused a weird negotiation between the driver and device that took no account of the features provided by the backend. To fix this we must set vdev->host_features once we have initialised the vhost backend.

[PATCH v3 5/7] vhost: enable vrings in vhost_dev_start() for vhost-user devices

2022-11-28 Thread Alex Bennée
From: Stefano Garzarella Commit 02b61f38d3 ("hw/virtio: incorporate backend features in features") properly negotiates VHOST_USER_F_PROTOCOL_FEATURES with the vhost-user backend, but we forgot to enable vrings as specified in docs/interop/vhost-user.rst: If

[PATCH v3 7/7] hw/virtio: generalise CHR_EVENT_CLOSED handling

2022-11-28 Thread Alex Bennée
..and use for both virtio-user-blk and virtio-user-gpio. This avoids the circular close by deferring shutdown due to disconnection until a later point. virtio-user-blk already had this mechanism in place so generalise it as a vhost-user helper function and use for both blk and gpio devices. While

[PATCH for 7.2-rc3 v3 0/7] fix vhost-user issues with CI

2022-11-28 Thread Alex Bennée
Hi, Hopefully this is the final iteration to fix the vhost-user issues that are currently plaguing the release. I've prevented the circular closing for the vhost_dev structure by generalising the solution used by virtio-user-blk which punts the close off to an aio instance. The memory leak from:

Re: [RFC PATCH-for-7.2 3/5] hw/display/qxl: Pass requested buffer size to qxl_phys2virt()

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 17:18, Philippe Mathieu-Daudé wrote: On 28/11/22 16:41, Philippe Mathieu-Daudé wrote: On 28/11/22 16:08, Gerd Hoffmann wrote: Also at least one code path (processing SPICE_CURSOR_TYPE_MONO in qxl_cursor) goes access chunk.data[] without calling qxl_unpack_chunks(), that needs

Re: [PATCH] tests/qtest/migration-test: Fix unlink error and memory leaks

2022-11-28 Thread Juan Quintela
Daniel P. Berrangé wrote: > On Fri, Nov 25, 2022 at 09:30:54AM +0100, Thomas Huth wrote: >> When running the migration test compiled with Clang from Fedora 37 >> and sanitizers enabled, there is an error complaining about unlink(): >> >> ../tests/qtest/migration-test.c:1072:12: runtime error:

Re: [RFC PATCH-for-7.2 3/5] hw/display/qxl: Pass requested buffer size to qxl_phys2virt()

2022-11-28 Thread Philippe Mathieu-Daudé
On 28/11/22 16:41, Philippe Mathieu-Daudé wrote: On 28/11/22 16:08, Gerd Hoffmann wrote: Also at least one code path (processing SPICE_CURSOR_TYPE_MONO in qxl_cursor) goes access chunk.data[] without calling qxl_unpack_chunks(), that needs additional verification too (or switch it to call

Re: [PATCH v3 3/3] ppc4xx_sdram: Simplify sdram_ddr_size() to return directly

2022-11-28 Thread Juan Quintela
Markus Armbruster wrote: > Suggested-by: BALATON Zoltan > Signed-off-by: Markus Armbruster > Reviewed-by: BALATON Zoltan > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela

Re: [PATCH v3 2/3] block/vmdk: Simplify vmdk_co_create() to return directly

2022-11-28 Thread Juan Quintela
Markus Armbruster wrote: > Cc: Fam Zheng > Cc: Kevin Wolf > Cc: Hanna Reitz > Cc: qemu-bl...@nongnu.org > Signed-off-by: Markus Armbruster > Reviewed-by: Peter Maydell > Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela goto, uninitialized variable at declaraton and can use

  1   2   3   >