Re: [PATCH 2/5] configure: Add braces to clarify intent of $emu[[:space:]]

2022-07-20 Thread Markus Armbruster
Peter Maydell writes: > In shell script syntax, $var[something] is not special for variable > expansion: $emu is expanded. However, as it can look as if it were Do you mean "$var is expanded"? > intended to be an array element access (the correct syntax for which > is ${var[something]}), shell

[PATCH] dump: introduce dump-cancel QMP command

2022-07-20 Thread Hogan Wang via
There's no way to cancel the current executing dump process, lead to the virtual machine manager daemon((e.g. libvirtd) cannot restore the dump job after daemon restart. Add the 'cancelling' and 'cancelled' dump states. Use 'dump-cancel' qmp command Set the dump state as 'cancelling'. The dump pr

Re: [PATCH v4 1/1] target/riscv: Add Zihintpause support

2022-07-20 Thread Alistair Francis
On Tue, Jul 19, 2022 at 4:02 AM Dao Lu wrote: > > ping Sorry for the delay. Do you mind rebasing this on https://github.com/alistair23/qemu/tree/riscv-to-apply.next and sending a v5 Alistair > > On Tue, Jul 5, 2022 at 10:49 AM Dao Lu wrote: > > > > Added support for RISC-V PAUSE instruction f

Re: [PATCH v4 1/1] target/riscv: Add Zihintpause support

2022-07-20 Thread Alistair Francis
On Wed, Jul 6, 2022 at 3:50 AM Dao Lu wrote: > > Added support for RISC-V PAUSE instruction from Zihintpause extension, > enabled by default. > > Tested-by: Heiko Stuebner > Signed-off-by: Dao Lu Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu.c | 2 ++

Re: [PATCH] target/riscv: fix csr check for cycle{h}, instret{h}, time{h}, hpmcounter3~31{h}

2022-07-20 Thread Alistair Francis
On Sat, Jul 2, 2022 at 11:42 PM Weiwei Li wrote: > > - improve the field extract progress > - add stand-alone check for mcuonteren when in less-privileged mode > - add check for scounteren when 'S' is enabled and current priv is PRV_U > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang

Re: [PULL 20/21] hw/loongarch: Add acpi ged support

2022-07-20 Thread gaosong
On 2022/7/20 下午8:10, Peter Maydell wrote: On Tue, 19 Jul 2022 at 19:16, Richard Henderson wrote: From: Xiaojuan Yang Loongarch virt machine uses general hardware reduces acpi method, rather than LS7A acpi device. Now only power management function is used in acpi ged device, memory hotplug

[PATCH] hw/loongarch: remove acpi-build.c unused variable 'aml_len'

2022-07-20 Thread Song Gao
Fix a compiler warning on openbsd: ../src/hw/loongarch/acpi-build.c:416:12: warning: variable 'aml_len' set but not used [-Wunused-but-set-variable] size_t aml_len = 0; ^ Reported-by: Peter Maydell Signed-off-by: Song Gao --- hw/loongarch/acpi-build.c | 8 1 file changed

Re: [PATCH] hw/rx: pass random seed to fdt

2022-07-20 Thread Yoshinori Sato
On Tue, 19 Jul 2022 21:20:33 +0900, Jason A. Donenfeld wrote: > > If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to > initialize early. Set this using the usual guest random number > generation function. This FDT node is part of the DT specification. > > Cc: Yoshinori Sato

Re: [PATCH] i386: Disable BTS and PEBS

2022-07-20 Thread Like Xu
On 20/7/2022 2:53 am, Sean Christopherson wrote: On Tue, Jul 19, 2022, Paolo Bonzini wrote: On 7/18/22 22:12, Sean Christopherson wrote: On Mon, Jul 18, 2022, Paolo Bonzini wrote: This needs to be fixed in the kernel because old QEMU/new KVM is supported. I can't object to adding a quirk for

Re: [RFC] hw/nvme: Use irqfd to send interrupts

2022-07-20 Thread Jinhao Fan
Hi Stefan, Thanks for the detailed explanation! at 6:21 PM, Stefan Hajnoczi wrote: > Hi Jinhao, > Thanks for working on this! > > irqfd is not necessarily faster than KVM ioctl interrupt injection. > > There are at least two non performance reasons for irqfd: > 1. It avoids QEMU emulation co

Re: [PATCH qemu v6 00/10] Add mask agnostic behavior for rvv instructions

2022-07-20 Thread Alistair Francis
On Mon, Jun 20, 2022 at 4:56 PM ~eopxd wrote: > > According to v-spec, mask agnostic behavior can be either kept as > undisturbed or set elements' bits to all 1s. To distinguish the > difference of mask policies, QEMU should be able to simulate the mask > agnostic behavior as "set mask elements' b

Re: [PATCH v2] hw/virtio/virtio-iommu: Enforce power-of-two notify for both MAP and UNMAP

2022-07-20 Thread tina . zhang
On 7/18/22 21:56, Jean-Philippe Brucker wrote: Currently we only enforce power-of-two mappings (required by the QEMU notifier) for UNMAP requests. A MAP request not aligned on a power-of-two may be successfully handled by VFIO, and then the corresponding UNMAP notify will fail because it will

Re: [PATCH qemu v6 07/10] target/riscv: rvv: Add mask agnostic for vector floating-point instructions

2022-07-20 Thread Alistair Francis
On Mon, Jun 20, 2022 at 4:53 PM ~eopxd wrote: > > From: Yueh-Ting (eop) Chen > > Signed-off-by: eop Chen > Reviewed-by: Frank Chang > Reviewed-by: Weiwei Li Acked-by: Alistair Francis Alistair > --- > target/riscv/insn_trans/trans_rvv.c.inc | 12 > target/riscv/vector_helper.

Re: [PATCH qemu v6 10/10] target/riscv: rvv: Add option 'rvv_ma_all_1s' to enable optional mask agnostic behavior

2022-07-20 Thread Alistair Francis
On Mon, Jun 20, 2022 at 4:54 PM ~eopxd wrote: > > From: eopXD > > According to v-spec, mask agnostic behavior can be either kept as > undisturbed or set elements' bits to all 1s. To distinguish the > difference of mask policies, QEMU should be able to simulate the mask > agnostic behavior as "set

Re: [PATCH qemu v6 09/10] target/riscv: rvv: Add mask agnostic for vector permutation instructions

2022-07-20 Thread Alistair Francis
On Mon, Jun 20, 2022 at 4:59 PM ~eopxd wrote: > > From: Yueh-Ting (eop) Chen > > Signed-off-by: eop Chen > Reviewed-by: Frank Chang > Reviewed-by: Weiwei Li Acked-by: Alistair Francis Alistair > --- > target/riscv/insn_trans/trans_rvv.c.inc | 1 + > target/riscv/vector_helper.c

Re: [PATCH qemu v6 08/10] target/riscv: rvv: Add mask agnostic for vector mask instructions

2022-07-20 Thread Alistair Francis
On Mon, Jun 20, 2022 at 5:05 PM ~eopxd wrote: > > From: Yueh-Ting (eop) Chen > > Signed-off-by: eop Chen > Reviewed-by: Frank Chang > Reviewed-by: Weiwei Li Acked-by: Alistair Francis Alistair > --- > target/riscv/insn_trans/trans_rvv.c.inc | 3 +++ > target/riscv/vector_helper.c

Re: [PATCH qemu v6 06/10] target/riscv: rvv: Add mask agnostic for vector fix-point arithmetic instructions

2022-07-20 Thread Alistair Francis
On Mon, Jun 20, 2022 at 4:56 PM ~eopxd wrote: > > From: Yueh-Ting (eop) Chen > > Signed-off-by: eop Chen > Reviewed-by: Frank Chang > Reviewed-by: Weiwei Li Acked-by: Alistair Francis Alistair > --- > target/riscv/vector_helper.c | 26 -- > 1 file changed, 16 inser

Re: [PATCH qemu v6 05/10] target/riscv: rvv: Add mask agnostic for vector integer comparison instructions

2022-07-20 Thread Alistair Francis
On Mon, Jun 20, 2022 at 5:08 PM ~eopxd wrote: > > From: Yueh-Ting (eop) Chen > > Signed-off-by: eop Chen > Reviewed-by: Frank Chang > Reviewed-by: Weiwei Li Acked-by: Alistair Francis Alistair > --- > target/riscv/insn_trans/trans_rvv.c.inc | 1 + > target/riscv/vector_helper.c

Re: [PATCH qemu v6 04/10] target/riscv: rvv: Add mask agnostic for vector integer shift instructions

2022-07-20 Thread Alistair Francis
On Mon, Jun 20, 2022 at 4:52 PM ~eopxd wrote: > > From: Yueh-Ting (eop) Chen > > Signed-off-by: eop Chen > Reviewed-by: Frank Chang > Reviewed-by: Weiwei Li Acked-by: Alistair Francis Alistair > --- > target/riscv/insn_trans/trans_rvv.c.inc | 1 + > target/riscv/vector_helper.c

Re: [PATCH qemu v6 03/10] target/riscv: rvv: Add mask agnostic for vx instructions

2022-07-20 Thread Alistair Francis
On Mon, Jun 20, 2022 at 4:51 PM ~eopxd wrote: > > From: Yueh-Ting (eop) Chen > > Signed-off-by: eop Chen > Reviewed-by: Frank Chang > Reviewed-by: Weiwei Li Acked-by: Alistair Francis Alistair > --- > target/riscv/insn_trans/trans_rvv.c.inc | 2 ++ > target/riscv/vector_helper.c

Re: [PATCH qemu v6 02/10] target/riscv: rvv: Add mask agnostic for vector load / store instructions

2022-07-20 Thread Alistair Francis
On Mon, Jun 20, 2022 at 4:51 PM ~eopxd wrote: > > From: Yueh-Ting (eop) Chen > > Signed-off-by: eop Chen > Reviewed-by: Frank Chang > Reviewed-by: Weiwei Li Acked-by: Alistair Francis Alistair > --- > target/riscv/insn_trans/trans_rvv.c.inc | 5 > target/riscv/vector_helper.c

Re: [PATCH qemu v6 01/10] target/riscv: rvv: Add mask agnostic for vv instructions

2022-07-20 Thread Alistair Francis
On Mon, Jun 20, 2022 at 4:59 PM ~eopxd wrote: > > From: Yueh-Ting (eop) Chen > > According to v-spec, mask agnostic behavior can be either kept as > undisturbed or set elements' bits to all 1s. To distinguish the > difference of mask policies, QEMU should be able to simulate the mask > agnostic b

Re: [PATCH v5 2/3] target/riscv: Add stimecmp support

2022-07-20 Thread Alistair Francis
On Thu, Jul 21, 2022 at 5:32 AM Atish Patra wrote: > > On Wed, Jun 15, 2022 at 8:25 PM Anup Patel wrote: > > > > On Thu, Jun 16, 2022 at 8:08 AM Alistair Francis > > wrote: > > > > > > On Thu, Jun 16, 2022 at 4:21 AM Atish Kumar Patra > > > wrote: > > > > > > > > On Wed, Jun 8, 2022 at 12:19

Re: [PATCH v6 6/8] KVM: Handle page fault for private memory

2022-07-20 Thread Vishal Annapurve
> > Hmm, so a new slot->arch.page_attr array shouldn't be necessary, KVM can > > instead > > update slot->arch.lpage_info on shared<->private conversions. Detecting > > whether > > a given range is partially mapped could get nasty if KVM defers tracking to > > the > > backing store, but if KVM

Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need

2022-07-20 Thread Ani Sinha
On Wed, 20 Jul 2022, Peter Maydell wrote: > On Wed, 20 Jul 2022 at 19:37, Ani Sinha wrote: > > > > > > > > On Tue, 19 Jul 2022, Peter Maydell wrote: > > > > > On Sat, 4 Sept 2021 at 22:36, Michael S. Tsirkin wrote: > > > How is this intended to work? The obvious fix from my point > > > of vie

Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need

2022-07-20 Thread Peter Maydell
On Wed, 20 Jul 2022 at 19:37, Ani Sinha wrote: > > > > On Tue, 19 Jul 2022, Peter Maydell wrote: > > > On Sat, 4 Sept 2021 at 22:36, Michael S. Tsirkin wrote: > > How is this intended to work? The obvious fix from my point > > of view would just be to say "piix4.c requires pcihp.c" > > and cause

Re: [PULL V2 00/25] Net patches

2022-07-20 Thread Peter Maydell
On Wed, 20 Jul 2022 at 10:03, Jason Wang wrote: > > The following changes since commit d48125de38f48a61d6423ef6a01156d6dff9ee2c: > > Merge tag 'kraxel-20220719-pull-request' of https://gitlab.com/kraxel/qemu > into staging (2022-07-19 17:40:36 +0100) > > are available in the git repository at:

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-07-20 Thread Jason A. Donenfeld
Hi David, On Wed, Jul 20, 2022 at 08:41:48PM +0200, David Hildenbrand wrote: > > +while (len) { > > +size_t block = MIN(len, sizeof(tmp)); > > + > > +qemu_guest_getrandom_nofail(tmp, block); > > +for (size_t i = 0; i < block; ++i) { > > +

Re: [PATCH v8 03/12] s390x/cpu_topology: implementating Store Topology System Information

2022-07-20 Thread Janis Schoetterl-Glausch
On 6/20/22 16:03, Pierre Morel wrote: > The handling of STSI is enhanced with the interception of the > function code 15 for storing CPU topology. > > Using the objects built during the plugging of CPU, we build the > SYSIB 15_1_x structures. > > With this patch the maximum MNEST level is 2, this

Re: [PATCH v5 2/3] target/riscv: Add stimecmp support

2022-07-20 Thread Atish Patra
On Wed, Jun 15, 2022 at 8:25 PM Anup Patel wrote: > > On Thu, Jun 16, 2022 at 8:08 AM Alistair Francis wrote: > > > > On Thu, Jun 16, 2022 at 4:21 AM Atish Kumar Patra > > wrote: > > > > > > On Wed, Jun 8, 2022 at 12:19 AM Alistair Francis > > > wrote: > > > > > > > > On Mon, Jun 6, 2022 at 2

Re: [PATCH v3] target/s390x: support PRNO_TRNG instruction

2022-07-20 Thread David Hildenbrand
On 20.07.22 14:08, Jason A. Donenfeld wrote: > In order for hosts running inside of TCG to initialize the kernel's > random number generator, we should support the PRNO_TRNG instruction, > backed in the usual way with the qemu_guest_getrandom helper. This is > confirmed working on Linux 5.19-rc6. >

Re: [PULL 06/35] hw/acpi: refactor acpi hp modules so that targets can just use what they need

2022-07-20 Thread Ani Sinha
On Tue, 19 Jul 2022, Peter Maydell wrote: > On Sat, 4 Sept 2021 at 22:36, Michael S. Tsirkin wrote: > > > > From: Ani Sinha > > > > Currently various acpi hotplug modules like cpu hotplug, memory hotplug, pci > > hotplug, nvdimm hotplug are all pulled in when CONFIG_ACPI_X86 is turned on. > >

Re: [PATCH 3/5] configure: Don't use bash-specific string-replacement syntax

2022-07-20 Thread Eric Blake
On Wed, Jul 20, 2022 at 06:32:22PM +0100, Peter Maydell wrote: > > > +# backslash escape any '\' and '"' characters > > > +printf "%s" "$e" | sed -e 's/\([\"]\)/\\\1/g' > > > > You've fixed the bashism, but at the expense of a non-POSIX use of > > sed. POSIX says the input to sed must be a

[PATCH] oss-fuzz: ensure base_copy is a generic-fuzzer

2022-07-20 Thread Alexander Bulekov
Depending on how the target list is sorted in by qemu, the first target (used as the base copy of the fuzzer, to which all others are linked) might not be a generic-fuzzer. Since we are trying to only use generic-fuzz, on oss-fuzz, fix that, to ensure the base copy is a generic-fuzzer. Signed-off-

Re: [PATCH v2] target/s390x: support PRNO_TRNG instruction

2022-07-20 Thread David Hildenbrand
>> Again, what about the warning? We don't want to report warnings in the >> QEMU default. > > The change to cpu_models.c above gets rid of the warning. Ah, stupid me. I missed that hunk somehow completely. [...] >> We have to be careful in 24-bit an 31-bit address mode, we may only >> update

Re: [PATCH v7 11/14] KVM: Register/unregister the guest private memory regions

2022-07-20 Thread Gupta, Pankaj
Use kvm_arch_has_private_mem(), both because "has" makes it obvious this is checking a flag of sorts, and to align with other helpers of this nature (and with CONFIG_HAVE_KVM_PRIVATE_MEM). $ git grep kvm_arch | grep supported | wc -l 0 $ git grep kvm_arch | grep has | wc -l 26 +

Re: [PATCH v3 1/9] tests: introduce tree-wide code style checking

2022-07-20 Thread Peter Maydell
On Wed, 20 Jul 2022 at 18:08, Eric Blake wrote: > > On Wed, Jul 20, 2022 at 05:31:52PM +0100, Daniel P. Berrangé wrote: > > > > diff --git a/meson.build b/meson.build > > > > index 65a885ea69..d8ef24bacb 100644 > > > > --- a/meson.build > > > > +++ b/meson.build > > > > @@ -18,6 +18,8 @@ config_ho

Re: Access target TranslatorOps

2022-07-20 Thread Peter Maydell
On Wed, 20 Jul 2022 at 17:39, Kenneth Adam Miller wrote: > That I know of, the TCG plugins do not allow me to feed the > QEMU instance dynamically changing opcodes. I wouldn't use > TranslatorOps if I don't have to. I want to facilitate a > use case in which the contents of the target being emulat

Re: [PATCH 3/5] configure: Don't use bash-specific string-replacement syntax

2022-07-20 Thread Peter Maydell
On Wed, 20 Jul 2022 at 17:30, Eric Blake wrote: > > On Wed, Jul 20, 2022 at 04:26:29PM +0100, Peter Maydell wrote: > > The variable string-replacement syntax ${var/old/new} is a bashism > > (though it is also supported by some other shells), and for instance > > does not work with the NetBSD /bin/

Re: [PATCH v8 08/12] s390x/cpu_topology: implementing numa for the s390x topology

2022-07-20 Thread Janis Schoetterl-Glausch
On 7/15/22 15:07, Pierre Morel wrote: > > > On 7/15/22 11:11, Janis Schoetterl-Glausch wrote: >> On 7/14/22 22:17, Pierre Morel wrote: >>> >>> >>> On 7/14/22 16:57, Janis Schoetterl-Glausch wrote: On 6/20/22 16:03, Pierre Morel wrote: > S390x CPU Topology allows a non uniform repartition

Re: [PATCH] oss-fuzz: remove binaries from qemu-bundle tree

2022-07-20 Thread Alexander Bulekov
On 220720 1040, Paolo Bonzini wrote: > oss-fuzz is finding possible fuzzing targets even under qemu-bundle/.../bin, > but they > cannot be used because the required shared libraries are missing. Since the > fuzzing targets are already placed manually in $OUT, the bindir and libexecdir > subtrees

Re: [PATCH v3] target/ppc: Implement new wait variants

2022-07-20 Thread Víctor Colombo
CCing Daniel and Richard as they might be interested in taking a look On 20/07/2022 10:33, Nicholas Piggin wrote: ISA v2.06 adds new variations of wait, specified by the WC field. These are not all compatible with the prior wait implementation, because they add additional conditions that cause t

Re: [PATCH v3 8/9] misc: remove qemu/osdep.h from headers / included source files

2022-07-20 Thread Eric Blake
On Thu, Jul 07, 2022 at 05:37:19PM +0100, Daniel P. Berrangé wrote: > Since qemu/osdep.h is guaranteed present in all C source files, > there is hno reason for it to be present in header files. Some s/hno/no/ > C source files are not directly directly, but rather included > from other source file

Re: [PATCH v3 1/9] tests: introduce tree-wide code style checking

2022-07-20 Thread Eric Blake
On Wed, Jul 20, 2022 at 05:31:52PM +0100, Daniel P. Berrangé wrote: > > > diff --git a/meson.build b/meson.build > > > index 65a885ea69..d8ef24bacb 100644 > > > --- a/meson.build > > > +++ b/meson.build > > > @@ -18,6 +18,8 @@ config_host = keyval.load(meson.current_build_dir() / > > > 'config-hos

[PATCH 3/3] gitlab: drop 'containers-layer2' stage

2022-07-20 Thread Daniel P . Berrangé
Since we express dependancies via a 'needs' clause, we don't need to split container builds into separate stages. GitLab happily lets jobs depend on other jobs in the same stage and will run them when possible. Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.d/container-cross.yml | 24 +

[PATCH 2/3] gitlab: show testlog.txt contents when cirrus/custom-runner jobs fail

2022-07-20 Thread Daniel P . Berrangé
When tests fail meson just displays a summary and tells you to look at the testlog.txt file for details. The native jobs on shared runners publish testlog.txt as an artifact. For the Cirrus jobs and custom runner jobs this is not currently possible. The best we can do is cat the log contents on fai

[PATCH 0/3] ci: refresh packages/containers and misc changes

2022-07-20 Thread Daniel P . Berrangé
Mostly this is to get the latest libvirt-ci content pulled in, but I throw two small fixes on top. Daniel P. Berrangé (3): tests: refresh to latest libvirt-ci module gitlab: show testlog.txt contents when cirrus/custom-runner jobs fail gitlab: drop 'containers-layer2' stage .gitlab-ci.d/ci

[PATCH 1/3] tests: refresh to latest libvirt-ci module

2022-07-20 Thread Daniel P . Berrangé
Notable changes: - libvirt-ci source tree was re-arranged, so script we must run now lives in a bin/ sub-dir - opensuse 15.2 is replaced by opensuse 15.3 - libslirp is temporarily dropped on opensuse as the libslirp-version.h is broken https://bugzilla.opensuse.org/show_bug.c

Re: [PATCH v7 11/14] KVM: Register/unregister the guest private memory regions

2022-07-20 Thread Sean Christopherson
On Wed, Jul 06, 2022, Chao Peng wrote: > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index 230c8ff9659c..bb714c2a4b06 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -914,6 +914,35 @@ static int kvm_init_mmu_notifier(struct kvm *kvm) > > #endif /* CONFIG_MMU_NOTI

Re: Access target TranslatorOps

2022-07-20 Thread Kenneth Adam Miller
That I know of, the TCG plugins do not allow me to feed the QEMU instance dynamically changing opcodes. I wouldn't use TranslatorOps if I don't have to. I want to facilitate a use case in which the contents of the target being emulated are changing, but it is not a self modifying target. I have to

Re: [PATCH v3 1/9] tests: introduce tree-wide code style checking

2022-07-20 Thread Daniel P . Berrangé
On Wed, Jul 20, 2022 at 05:25:00PM +0100, Peter Maydell wrote: > On Thu, 7 Jul 2022 at 17:37, Daniel P. Berrangé wrote: > > The logic provide is inspired by the GNULIB 'top/maint.mk' file, > > but has been re-implemented in a simple Python script, using a > > YAML config file, in an attempt to mak

Re: [PATCH 3/5] configure: Don't use bash-specific string-replacement syntax

2022-07-20 Thread Eric Blake
On Wed, Jul 20, 2022 at 04:26:29PM +0100, Peter Maydell wrote: > The variable string-replacement syntax ${var/old/new} is a bashism > (though it is also supported by some other shells), and for instance > does not work with the NetBSD /bin/sh, which complains: > ../src/configure: 687: Syntax error

Re: [PATCH v3 1/9] tests: introduce tree-wide code style checking

2022-07-20 Thread Peter Maydell
On Thu, 7 Jul 2022 at 17:37, Daniel P. Berrangé wrote: > > Historically QEMU has used the 'scripts/checkpatch.pl' script to > validate various style rules but there are a number of issues: > > - Contributors / maintainers are reluctant to add new >tests to it, nor fix existint rules, because

Re: [PATCH v7 11/14] KVM: Register/unregister the guest private memory regions

2022-07-20 Thread Sean Christopherson
On Wed, Jul 20, 2022, Gupta, Pankaj wrote: > > > > > > > +bool __weak kvm_arch_private_mem_supported(struct kvm *kvm) Use kvm_arch_has_private_mem(), both because "has" makes it obvious this is checking a flag of sorts, and to align with other helpers of this nature (and with CONFIG_HAVE_KVM_PRI

Re: [PULL SUBSYSTEM qemu-pseries] pseries: Update SLOF firmware image

2022-07-20 Thread Daniel Henrique Barboza
Hey, On 7/19/22 04:59, Alexey Kardashevskiy wrote: The following changes since commit d2066bc50d690a6605307eaf0e72a9cf51e6fc25: target/ppc: Check page dir/table base alignment (2022-07-18 13:59:43 -0300) are available in the Git repository at: g...@github.com:aik/qemu.git tags/qemu-slof

Re: [PATCH 1/5] configure: Add missing POSIX-required space

2022-07-20 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > In commit 7d7dbf9dc15be6e1 we added a line to the configure script > which is not valid POSIX shell syntax, because it is missing a space > after a '!' character. shellcheck diagnoses this: > > if !(GIT="$git" "$source_path/scripts/git-submodule.

Re: [PATCH] target/ppc: fix unreachable code in do_ldst_quad()

2022-07-20 Thread Víctor Colombo
On 20/07/2022 10:57, Daniel Henrique Barboza wrote: Coverity reports that commit fc34e81acd51 ("target/ppc: add macros to check privilege level") turned the following code unreachable: if (!prefixed && !(ctx->insns_flags2 & PPC2_LSQ_ISA207)) { /* lq and stq were privileged prior to V. 2.07

Re: [PATCH 3/5] configure: Don't use bash-specific string-replacement syntax

2022-07-20 Thread Thomas Huth
On 20/07/2022 17.26, Peter Maydell wrote: The variable string-replacement syntax ${var/old/new} is a bashism (though it is also supported by some other shells), and for instance does not work with the NetBSD /bin/sh, which complains: ../src/configure: 687: Syntax error: Bad substitution Replac

Re: [PATCH] i386: Disable BTS and PEBS

2022-07-20 Thread Sean Christopherson
On Wed, Jul 20, 2022, Duan, Zhenzhong wrote: > >On Tue, Jul 19, 2022, Paolo Bonzini wrote: > >> On 7/18/22 22:12, Sean Christopherson wrote: > >> > On Mon, Jul 18, 2022, Paolo Bonzini wrote: > >> > > This needs to be fixed in the kernel because old QEMU/new KVM is > >> > > supported. > >> > > >> >

Re: [PATCH 5/5] configure: Avoid '==' bashism

2022-07-20 Thread Thomas Huth
On 20/07/2022 17.26, Peter Maydell wrote: The '==' operator to test is a bashism; the standard way to copmare strings is '='. This causes dash to complain: ../../configure: 681: test: linux: unexpected operator Signed-off-by: Peter Maydell --- configure | 2 +- 1 file changed, 1 insertion(+

Re: [PATCH 4/5] configure: Drop dead code attempting to use -msmall-data on alpha hosts

2022-07-20 Thread Thomas Huth
On 20/07/2022 17.26, Peter Maydell wrote: In commit 823eb013452e93d we moved the setting of ARCH from configure to meson.build, but we accidentally left behind one attempt to use $ARCH in configure, which was trying to add -msmall-data to the compiler flags on Alpha hosts. Since ARCH is now neve

Re: [PATCH v7 11/14] KVM: Register/unregister the guest private memory regions

2022-07-20 Thread Gupta, Pankaj
+bool __weak kvm_arch_private_mem_supported(struct kvm *kvm) +{ + return false; +} Does this function has to be overriden by SEV and TDX to support the private regions? Yes it should be overridden by architectures which want to support it. o.k + static int check_memory_regi

Re: [PATCH 2/5] configure: Add braces to clarify intent of $emu[[:space:]]

2022-07-20 Thread Thomas Huth
On 20/07/2022 17.26, Peter Maydell wrote: In shell script syntax, $var[something] is not special for variable expansion: $emu is expanded. However, as it can look as if it were intended to be an array element access (the correct syntax for which is ${var[something]}), shellcheck recommends using

Re: [PATCH 1/5] configure: Add missing POSIX-required space

2022-07-20 Thread Thomas Huth
On 20/07/2022 17.26, Peter Maydell wrote: In commit 7d7dbf9dc15be6e1 we added a line to the configure script which is not valid POSIX shell syntax, because it is missing a space after a '!' character. shellcheck diagnoses this: if !(GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submod

[PATCH 4/5] configure: Drop dead code attempting to use -msmall-data on alpha hosts

2022-07-20 Thread Peter Maydell
In commit 823eb013452e93d we moved the setting of ARCH from configure to meson.build, but we accidentally left behind one attempt to use $ARCH in configure, which was trying to add -msmall-data to the compiler flags on Alpha hosts. Since ARCH is now never set, the test always fails and we never ad

Re: [PULL 0/3] s390x fixes

2022-07-20 Thread Peter Maydell
On Wed, 20 Jul 2022 at 08:58, Thomas Huth wrote: > > Hi! > > The following changes since commit b8bb9bbf4695b89bbdca702a054db0a7a2c8ff2b: > > Merge tag 'pull-ppc-20220718' of https://gitlab.com/danielhb/qemu into > staging (2022-07-18 19:27:25 +0100) > > are available in the Git repository at:

[PATCH 3/5] configure: Don't use bash-specific string-replacement syntax

2022-07-20 Thread Peter Maydell
The variable string-replacement syntax ${var/old/new} is a bashism (though it is also supported by some other shells), and for instance does not work with the NetBSD /bin/sh, which complains: ../src/configure: 687: Syntax error: Bad substitution Replace it with a more portable sed-based approach,

[PATCH 5/5] configure: Avoid '==' bashism

2022-07-20 Thread Peter Maydell
The '==' operator to test is a bashism; the standard way to copmare strings is '='. This causes dash to complain: ../../configure: 681: test: linux: unexpected operator Signed-off-by: Peter Maydell --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/con

[PATCH 2/5] configure: Add braces to clarify intent of $emu[[:space:]]

2022-07-20 Thread Peter Maydell
In shell script syntax, $var[something] is not special for variable expansion: $emu is expanded. However, as it can look as if it were intended to be an array element access (the correct syntax for which is ${var[something]}), shellcheck recommends using explicit braces around ${var} to clarify th

[PATCH 1/5] configure: Add missing POSIX-required space

2022-07-20 Thread Peter Maydell
In commit 7d7dbf9dc15be6e1 we added a line to the configure script which is not valid POSIX shell syntax, because it is missing a space after a '!' character. shellcheck diagnoses this: if !(GIT="$git" "$source_path/scripts/git-submodule.sh" "$git_submodules_action" "$git_submodules"); then ^

[PATCH 0/5] configure: fix some non-portabilities

2022-07-20 Thread Peter Maydell
This patchset fixes some non-portable code that has crept in recently: notably, it fixes problems that are reported to cause configure not to work correctly on OpenBSD and NetBSD, and a warning message when using dash as /bin/sh on Linux. I threw in a less important "drop some dead code" fix too, a

Re: [PATCH v7 11/14] KVM: Register/unregister the guest private memory regions

2022-07-20 Thread Chao Peng
On Tue, Jul 19, 2022 at 04:23:52PM +0200, Gupta, Pankaj wrote: > > > > > +bool __weak kvm_arch_private_mem_supported(struct kvm *kvm) > > > > +{ > > > > + return false; > > > > +} > > > > > > Does this function has to be overriden by SEV and TDX to support the > > > private > > > regions?

Re: [PATCH 1/3] scripts/make-release: Do not include the edk2 sources in the tarball anymore

2022-07-20 Thread Thomas Huth
On 04/07/2022 12.45, Daniel P. Berrangé wrote: On Mon, Jul 04, 2022 at 11:37:11AM +0200, Thomas Huth wrote: On 04/07/2022 11.14, Daniel P. Berrangé wrote: On Mon, Jul 04, 2022 at 08:26:34AM +0100, Stefan Hajnoczi wrote: On Mon, 4 Jul 2022 at 07:45, Thomas Huth wrote: ... +cat > sources.txt

Re: [PATCH] tests: migration-test: Allow test to run without uffd

2022-07-20 Thread Daniel P . Berrangé
On Wed, Jul 20, 2022 at 04:11:43PM +0200, Thomas Huth wrote: > On 19/07/2022 12.37, Daniel P. Berrangé wrote: > > On Tue, Jul 19, 2022 at 12:28:24PM +0200, Thomas Huth wrote: > > > On 18/07/2022 21.14, Peter Xu wrote: > > > > Hi, Thomas, > > > > > > > > On Mon, Jul 18, 2022 at 08:23:26PM +0200, Th

Re: Support for Gaisler multicore LEONx SoCs

2022-07-20 Thread Fabien Chouteau
Hello everyone, On Fri, Jul 8, 2022 at 12:16 PM Frederic Konrad wrote: > About the SMP support AdaCore had a few patches for it, I'll let Fabien > answer. > The patches for SMP support actually come from Gaisler originally (if I remember correctly). For sure we at AdaCore support SMP Leon3/Leo

Re: [PATCH v9 09/21] jobs: use job locks also in the unit tests

2022-07-20 Thread Emanuele Giuseppe Esposito
Am 20/07/2022 um 15:06 schrieb Vladimir Sementsov-Ogievskiy: > On 7/19/22 15:00, Emanuele Giuseppe Esposito wrote: >> >> >> Am 11/07/2022 um 15:08 schrieb Vladimir Sementsov-Ogievskiy: >>> >>> That made me ask: >>> >>> 1. Are all tests always run in main loop? If yes, why to protect status >>> r

Re: [PATCH] tests: migration-test: Allow test to run without uffd

2022-07-20 Thread Thomas Huth
On 19/07/2022 12.37, Daniel P. Berrangé wrote: On Tue, Jul 19, 2022 at 12:28:24PM +0200, Thomas Huth wrote: On 18/07/2022 21.14, Peter Xu wrote: Hi, Thomas, On Mon, Jul 18, 2022 at 08:23:26PM +0200, Thomas Huth wrote: On 07/07/2022 20.46, Peter Xu wrote: We used to stop running all tests if

Re: [RFC PATCH 3/8] RFC: block: use transactions as a replacement of ->{can_}set_aio_context()

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/13/22 00:19, Emanuele Giuseppe Esposito wrote: +/* + * @visited will accumulate all visited BdrvChild object. The caller is + * responsible for freeing the list afterwards. + */ +bool bdrv_change_aio_context(BlockDriverState *bs, AioContext *ctx, + GSList **visite

Re: [PATCH v9 19/21] blockjob: protect iostatus field in BlockJob struct

2022-07-20 Thread Emanuele Giuseppe Esposito
Am 20/07/2022 um 15:15 schrieb Vladimir Sementsov-Ogievskiy: > On 7/19/22 16:07, Emanuele Giuseppe Esposito wrote: >> >> >> Am 11/07/2022 um 16:51 schrieb Vladimir Sementsov-Ogievskiy: >>> On 7/6/22 23:15, Emanuele Giuseppe Esposito wrote: iostatus is the only field (together with .job) tha

Re: [PATCH v2 1/1] hw/ppc: check if spapr_drc_index() returns NULL in spapr_nvdimm.c

2022-07-20 Thread Daniel Henrique Barboza
On 7/20/22 10:16, Greg Kurz wrote: On Sat, 9 Apr 2022 17:08:56 -0300 Daniel Henrique Barboza wrote: spapr_nvdimm_flush_completion_cb() and flush_worker_cb() are using the DRC object returned by spapr_drc_index() without checking it for NULL. In this case we would be dereferencing a NULL po

[PATCH] target/ppc: fix unreachable code in do_ldst_quad()

2022-07-20 Thread Daniel Henrique Barboza
Coverity reports that commit fc34e81acd51 ("target/ppc: add macros to check privilege level") turned the following code unreachable: if (!prefixed && !(ctx->insns_flags2 & PPC2_LSQ_ISA207)) { /* lq and stq were privileged prior to V. 2.07 */ REQUIRE_SV(ctx); >>> CID 1490757: Control

Re: [RFC PATCH 2/8] transactions: add tran_add_back

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/18/22 19:20, Paolo Bonzini wrote: On 7/14/22 17:13, Hanna Reitz wrote: that we want to run before the others but still only when invoking finalize/commit/abort. I don’t understand this yet (but perhaps it’ll become clearer with the following patches); doesn’t the new function do the oppo

[PATCH v3] target/ppc: Implement new wait variants

2022-07-20 Thread Nicholas Piggin
ISA v2.06 adds new variations of wait, specified by the WC field. These are not all compatible with the prior wait implementation, because they add additional conditions that cause the processor to resume, which can cause software to hang or run very slowly. ISA v3.0 changed the wait opcode and re

Re: [PATCH v3] hw/pci/pci_bridge: ensure PCIe slots have only one slot

2022-07-20 Thread Mark Cave-Ayland
On 20/07/2022 12:00, Roman Kagan wrote: On Wed, Jul 20, 2022 at 11:44:26AM +0100, Daniel P. Berrangé wrote: On Wed, Jul 20, 2022 at 01:25:55PM +0300, Roman Kagan wrote: It's possible to create non-working configurations by attaching a device to a derivative of PCIe slot (pcie-root-port, ioh342

[PATCH v13 09/10] virtio-mmio: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add configure interrupt support in virtio-mmio bus. add function to set configure guest notifier. Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 688eccda9

Re: [PATCH v2 1/1] hw/ppc: check if spapr_drc_index() returns NULL in spapr_nvdimm.c

2022-07-20 Thread Greg Kurz
On Sat, 9 Apr 2022 17:08:56 -0300 Daniel Henrique Barboza wrote: > spapr_nvdimm_flush_completion_cb() and flush_worker_cb() are using the > DRC object returned by spapr_drc_index() without checking it for NULL. > In this case we would be dereferencing a NULL pointer when doing > SPAPR_NVDIMM(drc

[PATCH v13 06/10] virtio: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add the functions to support the configure interrupt in virtio The function virtio_config_guest_notifier_read will notify the guest if there is an configure interrupt. The function virtio_config_set_guest_notifier_fd_handler is to set the fd hander for the notifier Signed-off-by: Cindy Lu --- hw

[PATCH v13 08/10] virtio-net: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add functions to support configure interrupt in virtio_net Add the functions to support vhost_net_config_pending and vhost_net_config_mask. Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 9 + hw/net/virtio-net.c | 4 ++-- include/net/vhost_net.h | 2 ++ 3 files changed, 13 ins

Re: [PATCH v9 19/21] blockjob: protect iostatus field in BlockJob struct

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/19/22 16:07, Emanuele Giuseppe Esposito wrote: Am 11/07/2022 um 16:51 schrieb Vladimir Sementsov-Ogievskiy: On 7/6/22 23:15, Emanuele Giuseppe Esposito wrote: iostatus is the only field (together with .job) that needs protection using the job mutex. It is set in the main loop (GLOBAL_ST

[PATCH v13 10/10] virtio-pci: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add process to handle the configure interrupt, The function's logic is the same with vq interrupt.Add extra process to check the configure interrupt Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 110 ++--- hw/virtio/virtio-pci.h | 4 +- 2 files change

[PATCH v13 02/10] virtio-pci: decouple notifier from interrupt process

2022-07-20 Thread Cindy Lu
To reuse the notifier process. We add the virtio_pci_get_notifier to get the notifier and vector. The INPUT for this function is IDX, The OUTPUT is the notifier and the vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 88 +++--- 1 file changed, 57 i

[PATCH v13 04/10] vhost: introduce new VhostOps vhost_set_config_call

2022-07-20 Thread Cindy Lu
This patch introduces new VhostOps vhost_set_config_call. This function allows the qemu to set the config event fd to kernel driver. Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/h

[PATCH v13 05/10] vhost-vdpa: add support for config interrupt

2022-07-20 Thread Cindy Lu
Add new call back function in vhost-vdpa, The function vhost_set_config_call can set the event fd to kernel. This function will be called in the vhost_dev_start and vhost_dev_stop Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 1 + hw/virtio/vhost-vdpa.c | 8 2 files changed, 9 in

[PATCH] e1000e: Fix possible interrupt loss when using MSI

2022-07-20 Thread Ake Koomsin
Commit "e1000e: Prevent MSI/MSI-X storms" introduced msi_causes_pending to prevent interrupt storms problem. It was tested with MSI-X. In case of MSI, the guest can rely solely on interrupts to clear ICR. Upon clearing all pending interrupts, msi_causes_pending gets cleared. However, when e1000e_i

[PATCH v13 01/10] virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX

2022-07-20 Thread Cindy Lu
To support configure interrupt for vhost-vdpa Introduce VIRTIO_CONFIG_IRQ_IDX -1 as configure interrupt's queue index, Then we can reuse the functions guest_notifier_mask and guest_notifier_pending. Add the check of queue index in these drivers, if the driver does not support configure interrupt, t

[PATCH v13 07/10] vhost: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add functions to support configure interrupt. The configure interrupt process will start in vhost_dev_start and stop in vhost_dev_stop. Also add the functions to support vhost_config_pending and vhost_config_mask. Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 78 ++

[PATCH v13 03/10] virtio-pci: decouple the single vector from the interrupt process

2022-07-20 Thread Cindy Lu
To reuse the interrupt process in configure interrupt Need to decouple the single vector from the interrupt process. We add new function kvm_virtio_pci_vector_use_one and _release_one. These functions are used for the single vector, the whole process will finish in the loop with vq number. Signed-

[PATCH v13 00/10] vhost-vdpa: add support for configure interrupt

2022-07-20 Thread Cindy Lu
Add support for virtio-mmio bus active the notifier while the backend support configure interrupt misc fixes from v1 Change in v3 fix the coding style problems Change in v4 misc fixes from v3 merge the set_config_notifier to set_guest_notifier when vdpa start, check the feature by VIRTIO_NET_F_ST

Re: [PATCH v9 11/21] jobs: group together API calls under the same job lock

2022-07-20 Thread Vladimir Sementsov-Ogievskiy
On 7/19/22 15:40, Emanuele Giuseppe Esposito wrote: Am 11/07/2022 um 15:26 schrieb Vladimir Sementsov-Ogievskiy:   }     static bool child_job_drained_poll(BdrvChild *c) @@ -111,8 +113,10 @@ static bool child_job_drained_poll(BdrvChild *c)   /* An inactive or completed job doesn't have

Re: [PATCH v12 00/10] vhost-vdpa: add support for configure interrupt

2022-07-20 Thread Cindy Lu
On Tue, Jul 19, 2022 at 10:28 PM Daniel P. Berrangé wrote: > > On Tue, Jul 19, 2022 at 09:46:45PM +0800, Cindy Lu wrote: > > These patches introduced the support for configure interrupt > > The email threading of this series isn't setup right. Each > patch is appearing as a new top level mail, rat

  1   2   3   >