Re: [RFC v4 2/3] virtio-blk: add zoned storage emulation for zoned devices

2022-11-03 Thread Sam Li
Stefan Hajnoczi 于2022年11月3日周四 04:58写道: > > On Sun, Oct 30, 2022 at 05:32:41AM -0400, Sam Li wrote: > > This patch extends virtio-blk emulation to handle zoned device commands > > by calling the new block layer APIs to perform zoned device I/O on > > behalf of the guest. It supports Report Zone,

Re: [RFC v4 3/3] virtio-blk: add some trace events for zoned emulation

2022-11-03 Thread Sam Li
Philippe Mathieu-Daudé 于2022年11月3日周四 05:21写道: > > Hi, > > On 30/10/22 10:32, Sam Li wrote: > > Signed-off-by: Sam Li > > --- > > hw/block/trace-events | 7 +++ > > hw/block/virtio-blk.c | 12 > > 2 files changed, 19 insertions(+) > > > > diff --git a/hw/block/trace-events

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

2022-11-03 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 3/11/22 11:47, Zhenyu Zhang wrote: >> Since the amount of prealloc-threads to smp-cpus is >> defaulted in hostmem, so sync this information. Has this always defaulted to smp-cpus, or did this change along the way? >> Signed-off-by: Zhenyu Zhang >> --- >>

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

2022-11-03 Thread Rui Wang
We need to emulate it to generate a floating point disable exception when CSR.EUEN.FPE is zero. Reviewed-by: Richard Henderson Reviewed-by: Song Gao Signed-off-by: Rui Wang --- target/loongarch/cpu.c| 2 ++ target/loongarch/cpu.h| 2 ++

[PATCH v3 1/2] target/loongarch: Adjust the layout of hardware flags bit fields

2022-11-03 Thread Rui Wang
Suggested-by: Richard Henderson Reviewed-by: Song Gao Signed-off-by: Rui Wang --- target/loongarch/cpu.h | 9 - target/loongarch/insn_trans/trans_privileged.c.inc | 2 +- target/loongarch/translate.c | 6 +- 3 files changed, 14

[PATCH v3 0/2] target/loongarch: Fix emulation of float-point disable exception

2022-11-03 Thread Rui Wang
v3: target/loongarch: Adjust the layout of hardware flags bit fields target/loongarch: Fix emulation of float-point disable exception target/loongarch/cpu.c| 2 ++ target/loongarch/cpu.h| 11 +- .../loongarch/insn_trans/trans_farith.c.inc

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

2022-11-03 Thread Ani Sinha
On Fri, Nov 4, 2022 at 02:02 Michael S. Tsirkin wrote: > On Thu, Nov 03, 2022 at 11:14:21PM +0530, Ani Sinha wrote: > > > > > > On Thu, Nov 3, 2022 at 23:11 Daniel P. Berrangé > wrote: > > > > On Thu, Nov 03, 2022 at 10:26:26PM +0530, Ani Sinha wrote: > > > On Thu, Nov 3, 2022 at 10:18

Re: [PATCH v9 4/8] KVM: Use gfn instead of hva for mmu_notifier_retry

2022-11-03 Thread Chao Peng
On Thu, Oct 27, 2022 at 11:29:14AM +0100, Fuad Tabba wrote: > Hi, > > On Tue, Oct 25, 2022 at 4:19 PM Chao Peng wrote: > > > > Currently in mmu_notifier validate path, hva range is recorded and then > > checked against in the mmu_notifier_retry_hva() of the page fault path. > > However, for the

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

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

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

2022-11-03 Thread Zhenyu Zhang
Hello Philippe I checked out this modified patch: https://www.mail-archive.com/qemu-devel@nongnu.org/msg15.html It should have been merged in 7.1 On Thu, Nov 3, 2022 at 7:00 PM Philippe Mathieu-Daudé wrote: > > On 3/11/22 11:47, Zhenyu Zhang wrote: > > Since the amount of prealloc-threads

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

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

Re: [PATCH v9 5/8] KVM: Register/unregister the guest private memory regions

2022-11-03 Thread Sean Christopherson
On Tue, Oct 25, 2022, Chao Peng wrote: > @@ -4708,6 +4802,24 @@ static long kvm_vm_ioctl(struct file *filp, > r = kvm_vm_ioctl_set_memory_region(kvm, ); > break; > } > +#ifdef CONFIG_KVM_GENERIC_PRIVATE_MEM > + case KVM_MEMORY_ENCRYPT_REG_REGION: > + case

Re: [PATCH] gitlab-ci: split clang-user to avoid timeout

2022-11-03 Thread Richard Henderson
On 11/4/22 09:32, Philippe Mathieu-Daudé wrote: +Richard On 3/11/22 22:23, Stefan Hajnoczi wrote: GitLab CI times out when the clang-user job takes over 1 hour. Split it into parts that check various architectures. An alternative is to have one job per architecture but that clutters the

Re: [PATCH] gitlab-ci: split clang-user to avoid timeout

2022-11-03 Thread Philippe Mathieu-Daudé
+Richard On 3/11/22 22:23, Stefan Hajnoczi wrote: GitLab CI times out when the clang-user job takes over 1 hour. Split it into parts that check various architectures. An alternative is to have one job per architecture but that clutters the pipeline view and maybe there is some sharing when

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

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

Re: [PATCH v4 10/22] hw/virtio: move vm_running check to virtio_device_started

2022-11-03 Thread Michael S. Tsirkin
On Thu, Nov 03, 2022 at 04:30:48PM -0400, Michael S. Tsirkin wrote: > On Thu, Nov 03, 2022 at 07:18:30PM +, Alex Bennée wrote: > > > > "Michael S. Tsirkin" writes: > > > > > On Tue, Aug 02, 2022 at 10:49:58AM +0100, Alex Bennée wrote: > > >> All the boilerplate virtio code does the same

Re: [PATCH 2/2] gitlab: show configure/make args before running

2022-11-03 Thread Richard Henderson
On 11/4/22 06:06, Stefan Hajnoczi wrote: On Thu, 3 Nov 2022 at 13:30, Daniel P. Berrangé wrote: When debugging failed jobs it is helpful to see the full configure/make args used, without having to search the gitlab config file to figure it out. Signed-off-by: Daniel P. Berrangé ---

Re: [PATCH] meson: avoid unused arguments of main() in compiler tests

2022-11-03 Thread Richard Henderson
On 11/4/22 04:21, Paolo Bonzini wrote: meson.build has one test where "main" is declared unnecessarily with argc and argv arguments, but does not use them. Because the test needs -Werror too, HAVE_BROKEN_SIZE_MAX is defined incorrectly. Fix the test and, for consistency, remove argc and argv

Re: [PULL 0/4] Linux user for 7.2 patches

2022-11-03 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/2] hw/nvme fixes

2022-11-03 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/5] Misc patches for QEMU 7.2 soft freeze

2022-11-03 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/7.2 for any user-visible changes. signature.asc Description: PGP signature

[PATCH] gitlab-ci: split clang-user to avoid timeout

2022-11-03 Thread Stefan Hajnoczi
GitLab CI times out when the clang-user job takes over 1 hour. Split it into parts that check various architectures. An alternative is to have one job per architecture but that clutters the pipeline view and maybe there is some sharing when multiple targets are built at once. Signed-off-by:

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

2022-11-03 Thread Richard Henderson
On 11/3/22 23:25, Rui Wang wrote: +/* + * LoongArch CPUs hardware flags. + * bit[2..0] for MMU index. + * bit[7..4] for CSR.EUEN.{ BTE, ASXE, SXE, FPE }. + */ +#define HW_FLAGS_MMU_MASK 0x07 +#define HW_FLAGS_EUEN_FPE 0x10 + static inline void cpu_get_tb_cpu_state(CPULoongArchState *env,

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

2022-11-03 Thread Richard Henderson
On 11/3/22 19:02, Rui Wang wrote: +static void check_fpe(DisasContext *ctx) +{ +#ifndef CONFIG_USER_ONLY +TCGLabel *skip = gen_new_label(); +TCGv tmp = tcg_temp_new(); + +tcg_gen_andi_tl(tmp, cpu_euen, R_CSR_EUEN_FPE_MASK); +tcg_gen_brcond_tl(TCG_COND_NE, tmp, ctx->zero, skip); +

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

2022-11-03 Thread Michael S. Tsirkin
On Thu, Nov 03, 2022 at 11:14:21PM +0530, Ani Sinha wrote: > > > On Thu, Nov 3, 2022 at 23:11 Daniel P. Berrangé wrote: > > On Thu, Nov 03, 2022 at 10:26:26PM +0530, Ani Sinha wrote: > > On Thu, Nov 3, 2022 at 10:18 PM Ani Sinha wrote: > > > > > > On Thu, Nov 3, 2022 at 10:17

Re: [PATCH v4 10/22] hw/virtio: move vm_running check to virtio_device_started

2022-11-03 Thread Michael S. Tsirkin
On Thu, Nov 03, 2022 at 07:18:30PM +, Alex Bennée wrote: > > "Michael S. Tsirkin" writes: > > > On Tue, Aug 02, 2022 at 10:49:58AM +0100, Alex Bennée wrote: > >> All the boilerplate virtio code does the same thing (or should at > >> least) of checking to see if the VM is running before

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

2022-11-03 Thread Richard Henderson
On 11/4/22 00:19, Peter Maydell wrote: @@ -2671,6 +2671,13 @@ static bool get_phys_addr_with_struct(CPUARMState *env, S1Translate *ptw, bool is_secure = ptw->in_secure; ARMMMUIdx s1_mmu_idx; +/* + * The page table entries may downgrade secure to non-secure, but + *

Re: [PATCH] meson: avoid unused arguments of main() in compiler tests

2022-11-03 Thread Stefan Weil via
Am 03.11.22 um 18:21 schrieb Paolo Bonzini: meson.build has one test where "main" is declared unnecessarily with argc and argv arguments, but does not use them. Because the test needs -Werror too, HAVE_BROKEN_SIZE_MAX is defined incorrectly. Fix the test and, for consistency, remove argc and

Re: [PATCH v3] linux-user: implement execveat

2022-11-03 Thread Helge Deller
On 11/3/22 18:32, Drew DeVault wrote: References: https://gitlab.com/qemu-project/qemu/-/issues/1007 Signed-off-by: Drew DeVault --- v2 => v3: - Rebase to address the is_proc_myself fix - Drop the ifdefs linux-user/syscall.c | 203 ++- 1 file changed,

Re: [PATCH v4 10/22] hw/virtio: move vm_running check to virtio_device_started

2022-11-03 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Tue, Aug 02, 2022 at 10:49:58AM +0100, Alex Bennée wrote: >> All the boilerplate virtio code does the same thing (or should at >> least) of checking to see if the VM is running before attempting to >> start VirtIO. Push the logic up to the common function to

Re: [PATCH 2/2] gitlab: show configure/make args before running

2022-11-03 Thread Stefan Hajnoczi
On Thu, 3 Nov 2022 at 13:30, Daniel P. Berrangé wrote: > > When debugging failed jobs it is helpful to see the > full configure/make args used, without having to search > the gitlab config file to figure it out. > > Signed-off-by: Daniel P. Berrangé > --- > .gitlab-ci.d/buildtest-template.yml

Re: [PATCH 1/2] gitlab: remove redundant setting of PKG_CONFIG_PATH

2022-11-03 Thread Stefan Hajnoczi
On Thu, 3 Nov 2022 at 13:30, Daniel P. Berrangé wrote: > > The PKG_CONFIG_PATH variable is not defined in GitLab CI > envs and even if it was, we don't need to set it to its > existing value. > > Signed-off-by: Daniel P. Berrangé > --- > .gitlab-ci.d/crossbuild-template.yml | 9 +++-- > 1

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

2022-11-03 Thread manish.mishra
On 03/11/22 11:47 pm, manish.mishra wrote: On 03/11/22 11:27 pm, Daniel P. Berrangé wrote: On Thu, Nov 03, 2022 at 11:06:23PM +0530, manish.mishra wrote: On 03/11/22 10:57 pm, Daniel P. Berrangé wrote: On Thu, Nov 03, 2022 at 10:04:54PM +0530, manish.mishra wrote: On 03/11/22 2:59 pm,

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

2022-11-03 Thread manish.mishra
On 03/11/22 11:47 pm, manish.mishra wrote: On 03/11/22 11:27 pm, Daniel P. Berrangé wrote: On Thu, Nov 03, 2022 at 11:06:23PM +0530, manish.mishra wrote: On 03/11/22 10:57 pm, Daniel P. Berrangé wrote: On Thu, Nov 03, 2022 at 10:04:54PM +0530, manish.mishra wrote: On 03/11/22 2:59 pm,

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

2022-11-03 Thread Paolo Bonzini
Queued, thanks. Paolo

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

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

Re: [PATCH] gdb-xml: Fix size of EFER register on i386 architecture when debugged by GDB

2022-11-03 Thread Paolo Bonzini
On 9/13/22 14:06, TaiseiIto wrote: Before this commit, there were contradictory descriptions about size of EFER register. Line 113 says the size is 8 bytes. Line 129 says the size is 4 bytes. As a result, when GDB is debugging an OS running on QEMU, the GDB cannot read 'g' packets correctly.

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

2022-11-03 Thread Paolo Bonzini
On 11/3/22 19:06, Kevin Wolf wrote: I think it can make sense to have coroutine_fn as a documentation for things that are only ever called in a coroutine even if they could theoretically also work outside of coroutine context. Otherwise, when we want to introduce a coroutine_fn call somewhere,

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

2022-11-03 Thread Stefan Hajnoczi
Linux v6.0 dm-crypt returns errno EIO from unaligned O_DIRECT pread(2) calls. Alignment probing fails on dm-crypt devices because the code expects EINVAL. This is a kernel regression that is expected to be fixed upstream:

[PATCH v2 2/2] file-posix: add statx(STATX_DIOALIGN) support

2022-11-03 Thread Stefan Hajnoczi
Linux v6.1 commit 825cf206ed51 ("statx: add direct I/O alignment information") added an interface to fetch O_DIRECT alignment values for block devices and file systems. Prefer STATX_DIOALIGN to older interfaces and probing, but keep them as fallbacks in case STATX_DIOALIGN cannot provide the

[PATCH v2 0/2] file-posix: alignment probing improvements

2022-11-03 Thread Stefan Hajnoczi
v2: - Make sure that XFS_IOC_DIOINFO takes priority over logical blocksize [Eric Biggers] - Included a link to Eric's linux-block regression email These patches fix alignment probing with dm-crypt and add support for the new Linux statx(STATX_DIOALIGN) interface. Given that Linux v6.0 kernels

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

2022-11-03 Thread Stefan Hajnoczi
The cross-win32-system GitLab CI job fails to build with the following error: i686-w64-mingw32-gcc -m32 -Ilibqemu-loongarch64-softmmu.fa.p -I. -I.. -Itarget/loongarch -I../target/loongarch -I../dtc/libfdt -Iqapi -Itrace -Iui -Iui/shader -I/usr/i686-w64-mingw32/sys-root/mingw/include/pixman-1

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

2022-11-03 Thread manish.mishra
On 03/11/22 11:27 pm, Daniel P. Berrangé wrote: On Thu, Nov 03, 2022 at 11:06:23PM +0530, manish.mishra wrote: On 03/11/22 10:57 pm, Daniel P. Berrangé wrote: On Thu, Nov 03, 2022 at 10:04:54PM +0530, manish.mishra wrote: On 03/11/22 2:59 pm, Daniel P. Berrangé wrote: On Thu, Nov 03, 2022

Re: [PATCH v2 1/2] hw/i386/postcard.c: New ISA POST card device

2022-11-03 Thread Paolo Bonzini
On 7/7/22 02:37, Lev Kujawski wrote: @@ -1139,12 +1120,10 @@ void pc_basic_device_init(struct PCMachineState *pcms, qemu_irq pit_alt_irq = NULL; qemu_irq rtc_irq = NULL; ISADevice *pit = NULL; -MemoryRegion *ioport80_io = g_new(MemoryRegion, 1); MemoryRegion *ioportF0_io

Re: [PATCH 1/2] hw/cxl: set cxl-type3 device type to PCI_CLASS_MEMORY_CXL

2022-11-03 Thread Jonathan Cameron via
On Wed, 26 Oct 2022 17:07:53 -0400 Gregory Price wrote: > On Wed, Oct 26, 2022 at 04:11:29PM -0400, Michael S. Tsirkin wrote: > > He does but in the end he sends patches not pull requests. > > I don't care really as long as someone will send it up. > > > > Jonathan will submit this, it's not

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

2022-11-03 Thread Kevin Wolf
Am 03.11.2022 um 17:56 hat Paolo Bonzini geschrieben: > On 11/3/22 14:41, Emanuele Giuseppe Esposito wrote: > > block_copy_reset_unallocated and block_copy_is_cluster_allocated are > > only called by backup_run, a corotuine_fn itself. s/corotuine_fn/coroutine_fn/ > > > > Same applies to

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

2022-11-03 Thread Daniel P . Berrangé
On Thu, Nov 03, 2022 at 11:06:23PM +0530, manish.mishra wrote: > > On 03/11/22 10:57 pm, Daniel P. Berrangé wrote: > > On Thu, Nov 03, 2022 at 10:04:54PM +0530, manish.mishra wrote: > > > On 03/11/22 2:59 pm, Daniel P. Berrangé wrote: > > > > On Thu, Nov 03, 2022 at 02:50:25PM +0530,

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

2022-11-03 Thread Stefan Hajnoczi
On Thu, Nov 03, 2022 at 04:54:09PM +, Eric Biggers wrote: > On Thu, Nov 03, 2022 at 04:26:14PM +, Eric Biggers wrote: > > > In other words, STATX_DIOALIGN is unusable from the start because we > > > don't know whether the information it returns is actually correct? :-/ > > > > That's a

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

2022-11-03 Thread Ani Sinha
On Thu, Nov 3, 2022 at 23:11 Daniel P. Berrangé wrote: > On Thu, Nov 03, 2022 at 10:26:26PM +0530, Ani Sinha wrote: > > On Thu, Nov 3, 2022 at 10:18 PM Ani Sinha wrote: > > > > > > On Thu, Nov 3, 2022 at 10:17 PM Ani Sinha wrote: > > > > > > > > On Thu, Nov 3, 2022 at 9:12 PM Ani Sinha wrote:

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

2022-11-03 Thread Daniel P . Berrangé
On Thu, Nov 03, 2022 at 10:26:26PM +0530, Ani Sinha wrote: > On Thu, Nov 3, 2022 at 10:18 PM Ani Sinha wrote: > > > > On Thu, Nov 3, 2022 at 10:17 PM Ani Sinha wrote: > > > > > > On Thu, Nov 3, 2022 at 9:12 PM Ani Sinha wrote: > > > > > > > > > To pull this image: > > > > > > > > > $ docker

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

2022-11-03 Thread manish.mishra
On 03/11/22 10:57 pm, Daniel P. Berrangé wrote: On Thu, Nov 03, 2022 at 10:04:54PM +0530, manish.mishra wrote: On 03/11/22 2:59 pm, Daniel P. Berrangé wrote: On Thu, Nov 03, 2022 at 02:50:25PM +0530, manish.mishra wrote: On 01/11/22 9:15 pm, Daniel P. Berrangé wrote: On Tue, Nov 01, 2022

[PATCH v3] linux-user: implement execveat

2022-11-03 Thread Drew DeVault
References: https://gitlab.com/qemu-project/qemu/-/issues/1007 Signed-off-by: Drew DeVault --- v2 => v3: - Rebase to address the is_proc_myself fix - Drop the ifdefs linux-user/syscall.c | 203 ++- 1 file changed, 105 insertions(+), 98 deletions(-) diff

[PATCH 1/2] gitlab: remove redundant setting of PKG_CONFIG_PATH

2022-11-03 Thread Daniel P . Berrangé
The PKG_CONFIG_PATH variable is not defined in GitLab CI envs and even if it was, we don't need to set it to its existing value. Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.d/crossbuild-template.yml | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git

[PATCH 0/2] gitlab: improve debuggability of jobs

2022-11-03 Thread Daniel P . Berrangé
This ensures that the main configure/make commands run have their args echoed into the build logs. Daniel P. Berrangé (2): gitlab: remove redundant setting of PKG_CONFIG_PATH gitlab: show configure/make args before running .gitlab-ci.d/buildtest-template.yml | 4

[PATCH 2/2] gitlab: show configure/make args before running

2022-11-03 Thread Daniel P . Berrangé
When debugging failed jobs it is helpful to see the full configure/make args used, without having to search the gitlab config file to figure it out. Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.d/buildtest-template.yml | 4 .gitlab-ci.d/crossbuild-template.yml | 15 +++ 2

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

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

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

2022-11-03 Thread Paolo Bonzini
On 11/2/22 21:22, Stefan Weil via wrote: != "no"; then cat > $TMPC << EOF int main(int argc, char *argv[]) { +(void)argc; char arr[64], *p = arr, *c = argv[0]; You could use argv[argc - 1] instead. Paolo while (*c) { *p++ = *c++;

[PATCH] meson: avoid unused arguments of main() in compiler tests

2022-11-03 Thread Paolo Bonzini
meson.build has one test where "main" is declared unnecessarily with argc and argv arguments, but does not use them. Because the test needs -Werror too, HAVE_BROKEN_SIZE_MAX is defined incorrectly. Fix the test and, for consistency, remove argc and argv whenever they are not needed.

Re: [PATCH v11 09/11] s390x/cpu topology: add topology machine property

2022-11-03 Thread Cornelia Huck
On Thu, Nov 03 2022, Pierre Morel wrote: > We keep the possibility to switch on/off the topology on newer > machines with the property topology=[on|off]. > > Signed-off-by: Pierre Morel > --- > include/hw/boards.h| 3 +++ > include/hw/s390x/cpu-topology.h| 8 +++- >

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

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

Re: [PATCH v2] linux-user: implement execveat

2022-11-03 Thread Laurent Vivier
Le 03/11/2022 à 15:57, Drew DeVault a écrit : References: https://gitlab.com/qemu-project/qemu/-/issues/1007 Signed-off-by: Drew DeVault --- linux-user/syscall.c | 204 +++ 1 file changed, 111 insertions(+), 93 deletions(-) diff --git

[PATCH v11 11/11] docs/s390x: document s390x cpu topology

2022-11-03 Thread Pierre Morel
Add some basic examples for the definition of cpu topology in s390x. Signed-off-by: Pierre Morel --- docs/system/s390x/cpu-topology.rst | 80 ++ 1 file changed, 80 insertions(+) create mode 100644 docs/system/s390x/cpu-topology.rst diff --git

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

2022-11-03 Thread Paolo Bonzini
On 11/3/22 14:41, Emanuele Giuseppe Esposito wrote: -for (i = 0; i < bs->quiesce_counter; i++) { -if (drv->bdrv_co_drain_begin) { -drv->bdrv_co_drain_begin(bs); -} +if (drv->bdrv_co_drain_begin) { +co = qemu_coroutine_create(bdrv_co_drain_begin, ); +

[PATCH v11 07/11] target/s390x: interception of PTF instruction

2022-11-03 Thread Pierre Morel
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_TOPOLOGY KVM extension. The PTF instructions with function code 0 and 1 are

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

2022-11-03 Thread Paolo Bonzini
On 11/3/22 14:42, Emanuele Giuseppe Esposito wrote: Delete the if case and make sure it won't be called again in coroutines. Signed-off-by: Emanuele Giuseppe Esposito --- block.c | 37 - 1 file changed, 16 insertions(+), 21 deletions(-) diff --git

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

2022-11-03 Thread Stefan Hajnoczi
On Thu, Nov 3, 2022, 12:49 Daniel P. Berrangé wrote: > On Thu, Nov 03, 2022 at 04:47:03PM +, Peter Maydell wrote: > > On Thu, 3 Nov 2022 at 16:38, Daniel P. Berrangé > wrote: > > > On Thu, Nov 03, 2022 at 12:25:49PM -0400, Stefan Hajnoczi wrote: > > > > 2. The GitLab output does not contain

[PATCH v11 01/11] s390x: Register TYPE_S390_CCW_MACHINE properties as class properties

2022-11-03 Thread Pierre Morel
Signed-off-by: Pierre Morel --- hw/s390x/s390-virtio-ccw.c | 127 + 1 file changed, 72 insertions(+), 55 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 1cc20d8717..567498e780 100644 --- a/hw/s390x/s390-virtio-ccw.c +++

[PATCH v11 04/11] s390x/cpu topology: reporting the CPU topology to the guest

2022-11-03 Thread Pierre Morel
The guest can use the STSI instruction to get a buffer filled with the CPU topology description. Let us implement the STSI instruction for the basis CPU topology level, level 2. Signed-off-by: Pierre Morel --- include/hw/s390x/cpu-topology.h | 6 ++ target/s390x/cpu.h | 77

[PATCH v11 00/11] s390x: CPU Topology

2022-11-03 Thread Pierre Morel
Hi, The implementation of the CPU Topology in QEMU has been drastically modified since the last patch series and the number of LOCs has been greatly reduced. 0) Two new patches in front of the series: - A preliminary patch to move the machine properties to the class_init routine -

[PATCH v11 08/11] s390x/cpu topology: add topology_capable QEMU capability

2022-11-03 Thread Pierre Morel
S390 CPU topology is only allowed for s390-virtio-ccw-7.2 and newer S390 machines. Signed-off-by: Pierre Morel --- include/hw/s390x/s390-virtio-ccw.h | 1 + hw/s390x/s390-virtio-ccw.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/hw/s390x/s390-virtio-ccw.h

[PATCH v11 02/11] s390x/cpu topology: add max_threads machine class attribute

2022-11-03 Thread Pierre Morel
The S390 CPU topology accepts the smp.threads argument while in reality it does not effectively allow multthreading. Let's keep this behavior for machines older than 7.3 and refuse to use threads in newer machines until multithreading is really proposed to the guest by the machine.

[PATCH v11 05/11] s390x/cpu_topology: resetting the Topology-Change-Report

2022-11-03 Thread Pierre Morel
During a subsystem reset the Topology-Change-Report is cleared by the machine. Let's ask KVM to clear the Modified Topology Change Report (MTCR) bit of the SCA in the case of a subsystem reset. Signed-off-by: Pierre Morel Reviewed-by: Nico Boehr Reviewed-by: Janis Schoetterl-Glausch ---

[PATCH v11 09/11] s390x/cpu topology: add topology machine property

2022-11-03 Thread Pierre Morel
We keep the possibility to switch on/off the topology on newer machines with the property topology=[on|off]. Signed-off-by: Pierre Morel --- include/hw/boards.h| 3 +++ include/hw/s390x/cpu-topology.h| 8 +++- include/hw/s390x/s390-virtio-ccw.h | 1 +

[PATCH v11 06/11] s390x/cpu_topology: CPU topology migration

2022-11-03 Thread Pierre Morel
The migration can only take place if both source and destination of the migration both use or both do not use the CPU topology facility. We indicate a change in topology during migration postload for the case the topology changed between source and destination. Signed-off-by: Pierre Morel ---

[PATCH v11 03/11] s390x/cpu topology: core_id sets s390x CPU topology

2022-11-03 Thread Pierre Morel
In the S390x CPU topology the core_id specifies the CPU address and the position of the core withing the topology. Let's build the topology based on the core_id. Signed-off-by: Pierre Morel --- include/hw/s390x/cpu-topology.h| 41 ++ include/hw/s390x/s390-virtio-ccw.h | 1 +

[PATCH v11 10/11] s390x/cpu_topology: activating CPU topology

2022-11-03 Thread Pierre Morel
The KVM capability, KVM_CAP_S390_CPU_TOPOLOGY is used to activate the S390_FEAT_CONFIGURATION_TOPOLOGY feature and the topology facility for the guest in the case the topology is available in QEMU and in KVM. Signed-off-by: Pierre Morel --- target/s390x/kvm/kvm.c | 16 1 file

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

2022-11-03 Thread Paolo Bonzini
On 11/3/22 14:42, Emanuele Giuseppe Esposito wrote: It is always called in coroutine_fn callbacks, therefore it can directly call bdrv_co_create(). Signed-off-by: Emanuele Giuseppe Esposito --- block.c| 6 -- include/block/block-global-state.h | 3 ++- 2

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

2022-11-03 Thread Paolo Bonzini
On 11/3/22 14:42, Emanuele Giuseppe Esposito wrote: vmdk_co_create_opts() is a coroutine_fn, and calls vmdk_co_do_create() which in turn can call two callbacks: vmdk_co_create_opts_cb and vmdk_co_create_cb. Mark all these functions as coroutine_fn, since vmdk_co_create_opts() is the only

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

2022-11-03 Thread Paolo Bonzini
On 11/3/22 14:42, Emanuele Giuseppe Esposito wrote: There are probably more missing, but right now it is necessary that we extend coroutine_fn to block{allock/status}_to_extents, because they use bdrv_* functions calling the generated_co_wrapper API, which checks for the qemu_in_coroutine()

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

2022-11-03 Thread Paolo Bonzini
On 11/3/22 14:41, Emanuele Giuseppe Esposito wrote: block_copy_reset_unallocated and block_copy_is_cluster_allocated are only called by backup_run, a corotuine_fn itself. Same applies to block_copy_block_status, called by block_copy_dirty_clusters. Therefore mark them as coroutine too.

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

2022-11-03 Thread Ani Sinha
On Thu, Nov 3, 2022 at 10:18 PM Ani Sinha wrote: > > On Thu, Nov 3, 2022 at 10:17 PM Ani Sinha wrote: > > > > On Thu, Nov 3, 2022 at 9:12 PM Ani Sinha wrote: > > > > > > > To pull this image: > > > > > > > $ docker pull registry.gitlab.com/qemu-project/qemu/fedora:latest > > > > > > Actually

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

2022-11-03 Thread Eric Biggers
On Thu, Nov 03, 2022 at 04:26:14PM +, Eric Biggers wrote: > > In other words, STATX_DIOALIGN is unusable from the start because we > > don't know whether the information it returns is actually correct? :-/ > > That's a silly point of view. STATX_DIOALIGN has only been in a released > kernel

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

2022-11-03 Thread Daniel P . Berrangé
On Thu, Nov 03, 2022 at 04:47:03PM +, Peter Maydell wrote: > On Thu, 3 Nov 2022 at 16:38, Daniel P. Berrangé wrote: > > On Thu, Nov 03, 2022 at 12:25:49PM -0400, Stefan Hajnoczi wrote: > > > 2. The GitLab output does not contain the full command lines because > > > environment variables are

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

2022-11-03 Thread Ani Sinha
On Thu, Nov 3, 2022 at 10:17 PM Ani Sinha wrote: > > On Thu, Nov 3, 2022 at 9:12 PM Ani Sinha wrote: > > > > > To pull this image: > > > > > $ docker pull registry.gitlab.com/qemu-project/qemu/fedora:latest > > > > Actually the URL is: > > > > $ docker pull

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

2022-11-03 Thread Peter Maydell
On Thu, 3 Nov 2022 at 16:38, Daniel P. Berrangé wrote: > On Thu, Nov 03, 2022 at 12:25:49PM -0400, Stefan Hajnoczi wrote: > > 2. The GitLab output does not contain the full command lines because > > environment variables are hidden (e.g. $QEMU_CONFIGURE_OPTS). > > Note, $QEMU_CONFIGURE_OPTS is

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

2022-11-03 Thread Ani Sinha
On Thu, Nov 3, 2022 at 9:12 PM Ani Sinha wrote: > > > To pull this image: > > > $ docker pull registry.gitlab.com/qemu-project/qemu/fedora:latest > > Actually the URL is: > > $ docker pull registry.gitlab.com/qemu-project/qemu/qemu/fedora:latest > > > (or to be sure to pull the very same:) > > >

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

2022-11-03 Thread Daniel P . Berrangé
On Thu, Nov 03, 2022 at 04:38:35PM +, Daniel P. Berrangé wrote: > On Thu, Nov 03, 2022 at 12:25:49PM -0400, Stefan Hajnoczi wrote: > > On Thu, 3 Nov 2022 at 11:59, Daniel P. Berrangé wrote: > > > > > > On Thu, Nov 03, 2022 at 11:49:21AM -0400, Stefan Hajnoczi wrote: > > > > gitlab-runner can

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

2022-11-03 Thread Philippe Mathieu-Daudé
On 3/11/22 16:13, Daniel Henrique Barboza wrote: On 11/3/22 09:51, BALATON Zoltan wrote: On Wed, 2 Nov 2022, Daniel Henrique Barboza wrote: Queued in gitlab.com/danielhb/qemu/tree/ppc-8.0 (since we missed the freeze for 7.2). Could you please always use ppc-next to queue patches for the

Re: [PATCH v4 11/22] hw/virtio: move vhd->started check into helper and add FIXME

2022-11-03 Thread Michael S. Tsirkin
On Tue, Aug 02, 2022 at 10:49:59AM +0100, Alex Bennée wrote: > The `started` field is manipulated internally within the vhost code > except for one place, vhost-user-blk via f5b22d06fb (vhost: recheck > dev state in the vhost_migration_log routine). Mark that as a FIXME > because it introduces a

Re: [PATCH v4 10/22] hw/virtio: move vm_running check to virtio_device_started

2022-11-03 Thread Michael S. Tsirkin
On Tue, Aug 02, 2022 at 10:49:58AM +0100, Alex Bennée wrote: > All the boilerplate virtio code does the same thing (or should at > least) of checking to see if the VM is running before attempting to > start VirtIO. Push the logic up to the common function to avoid > getting a copy and paste wrong.

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

2022-11-03 Thread Daniel P . Berrangé
On Thu, Nov 03, 2022 at 12:25:49PM -0400, Stefan Hajnoczi wrote: > On Thu, 3 Nov 2022 at 11:59, Daniel P. Berrangé wrote: > > > > On Thu, Nov 03, 2022 at 11:49:21AM -0400, Stefan Hajnoczi wrote: > > > gitlab-runner can run locally with minimal setup: > > >

Re: [PATCH] virtio-blk: simplify virtio_blk_dma_restart_cb()

2022-11-03 Thread Emanuele Giuseppe Esposito
Am 02/11/2022 um 19:23 schrieb Stefan Hajnoczi: > virtio_blk_dma_restart_cb() is tricky because the BH must deal with > virtio_blk_data_plane_start()/virtio_blk_data_plane_stop() being called. > > There are two issues with the code: > > 1. virtio_blk_realize() should use

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

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

Re: [RFC PATCH] virtio: re-order vm_running and use_started checks

2022-11-03 Thread Michael S. Tsirkin
On Fri, Oct 14, 2022 at 02:21:08PM +0100, Alex Bennée wrote: > During migration the virtio device state can be restored before we > restart the VM. As no devices can be running while the VM is paused it > makes sense to bail out early in that case. > > This returns the order introduced in: > >

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

2022-11-03 Thread Kirill A. Shutemov
On Wed, Nov 02, 2022 at 05:07:00PM -0500, Michael Roth wrote: > On Thu, Nov 03, 2022 at 12:14:04AM +0300, Kirill A. Shutemov wrote: > > On Mon, Oct 31, 2022 at 12:47:38PM -0500, Michael Roth wrote: > > > > > > In v8 there was some discussion about potentially passing the page/folio > > > and

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-11-03 Thread Vishal Annapurve
On Mon, Oct 24, 2022 at 8:30 PM Kirill A . Shutemov wrote: > > On Fri, Oct 21, 2022 at 04:18:14PM +, Sean Christopherson wrote: > > On Fri, Oct 21, 2022, Chao Peng wrote: > > > > > > > > In the context of userspace inaccessible memfd, what would be a > > > > suggested way to enforce NUMA

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

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

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

2022-11-03 Thread Stefan Hajnoczi
On Thu, 3 Nov 2022 at 11:59, Daniel P. Berrangé wrote: > > On Thu, Nov 03, 2022 at 11:49:21AM -0400, Stefan Hajnoczi wrote: > > gitlab-runner can run locally with minimal setup: > > https://bagong.gitlab.io/posts/run-gitlab-ci-locally/ > > > > I haven't tried it yet, but that seems like the most

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

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

[PATCH v3 14/17] vfio/migration: Reset device if setting recover state fails

2022-11-03 Thread Avihai Horon
If vfio_migration_set_state() fails to set the device in the requested state it tries to put it in a recover state. If setting the device in the recover state fails as well, hw_error is triggered and the VM is aborted. To improve user experience and avoid VM data loss, reset the device with

  1   2   3   >