Re: [PATCH 20/20] target/loongarch: Add linux-user emulation support

2021-07-01 Thread maobibo
在 2021年07月01日 14:47, Thomas Huth 写道: > On 01/07/2021 03.07, maobibo wrote: >> >> >> 在 2021年06月30日 17:36, Alex Bennée 写道: >>> >>> maobibo writes: >>> 在 2021年06月29日 21:42, Peter Maydell 写道: > On Mon, 28 Jun 2021 at 13:05, Song Gao wrote: >> >> Add files to linux-user/loongarch64

Re: [PATCH] seccomp: don't block getters for resource control syscalls

2021-07-01 Thread Eduardo Otubo
On 30/06/2021 - 17:05:26, Daniel P. Berrange wrote: > Recent GLibC calls sched_getaffinity in code paths related to malloc and > when QEMU blocks access, it sends it off into a bad codepath resulting > in stack exhaustion[1]. The GLibC bug is being fixed[2], but none the > less, GLibC has valid rea

[PATCH 1/2] hw/display: report an error if virgl initialization failed

2021-07-01 Thread marcandre . lureau
From: Marc-André Lureau Currently, virgl initialization error are silently ignored. This is likely going to crash later on, as the device isn't fully initialized then. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu-virgl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/dis

[PATCH 2/2] hw/display: fail early when multiple virgl devices are requested

2021-07-01 Thread marcandre . lureau
From: Marc-André Lureau This avoids failing to initialize virgl and crashing later on, and clear the user expectations. Signed-off-by: Marc-André Lureau --- hw/display/virtio-gpu-gl.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virt

Re: [PATCH v2 22/28] target/s390x: Use translator_use_goto_tb

2021-07-01 Thread David Hildenbrand
On 30.06.21 20:32, Richard Henderson wrote: Cc: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/translate.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 03dab9f350..117a890ecd 100644 --

Re: [PATCH v2 23/28] target/s390x: Remove use_exit_tb

2021-07-01 Thread David Hildenbrand
On 30.06.21 20:32, Richard Henderson wrote: We have not needed to end a TB for I/O since ba3e7926691 ("icount: clean up cpu_can_io at the entry to the block"). In use_goto_tb, the check for singlestep_enabled is in the generic translator_use_goto_tb. In s390x_tr_tb_stop, the check for singleste

Re: [PATCH 1/1] s390x/cpumodel: add 3931 and 3932

2021-07-01 Thread David Hildenbrand
On 30.06.21 17:56, Christian Borntraeger wrote: On 30.06.21 17:32, Cornelia Huck wrote: On Wed, Jun 30 2021, Christian Borntraeger wrote: On 30.06.21 15:32, David Hildenbrand wrote: On 22.06.21 22:19, Christian Borntraeger wrote: This defines 5 new facilities and the new 3931 and 3932 mac

Re: [PATCH] nvdimm: add 'target-node' option

2021-07-01 Thread Liu, Jingqi
Hi Igor, Thanks for your comments. On 6/30/2021 11:00 PM, Igor Mammedov wrote: On Fri, 25 Jun 2021 10:25:18 +0800 Jingqi Liu wrote: Linux kernel version 5.1 brings in support for the volatile-use of persistent memory as a hotplugged memory region (KMEM DAX). When this feature is enabled, p

Re: [PATCH 18/18] vhost-vdpa: multiqueue support

2021-07-01 Thread Jason Wang
在 2021/7/1 下午2:51, Eugenio Perez Martin 写道: On Mon, Jun 21, 2021 at 6:18 AM Jason Wang wrote: This patch implements the multiqueue support for vhost-vdpa. This is done simply by reading the number of queue pairs from the config space and initialize the datapath and control path net client. S

Re: [PATCH v5 7/7] bios-tables-test: Update golden binaries

2021-07-01 Thread Igor Mammedov
On Thu, 1 Jul 2021 14:54:36 +1000 David Gibson wrote: > On Thu, Jun 17, 2021 at 09:07:39PM +0200, Julia Suvorova wrote: > > Add ACPI hot-plug registers to DSDT Q35 tables. > > Changes in the tables: > > > > +Scope (_SB.PCI0) > > +{ > > +OperationRegion (PCST, SystemIO, 0x0CC4, 0x

Re: [PULL 3/6] hmp-commands: Add new HMP command for filter passthrough

2021-07-01 Thread chen.zh...@intel.com
On 6/30/21 6:39 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (chen.zh...@intel.com) wrote: Add hmp_passthrough_filter_add and hmp_passthrough_filter_del make user can maintain object network passthrough list in human monitor Signed-off-by: Zhang Chen --- hmp-commands.hx | 26 ++

Re: [PATCH 1/1] s390x/cpumodel: add 3931 and 3932

2021-07-01 Thread Thomas Huth
On 01/07/2021 09.45, David Hildenbrand wrote: On 30.06.21 17:56, Christian Borntraeger wrote: On 30.06.21 17:32, Cornelia Huck wrote: On Wed, Jun 30 2021, Christian Borntraeger wrote: On 30.06.21 15:32, David Hildenbrand wrote: On 22.06.21 22:19, Christian Borntraeger wrote: This defines

Re: [PATCH] target/i386: Fix cpuid level for AMD

2021-07-01 Thread Igor Mammedov
On Wed, 30 Jun 2021 14:18:09 -0500 Michael Roth wrote: > Quoting Dr. David Alan Gilbert (2021-06-29 09:06:02) > > * zhenwei pi (pizhen...@bytedance.com) wrote: > > > A AMD server typically has cpuid level 0x10(test on Rome/Milan), it > > > should not be changed to 0x1f in multi-dies case. > > >

[PATCH fixup] s390x: fixup for "s390x/cpumodel: add 3931 and 3932"

2021-07-01 Thread Christian Borntraeger
as discussed we want to change some facility names. Please merge Signed-off-by: Christian Borntraeger --- target/s390x/cpu_features_def.h.inc | 4 ++-- target/s390x/gen-features.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/s390x/cpu_features_def.h.inc

Re: [RFC PATCH 01/11] target/riscv: Add CLIC CSR mintstatus

2021-07-01 Thread Frank Chang
LIU Zhiwei 於 2021年4月20日 週二 上午8:49寫道: > > On 2021/4/20 上午7:23, Alistair Francis wrote: > > On Fri, Apr 9, 2021 at 5:52 PM LIU Zhiwei wrote: > >> CSR mintstatus holds the active interrupt level for each supported > >> privilege mode. sintstatus, and user, uintstatus, provide restricted > >> views

Re: [PATCH fixup] s390x: fixup for "s390x/cpumodel: add 3931 and 3932"

2021-07-01 Thread David Hildenbrand
On 01.07.21 10:43, Christian Borntraeger wrote: as discussed we want to change some facility names. Please merge Signed-off-by: Christian Borntraeger --- target/s390x/cpu_features_def.h.inc | 4 ++-- target/s390x/gen-features.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions

Re: [PATCH v3 1/2] hw/i386/pc: pc_system_ovmf_table_find: Assert that flash was parsed

2021-07-01 Thread Philippe Mathieu-Daudé
On 7/1/21 7:27 AM, Dov Murik wrote: > Add assertion in pc_system_ovmf_table_find that verifies that the flash > was indeed previously parsed (looking for the OVMF table) by > pc_system_parse_ovmf_flash. > > Now pc_system_ovmf_table_find distinguishes between "no one called > pc_system_parse_ovmf_f

Re: [PULL 00/23] hw/nvme patches

2021-07-01 Thread Peter Maydell
On Tue, 29 Jun 2021 at 19:47, Klaus Jensen wrote: > > From: Klaus Jensen > > Hi Peter, > > The following changes since commit 9e654e10197f5a014eccd71de5ea633c1b0f4303: > > Merge remote-tracking branch 'remotes/vsementsov/tags/pull-jobs-2021-06-25' > into staging (2021-06-28 18:58:19 +0100) > >

Re: [PATCH 1/2] tests/migration: parse the thread-id key of CpuInfoFast

2021-07-01 Thread Dr. David Alan Gilbert
* huang...@chinatelecom.cn (huang...@chinatelecom.cn) wrote: > From: Hyman Huang(黄勇) > > thread_id in CpuInfoFast is deprecated, parse thread-id instead > after execute qmp query-cpus-fast. fix this so that test can > go smoothly. > > Signed-off-by: Hyman Huang(黄勇) Queued (both 1 and 2) > ---

[PULL V2 0/6] COLO-Proxy patches for 2021-06-25

2021-07-01 Thread Zhang Chen
Hi Jason, Please help to queue COLO-proxy patches to net branch. Thanks Chen The following changes since commit b22726abdfa54592d6ad88f65b0297c0e8b363e2: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging (2021-06-22 16:07:53 +0100) are availa

[PULL V2 2/6] util/qemu-sockets.c: Add inet_parse_base to handle InetSocketAddressBase

2021-07-01 Thread Zhang Chen
No need to carry the flag all the time in many scenarios. Signed-off-by: Zhang Chen --- include/qemu/sockets.h | 1 + util/qemu-sockets.c| 14 ++ 2 files changed, 15 insertions(+) diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h index 0c34bf2398..3a0f8fa8f2 100644 -

[PULL V2 1/6] qapi/net: Add IPFlowSpec and QMP command for filter passthrough

2021-07-01 Thread Zhang Chen
Since the real user scenario does not need to monitor all traffic. Add passthrough-filter-add and passthrough-filter-del to maintain a network passthrough list in object with network packet processing function. Add IPFlowSpec struct for all QMP commands. Most the fields of IPFlowSpec are optional,e

[PULL V2 4/6] net/colo-compare: Move data structure and define to .h file.

2021-07-01 Thread Zhang Chen
Rename structure with COLO index and move it to .h file, It make other modules can reuse COLO code. Signed-off-by: Zhang Chen --- net/colo-compare.c | 132 - net/colo-compare.h | 86 + 2 files changed, 109 insertions(+), 10

[PULL V2 5/6] net/colo-compare: Add passthrough list to CompareState

2021-07-01 Thread Zhang Chen
Add passthrough list for each CompareState. Signed-off-by: Zhang Chen --- net/colo-compare.c | 28 net/colo-compare.h | 12 2 files changed, 40 insertions(+) diff --git a/net/colo-compare.c b/net/colo-compare.c index dcd24bb113..64e72c82f1 100644 --- a/

[PULL V2 3/6] hmp-commands: Add new HMP command for filter passthrough

2021-07-01 Thread Zhang Chen
Add hmp_passthrough_filter_add and hmp_passthrough_filter_del make user can maintain object network passthrough list in human monitor Signed-off-by: Zhang Chen --- hmp-commands.hx | 26 + include/monitor/hmp.h | 2 ++ monitor/hmp-cmds.c| 67

[PULL V2 6/6] net/net.c: Add handler for passthrough filter command

2021-07-01 Thread Zhang Chen
Use the connection protocol,src port,dst port,src ip,dst ip as the key to passthrough certain network traffic in object with network packet processing function. Signed-off-by: Zhang Chen --- net/net.c | 199 +- 1 file changed, 197 insertions(+)

Re: [PATCH v3 1/2] hw/i386/pc: pc_system_ovmf_table_find: Assert that flash was parsed

2021-07-01 Thread Dov Murik
On 01/07/2021 11:54, Philippe Mathieu-Daudé wrote: > On 7/1/21 7:27 AM, Dov Murik wrote: >> Add assertion in pc_system_ovmf_table_find that verifies that the flash >> was indeed previously parsed (looking for the OVMF table) by >> pc_system_parse_ovmf_flash. >> >> Now pc_system_ovmf_table_find d

Re: [PATCH] migration/rdma: Use error_report to suppress errno message

2021-07-01 Thread Dr. David Alan Gilbert
* Li Zhijian (lizhij...@cn.fujitsu.com) wrote: > Since the prior calls are successful, in this case a errno doesn't > indicate a real error which would just make us confused. > > before: > (qemu) migrate -d rdma:192.168.22.23: > source_resolve_host RDMA Device opened: kernel name rxe_eth0 uver

Re: [RFC PATCH 01/11] target/riscv: Add CLIC CSR mintstatus

2021-07-01 Thread LIU Zhiwei
On 2021/7/1 下午4:45, Frank Chang wrote: LIU Zhiwei mailto:zhiwei_...@c-sky.com>> 於 2021年4月20日 週二 上午8:49寫道: On 2021/4/20 上午7:23, Alistair Francis wrote: > On Fri, Apr 9, 2021 at 5:52 PM LIU Zhiwei mailto:zhiwei_...@c-sky.com>> wrote: >> CSR mintstatus holds the active interrupt leve

[PATCH 1/3] hw/net: e1000: Correct the initial value of VET register

2021-07-01 Thread Bin Meng
From: Christina Wang The initial value of VLAN Ether Type (VET) register is 0x8100, as per the manual and real hardware. While Linux e1000 driver always writes VET register to 0x8100, it is not always the case for everyone. Drivers relying on the reset value of VET won't be able to transmit and

[PATCH 3/3] hw/net: e1000e: Don't zero out the VLAN tag in the legacy RX descriptor

2021-07-01 Thread Bin Meng
From: Christina Wang In the legacy RX descriptor mode, VLAN tag was saved to d->special by e1000e_build_rx_metadata() in e1000e_write_lgcy_rx_descr(), but it was then zeroed out again at the end of the call, which is wrong. Fixes: c89d416a2b0f ("e1000e: Don't zero out buffer address in rx descri

[PATCH 2/3] hw/net: e1000e: Correct the initial value of VET register

2021-07-01 Thread Bin Meng
From: Christina Wang The initial value of VLAN Ether Type (VET) register is 0x8100, as per the manual and real hardware. While Linux e1000e driver always writes VET register to 0x8100, it is not always the case for everyone. Drivers relying on the reset value of VET won't be able to transmit and

Re: [PATCH RFC] meson: add option to use zstd for qcow2 compression by default

2021-07-01 Thread Vladimir Sementsov-Ogievskiy
17.06.2021 22:51, Vladimir Sementsov-Ogievskiy wrote: Recently we added support of zstd to qcow2 format, as zstd seems to be better than zlib in general, and which is important (as qcow2 compression used mostly for backups) compressed writes are faster with zstd. Let's add a build option to use

Re: [RFC v6 02/13] hw/s390x: rename tod-qemu.c to tod-tcg.c

2021-07-01 Thread Thomas Huth
On 29/06/2021 16.19, Cho, Yu-Chen wrote: we stop short of renaming the actual qom object though, so type remains TYPE_QEMU_S390_TOD, ie "s390-tod-qemu". Signed-off-by: Claudio Fontana Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Cho, Yu-Chen --- hw/s390x/meson.b

Re: [RFC v6 04/13] hw/s390x: tod: make explicit checks for accelerators when initializing

2021-07-01 Thread Thomas Huth
On 29/06/2021 16.19, Cho, Yu-Chen wrote: replace general "else" with specific checks for each possible accelerator. Handle qtest as a NOP, and error out for an unknown accelerator used in combination with tod. Signed-off-by: Claudio Fontana Reviewed-by: David Hildenbrand Reviewed-by: Cornelia

Re: [RFC v6 03/13] hw/s390x: only build tod-tcg from the CONFIG_TCG build

2021-07-01 Thread Thomas Huth
On 29/06/2021 16.19, Cho, Yu-Chen wrote: this will allow in later patches to remove unneeded stubs in target/s390x. Signed-off-by: Claudio Fontana Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Cho, Yu-Chen --- hw/s390x/meson.build | 4 +++- 1 file changed, 3 ins

Re: [PATCH 20/20] target/loongarch: Add linux-user emulation support

2021-07-01 Thread Alex Bennée
Thomas Huth writes: > On 01/07/2021 03.07, maobibo wrote: >> 在 2021年06月30日 17:36, Alex Bennée 写道: >>> >>> maobibo writes: >>> 在 2021年06月29日 21:42, Peter Maydell 写道: > On Mon, 28 Jun 2021 at 13:05, Song Gao wrote: >> >> Add files to linux-user/loongarch64 >> Add file to de

Re: [RFC v6 05/13] target/s390x: remove tcg-stub.c

2021-07-01 Thread Thomas Huth
On 29/06/2021 16.19, Cho, Yu-Chen wrote: now that we protect all calls to the tcg-specific functions with if (tcg_enabled()), we do not need the TCG stub anymore. Signed-off-by: Claudio Fontana Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Cho, Yu-Chen --- target

Re: [RFC v6 06/13] target/s390x: start moving TCG-only code to tcg/

2021-07-01 Thread Thomas Huth
On 29/06/2021 16.19, Cho, Yu-Chen wrote: move everything related to translate, as well as HELPER code in tcg/ mmu_helper.c stays put for now, as it contains both TCG and KVM code. The internal.h file is renamed to s390x-internal.h, because of the risk of collision with other files with the same

Re: [PATCH 20/20] target/loongarch: Add linux-user emulation support

2021-07-01 Thread Peter Maydell
On Thu, 1 Jul 2021 at 11:40, Alex Bennée wrote: > Thomas Huth writes: > > I think we'd need some way of automatic regression testing for new > > targets. If your board has a serial UART that is easy to use, then > > please add a test in tests/qtest/boot-serial-test.c. > > You can also write a ver

Re: [v4] migration: fix the memory overwriting risk in add_to_iovec

2021-07-01 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Lin Feng (linfen...@huawei.com) wrote: > > From: Feng Lin > > > > When testing migration, a Segmentation fault qemu core is generated. > > 0 error_free (err=0x1) > > 1 0x7f8b862df647 in qemu_fclose (f=f@entry=0x55e06c247640) > > 2 0

Re: [PATCH 0/4] ppc/Pegasos2: Firmware replacement using VOF

2021-07-01 Thread BALATON Zoltan
On Sun, 27 Jun 2021, BALATON Zoltan wrote: Based-on: <20210625055155.2252896-1-...@ozlabs.ru> ^ That is v22 of Alexey's VOF patch With this series on top of VOF v22 I can now boot Linux and MorphOS on pegasos2 without a firmware blob so I hope this is enough to get this board in 6.1 and also hav

Re: [RFC v6 07/13] target/s390x: move sysemu-only code out to cpu-sysemu.c

2021-07-01 Thread Thomas Huth
On 29/06/2021 16.19, Cho, Yu-Chen wrote: move sysemu-only code out to cpu-sysemu.c Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen --- target/s390x/cpu-sysemu.c | 309 ++ target/s390x/cpu.c| 285 ++- tar

Re: [PATCH fixup] s390x: fixup for "s390x/cpumodel: add 3931 and 3932"

2021-07-01 Thread Cornelia Huck
On Thu, Jul 01 2021, Christian Borntraeger wrote: > as discussed we want to change some facility names. Please merge > > Signed-off-by: Christian Borntraeger > --- > target/s390x/cpu_features_def.h.inc | 4 ++-- > target/s390x/gen-features.c | 4 ++-- > 2 files changed, 4 insertions(+),

Re: [PATCH 20/20] target/loongarch: Add linux-user emulation support

2021-07-01 Thread maobibo
在 2021年07月01日 18:53, Peter Maydell 写道: > On Thu, 1 Jul 2021 at 11:40, Alex Bennée wrote: >> Thomas Huth writes: >>> I think we'd need some way of automatic regression testing for new >>> targets. If your board has a serial UART that is easy to use, then >>> please add a test in tests/qtest/boo

Re: [RFC v6 08/13] target/s390x: split cpu-dump from helper.c

2021-07-01 Thread Thomas Huth
On 29/06/2021 16.19, Cho, Yu-Chen wrote: Splitting this functionality also allows us to make helper.c sysemu-only. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen Acked-by: Cornelia Huck --- target/s390x/cpu-dump.c | 176 +++ Apart from the d

Re: [RFC v6 09/13] target/s390x: make helper.c sysemu-only

2021-07-01 Thread Thomas Huth
On 29/06/2021 16.19, Cho, Yu-Chen wrote: Now that we have moved cpu-dump functionality out of helper.c, we can make the module sysemu-only. Signed-off-by: Claudio Fontana Signed-off-by: Cho, Yu-Chen Acked-by: Cornelia Huck --- target/s390x/helper.c| 9 + target/s390x/meson.buil

Re: [PATCH v7 2/4] Jobs based on custom runners: build environment docs and playbook

2021-07-01 Thread Alex Bennée
Willian Rampazzo writes: > On Wed, Jun 30, 2021 at 8:28 AM Alex Bennée wrote: >> >> >> Cleber Rosa writes: >> >> > To run basic jobs on custom runners, the environment needs to be >> > properly set up. The most common requirement is having the right >> > packages installed. >> > >> > The pla

Re: [PATCH] migration: Move bitmap_mutex out of migration_bitmap_clear_dirty()

2021-07-01 Thread Peter Xu
On Thu, Jul 01, 2021 at 04:42:38AM +, Wang, Wei W wrote: > On Thursday, July 1, 2021 4:08 AM, Peter Xu wrote: > > Taking the mutex every time for each dirty bit to clear is too slow, > > especially we'll > > take/release even if the dirty bit is cleared. So far it's only used to > > sync wit

Re: [PATCH v7 3/4] Jobs based on custom runners: docs and gitlab-runner setup playbook

2021-07-01 Thread Alex Bennée
Cleber Rosa writes: > To have the jobs dispatched to custom runners, gitlab-runner must > be installed, active as a service and properly configured. The > variables file and playbook introduced here should help with those > steps. > > The playbook introduced here covers the Linux distributions

[PATCH] migration: failover: emit a warning when the card is not fully unplugged

2021-07-01 Thread Laurent Vivier
When the migration fails or is canceled we wait the end of the unplug operation to be able to plug it back. But if the unplug operation is never finished we stop to wait and QEMU emits a warning to inform the user. Based-on: 20210629155007.629086-1-lviv...@redhat.com Signed-off-by: Laurent Vivier

Re: [PATCH v3] target/s390x: Fix CC set by CONVERT TO FIXED/LOGICAL

2021-07-01 Thread Cornelia Huck
On Wed, Jun 30 2021, Ulrich Weigand wrote: > The FP-to-integer conversion instructions need to set CC 3 whenever > a "special case" occurs; this is the case whenever the instruction > also signals the IEEE invalid exception. (See e.g. figure 19-18 > in the Principles of Operation.) > > However,

Re: [PATCH v7 1/2] target/i386: Trivial code motion and code style fix

2021-07-01 Thread Ziqiao Kong
Ping. Ziqiao On Fri, Jun 25, 2021 at 1:06 AM Ziqiao Kong wrote: > > Ping. > > On Fri, Jun 11, 2021 at 10:32 PM Ziqiao Kong wrote: > > > > Ping. > > > > On Fri, Jun 4, 2021 at 11:04 PM Ziqiao Kong wrote: > > > > > > Ping. > > > > > > Sorry again for the previous duplicate emails. > > > > > > On

Re: [PATCH v7 2/2] target/i386: Correct implementation for FCS, FIP, FDS and FDP

2021-07-01 Thread Ziqiao Kong
Ping. Ziqiao On Fri, Jun 25, 2021 at 1:06 AM Ziqiao Kong wrote: > > Ping. > > On Fri, Jun 11, 2021 at 10:32 PM Ziqiao Kong wrote: > > > > Ping. > > > > On Fri, Jun 4, 2021 at 11:04 PM Ziqiao Kong wrote: > > > > > > Ping. > > > > > > Sorry again for the previous duplicate emails. > > > > > > On

[PULL 00/20] migration queue

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 1ec2cd0ce2ca94292ce237becc2c21b4eb9edca0: Merge remote-tracking branch 'remotes/nvme/tags/nvme-next-pull-request' into staging (2021-06-30 21:09:27 +0100) are available in the Git repository at: https://gitlab.com/dagrh/qem

[PULL 03/20] migration: fix the memory overwriting risk in add_to_iovec

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Feng Lin When testing migration, a Segmentation fault qemu core is generated. 0 error_free (err=0x1) 1 0x7f8b862df647 in qemu_fclose (f=f@entry=0x55e06c247640) 2 0x7f8b8516d59a in migrate_fd_cleanup (s=s@entry=0x55e06c0e1ef0) 3 0x7f8b8516d66c in migrate_fd_cleanup_bh (opaque

[PULL 01/20] tests: migration-test: Still run the rest even if uffd missing

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Currently we'll skip the whole migration-test if uffd missing. It's a bit harsh - we can still run the rest besides postcopy! Enable them when we still can. It'll happen more frequently now after kernel UFFD_USER_MODE_ONLY introduced in commit 37cd0575b8510159, as qemu test norm

[PULL 14/20] virtiofsd: Add umask to seccom allow list

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Patches in this series are going to make use of "umask" syscall. So allow it. Signed-off-by: Vivek Goyal Reviewed-by: Stefan Hajnoczi Message-Id: <20210622150852.1507204-5-vgo...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/passthrough_seccomp.c |

[PULL 08/20] virtiofsd: use GDateTime for formatting timestamp for debug messages

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé The GDateTime APIs provided by GLib avoid portability pitfalls, such as some platforms where 'struct timeval.tv_sec' field is still 'long' instead of 'time_t'. When combined with automatic cleanup, GDateTime often results in simpler code too. Localtime is changed to UTC

[PULL 02/20] tests: migration-test: Add dirty ring test

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Add dirty ring test if kernel supports it. Add the dirty ring parameter on source should be mostly enough, but let's change the dest too to make them match always. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20210615175523.439830-3-pet...@redhat.com

[PULL 05/20] migration: Allow reset of postcopy_recover_triggered when failed

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Peter Xu It's possible qemu_start_incoming_migration() failed at any point, when it happens we should reset postcopy_recover_triggered to false so that the user can still retry with a saner incoming port. Signed-off-by: Peter Xu Message-Id: <20210629181356.217312-3-pet...@redhat.com> Revi

[PULL 04/20] migration: Move yank outside qemu_start_incoming_migration()

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Peter Xu Starting from commit b5eea99ec2f5c, qmp_migrate_recover() calls unregister before calling qemu_start_incoming_migration(). I believe it wanted to mitigate the next call to yank_register_instance(), but I think that's wrong. Firstly, if during recover, we should keep the yank insta

[PULL 11/20] virtiofsd: Fix fuse setxattr() API change issue

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal With kernel header updates fuse_setxattr_in struct has grown in size. But this new struct size only takes affect if user has opted in for fuse feature FUSE_SETXATTR_EXT otherwise fuse continues to send "fuse_setxattr_in" of older size. Older size is determined by FUSE_COMPAT_SET

[PULL 10/20] virtiofsd: Don't allow file creation with FUSE_OPEN

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Greg Kurz A well behaved FUSE client uses FUSE_CREATE to create files. It isn't supposed to pass O_CREAT along a FUSE_OPEN request, as documented in the "fuse_lowlevel.h" header : /** * Open a file * * Open flags are available in fi->flags. The following rules * app

[PULL 12/20] virtiofsd: Fix xattr operations overwriting errno

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal getxattr/setxattr/removexattr/listxattr operations handle regualar and non-regular files differently. For the case of non-regular files we do fchdir(/proc/self/fd) and the xattr operation and then revert back to original working directory. After this we are saving errno and that

[PULL 06/20] migration: move wait-unplug loop to its own function

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Laurent Vivier The loop is used in migration_thread() and bg_migration_thread(), so we can move it to its own function and call it from these both places. Moreover, in migration_thread() we have a wrong state transition from SETUP to ACTIVE while state could be WAIT_UNPLUG. This is correct

[PULL 16/20] virtiofsd: Switch creds, drop FSETID for system.posix_acl_access xattr

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal When posix access acls are set on a file, it can lead to adjusting file permissions (mode) as well. If caller does not have CAP_FSETID and it also does not have membership of owner group, this will lead to clearing SGID bit in mode. Current fuse code is written in such a way th

[PULL 19/20] tests/migration: fix "downtime_limit" type when "migrate-set-parameters"

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Hyman Huang(黄勇) migrate-set-parameters parse "downtime_limit" as integer type when execute "migrate-set-parameters" before migration, and, the unit dowtime_limit is milliseconds, fix this two so that test can go smoothly. Signed-off-by: Hyman Huang(黄勇) Message-Id: <31d82df24cc0c468dbe4d2

[PULL 13/20] virtiofsd: Add support for extended setxattr

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add the bits to enable support for setxattr_ext if fuse offers it. Do not enable it by default yet. Let passthrough_ll opt-in. Enabling it by deafult kind of automatically means that you are taking responsibility of clearing SGID if ACL is set. Signed-off-by: Vivek Goyal Messa

[PULL 07/20] migration: failover: continue to wait card unplug on error

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Laurent Vivier If the user cancels the migration in the unplug-wait state, QEMU will try to plug back the card and this fails because the card is partially unplugged. To avoid the problem, continue to wait the card unplug, but to allow the migration to be canceled if the card never finishes

[PULL 09/20] docs: describe the security considerations with virtiofsd xattr mapping

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Daniel P. Berrangé Different guest xattr prefixes have distinct access control rules applied by the guest. When remapping a guest xattr care must be taken that the remapping does not allow the a guest user to bypass guest kernel access control rules. For example if 'trusted.*' which requir

[PULL 18/20] tests/migration: parse the thread-id key of CpuInfoFast

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Hyman Huang(黄勇) thread_id in CpuInfoFast is deprecated, parse thread-id instead after execute qmp query-cpus-fast. fix this so that test can go smoothly. Signed-off-by: Hyman Huang(黄勇) Message-Id: <584578c0a0dd781cee45f72ddf517f6e6a41c504.1622729934.git.huang...@chinatelecom.cn> Reviewed

[PULL 15/20] virtiofsd: Add capability to change/restore umask

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal When parent directory has default acl and a file is created in that directory, then umask is ignored and final file permissions are determined using default acl instead. (man 2 umask). Currently, fuse applies the umask and sends modified mode in create request accordingly. fuse

Re: [PATCH] migration: Move bitmap_mutex out of migration_bitmap_clear_dirty()

2021-07-01 Thread David Hildenbrand
On 01.07.21 14:51, Peter Xu wrote: On Thu, Jul 01, 2021 at 04:42:38AM +, Wang, Wei W wrote: On Thursday, July 1, 2021 4:08 AM, Peter Xu wrote: Taking the mutex every time for each dirty bit to clear is too slow, especially we'll take/release even if the dirty bit is cleared. So far it's o

[PULL 17/20] virtiofsd: Add an option to enable/disable posix acls

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal fuse has an option FUSE_POSIX_ACL which needs to be opted in by fuse server to enable posix acls. As of now we are not opting in for this, so posix acls are disabled on virtiofs by default. Add virtiofsd option "-o posix_acl/no_posix_acl" to let users enable/disable posix acl s

[PULL 20/20] migration/rdma: Use error_report to suppress errno message

2021-07-01 Thread Dr. David Alan Gilbert (git)
From: Li Zhijian Since the prior calls are successful, in this case a errno doesn't indicate a real error which would just make us confused. before: (qemu) migrate -d rdma:192.168.22.23: source_resolve_host RDMA Device opened: kernel name rxe_eth0 uverbs device name uverbs2, infiniband_verb

Re: [RFC v6 04/13] hw/s390x: tod: make explicit checks for accelerators when initializing

2021-07-01 Thread Al Cho via
ok, will swap 03 and 04 in next version. Thanks, AL From: Thomas Huth Sent: Thursday, July 1, 2021 6:32 PM To: Al Cho ; qemu-devel@nongnu.org ; qemu-s3...@nongnu.org Cc: Claudio Fontana ; José Ricardo Ziviani ; Claudio Fontana ; David Hildenbrand ;

[PATCH 02/17] accel/tcg: Move helper_lookup_tb_ptr to cpu-exec.c

2021-07-01 Thread Richard Henderson
This will allow additional code sharing. No functional change. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c| 30 ++ accel/tcg/tcg-runtime.c | 22 -- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/accel/tcg/cpu-exe

[PATCH 06/17] tcg: Remove TCG_TARGET_HAS_goto_ptr

2021-07-01 Thread Richard Henderson
Since 6eea04347eb6, all tcg backends support goto_ptr. Remove the conditional, making support mandatory. Signed-off-by: Richard Henderson --- include/tcg/tcg-opc.h| 3 +-- tcg/aarch64/tcg-target.h | 1 - tcg/arm/tcg-target.h | 1 - tcg/i386/tcg-target.h| 1 - tcg/mips/tcg-target.h

[PATCH 01/17] target/i386: Use cpu_breakpoint_test in breakpoint_handler

2021-07-01 Thread Richard Henderson
The loop is performing a simple boolean test for the existence of a BP_CPU breakpoint at EIP. Plus it gets the iteration wrong, if we happen to have a BP_GDB breakpoint at the same address. We have a function for this: cpu_breakpoint_test. Signed-off-by: Richard Henderson --- target/i386/tcg/s

[PATCH 04/17] accel/tcg: Split out log_cpu_exec

2021-07-01 Thread Richard Henderson
Split out CPU_LOG_EXEC and CPU_LOG_TB_CPU logging from cpu_tb_exec to a new function. Perform only one pc range check after a combined mask check. Use the new function in lookup_tb_ptr. This enables CPU_LOG_TB_CPU between indirectly chained tbs. Signed-off-by: Richard Henderson --- accel/tcg/

[PATCH 00/17] tcg: breakpoint reorg

2021-07-01 Thread Richard Henderson
Based-on: <20210630183226.3290849-1-richard.hender...@linaro.org> ("[PATCH v2 00/28] accel/tcg: Introduce translator_use_goto_tb") This is my attempt at fixing #404 ("windows xp boot takes much longer..."). I don't actually have windows xp available myself, so I don't know if this has worked, rea

[PATCH 08/17] accel/tcg: Move curr_cflags into cpu-exec.c

2021-07-01 Thread Richard Henderson
We will shortly have more than a simple member read here, with stuff not necessarily exposed to exec/exec-all.h. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 5 + accel/tcg/cpu-exec.c| 5 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/exec/

[PATCH 13/17] accel/tcg: Move cflags lookup into tb_find

2021-07-01 Thread Richard Henderson
We will shortly require the guest pc for computing cflags, so move the choice just after cpu_get_tb_cpu_state. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/accel/tcg/cpu-exec.c b

[PATCH 05/17] accel/tcg: Log tb->cflags with -d exec

2021-07-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 67ed25beb9..e22bcb99f7 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -183,9 +183,9 @@ static inli

[PATCH 12/17] accel/tcg: Use CF_NO_GOTO_{TB, PTR} in cpu_exec_step_atomic

2021-07-01 Thread Richard Henderson
Request that the one TB returns immediately, so that we release the exclusive lock as soon as possible. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 2206

[PATCH 07/17] accel/tcg: Reduce CF_COUNT_MASK to match TCG_MAX_INSNS

2021-07-01 Thread Richard Henderson
The space reserved for CF_COUNT_MASK was overly large. Reduce to free up cflags bits and eliminate an extra test. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 4 +++- accel/tcg/translate-all.c | 5 ++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/e

[PATCH 03/17] accel/tcg: Move tb_lookup to cpu-exec.c

2021-07-01 Thread Richard Henderson
Now that we've moved helper_lookup_tb_ptr, the only user of tb-lookup.h is cpu-exec.c; merge the contents in. Signed-off-by: Richard Henderson --- accel/tcg/tb-lookup.h | 49 --- accel/tcg/cpu-exec.c | 31 ++- 2 files changed, 30 i

[PATCH 11/17] accel/tcg: Handle -singlestep in curr_cflags

2021-07-01 Thread Richard Henderson
Exchange the test in translator_use_goto_tb for CF_NO_GOTO_TB, and the test in tb_gen_code for setting CF_COUNT_MASK to 1. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 8 +++- accel/tcg/translate-all.c | 2 +- accel/tcg/translator.c| 2 +- 3 files changed, 9 insertion

[PATCH 16/17] accel/tcg: Encode breakpoint info into tb->cflags

2021-07-01 Thread Richard Henderson
Having this data in cflags means that hashing takes care of selecting a TB with or without exceptions built in. Which means that we no longer need to flush all TBs. This does require that we single-step while we're within a page that contains a breakpoint, so it's not yet ideal, but should be an i

[PATCH 10/17] accel/tcg: Drop CF_NO_GOTO_PTR from -d nochain

2021-07-01 Thread Richard Henderson
The purpose of suppressing goto_ptr from -d nochain had been to return to the main loop so that -d cpu would be recognized. But we now include -d cpu logging in helper_lookup_tb_ptr so there is no need to exclude goto_ptr. Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 2 +- 1 file

[PATCH 09/17] accel/tcg: Add CF_NO_GOTO_TB and CF_NO_GOTO_PTR

2021-07-01 Thread Richard Henderson
Move the -d nochain check to bits on tb->cflags. These will be used for more than -d nochain shortly. Set bits during curr_cflags, test them in translator_use_goto_tb, assert we're not doing anything odd in tcg_gen_goto_tb. The test in tcg_gen_exit_tb is redundant with the assert for goto_tb_issu

[PATCH 14/17] accel/tcg: Adjust interface of TranslatorOps.breakpoint_check

2021-07-01 Thread Richard Henderson
We don't need the whole CPUBreakpoint structure in the check, only the flags. Return the instruction length to consolidate the adjustment of db->pc_next. Signed-off-by: Richard Henderson --- include/exec/translator.h | 17 +-- accel/tcg/translator.c| 40 +

[PATCH 15/17] accel/tcg: Hoist tb_cflags to a local in translator_loop

2021-07-01 Thread Richard Henderson
The access internal to tb_cflags() is atomic. Avoid re-reading it as such for the multiple uses. Signed-off-by: Richard Henderson --- accel/tcg/translator.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 1c44d096

[PATCH 17/17] cpu: Add breakpoint tracepoints

2021-07-01 Thread Richard Henderson
Signed-off-by: Richard Henderson --- cpu.c| 11 --- trace-events | 5 + 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cpu.c b/cpu.c index 2c9da10d0f..addcb5db9c 100644 --- a/cpu.c +++ b/cpu.c @@ -38,6 +38,7 @@ #include "exec/translate-all.h" #include "exec

Re: [RFC v6 01/13] target/s390x: meson: add target_user_arch

2021-07-01 Thread Richard Henderson
On 6/29/21 7:19 AM, Cho, Yu-Chen wrote: the lack of target_user_arch makes it hard to fully leverage the build system in order to separate user code from sysemu code. Provide it, so that we can avoid the proliferation of #ifdef in target code. Signed-off-by: Claudio Fontana Signed-off-by: Cho,

Re: [PATCH] migration: failover: emit a warning when the card is not fully unplugged

2021-07-01 Thread Philippe Mathieu-Daudé
On 7/1/21 3:14 PM, Laurent Vivier wrote: > When the migration fails or is canceled we wait the end of the unplug > operation to be able to plug it back. But if the unplug operation > is never finished we stop to wait and QEMU emits a warning to inform > the user. > > Based-on: 20210629155007.62908

Re: [PATCH 02/17] accel/tcg: Move helper_lookup_tb_ptr to cpu-exec.c

2021-07-01 Thread Philippe Mathieu-Daudé
On 7/1/21 5:25 PM, Richard Henderson wrote: > This will allow additional code sharing. > No functional change. > > Signed-off-by: Richard Henderson > --- > accel/tcg/cpu-exec.c| 30 ++ > accel/tcg/tcg-runtime.c | 22 -- > 2 files changed, 30 in

Re: [PATCH 03/17] accel/tcg: Move tb_lookup to cpu-exec.c

2021-07-01 Thread Philippe Mathieu-Daudé
On 7/1/21 5:25 PM, Richard Henderson wrote: > Now that we've moved helper_lookup_tb_ptr, the only user > of tb-lookup.h is cpu-exec.c; merge the contents in. > > Signed-off-by: Richard Henderson > --- > accel/tcg/tb-lookup.h | 49 --- > accel/tcg/cpu-exec.

Re: [PATCH 06/17] tcg: Remove TCG_TARGET_HAS_goto_ptr

2021-07-01 Thread Philippe Mathieu-Daudé
On 7/1/21 5:25 PM, Richard Henderson wrote: > Since 6eea04347eb6, all tcg backends support goto_ptr. > Remove the conditional, making support mandatory. > > Signed-off-by: Richard Henderson > --- > include/tcg/tcg-opc.h| 3 +-- > tcg/aarch64/tcg-target.h | 1 - > tcg/arm/tcg-target.h | 1

  1   2   >