Re: [PATCH] pci-host: Allow extended config space access for PowerNV PHB4 model

2021-11-17 Thread Philippe Mathieu-Daudé
On 11/9/21 17:04, Cédric Le Goater wrote: > On 11/9/21 16:51, Frederic Barrat wrote: >> >> >> On 09/11/2021 15:50, Christophe Lombard wrote: >>> The PCIe extended configuration space on the device is not currently >>> accessible to the host. if by default,  it is still inaccessible for >>> conventi

Re: [PATCH-for-7.0 v4 08/11] tests/unit/test-smp-parse: Add 'smp-without-dies-valid' machine type

2021-11-17 Thread Philippe Mathieu-Daudé
Hi Yanan, On 11/17/21 08:37, wangyanan (Y) wrote: > On 2021/11/15 22:58, Philippe Mathieu-Daudé wrote: >> Keep the common TYPE_MACHINE class initialization in >> machine_base_class_init(), make it abstract, and move >> the non-common code to a new class: "smp-without-dies-valid". >> >> Signed-off-

Re: [PATCH v10 04/26] target/loongarch: Add fixed point arithmetic instruction translation

2021-11-17 Thread gaosong
Hi Richard, On 2021/11/15 下午4:42, Richard Henderson wrote: On 11/15/21 4:59 AM, gaosong wrote: 'The width of the immediate is a detail of the format'  means: &fmt_rdrjimm rd  rj imm @fmt_rdrjimm .. imm:12  rj:5 rd:5 &fmt_rdrjimm @fmt_rdrjimm14 imm:14

Re: [PATCH v4 3/9] linux-user/safe-syscall.inc.S: Move to common-user

2021-11-17 Thread Philippe Mathieu-Daudé
On 11/16/21 22:03, Warner Losh wrote: > On Tue, Nov 16, 2021 at 4:03 AM Richard Henderson > mailto:richard.hender...@linaro.org>> wrote: > > From: Warner Losh mailto:i...@bsdimp.com>> > > Move all the safe_syscall.inc.S files to common-user. They are almost > identical between linux-u

Re: [PATCH 1/2] migration/colo: Optimize COLO start code path

2021-11-17 Thread Juan Quintela
"Zhang, Chen" wrote: >> -Original Message- >> From: Juan Quintela >> Sent: Wednesday, November 17, 2021 12:28 AM >> To: Zhang, Chen >> Cc: Hailiang Zhang ; Dr . David Alan >> Gilbert ; qemu-dev >> Subject: Re: [PATCH 1/2] migration/colo: Optimize COLO start code path >> >> Zhang Chen

Re: [PATCH v4 7/9] linux-user: Remove HAVE_SAFE_SYSCALL and hostdep.h

2021-11-17 Thread Philippe Mathieu-Daudé
On 11/16/21 12:02, Richard Henderson wrote: > All supported hosts now define HAVE_SAFE_SYSCALL, so remove > the ifdefs. This leaves hostdep.h empty, so remove it. > > Signed-off-by: Richard Henderson > --- > common-user/host/aarch64/hostdep.h | 18 -- > common-user/host/arm/host

Re: [PATCH] q35: turn off power_controller_present when acpi hotplug is enabled

2021-11-17 Thread Gerd Hoffmann
On Tue, Nov 16, 2021 at 08:26:41PM +0100, Igor Mammedov wrote: > On Tue, 16 Nov 2021 10:04:33 +0100 > Gerd Hoffmann wrote: > > > Disable power control for pcie slots in case acpi hotplug is enabled > > (6.2+ only for compatibility reasons). This makes sure we don't get > > unpleasant surprises w

Re: [RFC PATCH v2 09/30] target/loongarch: Add TLB instruction support

2021-11-17 Thread Richard Henderson
On 11/17/21 8:29 AM, yangxiaojuan wrote: On 11/12/2021 02:14 AM, Richard Henderson wrote: On 11/11/21 2:35 AM, Xiaojuan Yang wrote: +static bool trans_tlbwr(DisasContext *ctx, arg_tlbwr *a) +{ +gen_helper_check_plv(cpu_env); +gen_helper_tlbwr(cpu_env); +tcg_gen_movi_tl(cpu_pc, ctx->

Re: [PATCH v4 8/9] common-user: Adjust system call return on FreeBSD

2021-11-17 Thread Philippe Mathieu-Daudé
On 11/16/21 12:02, Richard Henderson wrote: > From: Warner Losh > > FreeBSD system calls return positive errno. On the 4 hosts for > which we have support, error is indicated by the C bit set or clear. > > Signed-off-by: Warner Losh > [rth: Rebase on new safe_syscall_base api; add #error check

RE: [PATCH] linux-user/hexagon: Use generic target_stat64 structure

2021-11-17 Thread Taylor Simpson
> -Original Message- > From: Richard Henderson > Sent: Wednesday, November 17, 2021 1:18 AM > To: Philippe Mathieu-Daudé ; qemu-devel@nongnu.org > Cc: Laurent Vivier ; Taylor Simpson > > Subject: Re: [PATCH] linux-user/hexagon: Use generic target_stat64 > structure > > On 11/16/21 10:0

Re: [PATCH v10 04/26] target/loongarch: Add fixed point arithmetic instruction translation

2021-11-17 Thread Richard Henderson
On 11/17/21 8:57 AM, gaosong wrote: I see that  insns.decode format is not very consistent with other architectures, such ARM/RISCV No. I don't like how riscv has done it, though they have quite a few split fields, so perhaps they thought it looked weird. # # Argument sets # &r_i 

Re: [PULL 20/20] pcie: expire pending delete

2021-11-17 Thread Gerd Hoffmann
Hi, > > dev->pending_deleted_event = true; > > +dev->pending_deleted_expires_ms = > > +qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + 5000; /* 5 secs */ > > do we block migration if unplug was requested? Not sure. > (if not we might loose this state on destionatio, do we care about

Re: [PATCH v4 8/9] common-user: Adjust system call return on FreeBSD

2021-11-17 Thread Richard Henderson
On 11/17/21 9:23 AM, Philippe Mathieu-Daudé wrote: On 11/16/21 12:02, Richard Henderson wrote: From: Warner Losh FreeBSD system calls return positive errno. On the 4 hosts for which we have support, error is indicated by the C bit set or clear. Signed-off-by: Warner Losh [rth: Rebase on new

Re: [PATCH v4 8/9] common-user: Adjust system call return on FreeBSD

2021-11-17 Thread Philippe Mathieu-Daudé
On 11/17/21 09:32, Richard Henderson wrote: > On 11/17/21 9:23 AM, Philippe Mathieu-Daudé wrote: >> On 11/16/21 12:02, Richard Henderson wrote: >>> From: Warner Losh >>> >>> FreeBSD system calls return positive errno.  On the 4 hosts for >>> which we have support, error is indicated by the C bit s

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

2021-11-17 Thread Richard Henderson
On 11/16/21 11:48 PM, Alexey Kardashevskiy wrote: Yup. I am doing SLOF updates this way for ages after diifs became quite huge to make mailman barfing on the size, and the "subsystem" in the subj was the way to reduce the noise Peter had to respond to :) btw should I be signing those? I am not

[PATCH V2] migration/colo: Optimize COLO primary node start code path

2021-11-17 Thread Zhang Chen
Optimize COLO primary start path from: MIGRATION_STATUS_XXX --> MIGRATION_STATUS_ACTIVE --> MIGRATION_STATUS_COLO --> MIGRATION_STATUS_COMPLETED To: MIGRATION_STATUS_XXX --> MIGRATION_STATUS_COLO --> MIGRATION_STATUS_COMPLETED No need to start primary COLO through "MIGRATION_STATUS_ACTIVE". Signe

Re: [PULL 0/5] Python patches

2021-11-17 Thread Richard Henderson
On 11/17/21 1:33 AM, John Snow wrote: The following changes since commit 2b22e7540d6ab4efe82d442363e3fc900cea6584: Merge tag 'm68k-for-6.2-pull-request' of git://github.com/vivier/qemu-m68k into staging (2021-11-09 13:16:56 +0100) are available in the Git repository at: https://gitlab.c

Re: [RFC PATCH v2 08/30] target/loongarch: Add LoongArch CSR/IOCSR instruction

2021-11-17 Thread yangxiaojuan
Hi, Richard: On 11/12/2021 01:43 AM, Richard Henderson wrote: > On 11/11/21 2:35 AM, Xiaojuan Yang wrote: >> This includes: >> - CSRRD >> - CSRWR >> - CSRXCHG >> - IOCSR{RD/WR}.{B/H/W/D} > > I think IOCSR should be in a separate patch. > It's completely unrelated to the other CSRs. > >> +target_

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

2021-11-17 Thread Cédric Le Goater
On 11/17/21 09:39, Richard Henderson wrote: On 11/16/21 11:48 PM, Alexey Kardashevskiy wrote: Yup. I am doing SLOF updates this way for ages after diifs became quite huge to make mailman barfing on the size, and the "subsystem" in the subj was the way to reduce the noise Peter had to respond t

Re: [RFC PATCH v2 09/30] target/loongarch: Add TLB instruction support

2021-11-17 Thread yangxiaojuan
On 11/17/2021 04:22 PM, Richard Henderson wrote: > On 11/17/21 8:29 AM, yangxiaojuan wrote: >> On 11/12/2021 02:14 AM, Richard Henderson wrote: >>> On 11/11/21 2:35 AM, Xiaojuan Yang wrote: +static bool trans_tlbwr(DisasContext *ctx, arg_tlbwr *a) +{ +gen_helper_check_plv(cpu_

Re: [PATCH] pci-host: Allow extended config space access for PowerNV PHB4 model

2021-11-17 Thread Cédric Le Goater
On 11/17/21 08:59, Philippe Mathieu-Daudé wrote: On 11/9/21 17:04, Cédric Le Goater wrote: On 11/9/21 16:51, Frederic Barrat wrote: On 09/11/2021 15:50, Christophe Lombard wrote: The PCIe extended configuration space on the device is not currently accessible to the host. if by default,  it i

Re: [PATCH v3 3/3] docs: rSTify the "SubmitAPatch" wiki

2021-11-17 Thread Thomas Huth
On 10/11/2021 15.49, Kashyap Chamarthy wrote: - The original wiki is here[1]. I copied the wiki source[2] into a .wiki file, and used `pandoc` to convert it to rST: $> pandoc -f Mediawiki -t rst submitting-a-patch.wiki -o submitting-a-patch.rst - The only minor touch-ups I did w

[PULL 1/2] target/riscv: machine: Sort the .subsections

2021-11-17 Thread Alistair Francis
From: Bin Meng Move the codes around so that the order of .subsections matches the one they are referenced in vmstate_riscv_cpu. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Message-id: 20211030030606.32297-1-bmeng...@gmail.com Signed-off-by: Alistair Francis --- target/riscv/machin

[PULL 0/2] riscv-to-apply queue

2021-11-17 Thread Alistair Francis
u.git tags/pull-riscv-to-apply-2027-1 for you to fetch changes up to c94c239496256f1f1cb589825d052c2f3e26ebf6: meson.build: Merge riscv32 and riscv64 cpu family (2021-11-17 19:18:22 +1000) Sixth RISC-V PR for QEMU 6.2 - Fix

[PULL 2/2] meson.build: Merge riscv32 and riscv64 cpu family

2021-11-17 Thread Alistair Francis
From: Richard Henderson In ba0e73336200, we merged riscv32 and riscv64 in configure. However, meson does not treat them the same. We need to merge them here as well. Fixes: ba0e73336200 Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Message

Re: [PATCH v10 04/26] target/loongarch: Add fixed point arithmetic instruction translation

2021-11-17 Thread gaosong
Hi Richard, On 2021/11/17 下午4:28, Richard Henderson wrote: On 11/17/21 8:57 AM, gaosong wrote: I see that  insns.decode format is not very consistent with other architectures, such ARM/RISCV No.  I don't like how riscv has done it, though they have quite a few split fields, so perhaps they t

Re: [PULL 0/5] Python patches

2021-11-17 Thread Gerd Hoffmann
Hi, > https://gitlab.com/jsnow/qemu.git tags/python-pull-request What is the status of the plan to upload this to pypi eventually? thanks, Gerd

Re: [PATCH v2 1/3] icount: preserve cflags when custom tb is about to execute

2021-11-17 Thread Alex Bennée
Pavel Dovgalyuk writes: > When debugging with the watchpoints, qemu may need to create > TB with single instruction. This is achieved by setting cpu->cflags_next_tb. > But when this block is about to execute, it may be interrupted by another > thread. In this case cflags will be lost and next e

Re: [PATCH v2 6/7] target/riscv: cpu: Enable native debug feature on virt and sifive_u CPUs

2021-11-17 Thread Bin Meng
On Wed, Nov 17, 2021 at 8:58 AM Alistair Francis wrote: > > On Sat, Oct 30, 2021 at 11:56 PM Bin Meng wrote: > > > > Turn on native debug feature on virt and sifive_u CPUs. > > Is there a reason why it's only these 2 machines? Could this be > enabled by default for all CPUs? > Yes, I think so. I

[RFC PATCH] tests/avocado: fix tcg_plugin mem access count test

2021-11-17 Thread Alex Bennée
When we cleaned up argument handling the test was missed. Fixes: 5ae589faad ("tests/plugins/mem: introduce "track" arg and make args not positional") Signed-off-by: Alex Bennée --- tests/avocado/tcg_plugins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/avocado/tcg

Re: [PATCH v10 04/26] target/loongarch: Add fixed point arithmetic instruction translation

2021-11-17 Thread Richard Henderson
On 11/17/21 10:29 AM, gaosong wrote: gen_rr_i ? The code is not written completely, like this: gen_rr_i12: @fmt_rr_i12   .. imm:s12 rj:5 rd:5 &rr_i slti 001000 . . @fmt_rr_i12 sltui 001001 . . @fm

Re: [PATCH v2 1/3] icount: preserve cflags when custom tb is about to execute

2021-11-17 Thread Richard Henderson
On 11/17/21 10:47 AM, Alex Bennée wrote: -gen_set_label(tcg_ctx->exitreq_label); +if (tcg_ctx->exitreq_label) { +gen_set_label(tcg_ctx->exitreq_label); +} tcg_gen_exit_tb(tb, TB_EXIT_REQUESTED); The exit_tb is also not reachable, and should go in with the label. }

Failing QEMU iotests

2021-11-17 Thread Thomas Huth
Hi! I think it has been working fine for me a couple of weeks ago, but when I now run: make check SPEED=slow I'm getting a couple of failing iotests... not sure whether these are known issues already, so I thought I'd summarize them here: *** First one is 045 in raw mode: *** TEST iote

Re: [PATCH v3 3/3] docs: rSTify the "SubmitAPatch" wiki

2021-11-17 Thread Kashyap Chamarthy
On Wed, Nov 17, 2021 at 10:08:52AM +0100, Thomas Huth wrote: > On 10/11/2021 15.49, Kashyap Chamarthy wrote: [...] > > writing-qmp-commands > > trivial-patches > > submitting-a-pull-request > > + submitting-a-patch > > I'd suggest to insert this before the pull-request entry, in

Re: [PATCH v2 1/3] icount: preserve cflags when custom tb is about to execute

2021-11-17 Thread Alex Bennée
Richard Henderson writes: > On 11/17/21 10:47 AM, Alex Bennée wrote: >> -gen_set_label(tcg_ctx->exitreq_label); >> +if (tcg_ctx->exitreq_label) { >> +gen_set_label(tcg_ctx->exitreq_label); >> +} >> tcg_gen_exit_tb(tb, TB_EXIT_REQUESTED); > > The exit_tb is also not rea

Re: [PATCH 1/2] block:hdev: support BLKSECDISCARD

2021-11-17 Thread Stefan Hajnoczi
On Tue, Nov 16, 2021 at 09:53:39PM -0800, Christoph Hellwig wrote: > On Tue, Nov 16, 2021 at 10:58:30AM +, Stefan Hajnoczi wrote: > > Question for Jens and Christoph: > > > > Is there a way for userspace to detect whether a Linux block device > > supports SECDISCARD? > > I don't know of one.

Re: Fwd: New Defects reported by Coverity Scan for QEMU

2021-11-17 Thread Cédric Le Goater
On 11/16/21 21:21, Luis Fernando Fujita Pires wrote: From: Matheus K. Ferst Hi Cédric, The only change was the helper name that is now uppercase, so nothing new here. The underlying cause is that dfp_finalize_decimal64 only sets dfp->vt.VsrD(1) and set_dfp64 receives a pointer to the complete

Re: [PATCH v2] dump-guest-memory: Use BQL to protect dump finalize process

2021-11-17 Thread Laszlo Ersek
On 11/16/21 14:54, Peter Xu wrote: > When finalizing the dump-guest-memory with detached mode, we'll first set dump > status to either FAIL or COMPLETE before doing the cleanup, however right > after > the dump status change it's possible that another dump-guest-memory qmp > command > is sent so

Re: [PATCH v2] dump-guest-memory: Use BQL to protect dump finalize process

2021-11-17 Thread Peter Xu
On Wed, Nov 17, 2021 at 11:43:42AM +0100, Laszlo Ersek wrote: > On 11/16/21 14:54, Peter Xu wrote: > > When finalizing the dump-guest-memory with detached mode, we'll first set > > dump > > status to either FAIL or COMPLETE before doing the cleanup, however right > > after > > the dump status cha

Re: [PATCH-for-7.0 v4 08/11] tests/unit/test-smp-parse: Add 'smp-without-dies-valid' machine type

2021-11-17 Thread wangyanan (Y)
On 2021/11/17 16:08, Philippe Mathieu-Daudé wrote: Hi Yanan, On 11/17/21 08:37, wangyanan (Y) wrote: On 2021/11/15 22:58, Philippe Mathieu-Daudé wrote: Keep the common TYPE_MACHINE class initialization in machine_base_class_init(), make it abstract, and move the non-common code to a new clas

Re: Failing QEMU iotests

2021-11-17 Thread Hanna Reitz
On 17.11.21 11:07, Thomas Huth wrote:  Hi! I think it has been working fine for me a couple of weeks ago, but when I now run:  make check SPEED=slow I'm getting a couple of failing iotests... not sure whether these are known issues already, so I thought I'd summarize them here: Thanks! **

Re: [PATCH] pmu: fix pmu vmstate subsection list

2021-11-17 Thread Cédric Le Goater
diff --git a/hw/misc/macio/pmu.c b/hw/misc/macio/pmu.c index 4ad4f50e08c3..eb39c64694aa 100644 --- a/hw/misc/macio/pmu.c +++ b/hw/misc/macio/pmu.c @@ -718,6 +718,7 @@ static const VMStateDescription vmstate_pmu = { }, .subsections = (const VMStateDescription * []) { &vmstate_

[RFC PATCH] plugins/meson.build: fix linker issue with weird paths

2021-11-17 Thread Alex Bennée
Signed-off-by: Alex Bennée Fixes: https://gitlab.com/qemu-project/qemu/-/issues/712 --- plugins/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/meson.build b/plugins/meson.build index aeb386ebae..b3de57853b 100644 --- a/plugins/meson.build +++ b/plugins

Re: [PATCH v2 08/15] hw/nvme: Implement the Function Level Reset

2021-11-17 Thread Łukasz Gieryk
On Tue, Nov 16, 2021 at 01:28:19PM -0800, Keith Busch wrote: > On Tue, Nov 16, 2021 at 04:34:39PM +0100, Łukasz Gieryk wrote: > > if (!pci_is_vf(&n->parent_obj) && n->params.sriov_max_vfs) { > > -pcie_sriov_pf_disable_vfs(&n->parent_obj); > > +if (rst != NVME_RESET_CONTROLLER)

Re: [PATCH v2 1/3] icount: preserve cflags when custom tb is about to execute

2021-11-17 Thread Richard Henderson
On 11/17/21 11:29 AM, Alex Bennée wrote: Still missing something to avoid cpu_handle_interrupt firing? Something as simple as: --8<---cut here---start->8--- modified accel/tcg/cpu-exec.c @@ -721,6 +721,15 @@ static inline bool need_replay_interrupt(int in

Re: [PATCH v4 20/25] block_int-common.h: assertion in the callers of BlockDriver function pointers

2021-11-17 Thread Emanuele Giuseppe Esposito
On 15/11/2021 13:48, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi ---   block.c | 17 +   1 file changed, 17 insertions(+) diff --git a/block.c b/block.c index 94bff5c757..40c47

Re: [PULL 0/2] riscv-to-apply queue

2021-11-17 Thread Richard Henderson
repository at: g...@github.com:alistair23/qemu.git tags/pull-riscv-to-apply-2027-1 for you to fetch changes up to c94c239496256f1f1cb589825d052c2f3e26ebf6: meson.build: Merge riscv32 and riscv64 cpu family (2021-11-17 19:1

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

2021-11-17 Thread Philippe Mathieu-Daudé
On 11/17/21 09:49, Cédric Le Goater wrote: > On 11/17/21 09:39, Richard Henderson wrote: >> On 11/16/21 11:48 PM, Alexey Kardashevskiy wrote: >>> Yup. I am doing SLOF updates this way for ages after diifs became >>> quite huge to make mailman barfing on the size, and the "subsystem" >>> in the subj

[PATCH-for-6.2 v2 1/2] hw/nvme/ctrl: Fix buffer overrun in nvme_changed_nslist (CVE-2021-3947)

2021-11-17 Thread Philippe Mathieu-Daudé
Both 'buf_len' and 'off' arguments are under guest control. Since nvme_c2h() doesn't check out of boundary access, the caller must check for eventual buffer overrun on 'trans_len'. Cc: qemu-sta...@nongnu.org Reported-by: Qiuhao Li Fixes: f432fdfa121 ("support changed namespace asynchronous event"

[PATCH-for-6.2 v2 0/2] hw/nvme/ctrl: Fix buffer overrun (CVE-2021-3947)

2021-11-17 Thread Philippe Mathieu-Daudé
Since v1: - Do not add more buffer overflows in modify nvme_smart_info(), nvme_fw_log_info() and nvme_cmd_effects() (Klaus) - Split nvme_error_info() change in another patch Philippe Mathieu-Daudé (2): hw/nvme/ctrl: Fix buffer overrun in nvme_changed_nslist (CVE-2021-3947) hw/nvme/ctrl:

[PATCH-for-6.2 v2 2/2] hw/nvme/ctrl: Prevent buffer overrun in nvme_error_info()

2021-11-17 Thread Philippe Mathieu-Daudé
Both 'buf_len' and 'off' arguments are under guest control. Since nvme_c2h() doesn't check out of boundary access, the caller must check for eventual buffer overrun on 'trans_len'. Cc: qemu-sta...@nongnu.org Fixes: 94a7897c41d ("add support for the get log page command") Signed-off-by: Philippe Ma

Re: Failing QEMU iotests

2021-11-17 Thread Thomas Huth
On 17/11/2021 11.59, Hanna Reitz wrote: On 17.11.21 11:07, Thomas Huth wrote:  Hi! I think it has been working fine for me a couple of weeks ago, but when I now run:  make check SPEED=slow I'm getting a couple of failing iotests... not sure whether these are known issues already, so I though

Re: [PATCH v4 3/9] linux-user/safe-syscall.inc.S: Move to common-user

2021-11-17 Thread Richard Henderson
On 11/16/21 10:03 PM, Warner Losh wrote: I had to add this: diff --git a/meson.build b/meson.build index 0a88bff8d2..349e7a988f 100644 --- a/meson.build +++ b/meson.build @@ -2880,6 +2880,8 @@ foreach target : target_dirs      endif      if 'CONFIG_BSD_USER' in config_target        base_dir =

Re: [PATCH v4 20/25] block_int-common.h: assertion in the callers of BlockDriver function pointers

2021-11-17 Thread Hanna Reitz
On 17.11.21 12:33, Emanuele Giuseppe Esposito wrote: On 15/11/2021 13:48, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi ---   block.c | 17 +   1 file changed, 17 insertions(+) d

Re: [PATCH v3 2/4] s390x: kvm: topology: interception of PTF instruction

2021-11-17 Thread Pierre Morel
On 10/13/21 09:25, Thomas Huth wrote: On 16/09/2021 15.50, Pierre Morel wrote: When the host supports the CPU topology facility, the PTF instruction with function code 2 is interpreted by the SIE, provided that the userland hypervizor activates the interpretation by using the KVM_CAP_S390_CPU

Re: [PULL 0/6] Misc patches for 6.2-rc2

2021-11-17 Thread Richard Henderson
On 11/17/21 11:19 AM, Thomas Huth wrote: Hi Richard! The following changes since commit 8d5fcb1990bc64b62c0bc12121fe510940be5664: Merge tag 'python-pull-request' of https://gitlab.com/jsnow/qemu into staging (2021-11-17 07:41:08 +0100) are available in the Git repository at: https

Re: [PATCH-for-6.2 v2 1/2] hw/nvme/ctrl: Fix buffer overrun in nvme_changed_nslist (CVE-2021-3947)

2021-11-17 Thread Klaus Jensen
On Nov 17 13:35, Philippe Mathieu-Daudé wrote: > Both 'buf_len' and 'off' arguments are under guest control. > Since nvme_c2h() doesn't check out of boundary access, the > caller must check for eventual buffer overrun on 'trans_len'. > > Cc: qemu-sta...@nongnu.org > Reported-by: Qiuhao Li > Fixes

Re: [PATCH v4 20/25] block_int-common.h: assertion in the callers of BlockDriver function pointers

2021-11-17 Thread Emanuele Giuseppe Esposito
On 17/11/2021 13:51, Hanna Reitz wrote: On 17.11.21 12:33, Emanuele Giuseppe Esposito wrote: On 15/11/2021 13:48, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi ---   block.c | 17 +++

Re: [PATCH-for-6.2 v2 2/2] hw/nvme/ctrl: Prevent buffer overrun in nvme_error_info()

2021-11-17 Thread Klaus Jensen
On Nov 17 13:35, Philippe Mathieu-Daudé wrote: > Both 'buf_len' and 'off' arguments are under guest control. > Since nvme_c2h() doesn't check out of boundary access, the > caller must check for eventual buffer overrun on 'trans_len'. > > Cc: qemu-sta...@nongnu.org > Fixes: 94a7897c41d ("add suppor

[PATCH for-6.2] hw/nvme: fix buffer overrun in nvme_changed_nslist (CVE-2021-3947)

2021-11-17 Thread Klaus Jensen
From: Klaus Jensen Fix missing offset verification. Cc: qemu-sta...@nongnu.org Cc: Philippe Mathieu-Daudé Reported-by: Qiuhao Li Fixes: f432fdfa121 ("support changed namespace asynchronous event") Signed-off-by: Klaus Jensen --- Note: Since its so easy to mess this fix up, the log pages code

Re: [PATCH v4 20/25] block_int-common.h: assertion in the callers of BlockDriver function pointers

2021-11-17 Thread Hanna Reitz
On 17.11.21 14:09, Emanuele Giuseppe Esposito wrote: On 17/11/2021 13:51, Hanna Reitz wrote: On 17.11.21 12:33, Emanuele Giuseppe Esposito wrote: On 15/11/2021 13:48, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito Reviewe

Re: [PATCH V2] migration/colo: Optimize COLO primary node start code path

2021-11-17 Thread Juan Quintela
Zhang Chen wrote: > Optimize COLO primary start path from: > MIGRATION_STATUS_XXX --> MIGRATION_STATUS_ACTIVE --> MIGRATION_STATUS_COLO > --> MIGRATION_STATUS_COMPLETED > To: > MIGRATION_STATUS_XXX --> MIGRATION_STATUS_COLO --> MIGRATION_STATUS_COMPLETED > No need to start primary COLO through "M

Re: [PATCH v4 24/25] job.h: split function pointers in JobDriver

2021-11-17 Thread Emanuele Giuseppe Esposito
On 15/11/2021 16:11, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: The job API will be handled separately in another serie. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi ---   include/qemu/job.h | 16   1 file changed, 16 i

Re: [PATCH v4 24/25] job.h: split function pointers in JobDriver

2021-11-17 Thread Hanna Reitz
On 17.11.21 14:43, Emanuele Giuseppe Esposito wrote: On 15/11/2021 16:11, Hanna Reitz wrote: On 25.10.21 12:17, Emanuele Giuseppe Esposito wrote: The job API will be handled separately in another serie. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi ---   include/qe

Re: [PATCH] gitlab-ci: Test compilation on Windows with MSYS2

2021-11-17 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 11/16/21 08:05, Marc-André Lureau wrote: >> Hi >> >> On Mon, Nov 15, 2021 at 6:31 PM Philippe Mathieu-Daudé > > wrote: >> >> On 11/15/21 15:06, Thomas Huth wrote: >> > Gitlab also provides runners with Windows, we can use the

[PATCH v1 2/9] hw/arm/xlnx-versal: Connect Versal's PMC SLCR

2021-11-17 Thread Francisco Iglesias
Connect Versal's PMC SLCR (system-level control registers) model. Signed-off-by: Francisco Iglesias --- hw/arm/xlnx-versal.c | 18 ++ include/hw/arm/xlnx-versal.h | 6 ++ 2 files changed, 24 insertions(+) diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c inde

[PATCH v1 1/9] hw/misc: Add a model of Versal's PMC SLCR

2021-11-17 Thread Francisco Iglesias
Add a model of Versal's PMC SLCR (system-level control registers). Signed-off-by: Francisco Iglesias Signed-off-by: Edgar E. Iglesias --- hw/misc/meson.build|5 +- hw/misc/xlnx-versal-pmc-iou-slcr.c | 1437 include/hw/misc/xlnx-ve

[PATCH v1 3/9] include/hw/dma/xlnx_csu_dma: Include ptimer.h and stream.h in the header

2021-11-17 Thread Francisco Iglesias
Include ptimer.h and stream.h in the header for being able to build and reuse the DMA model (the first usage of StreamSink, StreamCanPushNotifyFn and ptimer_state is in the header). Signed-off-by: Francisco Iglesias --- include/hw/dma/xlnx_csu_dma.h | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH v1 9/9] hw/arm/xlnx-versal-virt: Connect mt35xu01g flashes to the OSPI

2021-11-17 Thread Francisco Iglesias
Connect Micron Xccela mt35xu01g flashes to the OSPI flash memory controller. Signed-off-by: Francisco Iglesias --- hw/arm/xlnx-versal-virt.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c index d2f55e29b6..f2f12a

[PATCH v1 4/9] hw/dma: Add the DMA control interface

2021-11-17 Thread Francisco Iglesias
Add an interface for controlling DMA models that are reused with other models. This allows a controlling model to start transfers through the DMA while reusing the DMA's handling of transfer state and completion signaling. Signed-off-by: Francisco Iglesias --- hw/dma/dma-ctrl.c | 31

[PATCH v1 5/9] hw/dma/xlnx_csu_dma: Implement the DMA control interface

2021-11-17 Thread Francisco Iglesias
Implement the DMA control interface for allowing control of DMA operations from inside models that contain instances of (and reuse) the Xilinx CSU DMA. Signed-off-by: Francisco Iglesias --- hw/dma/xlnx_csu_dma.c | 32 include/hw/dma/xlnx_csu_dma.h | 4 ++

[PATCH v1 8/9] hw/block/m25p80: Add support for Micron Xccela flash mt35xu01g

2021-11-17 Thread Francisco Iglesias
Add support for Micron Xccela flash mt35xu01g. Signed-off-by: Francisco Iglesias --- hw/block/m25p80.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index b77503dc84..c6bf3c6bfa 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -255,6 +255,8

[PATCH v1 7/9] hw/arm/xlnx-versal: Connect the OSPI flash memory controller model

2021-11-17 Thread Francisco Iglesias
Connect the OSPI flash memory controller model (including the source and destination DMA). Signed-off-by: Francisco Iglesias --- hw/arm/xlnx-versal.c | 89 include/hw/arm/xlnx-versal.h | 18 + 2 files changed, 107 insertions(+) diff -

[PATCH v1 6/9] hw/ssi: Add a model of Xilinx Versal's OSPI flash memory controller

2021-11-17 Thread Francisco Iglesias
Add a model of Xilinx Versal's OSPI flash memory controller. Signed-off-by: Francisco Iglesias --- hw/ssi/meson.build|1 + hw/ssi/xlnx-versal-ospi.c | 1892 + include/hw/ssi/xlnx-versal-ospi.h | 86 ++ 3 files changed, 1979 insert

Re: [PATCH] tests/9pfs: use g_autofree where possible

2021-11-17 Thread Christian Schoenebeck
On Dienstag, 16. November 2021 17:40:08 CET Christian Schoenebeck wrote: > Signed-off-by: Christian Schoenebeck > --- > tests/qtest/virtio-9p-test.c | 86 +++- > 1 file changed, 25 insertions(+), 61 deletions(-) > > diff --git a/tests/qtest/virtio-9p-test.c b/test

[PATCH v1] chardev/wctable: don't free the instance in wctablet_chr_finalize

2021-11-17 Thread Daniil Tatianin
Object is supposed to be freed by invoking obj->free, and not obj->instance_finalize. This would lead to use-after-free followed by double free in object_unref/object_finalize. Signed-off-by: Daniil Tatianin --- chardev/wctablet.c | 1 - 1 file changed, 1 deletion(-) diff --git a/chardev/wctabl

Re: [PATCH v2] hw/arm/virt: Expose empty NUMA nodes through ACPI

2021-11-17 Thread Jonathan Cameron
On Tue, 16 Nov 2021 12:11:29 +0100 David Hildenbrand wrote: > >> > >> Examples include exposing HBM or PMEM to the VM. Just like on real HW, > >> this memory is exposed via cpu-less, special nodes. In contrast to real > >> HW, the memory is hotplugged later (I don't think HW supports hotplug > >>

[PATCH v1 0/9] Xilinx Versal's PMC SLCR and OSPI support

2021-11-17 Thread Francisco Iglesias
Hi, This series attempts to add support for Xilinx Versal's PMC SLCR (system-level control registers) and OSPI flash memory controller to Xilinx Versal virt machine. The series start with adding a model of Versal's PMC SLCR and connecting the model to the Versal virt machine. The series then adds

Re: [PATCH v3 3/3] docs: rSTify the "SubmitAPatch" wiki

2021-11-17 Thread Thomas Huth
On 17/11/2021 11.25, Kashyap Chamarthy wrote: ... +QEMU follows the usual standard for git commit messages: the first line +(which becomes the email subject line) is "subsystem: single line +summary of change". Whether the "single line summary of change" starts +with a capital is a matter of tast

Re: [PATCH] gitlab-ci: Test compilation on Windows with MSYS2

2021-11-17 Thread Daniel P . Berrangé
On Wed, Nov 17, 2021 at 01:52:57PM +, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > > > On 11/16/21 08:05, Marc-André Lureau wrote: > >> Hi > >> > >> On Mon, Nov 15, 2021 at 6:31 PM Philippe Mathieu-Daudé >> > wrote: > >> > >> On 11/15/21 15:06, Thoma

Re: Failing QEMU iotests

2021-11-17 Thread Daniel P . Berrangé
On Wed, Nov 17, 2021 at 01:50:12PM +0100, Thomas Huth wrote: > On 17/11/2021 11.59, Hanna Reitz wrote: > > On 17.11.21 11:07, Thomas Huth wrote: > > > > > >  Hi! > > > > > > I think it has been working fine for me a couple of weeks ago, > > > but when I now run: > > > > > >  make check SPEED=slo

[PATCH v1] hw/i386/amd_iommu: clean up broken event logging

2021-11-17 Thread Daniil Tatianin
- Don't create evt buffer in every function where we want to log, instead make amdvi_log_event construct the buffer in-place using the arguments it was given. - Correctly place address & info in the event buffer. Previously both would get shifted to incorrect bit offsets leading to evt conta

[RFC PATCH v3 3/5] qapi: Implement x-machine-init QMP command

2021-11-17 Thread Damien Hedde
From: Mirela Grujic The x-machine-init QMP command is available only if the -preconfig option is used and the current machine initialization phase is accel-created. The command triggers QEMU to enter machine initialized phase and wait for the QMP configuration. In the next commit, we will add th

[RFC PATCH v3 0/5] QMP support for cold-plugging devices

2021-11-17 Thread Damien Hedde
Hi all, This series adds support for cold-plugging devices using QMP commands. It is a step towards machine configuration using QMP, but it does not allow the user to add more devices than he could do with the CLI options before. Right now we can add a device using 2 ways: + giving "-device" CLI

[RFC PATCH v3 1/5] rename MachineInitPhase enum constants for QAPI compatibility

2021-11-17 Thread Damien Hedde
From: Mirela Grujic This commit is a preparation to switch to a QAPI definition of the MachineInitPhase enum. QAPI will generate enumeration constants prefixed with the MACHINE_INIT_PHASE_, so rename values accordingly. Signed-off-by: Mirela Grujic Signed-off-by: Damien Hedde --- include/hw/

[RFC PATCH v3 5/5] docs/system: improve doc about preconfig

2021-11-17 Thread Damien Hedde
Separate -S / -preconfig sections and improve a bit the preconfig part. Signed-off-by: Damien Hedde Signed-off-by: Mirela Grujic --- docs/system/managed-startup.rst | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/system/managed-startup.rst b/docs/sy

[RFC PATCH v3 4/5] qapi: Allow device_add to execute in machine initialized phase

2021-11-17 Thread Damien Hedde
From: Mirela Grujic This commit allows to use the QMP command to add a cold-plugged device like we can do with the CLI option -device. Note: for device_add command in qdev.json adding the 'allow-preconfig' option has no effect because the command appears to bypass QAPI (see TODO at qapi/qdev.jso

[RFC PATCH v3 2/5] qapi: Implement query-machine-phase QMP command

2021-11-17 Thread Damien Hedde
From: Mirela Grujic The command returns current machine initialization phase. >From now on, the MachineInitPhase enum is generated from the QAPI schema. Signed-off-by: Mirela Grujic Signed-off-by: Damien Hedde Reviewed-by: Philippe Mathieu-Daudé --- v3: + add 'unstable' feature + bump to v

Re: [PATCH v1] chardev/wctable: don't free the instance in wctablet_chr_finalize

2021-11-17 Thread Marc-André Lureau
Hi On Wed, Nov 17, 2021 at 6:25 PM Daniil Tatianin wrote: > > Object is supposed to be freed by invoking obj->free, and not > obj->instance_finalize. This would lead to use-after-free followed by > double free in object_unref/object_finalize. > > Signed-off-by: Daniil Tatianin Fixes: 378af96155

[PATCH 0/2] iotests: Fix crypto algorithm failures

2021-11-17 Thread Hanna Reitz
Hi, iotests 149, 206, and 210 fail when qemu uses the gnutls crypto backend (which is the default as of 8bd0931f6) because they try to use algorithms that this backend does not support. Have 206 and 210 use different algorithms instead (patch 1), and let 149 be skipped when it encounters an unsup

[PATCH 1/2] iotests: Use aes-128-cbc

2021-11-17 Thread Hanna Reitz
Our gnutls crypto backend (which is the default as of 8bd0931f6) supports neither twofish-128 nor the CTR mode. CBC and aes-128 are supported by all of our backends (as far as I can tell), so use aes-128-cbc in our iotests. (We could also use e.g. aes-256-cbc, but the different key sizes would le

[PATCH 2/2] iotests/149: Skip on unsupported ciphers

2021-11-17 Thread Hanna Reitz
Whenever qemu-img or qemu-io report that some cipher is unsupported, skip the whole test, because that is probably because qemu has been configured with the gnutls crypto backend. We could taylor the algorithm list to what gnutls supports, but this is a test that is run rather rarely anyway (becau

Re: [PATCH 2/2] iotests/149: Skip on unsupported ciphers

2021-11-17 Thread Hanna Reitz
On 17.11.21 16:01, Hanna Reitz wrote: Whenever qemu-img or qemu-io report that some cipher is unsupported, skip the whole test, because that is probably because qemu has been configured with the gnutls crypto backend. We could taylor the algorithm list to what gnutls supports, but this is a test

[PATCH v2 2/2] iotests/149: Skip on unsupported ciphers

2021-11-17 Thread Hanna Reitz
Whenever qemu-img or qemu-io report that some cipher is unsupported, skip the whole test, because that is probably because qemu has been configured with the gnutls crypto backend. We could taylor the algorithm list to what gnutls supports, but this is a test that is run rather rarely anyway (becau

[PATCH v2 0/2] iotests: Fix crypto algorithm failures

2021-11-17 Thread Hanna Reitz
Hi, iotests 149, 206, and 210 fail when qemu uses the gnutls crypto backend (which is the default as of 8bd0931f6) because they try to use algorithms that this backend does not support. Have 206 and 210 use different algorithms instead (patch 1), and let 149 be skipped when it encounters an unsup

[PATCH v2 1/2] iotests: Use aes-128-cbc

2021-11-17 Thread Hanna Reitz
Our gnutls crypto backend (which is the default as of 8bd0931f6) supports neither twofish-128 nor the CTR mode. CBC and aes-128 are supported by all of our backends (as far as I can tell), so use aes-128-cbc in our iotests. (We could also use e.g. aes-256-cbc, but the different key sizes would le

[PATCH v4] s390: kvm: adjust diag318 resets to retain data

2021-11-17 Thread Collin Walling
The CPNC portion of the diag318 data is erroneously reset during an initial CPU reset caused by SIGP. Let's go ahead and relocate the diag318_info field within the CPUS390XState struct such that it is only zeroed during a clear reset. This way, the CPNC will be retained for each VCPU in the configu

Re: [PATCH v3] s390: kvm: adjust diag318 resets to retain data

2021-11-17 Thread Collin Walling
On 11/17/21 02:43, Christian Borntraeger wrote: > Am 09.11.21 um 21:56 schrieb Collin Walling: >> The CPNC portion of the diag 318 data is erroneously reset during an >> initial CPU reset caused by SIGP. Let's go ahead and relocate the >> diag318_info field within the CPUS390XState struct such that

Re: [PATCH v3 3/3] docs: rSTify the "SubmitAPatch" wiki

2021-11-17 Thread Kashyap Chamarthy
On Wed, Nov 17, 2021 at 03:43:56PM +0100, Thomas Huth wrote: > On 17/11/2021 11.25, Kashyap Chamarthy wrote: [...] > > > That ".". looks a little bit weird in the output ... maybe we should > > > replace > > > it with "does not end with a dot." ? > > > > Re-looking the output, yes it does look

Re: [PATCH v2 2/2] iotests/149: Skip on unsupported ciphers

2021-11-17 Thread Daniel P . Berrangé
On Wed, Nov 17, 2021 at 04:17:07PM +0100, Hanna Reitz wrote: > Whenever qemu-img or qemu-io report that some cipher is unsupported, > skip the whole test, because that is probably because qemu has been > configured with the gnutls crypto backend. > > We could taylor the algorithm list to what gnut

  1   2   3   >