Re: [PATCH] tests/qtest/libqos/e1000e: Refer common PCI ID definitions

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 02:50, Akihiko Odaki wrote: This is yet another minor cleanup to ease understanding and future refactoring of the tests. Signed-off-by: Akihiko Odaki --- tests/qtest/libqos/e1000e.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/qtest/libqos/e1000e.

Re: [PATCH 3/3] vdpa: Expose VIRTIO_NET_F_STATUS unconditionally

2022-11-03 Thread Eugenio Perez Martin
On Thu, Nov 3, 2022 at 4:21 AM Jason Wang wrote: > > On Wed, Nov 2, 2022 at 7:19 PM Eugenio Perez Martin > wrote: > > > > On Tue, Nov 1, 2022 at 9:10 AM Jason Wang wrote: > > > > > > On Fri, Oct 28, 2022 at 5:30 PM Eugenio Perez Martin > > > wrote: > > > > > > > > On Fri, Oct 28, 2022 at 3:59

Re: [PATCH] i386/cpu: Adjust cpuid addresable id count to match the spec

2022-11-03 Thread Ilya Oleinik
I'm not aware of any bug reports. L1 cache is typically shared between logical threads, so it seemed reasonable to correct this. On Fri, Oct 28, 2022 at 9:54 AM Wang, Lei wrote: > > On 10/10/2022 10:49 AM, Ilya Oleinik wrote: > > For EBX bits 23 - 16 in CPUID[01] Intel's manual states: > > " > >

[PATCH] tests/qtest/libqos/e1000e: Use E1000_STATUS_ASDV_1000

2022-11-03 Thread Akihiko Odaki
Nemonics E1000_STATUS_LAN_INIT_DONE and E1000_STATUS_ASDV_1000 have the same value, and E1000_STATUS_ASDV_1000 should be used here because E1000_STATUS_ASDV_1000 represents the auto-detected speed tested here while E1000_STATUS_LAN_INIT_DONE is a value used for a different purpose with a variant of

[PATCH] Add missing include statement for global xml_builtin

2022-11-03 Thread Stefan Weil via
This fixes some compiler warnings with compiler flag -Wmissing-variable-declarations (tested with clang): aarch64_be-linux-user-gdbstub-xml.c:564:19: warning: no previous extern declaration for non-static variable 'xml_builtin' [-Wmissing-variable-declarations] aarch64-linux-user-gdbstub

[PULL 2/4] linux-user: Add close_range() syscall

2022-11-03 Thread Laurent Vivier
From: Helge Deller Signed-off-by: Helge Deller Reviewed-by: Richard Henderson Message-Id: Signed-off-by: Laurent Vivier --- linux-user/strace.list | 3 +++ linux-user/syscall.c | 19 +++ 2 files changed, 22 insertions(+) diff --git a/linux-user/strace.list b/linux-user/st

[PULL 0/4] Linux user for 7.2 patches

2022-11-03 Thread Laurent Vivier
x-user-for-7.2-pull-request for you to fetch changes up to 16c81dd563b94e9392a578ccf5aa762d01e8f165: linux-user: always translate cmsg when recvmsg (2022-11-02 17:29:17 +0100) linux-user pull request 20221103 Fix recvmsg Fix hppa

[PULL 4/4] linux-user: always translate cmsg when recvmsg

2022-11-03 Thread Laurent Vivier
From: Icenowy Zheng It's possible that a message contains both normal payload and ancillary data in the same message, and even if no ancillary data is available this information should be passed to the target, otherwise the target cmsghdr will be left uninitialized and the target is going to acce

[PULL 1/4] linux-user/hppa: Detect glibc ABORT_INSTRUCTION and EXCP_BREAK handler

2022-11-03 Thread Laurent Vivier
From: Helge Deller The glibc on the hppa platform uses the "iitlbp %r0,(%sr0, %r0)" assembler instruction as ABORT_INSTRUCTION. If this (in userspace context) illegal assembler statement is found, dump the registers and report the failure to userspace the same way as the Linux kernel on physical

[PULL 3/4] linux-user: Add strace output for timer_settime64() syscall

2022-11-03 Thread Laurent Vivier
From: Helge Deller Add missing timer_settime64() strace output and specify format for timer_settime(). Signed-off-by: Helge Deller Message-Id: Signed-off-by: Laurent Vivier --- linux-user/strace.list | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.l

Re: [PATCH for 7.2] Fix broken configure with -Wunused-parameter

2022-11-03 Thread Daniel P . Berrangé
On Wed, Nov 02, 2022 at 09:22:58PM +0100, Stefan Weil via wrote: > The configure script fails because it tries to compile small C programs > with a main function which is declared with arguments argc and argv > although those arguments are unused. > > Running `configure -extra-cflags=-Wunused-para

Re: [PATCH for 7.2] Fix broken configure with -Wunused-parameter

2022-11-03 Thread Stefan Weil via
Am 03.11.22 um 09:58 schrieb Daniel P. Berrangé: On Wed, Nov 02, 2022 at 09:22:58PM +0100, Stefan Weil via wrote: The configure script fails because it tries to compile small C programs with a main function which is declared with arguments argc and argv although those arguments are unused. Run

Re: [PATCH] migration: check magic value for deciding the mapping of channels

2022-11-03 Thread manish.mishra
On 01/11/22 9:15 pm, Daniel P. Berrangé wrote: On Tue, Nov 01, 2022 at 09:10:14PM +0530, manish.mishra wrote: On 01/11/22 8:21 pm, Daniel P. Berrangé wrote: On Tue, Nov 01, 2022 at 02:30:29PM +, manish.mishra wrote: Current logic assumes that channel connections on the destination side a

Re: [PATCH] migration: check magic value for deciding the mapping of channels

2022-11-03 Thread Daniel P . Berrangé
On Thu, Nov 03, 2022 at 02:50:25PM +0530, manish.mishra wrote: > > On 01/11/22 9:15 pm, Daniel P. Berrangé wrote: > > On Tue, Nov 01, 2022 at 09:10:14PM +0530, manish.mishra wrote: > > > On 01/11/22 8:21 pm, Daniel P. Berrangé wrote: > > > > On Tue, Nov 01, 2022 at 02:30:29PM +, manish.mishra

Re: [PATCH v14 16/17] tests/qtest: netdev: test stream and dgram backends

2022-11-03 Thread Laurent Vivier
On 10/28/22 07:04, Jason Wang wrote: 在 2022/10/21 17:09, Laurent Vivier 写道: Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- I got this: 63/63 ERROR:../tests/qtest/netdev-socket.c:139:test_stream_inet_ipv6: assertion failed (resp == expect): ("st0: index=0,type=stream,conne

Re: [PATCH] tests/unit/test-io-channel-command: Silence GCC error "maybe-uninitialized"

2022-11-03 Thread Laurent Vivier
Le 02/11/2022 à 21:24, Alex Bennée a écrit : Bernhard Beschow writes: GCC issues a false positive warning, resulting in build failure with -Werror: In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, from /usr/include/glib-2.0/glib/gtypes.h:34,

Re: [PATCH 1/2] file-posix: fix Linux alignment probing when EIO is returned

2022-11-03 Thread Kevin Wolf
Am 02.11.2022 um 03:49 hat Eric Biggers geschrieben: > On Tue, Nov 01, 2022 at 07:27:16PM -0700, Eric Biggers wrote: > > On Tue, Nov 01, 2022 at 03:00:30PM -0400, Stefan Hajnoczi wrote: > > > Linux dm-crypt returns errno EIO from unaligned O_DIRECT pread(2) calls. > > > > Citation needed. For dir

[PATCH] tests/qtest/e1000e-test: Use e1000_regs.h

2022-11-03 Thread Akihiko Odaki
The register definitions in tests/qtest/e1000e-test.c had names different from hw/net/e1000_regs.h, which made it hard to understand what test codes corresponds to the implementation. Use hw/net/e1000_regs.h from tests/qtest/libqos/e1000e.c to remove these duplications. Signed-off-by: Akihiko Odak

Re: [PATCH v7 7/7] hw/arm/virt: Add properties to disable high memory regions

2022-11-03 Thread Eric Auger
Hi Gavin, On 10/30/22 00:43, Gavin Shan wrote: > The 3 high memory regions are usually enabled by default, but they may > be not used. For example, VIRT_HIGH_GIC_REDIST2 isn't needed by GICv2. > This leads to waste in the PA space. > > Add properties ("highmem-redists", "highmem-ecam", "highmem-mmi

[PATCH] tests/unit: simpler variable sequence for test-io-channel

2022-11-03 Thread Alex Bennée
This avoids some compilers complaining about a potentially un-initialised [src|dst]argv. In retrospect using GString was overkill for what we are constructing. Signed-off-by: Alex Bennée --- tests/unit/test-io-channel-command.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-

Re: [PATCH] tests/unit: simpler variable sequence for test-io-channel

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 11:23, Alex Bennée wrote: This avoids some compilers complaining about a potentially un-initialised [src|dst]argv. In retrospect using GString was overkill for what we are constructing. Signed-off-by: Alex Bennée --- tests/unit/test-io-channel-command.c | 14 -- 1 file

Re: [PATCH] tests/unit: simpler variable sequence for test-io-channel

2022-11-03 Thread Laurent Vivier
Le 03/11/2022 à 11:23, Alex Bennée a écrit : This avoids some compilers complaining about a potentially un-initialised [src|dst]argv. In retrospect using GString was overkill for what we are constructing. Signed-off-by: Alex Bennée --- tests/unit/test-io-channel-command.c | 14 --

Re: Issue with VDUSE (QSD vduse-blk export) and vhost-vdpa

2022-11-03 Thread Stefano Garzarella
On Wed, Oct 26, 2022 at 12:17 PM Stefano Garzarella wrote: > > On Wed, Oct 26, 2022 at 05:39:23PM +0800, Yongji Xie wrote: > >Hi Stefano, > > > >On Wed, Oct 26, 2022 at 5:12 PM Stefano Garzarella > >wrote: > >> > >> Hi Xie, > >> I was testing libblkio [1] with QSD vduse-blk export and had some >

[PATCH v3 0/4] compare machine type compat_props

2022-11-03 Thread Maksim Davydov
This script is necessary to choose the best machine type in the appropriate cases. Also we have to check compat_props of the old MT after changes to be sure that they haven't broken old the MT. For example, pc_compat_3_1 of pc-q35-3.1 has Icelake-Client which was removed in March. v3 -> v2: * simp

[PATCH v3 2/4] python/qmp: increase read buffer size

2022-11-03 Thread Maksim Davydov
After modification of "query-machines" command the buffer size should be more than 452kB to contain output with compat-props. Signed-off-by: Maksim Davydov Reviewed-by: Vladimir Sementsov-Ogievskiy --- python/qemu/qmp/qmp_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v3 4/4] scripts: add script to compare compatible properties

2022-11-03 Thread Maksim Davydov
This script run QEMU to obtain compat_props of machines and default values of different types and produce appropriate table. This table can be used to compare machine types to choose the most suitable machine. Also this table in json or csv format should be used to check that new machine doesn't af

[PATCH v3 1/4] qom: add default value

2022-11-03 Thread Maksim Davydov
qmp_qom_list_properties can print default values if they are available as qmp_device_list_properties does, because both of them use the ObjectPropertyInfo structure with default_value field. This can be useful when working with "not device" types. Signed-off-by: Maksim Davydov Reviewed-by: Vladim

[PATCH v3 3/4] qmp: add dump machine type compatible properties

2022-11-03 Thread Maksim Davydov
To control that creating new machine type doesn't affect the previous types (their compat_props) and to check complex compat_props inheritance we need qmp command to print machine type compatible properties. This patch adds the ability to get list of all the compat_props of the corresponding suppor

Re: [PATCH 01/26] target/s390x: Use tcg_constant_* in local contexts

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:43:56PM -0700, Richard Henderson wrote: > Replace tcg_const_* with tcg_constant_* in contexts > where the free to remove is nearby. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 408 +-

[PATCH] qom.json: default the prealloc-threads to smp-cpus

2022-11-03 Thread Zhenyu Zhang
Since the amount of prealloc-threads to smp-cpus is defaulted in hostmem, so sync this information. Signed-off-by: Zhenyu Zhang --- qapi/qom.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/qom.json b/qapi/qom.json index 87fcad2423..ac4cd213a7 100644 --- a/qapi/qom.j

Re: [PATCH 02/26] target/s390x: Use tcg_constant_* for DisasCompare

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:43:57PM -0700, Richard Henderson wrote: > The a and b fields are not modified by the consumer, > and while we need not free a constant, tcg will quietly > ignore such frees, so free_compare need not be changed. > > Signed-off-by: Richard Henderson > --- > target/s390x/

Re: [PATCH 03/26] target/s390x: Use tcg_constant_i32 for fpinst_extract_m34

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:43:58PM -0700, Richard Henderson wrote: > Return a constant or NULL, which means the free may be > removed from all callers of fpinst_extract_m34. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 26 +- > 1 file change

Re: [PATCH] qom.json: default the prealloc-threads to smp-cpus

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 11:47, Zhenyu Zhang wrote: Since the amount of prealloc-threads to smp-cpus is defaulted in hostmem, so sync this information. Signed-off-by: Zhenyu Zhang --- qapi/qom.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/qom.json b/qapi/qom.json index 87fc

Re: [PATCH 04/26] target/s390x: Use tcg_constant_* in translate_vx.c.inc

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:43:59PM -0700, Richard Henderson wrote: > In most cases, this is a simple local allocate and free > replaced by tcg_constant_*. In three cases, a variable > temp was initialized with a constant value -- reorg to > localize the constant. > > Signed-off-by: Richard Hender

Re: [PATCH] tests/qtest/e1000e-test: Use e1000_regs.h

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 10:54, Akihiko Odaki wrote: The register definitions in tests/qtest/e1000e-test.c had names different from hw/net/e1000_regs.h, which made it hard to understand what test codes corresponds to the implementation. Use hw/net/e1000_regs.h from tests/qtest/libqos/e1000e.c to remove these d

Re: [PATCH v14 16/17] tests/qtest: netdev: test stream and dgram backends

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 10:33, Laurent Vivier wrote: On 10/28/22 07:04, Jason Wang wrote: 在 2022/10/21 17:09, Laurent Vivier 写道: Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- I got this: 63/63 ERROR:../tests/qtest/netdev-socket.c:139:test_stream_inet_ipv6: assertion failed (resp ==

Re: [PATCH] tests/qtest/libqos/e1000e: Use E1000_STATUS_ASDV_1000

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 09:34, Akihiko Odaki wrote: Nemonics E1000_STATUS_LAN_INIT_DONE and E1000_STATUS_ASDV_1000 have the same value, and E1000_STATUS_ASDV_1000 should be used here because E1000_STATUS_ASDV_1000 represents the auto-detected speed tested here while E1000_STATUS_LAN_INIT_DONE is a value used

Re: [PATCH 05/26] target/s390x: Change help_goto_direct to work on displacements

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:00PM -0700, Richard Henderson wrote: > In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 11 +++ > 1 file changed, 7 insertions(+), 4 deletions(-) Reviewed-by:

Re: [PATCH 08/26] target/s390x: Use gen_psw_addr_disp in pc_to_link_info

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:03PM -0700, Richard Henderson wrote: > This is slightly more complicated that a straight displacement > for 31 and 24-bit modes. Dont bother with a cant-happen assert. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 21 --

Re: [PATCH v14 16/17] tests/qtest: netdev: test stream and dgram backends

2022-11-03 Thread Laurent Vivier
On 11/3/22 12:07, Philippe Mathieu-Daudé wrote: On 3/11/22 10:33, Laurent Vivier wrote: On 10/28/22 07:04, Jason Wang wrote: 在 2022/10/21 17:09, Laurent Vivier 写道: Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- I got this: 63/63 ERROR:../tests/qtest/netdev-socket.c:139:t

Re: [PATCH] tests/unit: simpler variable sequence for test-io-channel

2022-11-03 Thread Alex Bennée
Laurent Vivier writes: > Le 03/11/2022 à 11:23, Alex Bennée a écrit : >> This avoids some compilers complaining about a potentially >> un-initialised [src|dst]argv. In retrospect using GString was overkill >> for what we are constructing. >> Signed-off-by: Alex Bennée >> --- >> tests/unit/te

Re: [PATCH 06/26] target/s390x: Introduce gen_psw_addr_disp

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:01PM -0700, Richard Henderson wrote: > In preparation for TARGET_TB_PCREL, reduce reliance on absolute values. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 69 > 1 file changed, 46 insertions(+), 23

Re: [PATCH 07/26] target/s390x: Remove pc argument to pc_to_link_into

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:02PM -0700, Richard Henderson wrote: > All callers pass s->pc_tmp. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) Reviewed-by: Ilya

Re: [PATCH] Add missing include statement for global xml_builtin

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 09:38, Stefan Weil via wrote: This fixes some compiler warnings with compiler flag -Wmissing-variable-declarations (tested with clang): aarch64_be-linux-user-gdbstub-xml.c:564:19: warning: no previous extern declaration for non-static variable 'xml_builtin' [-Wmissing-variable-

Re: [PATCH for 7.2] Fix broken configure with -Wunused-parameter

2022-11-03 Thread Peter Maydell
On Wed, 2 Nov 2022 at 20:24, Stefan Weil via wrote: > > The configure script fails because it tries to compile small C programs > with a main function which is declared with arguments argc and argv > although those arguments are unused. > > Running `configure -extra-cflags=-Wunused-parameter` trig

Re: [PATCH v3] target/i386: Fix calculation of LOCK NEG eflags

2022-11-03 Thread Qi Hu
ping On 2022/10/24 16:41, Qi Hu wrote: In sequence: --- lock negl -0x14(%rbp) pushf pop%rax --- %rax will obtain the wrong value becasue the "lock neg" calculates the wrong eflags. The "s->T0" is updated by the wrong value. You can use this to do some test: --- #include int main() { _

Re: [PATCH for 7.2] Fix broken configure with -Wunused-parameter

2022-11-03 Thread Stefan Weil via
Am 03.11.22 um 12:48 schrieb Peter Maydell: On Wed, 2 Nov 2022 at 20:24, Stefan Weil via wrote: The configure script fails because it tries to compile small C programs with a main function which is declared with arguments argc and argv although those arguments are unused. Running `configure -

Re: [PATCH v3 3/4] hw/nvme: add iothread support

2022-11-03 Thread Klaus Jensen
On Nov 3 09:51, Jinhao Fan wrote: > at 7:13 PM, Klaus Jensen wrote: > > > Otherwise, it all looks fine. I'm still seeing the weird slowdown when > > an iothread is enabled. I have yet to figure out why that is... But it > > scales! :) > > How much slowdown do you observe on your machine? > I

Re: [PATCH v3 4/4] hw/nvme: add polling support

2022-11-03 Thread Klaus Jensen
On Nov 3 10:18, Jinhao Fan wrote: > at 7:10 PM, Klaus Jensen wrote: > > > This doesn't do what you expect it to. By not updaring the eventidx it > > will fall behind the actual head, causing the host to think that the > > device is not processing events (but it is!), resulting in doorbell > > ri

Re: [PULL v2 00/82] pci,pc,virtio: features, tests, fixes, cleanups

2022-11-03 Thread Michael S. Tsirkin
On Wed, Nov 02, 2022 at 03:47:43PM -0400, Stefan Hajnoczi wrote: > On Wed, Nov 02, 2022 at 12:02:14PM -0400, Michael S. Tsirkin wrote: > > Changes from v1: > > > > Applied and squashed fixes by Igor, Lei He, Hesham Almatary for > > bugs that tripped up the pipeline. > > Updated expected files for

Re: [PATCH v9 0/8] KVM: mm: fd-based approach for supporting KVM

2022-11-03 Thread Vishal Annapurve
On Tue, Oct 25, 2022 at 8:48 PM Chao Peng wrote: > > This patch series implements KVM guest private memory for confidential > computing scenarios like Intel TDX[1]. If a TDX host accesses > TDX-protected guest memory, machine check can happen which can further > crash the running host system, this

Re: [PATCH v4 0/6] Only generate cluster node in PPTT when specified

2022-11-03 Thread Yicong Yang via
On 2022/11/2 16:17, Michael S. Tsirkin wrote: > On Tue, Nov 01, 2022 at 03:10:42PM +0800, Yicong Yang wrote: >> From: Yicong Yang >> >> This series mainly change the policy for building a cluster topology node >> in PPTT. Previously we'll always build a cluster node in PPTT without >> asking the u

[PATCH v2] target/loongarch: Fix emulation of float-point disable exception

2022-11-03 Thread Rui Wang
We need to emulate it to generate a floating point disable exception when CSR.EUEN.FPE is zero. Signed-off-by: Rui Wang --- target/loongarch/cpu.c| 2 ++ target/loongarch/cpu.h| 13 +++ .../loongarch/insn_trans/trans_farith.c.inc | 30 ++

[PULL 7/7] target/loongarch: Fix raise_mmu_exception() set wrong exception_index

2022-11-03 Thread Song Gao
When the address is invalid address, We should set exception_index according to MMUAccessType, and EXCCODE_ADEF need't update badinstr. Otherwise, The system enters an infinite loop. e.g: run test.c on system mode test.c: #include void (*func)(int *); int main() { int i =

[PULL 0/7] loongarch-to-apply queue

2022-11-03 Thread Song Gao
The following changes since commit a11f65ec1b8adcb012b89c92819cbda4dc25aaf1: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2022-11-01 13:49:33 -0400) are available in the Git repository at: https://gitlab.com/gaosong/qemu.git tags/pull-loongarc

[PULL 3/7] hw/loongarch: Load FDT table into dram memory space

2022-11-03 Thread Song Gao
From: Xiaojuan Yang Load FDT table into dram memory space, and the addr is 2 MiB. Since lowmem region starts from 0, FDT base address is located at 2 MiB to avoid NULL pointer access. Signed-off-by: Xiaojuan Yang Acked-by: Song Gao Message-Id: <20221028014007.2718352-2-yangxiaoj...@loongson.cn

[PULL 1/7] hw/intc: Convert the memops to with_attrs in LoongArch extioi

2022-11-03 Thread Song Gao
From: Xiaojuan Yang Converting the MemoryRegionOps read/write handlers to with_attrs in LoongArch extioi emulation. Signed-off-by: Xiaojuan Yang Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221021015307.2570844-2-yangxiaoj...@loongson.cn> Signed-off-by: So

[PULL 4/7] hw/loongarch: Improve fdt for LoongArch virt machine

2022-11-03 Thread Song Gao
From: Xiaojuan Yang Add new items into LoongArch FDT, including rtc and uart info. Signed-off-by: Xiaojuan Yang Reviewed-by: Song Gao Message-Id: <20221028014007.2718352-3-yangxiaoj...@loongson.cn> Signed-off-by: Song Gao --- hw/loongarch/virt.c| 31 +++ i

[PULL 6/7] target/loongarch: Add exception subcode

2022-11-03 Thread Song Gao
We need subcodes to distinguish the same excode cs->exception_indexs, such as EXCCODE_ADEF/EXCCODE_ADEM. Signed-off-by: Song Gao Reviewed-by: Richard Henderson Message-ID: <20221101073210.3934280-1-gaos...@loongson.cn> --- target/loongarch/cpu.c | 7 +++-- target/loongarch/cpu.h | 58 +

[PULL 5/7] hw/loongarch: Add TPM device for LoongArch virt machine

2022-11-03 Thread Song Gao
From: Xiaojuan Yang Add TPM device for LoongArch virt machine, including establish TPM acpi info and add TYPE_TPM_TIS_SYSBUS to dynamic_sysbus_devices list. Signed-off-by: Xiaojuan Yang Reviewed-by: Song Gao Message-Id: <20221028014007.2718352-4-yangxiaoj...@loongson.cn> Signed-off-by: Song Ga

[PULL 2/7] hw/intc: Fix LoongArch extioi coreisr accessing

2022-11-03 Thread Song Gao
From: Xiaojuan Yang 1. When cpu read or write extioi COREISR reg, it should access the reg belonged to itself, so the cpu index of 's->coreisr' is current cpu number. Using MemTxAttrs' requester_id to get the cpu index. 2. it need not to mask 0x1f when calculate the coreisr array index. Signed-o

Re: [PATCH v6 0/3] ppc/e500: Add support for eSDHC

2022-11-03 Thread BALATON Zoltan
On Wed, 2 Nov 2022, Daniel Henrique Barboza wrote: On 11/1/22 19:29, Philippe Mathieu-Daudé wrote: This is a respin of Bernhard's v4 with Freescale eSDHC implemented as an 'UNIMP' region. See v4 cover here: https://lore.kernel.org/qemu-devel/20221018210146.193159-1-shen...@gmail.com/ Since v5:

Re: [PATCH 09/26] target/s390x: Use gen_psw_addr_disp in save_link_info

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:04PM -0700, Richard Henderson wrote: > Trivial but non-mechanical conversion away from pc_tmp. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions

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

2022-11-03 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/bal.S | 24 2 files changed, 25 insertions(+) create mode 100644 tests/tcg/s390x/bal.S diff --git a/tests/tcg/

Re: [PATCH 10/26] target/s390x: Use gen_psw_addr_disp in op_sam

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:05PM -0700, Richard Henderson wrote: > Complicated because we may now require a runtime jump. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 40 +--- > 1 file changed, 28 insertions(+), 12 deletions(-) Re

Re: [PATCH v3 3/4] hw/nvme: add iothread support

2022-11-03 Thread Jinhao Fan
On 11/3/2022 8:11 PM, Klaus Jensen wrote: I'll rerun some experiments and get back to you 😄 Thanks Klaus. I'll also run some experments on my machine, to see if the reenabling cqe batching patch solves this problem.

Re: [PATCH 11/26] target/s390x: Use ilen instead in branches

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:06PM -0700, Richard Henderson wrote: > Remove the remaining uses of pc_tmp, and remove the variable. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 13 +++-- > 1 file changed, 3 insertions(+), 10 deletions(-) Reviewed-by: Ilya L

Re: [PATCH v3] target/arm: honor HCR_E2H and HCR_TGE in ats_write64()

2022-11-03 Thread Peter Maydell
On Wed, 2 Nov 2022 at 05:33, Richard Henderson wrote: > > On 11/1/22 17:42, Ake Koomsin wrote: > > We need to check HCR_E2H and HCR_TGE to select the right MMU index for > > the correct translation regime. > > > > To check for EL2&0 translation regime: > > - For S1E0*, S1E1* and S12E* ops, check b

Re: [PATCH v3 4/4] hw/nvme: add polling support

2022-11-03 Thread Jinhao Fan
On 11/3/2022 8:10 PM, Klaus Jensen wrote: I agree that the spec is a little unclear on this point. In any case, in Linux, when the driver has decided that the sq tail must be updated, it will use this check: (new_idx - event_idx - 1) < (new_idx - old) When eventidx is already behind, it's l

Re: [PATCH] target/arm: Two fixes for secure ptw

2022-11-03 Thread Peter Maydell
On Wed, 2 Nov 2022 at 05:47, Richard Henderson wrote: > > Reversed the sense of non-secure in get_phys_addr_lpae, > and failed to initialize attrs.secure for ARMMMUIdx_Phys_S. > > Fixes: 48da29e4 ("target/arm: Add ptw_idx to S1Translate") > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1

Re: [PATCH] target/arm: Two fixes for secure ptw

2022-11-03 Thread Peter Maydell
On Thu, 3 Nov 2022 at 13:19, Peter Maydell wrote: > > On Wed, 2 Nov 2022 at 05:47, Richard Henderson > wrote: > > > > Reversed the sense of non-secure in get_phys_addr_lpae, > > and failed to initialize attrs.secure for ARMMMUIdx_Phys_S. > > > > Fixes: 48da29e4 ("target/arm: Add ptw_idx to S1Tran

Re: [PULL v2 00/82] pci,pc,virtio: features, tests, fixes, cleanups

2022-11-03 Thread Stefan Hajnoczi
On Thu, 3 Nov 2022 at 08:14, Michael S. Tsirkin wrote: > On Wed, Nov 02, 2022 at 03:47:43PM -0400, Stefan Hajnoczi wrote: > > On Wed, Nov 02, 2022 at 12:02:14PM -0400, Michael S. Tsirkin wrote: > > > Changes from v1: > > > > > > Applied and squashed fixes by Igor, Lei He, Hesham Almatary for > > >

Re: [PULL v2 00/82] pci,pc,virtio: features, tests, fixes, cleanups

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 13:13, Michael S. Tsirkin wrote: On Wed, Nov 02, 2022 at 03:47:43PM -0400, Stefan Hajnoczi wrote: On Wed, Nov 02, 2022 at 12:02:14PM -0400, Michael S. Tsirkin wrote: Changes from v1: Applied and squashed fixes by Igor, Lei He, Hesham Almatary for bugs that tripped up the pipeline. U

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

2022-11-03 Thread Ilya Leoshkevich
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. > > Signed-off-by: Richard Henderson > --- > target/s390x/cpu.h | 13 +++-- > target/s390x/tcg/translate.c |

[PATCH 6/9] block/vmdk: add missing coroutine_fn annotations

2022-11-03 Thread Emanuele Giuseppe Esposito
vmdk_co_create_opts() is a coroutine_fn, and calls vmdk_co_do_create() which in turn can call two callbacks: vmdk_co_create_opts_cb and vmdk_co_create_cb. Mark all these functions as coroutine_fn, since vmdk_co_create_opts() is the only caller. Signed-off-by: Emanuele Giuseppe Esposito --- bloc

[PATCH 9/9] block/dirty-bitmap: remove unnecessary qemu_in_coroutine() case

2022-11-03 Thread Emanuele Giuseppe Esposito
bdrv_can_store_new_dirty_bitmap and bdrv_remove_persistent_dirty_bitmap check if they are running in a coroutine, directly calling the coroutine callback if it's the case. Except that no coroutine calls such functions, therefore that check can be removed. Signed-off-by: Emanuele Giuseppe Esposito

[PATCH 2/9] block-copy: add missing coroutine_fn annotations

2022-11-03 Thread Emanuele Giuseppe Esposito
block_copy_reset_unallocated and block_copy_is_cluster_allocated are only called by backup_run, a corotuine_fn itself. Same applies to block_copy_block_status, called by block_copy_dirty_clusters. Therefore mark them as coroutine too. Signed-off-by: Emanuele Giuseppe Esposito --- block/block-c

[PATCH 0/9] Still more coroutine and various fixes in block layer

2022-11-03 Thread Emanuele Giuseppe Esposito
This is a dump of all minor coroutine-related fixes found while looking around and testing various things in the QEMU block layer. Patches aim to: - add missing coroutine_fn annotation to the functions - simplify to avoid the typical "if in coroutine: fn() // else create_coroutine(fn)" already p

[PATCH 3/9] nbd/server.c: add missing coroutine_fn annotations

2022-11-03 Thread Emanuele Giuseppe Esposito
There are probably more missing, but right now it is necessary that we extend coroutine_fn to block{allock/status}_to_extents, because they use bdrv_* functions calling the generated_co_wrapper API, which checks for the qemu_in_coroutine() case. Signed-off-by: Emanuele Giuseppe Esposito --- nbd/

[PATCH 5/9] block: distinguish between bdrv_create running in coroutine and not

2022-11-03 Thread Emanuele Giuseppe Esposito
Call two different functions depending on whether bdrv_create is in coroutine or not, following the same pattern as generated_co_wrapper functions. This allows to also call the coroutine function directly, without using CreateCo or relying in bdrv_create(). Signed-off-by: Emanuele Giuseppe Esposi

[PATCH 4/9] block-backend: replace bdrv_*_above with blk_*_above

2022-11-03 Thread Emanuele Giuseppe Esposito
Avoid mixing bdrv_* functions with blk_*, so create blk_* counterparts for: - bdrv_block_status_above - bdrv_is_allocated_above Signed-off-by: Emanuele Giuseppe Esposito --- block/block-backend.c | 21 + block/commit.c| 4 ++-- include/sysemu/

[PATCH 8/9] block: bdrv_create is never called in non-coroutine context

2022-11-03 Thread Emanuele Giuseppe Esposito
Delete the if case and make sure it won't be called again in coroutines. Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/block.c b/block.c index e5e70acf15..1ee76a8694 100644 --- a/b

[PATCH 7/9] block: bdrv_create_file is a coroutine_fn

2022-11-03 Thread Emanuele Giuseppe Esposito
It is always called in coroutine_fn callbacks, therefore it can directly call bdrv_co_create(). Signed-off-by: Emanuele Giuseppe Esposito --- block.c| 6 -- include/block/block-global-state.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/

[PATCH 1/9] block: call bdrv_co_drain_begin in a coroutine

2022-11-03 Thread Emanuele Giuseppe Esposito
It seems that bdrv_open_driver() forgot to create a coroutine where to call bs->drv->bdrv_co_drain_begin(), a callback marked as coroutine_fn. Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git

Re: [PATCH 13/26] target/s390x: Add disp argument to update_psw_addr

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:08PM -0700, Richard Henderson wrote: > Rename to update_psw_addr_disp at the same time. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) Reviewed-by: Ilya Leos

Re: [PATCH 14/26] target/s390x: Don't set gbea for user-only

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:09PM -0700, Richard Henderson wrote: > The rest of the per_* functions have this ifdef; > this one seemed to be missing. > > Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich

Re: [PATCH 15/26] target/s390x: Introduce per_enabled

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:10PM -0700, Richard Henderson wrote: > Hoist the test of FLAG_MASK_PER to a helper. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 23 --- > 1 file changed, 16 insertions(+), 7 deletions(-) Reviewed-by: Ilya Leoshkev

[PATCH RFC] target/loongarch: Fix emulation of float-point disable exception

2022-11-03 Thread Rui Wang
We need to emulate it to generate a floating point disable exception when CSR.EUEN.FPE is zero. Signed-off-by: Rui Wang --- target/loongarch/cpu.c| 2 ++ .../loongarch/insn_trans/trans_farith.c.inc | 36 +++ target/loongarch/insn_trans/trans_fcmp.c.inc

Re: [PATCH 1/2] file-posix: fix Linux alignment probing when EIO is returned

2022-11-03 Thread Stefan Hajnoczi
On Thu, Nov 03, 2022 at 10:52:43AM +0100, Kevin Wolf wrote: > Am 02.11.2022 um 03:49 hat Eric Biggers geschrieben: > > On Tue, Nov 01, 2022 at 07:27:16PM -0700, Eric Biggers wrote: > > > On Tue, Nov 01, 2022 at 03:00:30PM -0400, Stefan Hajnoczi wrote: > > > > Linux dm-crypt returns errno EIO from u

Re: [PULL v2 00/28] QAPI patches patches for 2022-10-25

2022-11-03 Thread Markus Armbruster
Stefan Hajnoczi writes: > On Wed, 26 Oct 2022 at 14:44, Markus Armbruster wrote: >> >> The following changes since commit e750a7ace492f0b450653d4ad368a77d6f660fb8: >> >> Merge tag 'pull-9p-20221024' of https://github.com/cschoenebeck/qemu into >> staging (2022-10-24 14:27:12 -0400) >> >> are

[RFC PATCH] tests/avocado: improve behaviour waiting for login prompts

2022-11-03 Thread Alex Bennée
This attempts to deal with the problem of login prompts not being guaranteed to be terminated with a newline. The solution to this is to peek at the incoming data looking to see if we see an up-coming match before we fall back to the old readline() logic. The reason to mostly rely on readline is be

Re: [PATCH 16/26] target/s390x: Disable conditional branch-to-next for PER

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:11PM -0700, Richard Henderson wrote: > For PER, we require a conditional call to helper_per_branch > for the conditional branch. Fold the remaining optimization > into a call to helper_goto_direct, which will take care of > the remaining gbea adjustment. > > Signed-o

Re: [PATCH 18/26] target/s390x: Split per_branch

2022-11-03 Thread Ilya Leoshkevich
On Wed, Oct 05, 2022 at 08:44:13PM -0700, Richard Henderson wrote: > Split into per_branch_dest and per_branch_disp, which can be > used for direct and indirect. In preperation for TARGET_TB_PCREL, > call per_branch_* before indirect branches. > > Signed-off-by: Richard Henderson > --- > target

Re: [PATCH] linux-user: implement execveat

2022-11-03 Thread Drew DeVault
You're right, that's a much better approach. New patch coming up shortly.

Re: [PULL v2 00/82] pci,pc,virtio: features, tests, fixes, cleanups

2022-11-03 Thread Michael S. Tsirkin
On Thu, Nov 03, 2022 at 09:29:56AM -0400, Stefan Hajnoczi wrote: > On Thu, 3 Nov 2022 at 08:14, Michael S. Tsirkin wrote: > > On Wed, Nov 02, 2022 at 03:47:43PM -0400, Stefan Hajnoczi wrote: > > > On Wed, Nov 02, 2022 at 12:02:14PM -0400, Michael S. Tsirkin wrote: > > > > Changes from v1: > > > >

[PATCH v2] linux-user: implement execveat

2022-11-03 Thread Drew DeVault
References: https://gitlab.com/qemu-project/qemu/-/issues/1007 Signed-off-by: Drew DeVault --- linux-user/syscall.c | 204 +++ 1 file changed, 111 insertions(+), 93 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f55cdebee5..57f

Re: [PATCH v6 0/3] ppc/e500: Add support for eSDHC

2022-11-03 Thread Daniel Henrique Barboza
On 11/3/22 09:51, BALATON Zoltan wrote: On Wed, 2 Nov 2022, Daniel Henrique Barboza wrote: On 11/1/22 19:29, Philippe Mathieu-Daudé wrote: This is a respin of Bernhard's v4 with Freescale eSDHC implemented as an 'UNIMP' region. See v4 cover here: https://lore.kernel.org/qemu-devel/2022101821

Re: [PULL v2 00/82] pci,pc,virtio: features, tests, fixes, cleanups

2022-11-03 Thread Ani Sinha
> To pull this image: > $ docker pull registry.gitlab.com/qemu-project/qemu/fedora:latest Actually the URL is: $ docker pull registry.gitlab.com/qemu-project/qemu/qemu/fedora:latest > (or to be sure to pull the very same:) > $ docker pull > registry.gitlab.com/qemu-project/qemu/fedora:d6d20c1

Re: [PULL v2 00/82] pci,pc,virtio: features, tests, fixes, cleanups

2022-11-03 Thread Stefan Hajnoczi
gitlab-runner can run locally with minimal setup: https://bagong.gitlab.io/posts/run-gitlab-ci-locally/ I haven't tried it yet, but that seems like the most reliable (and easiest) way to reproduce the CI environment. Stefan

Re: [PULL v2 00/82] pci,pc,virtio: features, tests, fixes, cleanups

2022-11-03 Thread Michael S. Tsirkin
On Thu, Nov 03, 2022 at 11:49:21AM -0400, Stefan Hajnoczi wrote: > gitlab-runner can run locally with minimal setup: > https://bagong.gitlab.io/posts/run-gitlab-ci-locally/ > > I haven't tried it yet, but that seems like the most reliable (and > easiest) way to reproduce the CI environment. > > S

  1   2   3   >