Re: [PATCH v4 0/9] hw/block/fdc: Allow Kconfig-selecting ISA bus/SysBus floppy controllers

2021-05-21 Thread Hervé Poussineau
Le 18/05/2021 à 09:14, Philippe Mathieu-Daudé a écrit : Cc'ing Hervé, Aleksandar, Markus & Mark. On 5/17/21 11:11 PM, John Snow wrote: On 5/17/21 4:50 PM, Philippe Mathieu-Daudé wrote: On 5/17/21 9:19 PM, John Snow wrote: On 5/17/21 2:39 PM, Philippe Mathieu-Daudé wrote: The floppy disc co

Re: [PATCH 0/3] hw/block/nvme: fixes lbaf formats initialization and adds idns enums

2021-05-21 Thread Klaus Jensen
On Apr 21 18:20, Gollu Appalanaidu wrote: This series fixes the LBAF Formats intialization and Adds the Identify Namespace Parameters enums to make to more readable. Gollu Appalanaidu (3): hw/block/nvme: fix lbaf formats initialization hw/block/nvme: add id ns flbas enum hw/block/nvme: add id

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-05-21 Thread Alexey Kardashevskiy
On 22/05/2021 05:57, BALATON Zoltan wrote: On Fri, 21 May 2021, BALATON Zoltan wrote: On Fri, 21 May 2021, Alexey Kardashevskiy wrote: On 21/05/2021 07:59, BALATON Zoltan wrote: On Thu, 20 May 2021, Alexey Kardashevskiy wrote: The PAPR platform describes an OS environment that's presented

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-05-21 Thread Alexey Kardashevskiy
On 21/05/2021 19:05, BALATON Zoltan wrote: On Fri, 21 May 2021, Alexey Kardashevskiy wrote: On 21/05/2021 07:59, BALATON Zoltan wrote: On Thu, 20 May 2021, Alexey Kardashevskiy wrote: The PAPR platform describes an OS environment that's presented by a combination of a hypervisor and firmwar

[Bug 1921948] Re: MTE tags not checked properly for unaligned accesses at EL1

2021-05-21 Thread Peter Collingbourne
(s/PR_MTE_TCF_ASYNC/PR_MTE_TCF_SYNC/g in the above program -- but the actual constant is correct) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1921948 Title: MTE tags not checked properly for unal

[Bug 1921948] Re: MTE tags not checked properly for unaligned accesses at EL1

2021-05-21 Thread Peter Collingbourne
It looks like there's still a bug here: I'm seeing false positive MTE faults for unaligned accesses that touch multiple pages. This userspace assembly program demonstrates the problem, but for some reason it only reproduces some of the time for me: .arch_extension memtag .globl _start _start: mov

Re: [RFC PATCH v3] ppc/spapr: Add support for H_SCM_PERFORMANCE_STATS hcall

2021-05-21 Thread Vaibhav Jain
Thanks for looking into this patch David and Groug, David Gibson writes: > On Sat, May 15, 2021 at 01:07:59PM +0530, Vaibhav Jain wrote: >> Add support for H_SCM_PERFORMANCE_STATS described at [1] for >> spapr nvdimms. This enables guest to fetch performance stats[2] like >> expected life of an n

Re: [PATCH v3] target/i386/sev: add support to query the attestation report

2021-05-21 Thread Brijesh Singh
Hi, Ping. Please let me know if you have any feedback on this patch. Thanks On 4/29/21 12:07 PM, Brijesh Singh wrote: > The SEV FW >= 0.23 added a new command that can be used to query the > attestation report containing the SHA-256 digest of the guest memory > and VMSA encrypted with the LAUNCH

Re: [PATCH V3 12/22] vfio-pci: cpr part 1

2021-05-21 Thread Alex Williamson
On Fri, 7 May 2021 05:25:10 -0700 Steve Sistare wrote: > Enable vfio-pci devices to be saved and restored across an exec restart > of qemu. > > At vfio creation time, save the value of vfio container, group, and device > descriptors in the environment. > > In cprsave, suspend the use of virtua

Re: [PATCH V3 13/22] vfio-pci: cpr part 2

2021-05-21 Thread Alex Williamson
On Fri, 7 May 2021 05:25:11 -0700 Steve Sistare wrote: > Finish cpr for vfio-pci by preserving eventfd's and vector state. > > Signed-off-by: Steve Sistare > --- > hw/vfio/pci.c | 110 > -- > 1 file changed, 108 insertions(+), 2 deletio

Re: [PATCH v6 17/19] i386: HV_HYPERCALL_AVAILABLE privilege bit is always needed

2021-05-21 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:28PM +0200, Vitaly Kuznetsov wrote: > According to TLFS, Hyper-V guest is supposed to check > HV_HYPERCALL_AVAILABLE privilege bit before accessing > HV_X64_MSR_GUEST_OS_ID/HV_X64_MSR_HYPERCALL MSRs but at least some > Windows versions ignore that. As KVM is very permi

Re: RFC: Qemu backup interface plans

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
17.05.2021 15:07, Vladimir Sementsov-Ogievskiy wrote: 3.1 and make it possible to modify the bitmap externally, so that consumer of fleecing can say to backup-top filter: I've already copied these blocks, don't bother with copying them to temp image". This is to solve [2]. Still, how consumer

Re: [PATCH v6 16/19] i386: kill off hv_cpuid_check_and_set()

2021-05-21 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:27PM +0200, Vitaly Kuznetsov wrote: > hv_cpuid_check_and_set() does too much: > - Checks if the feature is supported by KVM; > - Checks if all dependencies are enabled; > - Sets the feature bit in cpu->hyperv_features for 'passthrough' mode. > > To reduce the complexi

Re: [PATCH v6 15/19] i386: expand Hyper-V features during CPU feature expansion time

2021-05-21 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:26PM +0200, Vitaly Kuznetsov wrote: > To make Hyper-V features appear in e.g. QMP query-cpu-model-expansion we > need to expand and set the corresponding CPUID leaves early. Modify > x86_cpu_get_supported_feature_word() to call newly intoduced Hyper-V > specific kvm_hv

Re: [PATCH v6 14/19] i386: use global kvm_state in hyperv_enabled() check

2021-05-21 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:25PM +0200, Vitaly Kuznetsov wrote: > There is no need to use vCPU-specific kvm state in hyperv_enabled() check > and we need to do that when feature expansion happens early, before vCPU > specific KVM state is created. > > Signed-off-by: Vitaly Kuznetsov Reviewed-b

Re: [PATCH v6 13/19] i386: prefer system KVM_GET_SUPPORTED_HV_CPUID ioctl over vCPU's one

2021-05-21 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:24PM +0200, Vitaly Kuznetsov wrote: > KVM_GET_SUPPORTED_HV_CPUID was made a system wide ioctl which can be called > prior to creating vCPUs and we are going to use that to expand Hyper-V cpu > features early. Use it when it is supported by KVM. > > Signed-off-by: Vita

Re: [PATCH v6 12/19] i386: adjust the expected KVM_GET_SUPPORTED_HV_CPUID array size

2021-05-21 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:23PM +0200, Vitaly Kuznetsov wrote: > SYNDBG leaves were recently (Linux-5.8) added to KVM but we haven't > updated the expected size of KVM_GET_SUPPORTED_HV_CPUID output in > KVM so we now make serveral tries before succeeding. Update the > default. > > Signed-off-by

Re: [PATCH v6 11/19] i386: switch hyperv_expand_features() to using error_setg()

2021-05-21 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:22PM +0200, Vitaly Kuznetsov wrote: > Use standard error_setg() mechanism in hyperv_expand_features(). > > Signed-off-by: Vitaly Kuznetsov No objections, but only suggestions below: > --- > target/i386/kvm/kvm.c | 101 +- >

Re: [PATCH v6 10/19] i386: move eVMCS enablement to hyperv_init_vcpu()

2021-05-21 Thread Eduardo Habkost
On Thu, Apr 22, 2021 at 06:11:21PM +0200, Vitaly Kuznetsov wrote: > hyperv_expand_features() will be called before we create vCPU so > evmcs enablement should go away. hyperv_init_vcpu() looks like the > right place. > > Signed-off-by: Vitaly Kuznetsov > --- > target/i386/kvm/kvm.c | 60

Re: [PATCH V3 11/22] vfio-pci: refactor for cpr

2021-05-21 Thread Steven Sistare
On 5/21/2021 5:07 PM, Alex Williamson wrote: > On Fri, 21 May 2021 09:33:13 -0400 > Steven Sistare wrote: > >> On 5/19/2021 6:38 PM, Alex Williamson wrote: >>> On Fri, 7 May 2021 05:25:09 -0700 >>> Steve Sistare wrote: >>> Export vfio_address_spaces and vfio_listener_skipped_section. >>

Re: [PATCH V3 11/22] vfio-pci: refactor for cpr

2021-05-21 Thread Alex Williamson
On Fri, 21 May 2021 09:33:13 -0400 Steven Sistare wrote: > On 5/19/2021 6:38 PM, Alex Williamson wrote: > > On Fri, 7 May 2021 05:25:09 -0700 > > Steve Sistare wrote: > > > >> Export vfio_address_spaces and vfio_listener_skipped_section. > >> Add optional eventfd arg to vfio_add_kvm_msi_virq

[PATCH v3 8/9] target/ppc: created tcg-stub.c file

2021-05-21 Thread Bruno Larsen (billionai)
Created a file with stubs needed to compile disabling TCG. *_ppc_opcodes were created to make cpu_init.c have a few less ifdefs, since they are not needed. coftmmu_resize_hpt_* have to be created because the compiler can't automatically know they aren't used, but they should never be reached. Sign

[PATCH v3 5/9] target/ppc: removed unnecessary inclusion of helper-proto.h

2021-05-21 Thread Bruno Larsen (billionai)
These files included helper-proto.h, but didn't use or declare any helpers, so the #include has been removed Signed-off-by: Bruno Larsen (billionai) Reviewed-by: Richard Henderson --- target/ppc/cpu_init.c| 1 - target/ppc/gdbstub.c | 1 - target/ppc/mmu-hash32.c | 1 - target/ppc/mmu-

[PATCH v3 7/9] target/ppc: Added options to disable many TCG-only functions

2021-05-21 Thread Bruno Larsen (billionai)
Wrapped some function calls in cpu_init.c, gdbstub.c, mmu-hash64.c, mmu_helper.c and excp_helper.c that were TCG only with ifdef CONFIG_TCG, to support building without TCG. for excp_helper we also moved the function do_rfi higher in the file to reduce the ifdef count. For cpu_init.c, we will als

[PATCH v3 9/9] target/ppc: updated meson.build to support disable-tcg

2021-05-21 Thread Bruno Larsen (billionai)
updated build file to not compile some sources that are unnecessary if TCG is disabled on the system. Signed-off-by: Bruno Larsen (billionai) --- target/ppc/meson.build | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/target/ppc/meson.build b/target/ppc/meson.build inde

[PATCH v3 3/9] target/ppc: reduce usage of fpscr_set_rounding_mode

2021-05-21 Thread Bruno Larsen (billionai)
It is preferable to store the current rounding mode and retore from that than recalculating from fpscr, so we changed the behavior of do_fri and VSX_ROUND to do it like that. Suggested-by: Richard Henderson Signed-off-by: Bruno Larsen (billionai) Reviewed-by: Richard Henderson --- target/ppc/f

[PATCH v3 1/9] target/ppc: cleaned error_report from ppc_store_sdr1

2021-05-21 Thread Bruno Larsen (billionai)
Changed how the function ppc_store_sdr1, from error_report(...) to qemu_log_mask(LOG_GUEST_ERROR, ...). Signed-off-by: Bruno Larsen (billionai) Suggested-by: Richard Henderson --- target/ppc/cpu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/ppc/cpu.c b/tar

[PATCH v3 4/9] target/ppc: overhauled and moved logic of storing fpscr

2021-05-21 Thread Bruno Larsen (billionai)
Followed the suggested overhaul to store_fpscr logic, and moved it to cpu.c where it can be accessed in !TCG builds. The overhaul was suggesting because storing a value to fpscr should never raise an exception, so we could remove all the mess that happened with POWERPC_EXCP_FP. We also moved fpsc

[PATCH v3 6/9] target/ppc: moved ppc_cpu_do_interrupt to cpu.c

2021-05-21 Thread Bruno Larsen (billionai)
Moved the ppc_cpu_do_interrupt function to cpu.c file, where it makes more sense, and turned powerpc_excp not static, as it now needs to be accessed from outside of excp_helper.c Signed-off-by: Bruno Larsen (billionai) --- target/ppc/cpu.c | 20 target/ppc/cpu.h

[PATCH v3 2/9] target/ppc: moved ppc_store_lpcr and ppc_store_msr to cpu.c

2021-05-21 Thread Bruno Larsen (billionai)
These functions are used in hw/ppc logic, during machine startup, which means it must be compiled when --disable-tcg is selected, and so it has been moved into a common code file Signed-off-by: Bruno Larsen (billionai) Reviewed-by: Richard Henderson Reviewed-by: David Gibson --- target/ppc/cpu

[PATCH v3 0/9] target/ppc: add support to disable-tcg

2021-05-21 Thread Bruno Larsen (billionai)
This patch series finishes the the changes required to support disabling TCG for ppc targets. With the current version of the patch, the project compiles and runs ok, but we need some more testing to ensure that no regressions happened, especially with relation to gdb. For patch 7, if we were to

Re: [PATCH qemu v20] spapr: Implement Open Firmware client interface

2021-05-21 Thread BALATON Zoltan
On Fri, 21 May 2021, BALATON Zoltan wrote: On Fri, 21 May 2021, Alexey Kardashevskiy wrote: On 21/05/2021 07:59, BALATON Zoltan wrote: On Thu, 20 May 2021, Alexey Kardashevskiy wrote: The PAPR platform describes an OS environment that's presented by a combination of a hypervisor and firmware.

Fwd: GSoC Intro - TUI interface for QMP

2021-05-21 Thread Niteesh G. S.
Hello all, I am Niteesh, one of the students selected under Google Summer of Code 2021 to work on the project* Interactive, asynchronous QMP TUI.* Link to my proposal: https://docs.google.com/document/d/1o_U9txCyqZDYIqqhj4V0IEO9-20KY2pb4egi75ueXco/edit?usp=sharing The goal of this project is to g

Re: Qemu block filter insertion/removal API

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
21.05.2021 21:32, Vladimir Sementsov-Ogievskiy wrote: 19.05.2021 17:14, Vladimir Sementsov-Ogievskiy wrote: 19.05.2021 16:02, Kevin Wolf wrote: Am 19.05.2021 um 14:19 hat Vladimir Sementsov-Ogievskiy geschrieben: 19.05.2021 14:44, Kevin Wolf wrote: Am 17.05.2021 um 14:44 hat Vladimir Sementso

Re: Qemu block filter insertion/removal API

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
19.05.2021 17:14, Vladimir Sementsov-Ogievskiy wrote: 19.05.2021 16:02, Kevin Wolf wrote: Am 19.05.2021 um 14:19 hat Vladimir Sementsov-Ogievskiy geschrieben: 19.05.2021 14:44, Kevin Wolf wrote: Am 17.05.2021 um 14:44 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi all! I'd like to be sure

[PATCH 5/6] block/backup: don't insert filter if no writers

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
If source is immutable and there no writers on it, we don't need to insert a filter, so let's detect it and use simple blk's for block-copy. Note, that it's possible, that user will try to add writers on source during backup. It will fail, as our source blk doesn't share write. In future we can a

Re: [PATCH v2 1/7] block-copy: streamline choice of copy_range vs. read/write

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
21.05.2021 18:10, Paolo Bonzini wrote: Stats don't say everything.  Not having something like this:     s->copy_size =     MIN(MAX(s->cluster_size, BLOCK_COPY_MAX_COPY_RANGE),     QEMU_ALIGN_DOWN(block_copy_max_transfer(s->source,  

[PATCH 3/6] block: share writes on backing child of fleecing node

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
By default, we share writes on backing child only if our parents share write permission on us. Still, with fleecing scheme we want to be able to unshare writes on fleecing node, which is a kind of immutable snapshot (copy-before-write operations are write-unchanged). So, let's detect fleecing node

[PATCH 6/6] iotests/image-fleecing: test push backup with fleecing

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
Add test for push backup with fleecing: - start fleecing with copy-before-write filter - start a backup job from temporary fleecing node to actual backup target Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 104 +++- tests/qem

[PATCH 1/6] block/block-copy: use write-unchanged for fleecing scheme

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
We are going to use fleecing scheme for push-backup, so that copy-before-write filter does copy before write operations to temporary image and backup job copies data from (immutable from backup's point of view) temporary image to actual backup target. For this to work properly, backup job should un

[PATCH 4/6] block: blk_root(): return non-const pointer

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
In the following patch we'll want to pass blk children to block-copy. Const pointers are not enough. So, return non const pointer from blk_root(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend.h | 2 +- block/block-backend.c | 2 +- 2 files changed, 2 inse

[PATCH 2/6] block/copy-before-write: require BLK_PERM_WRITE_UNCHANGED for fleecing

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
Now block-copy detects fleecing scheme and do write-unchanged operations if detected. So, let's require appropriate permissions. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/copy-before-write.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/block/copy-be

[PATCH 0/6] push backup with fleecing

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here is push-backup with fleecing. What is it: 1. Make fleecing scheme guest blk | |root v copy-before-write filter ---> temp qcow2 | | |file | backing V | active disk <---

Re: [RFC 1/1] acceptance tests: rename acceptance to system

2021-05-21 Thread Willian Rampazzo
On Fri, May 21, 2021 at 2:14 PM Thomas Huth wrote: > > On 21/05/2021 16.29, Peter Maydell wrote: > > On Fri, 21 May 2021 at 15:19, Philippe Mathieu-Daudé > > wrote: > >> If you think these tests belong to tests/tcg/, I am OK to put > >> them they, but I don't think adding the Avocado buildsys >

Re: [RFC 1/1] acceptance tests: rename acceptance to system

2021-05-21 Thread Philippe Mathieu-Daudé
On 5/21/21 7:14 PM, Thomas Huth wrote: > On 21/05/2021 16.29, Peter Maydell wrote: >> On Fri, 21 May 2021 at 15:19, Philippe Mathieu-Daudé >> wrote: >>> If you think these tests belong to tests/tcg/, I am OK to put >>> them they, but I don't think adding the Avocado buildsys >>> machinery to the a

[PATCH v2 2/2] GitLab: Add "Feature Request" issue template.

2021-05-21 Thread John Snow
Based on Peter Krempa's libvirt template, feature.md. CC: Peter Krempa Signed-off-by: John Snow --- .gitlab/issue_templates/feature_request.md | 32 ++ 1 file changed, 32 insertions(+) create mode 100644 .gitlab/issue_templates/feature_request.md diff --git a/.gitlab/issue

Re: [PATCH v6 03/25] python: create utils sub-package

2021-05-21 Thread John Snow
On 5/21/21 1:18 PM, Willian Rampazzo wrote: On Wed, May 12, 2021 at 8:13 PM John Snow wrote: Create a space for miscellaneous things that don't belong strictly in "qemu.machine" nor "qemu.qmp" packages. Signed-off-by: John Snow --- python/qemu/machine/__init__.py | 8

[PATCH v2 1/2] GitLab: Add "Bug" issue reporting template

2021-05-21 Thread John Snow
Based loosely on libvirt's template, written by Peter Krempa. CC: Peter Krempa Signed-off-by: John Snow --- .gitlab/issue_templates/bug.md | 61 ++ 1 file changed, 61 insertions(+) create mode 100644 .gitlab/issue_templates/bug.md diff --git a/.gitlab/issue_tem

[PATCH v2 0/2] Gitlab: Add issue templates

2021-05-21 Thread John Snow
Add "Bug" and "Feature Request" templates to the Gitlab interface to help improve the quality of newly reported issues. To see what this looks like, I've temporarily allowed my Gitlab fork to diverge with these files merged. See my fork's "new issue" page to see it in action: https://gitlab.com/j

Re: [PATCH v3 2/2] virtio-blk: Convert QEMUBH callback to "bitops.h" API

2021-05-21 Thread Stefan Hajnoczi
On Mon, May 10, 2021 at 10:07:58PM +0200, Philippe Mathieu-Daudé wrote: > By directly using find_first_bit() and find_next_bit from the > "bitops.h" API to iterate over the bitmap, we can remove the > bitmap[] variable-length array copy on the stack and the complex > manual bit testing/clearing log

Re: [PATCH v3 0/2] virtio-blk: Convert QEMUBH callback to "bitops.h" API

2021-05-21 Thread Stefan Hajnoczi
On Mon, May 10, 2021 at 10:07:56PM +0200, Philippe Mathieu-Daudé wrote: > This series follow a suggestion from Stefan to use the bitops > API in virtio-blk: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg805139.html > > Since v2: > - clear bitmap to avoid spurious interrupts! (Stefan) > -

Re: [PATCH v5 23/23] target/ppc: Move cmp/cmpi/cmpl/cmpli to decodetree

2021-05-21 Thread Matheus K. Ferst
On 18/05/2021 07:12, Richard Henderson wrote: On 5/17/21 3:50 PM, matheus.fe...@eldorado.org.br wrote: +    if(a->l && (ctx->insns_flags & PPC_64B)) { Space after IF. > If I look back to the 6xx manual, I see   NOTE: If L = 1, the instruction form is invalid. The fact that we're allowing L=

Re: [PATCH v6 03/25] python: create utils sub-package

2021-05-21 Thread Willian Rampazzo
On Wed, May 12, 2021 at 8:13 PM John Snow wrote: > > Create a space for miscellaneous things that don't belong strictly in > "qemu.machine" nor "qemu.qmp" packages. > > Signed-off-by: John Snow > --- > python/qemu/machine/__init__.py | 8 > python/qemu/utils/__init__.py

Re: [PATCH v6 02/25] python: create qemu packages

2021-05-21 Thread Willian Rampazzo
On Wed, May 12, 2021 at 8:13 PM John Snow wrote: > > move python/qemu/*.py to python/qemu/[machine, qmp]/*.py and update import > directives across the tree. > > This is done to create a PEP420 namespace package, in which we may > create subpackages. To do this, the namespace directory ("qemu") sh

Re: A bug of Monitor Chardev ?

2021-05-21 Thread Daniel P . Berrangé
On Fri, May 21, 2021 at 01:09:17PM -0400, Peter Xu wrote: > On Fri, May 21, 2021 at 05:56:14PM +0100, Daniel P. Berrangé wrote: > > On Fri, May 21, 2021 at 05:33:46PM +0100, Daniel P. Berrangé wrote: > > > On Fri, May 21, 2021 at 10:43:36AM -0400, Peter Xu wrote: > > > > > > > > I think the origin

Re: A bug of Monitor Chardev ?

2021-05-21 Thread Peter Xu
On Fri, May 21, 2021 at 08:59:17PM +0400, Marc-André Lureau wrote: > What about my earlier suggestion to add a new > "qemu_chr_be_disable_handlers()" (until update_read_handlers is called > again to enable them and the set a different context)? Yes this sounds both clean and easy indeed (while the

Re: [RFC 1/1] acceptance tests: rename acceptance to system

2021-05-21 Thread Thomas Huth
On 21/05/2021 16.29, Peter Maydell wrote: On Fri, 21 May 2021 at 15:19, Philippe Mathieu-Daudé wrote: If you think these tests belong to tests/tcg/, I am OK to put them they, but I don't think adding the Avocado buildsys machinery to the already-complex tests/tcg/ Makefiles is going to help us.

Re: [PATCH v2 7/7] block-copy: protect BlockCopyState .method fields

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
18.05.2021 13:07, Emanuele Giuseppe Esposito wrote: With tasks and calls lock protecting all State fields, .method is the last BlockCopyState field left unprotected. Set it as atomic. Signed-off-by: Emanuele Giuseppe Esposito OK, in 06 some things are out of coroutine. Here could we just reus

Re: A bug of Monitor Chardev ?

2021-05-21 Thread Peter Xu
On Fri, May 21, 2021 at 05:56:14PM +0100, Daniel P. Berrangé wrote: > On Fri, May 21, 2021 at 05:33:46PM +0100, Daniel P. Berrangé wrote: > > On Fri, May 21, 2021 at 10:43:36AM -0400, Peter Xu wrote: > > > > > > I think the original problem was that if qemu_chr_fe_set_handlers() is > > > called >

Re: A bug of Monitor Chardev ?

2021-05-21 Thread Daniel P . Berrangé
On Fri, May 21, 2021 at 08:59:17PM +0400, Marc-André Lureau wrote: > Hi > > On Fri, May 21, 2021 at 8:56 PM Daniel P. Berrangé > wrote: > > > On Fri, May 21, 2021 at 05:33:46PM +0100, Daniel P. Berrangé wrote: > > > On Fri, May 21, 2021 at 10:43:36AM -0400, Peter Xu wrote: > > > > > > > > I thin

Re: [RFC PATCH 0/9] Initial support for machine creation via QMP

2021-05-21 Thread Paolo Bonzini
On 21/05/21 13:32, Markus Armbruster wrote: PHASE_NO_MACHINE -> machine-set -> PHASE_MACHINE_CREATED -> -> accel-set -> PHASE_ACCEL_CREATED -> PHASE_MACHINE_INITIALIZED -> -> finish-machine-init -> PHASE_MACHINE_READY -> cont Is machine-set one big command, or a sequence of commands,

Re: A bug of Monitor Chardev ?

2021-05-21 Thread Marc-André Lureau
Hi On Fri, May 21, 2021 at 8:56 PM Daniel P. Berrangé wrote: > On Fri, May 21, 2021 at 05:33:46PM +0100, Daniel P. Berrangé wrote: > > On Fri, May 21, 2021 at 10:43:36AM -0400, Peter Xu wrote: > > > > > > I think the original problem was that if qemu_chr_fe_set_handlers() is > called > > > in ma

Re: [RFC PATCH 0/9] Initial support for machine creation via QMP

2021-05-21 Thread Paolo Bonzini
On 21/05/21 16:06, Mirela Grujic wrote: PHASE_NO_MACHINE    -> machine-set -> PHASE_MACHINE_CREATED ->    -> accel-set -> PHASE_ACCEL_CREATED -> PHASE_MACHINE_INITIALIZED -> My understanding is that an equivalent of previously supported 'preconfig' state is PHASE_ACCEL_CREATED, from the pers

Re: A bug of Monitor Chardev ?

2021-05-21 Thread Daniel P . Berrangé
On Fri, May 21, 2021 at 05:33:46PM +0100, Daniel P. Berrangé wrote: > On Fri, May 21, 2021 at 10:43:36AM -0400, Peter Xu wrote: > > > > I think the original problem was that if qemu_chr_fe_set_handlers() is > > called > > in main thread, it can start to race somehow within execution of the > > f

Re: [PATCH v2 6/7] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState

2021-05-21 Thread Paolo Bonzini
On 21/05/21 17:56, Vladimir Sementsov-Ogievskiy wrote: 21.05.2021 18:02, Paolo Bonzini wrote: On 20/05/21 17:34, Vladimir Sementsov-Ogievskiy wrote: By adding acquire/release pairs, we ensure that .ret and .error_is_read fields are written by block_copy_dirty_clusters before .finished is tru

Re: [PATCH v2 1/7] block-copy: streamline choice of copy_range vs. read/write

2021-05-21 Thread Paolo Bonzini
On 21/05/21 17:48, Vladimir Sementsov-Ogievskiy wrote: I keep it thinking about further moving qemu-img convert to block-copy. But I don't even have a plan when to start this work. So, if we want to do something around copy_range here to prepare for thread-safety, let's just drop it for now as

Re: [PATCH v3 1/3] qemu-config: parse configuration files to a QDict

2021-05-21 Thread Paolo Bonzini
On 21/05/21 18:09, Kevin Wolf wrote: +qemu_opts_absorb_qdict(opts, qdict, errp); +if (errp) { This doesn't do what you wanted. *errp would be be better, but you also need ERRP_GUARD() then. The other option would be using the return value of qemu_opts_absorb_qdict(). Uff, you're abs

Re: A bug of Monitor Chardev ?

2021-05-21 Thread Daniel P . Berrangé
On Fri, May 21, 2021 at 10:43:36AM -0400, Peter Xu wrote: > On Fri, May 21, 2021 at 09:25:52AM +0200, Markus Armbruster wrote: > > Daniel P. Berrangé writes: > > > > > On Wed, May 19, 2021 at 08:17:51PM +0400, Marc-André Lureau wrote: > > >> Hi > > >> > > >> On Mon, May 17, 2021 at 11:11 AM Long

[RFC PATCH] tests/tcg/configure.sh: tweak quoting of target_compiler

2021-05-21 Thread Alex Bennée
If you configure the host compiler with a multi-command stanza like: --cc="ccache gcc" then the configure.sh machinery falls over with confusion. Work around this by ensuring we correctly quote so where we need a complete evaluation we get it. Of course the has() check needs single variable so

Re: [PATCH 2/2] Gitlab: Add "Feature Request" issue template.

2021-05-21 Thread Daniel P . Berrangé
On Fri, May 21, 2021 at 11:49:39AM -0400, John Snow wrote: > On 5/20/21 2:52 AM, Thomas Huth wrote: > > On 19/05/2021 23.32, John Snow wrote: > > > Copied from Peter Krempa's libvirt template, feature.md. > > > > > > CC: Peter Krempa > > > Signed-off-by: John Snow > > > --- > > >   .gitlab/issue

Re: [PATCH v3 3/9] qapi: start building an 'if' predicate tree

2021-05-21 Thread John Snow
On 5/21/21 10:48 AM, Markus Armbruster wrote: Beware, I'm skimming, not really reviewing. John Snow writes: On 4/29/21 9:40 AM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The following patches are going to express schema 'if' conditions in a target language agnostic way. For

Re: [PATCH v3 1/3] qemu-config: parse configuration files to a QDict

2021-05-21 Thread Kevin Wolf
Am 21.05.2021 um 12:21 hat Paolo Bonzini geschrieben: > Change the parser to put the values into a QDict and pass them > to a callback. qemu_config_parse's QemuOpts creation is > itself turned into a callback function. > > This is useful for -readconfig to support keyval-based options; > getting

[PATCH] spapr: Don't hijack current_machine->boot_order

2021-05-21 Thread Greg Kurz
QEMU 6.0 moved all the -boot variables to the machine. Especially, the removal of the boot_order static changed the handling of '-boot once' from: if (boot_once) { qemu_boot_set(boot_once, &error_fatal); qemu_register_reset(restore_boot_order, g_strdup(boot_order)); } to

Re: [PATCH] spapr: Make spapr_boot_set() a nop

2021-05-21 Thread Greg Kurz
Dammit, forgot to update the subject... Re-posting. On Fri, 21 May 2021 17:45:12 +0200 Greg Kurz wrote: > QEMU 6.0 moved all the -boot variables to the machine. Especially, the > removal of the boot_order static changed the handling of '-boot once' > from: > > if (boot_once) { > qem

Re: [PATCH v2 6/7] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
21.05.2021 18:02, Paolo Bonzini wrote: On 20/05/21 17:34, Vladimir Sementsov-Ogievskiy wrote: By adding acquire/release pairs, we ensure that .ret and .error_is_read fields are written by block_copy_dirty_clusters before .finished is true. As I already said, please, can we live with one mute

Re: [PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-05-21 Thread John Snow
On 5/21/21 1:35 AM, Markus Armbruster wrote: Does not fire for qga/qapi-schema.json. Can you help? Odd. I did: if self._section: ... else: raise QAPIWhicheverErrorItWas(...) and then did a full build and found it to fail on QGA stuff. You may need --enable-docs to make it happen.

Re: [PATCH v2 6/7] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
21.05.2021 18:02, Paolo Bonzini wrote: On 20/05/21 17:34, Vladimir Sementsov-Ogievskiy wrote: By adding acquire/release pairs, we ensure that .ret and .error_is_read fields are written by block_copy_dirty_clusters before .finished is true. As I already said, please, can we live with one mute

Re: [PATCH v6 04/25] python: add qemu package installer

2021-05-21 Thread John Snow
On 5/21/21 12:00 AM, Cleber Rosa wrote: On Wed, May 12, 2021 at 07:12:20PM -0400, John Snow wrote: Add setup.cfg and setup.py, necessary for installing a package via pip. Add a ReST document (PACKAGE.rst) explaining the basics of what this package is for and who to contact for more information.

Re: [PATCH 2/2] Gitlab: Add "Feature Request" issue template.

2021-05-21 Thread John Snow
On 5/20/21 2:52 AM, Thomas Huth wrote: On 19/05/2021 23.32, John Snow wrote: Copied from Peter Krempa's libvirt template, feature.md. CC: Peter Krempa Signed-off-by: John Snow ---   .gitlab/issue_templates/feature_request.md | 13 +   1 file changed, 13 insertions(+)   create mode

Re: [PATCH v2 1/7] block-copy: streamline choice of copy_range vs. read/write

2021-05-21 Thread Vladimir Sementsov-Ogievskiy
21.05.2021 18:10, Paolo Bonzini wrote: On 20/05/21 16:42, Vladimir Sementsov-Ogievskiy wrote: 18.05.2021 13:07, Emanuele Giuseppe Esposito wrote: From: Paolo Bonzini Put the logic to determine the copy size in a separate function, so that there is a simple state machine for the possible metho

Re: [PATCH 1/2] Gitlab: Add "Bug" issue reporting template

2021-05-21 Thread John Snow
On 5/20/21 2:34 AM, Peter Krempa wrote: On Wed, May 19, 2021 at 17:32:01 -0400, John Snow wrote: Based loosely on libvirt's template, written by Peter Krempa. CC: Peter Krempa Signed-off-by: John Snow --- .gitlab/issue_templates/bug.md | 52 ++ 1 file change

[PATCH] spapr: Make spapr_boot_set() a nop

2021-05-21 Thread Greg Kurz
QEMU 6.0 moved all the -boot variables to the machine. Especially, the removal of the boot_order static changed the handling of '-boot once' from: if (boot_once) { qemu_boot_set(boot_once, &error_fatal); qemu_register_reset(restore_boot_order, g_strdup(boot_order)); } to

Re: [PATCH 2/2] hw/usb: hcd-xhci-pci: Fix spec violation of IP flag for MSI/MSI-X

2021-05-21 Thread Philippe Mathieu-Daudé
On 5/21/21 3:25 PM, Bin Meng wrote: > On Fri, May 21, 2021 at 8:46 PM Philippe Mathieu-Daudé > wrote: >> >> On 5/21/21 4:42 AM, Bin Meng wrote: >>> From: Ruimei Yan >>> >>> Per xHCI spec v1.2 chapter 4.17.5 page 296: >>> >>> If MSI or MSI-X interrupts are enabled, Interrupt Pending (IP) >>> s

Re: [RFC 1/1] acceptance tests: rename acceptance to system

2021-05-21 Thread Willian Rampazzo
On Fri, May 21, 2021 at 12:23 PM Peter Maydell wrote: > > On Fri, 21 May 2021 at 16:13, Willian Rampazzo wrote: > > On Fri, May 21, 2021 at 11:29 AM Peter Maydell > > wrote: > > > This does raise the question of what we're actually trying > > > to distinguish. It seems to me somewhat that what

Re: [PATCH v4 0/9] qapi: untie 'if' conditions from C preprocessor

2021-05-21 Thread Markus Armbruster
Since I won't be able to complete my review before my vaction, let me at least give you some high-level feedback. I admit I'm rather fond of the the radically simple, stupid way 'if' works. It's tied to C, which is just fine as long as all we need is C. Since we're going to need more than C, it'

Re: [PULL 00/11] Ui 20210521 patches

2021-05-21 Thread Peter Maydell
available in the Git repository at: > > git://git.kraxel.org/qemu tags/ui-20210521-pull-request > > for you to fetch changes up to d11ebe2ca257769337118d3b0ff3f76ea4928018: > > ui/gtk: add clipboard support (2021-05-21 09:42:44 +0200) > > -

Re: [RFC 1/1] acceptance tests: rename acceptance to system

2021-05-21 Thread Peter Maydell
On Fri, 21 May 2021 at 16:13, Willian Rampazzo wrote: > On Fri, May 21, 2021 at 11:29 AM Peter Maydell > wrote: > > This does raise the question of what we're actually trying > > to distinguish. It seems to me somewhat that what tests/acceptance/ > > actually contains that makes it interestingly

Re: [PATCH] hw/scsi: Fix sector translation bug in scsi_unmap_complete_noio

2021-05-21 Thread Paolo Bonzini
On 21/05/21 16:28, Kit Westneat wrote: check_lba_range expects sectors to be expressed in original qdev blocksize, but scsi_unmap_complete_noio was translating them to 512 block sizes, which was causing sense errors in the larger LBAs in devices using a 4k block size. Resolves: https://gitlab.co

Re: [RFC 1/1] acceptance tests: rename acceptance to system

2021-05-21 Thread Willian Rampazzo
On Fri, May 21, 2021 at 11:29 AM Peter Maydell wrote: > > On Fri, 21 May 2021 at 15:19, Philippe Mathieu-Daudé wrote: > > If you think these tests belong to tests/tcg/, I am OK to put > > them they, but I don't think adding the Avocado buildsys > > machinery to the already-complex tests/tcg/ Make

Re: [PATCH v2 1/7] block-copy: streamline choice of copy_range vs. read/write

2021-05-21 Thread Paolo Bonzini
On 20/05/21 16:42, Vladimir Sementsov-Ogievskiy wrote: 18.05.2021 13:07, Emanuele Giuseppe Esposito wrote: From: Paolo Bonzini Put the logic to determine the copy size in a separate function, so that there is a simple state machine for the possible methods of copying data from one BlockDriverS

Re: [PATCH v4 8/9] qapi: make 'if' condition strings simple identifiers

2021-05-21 Thread Markus Armbruster
Marc-André Lureau writes: > On Fri, May 21, 2021 at 4:03 PM Markus Armbruster wrote: [...] >> At this point in your series, the documentation does not yet reflect the >> code changes you've made. You now add another change together with a >> doc update. Now the docs match *no* version of the

[PATCH] hw/scsi: Fix sector translation bug in scsi_unmap_complete_noio

2021-05-21 Thread Kit Westneat
check_lba_range expects sectors to be expressed in original qdev blocksize, but scsi_unmap_complete_noio was translating them to 512 block sizes, which was causing sense errors in the larger LBAs in devices using a 4k block size. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/345 Signed-o

Re: [PATCH v2 6/7] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState

2021-05-21 Thread Paolo Bonzini
On 20/05/21 17:34, Vladimir Sementsov-Ogievskiy wrote: By adding acquire/release pairs, we ensure that .ret and .error_is_read fields are written by block_copy_dirty_clusters before .finished is true. As I already said, please, can we live with one mutex for now? finished, ret, error_is_read

Re: [PATCH v2 5/7] block-copy: add QemuMutex lock for BlockCopyCallState list

2021-05-21 Thread Paolo Bonzini
On 20/05/21 17:30, Vladimir Sementsov-Ogievskiy wrote: 18.05.2021 13:07, Emanuele Giuseppe Esposito wrote: As for BlockCopyTask, add a lock to protect BlockCopyCallState ret and sleep_state fields. Also move ret, finished and cancelled in the OUT fields of BlockCopyCallState. Here a QemuMutex i

Re: [PATCH V3 00/22] Live Update [reboot]

2021-05-21 Thread Steven Sistare
On 5/20/2021 9:00 AM, Dr. David Alan Gilbert wrote: > Hi Steven, > I'd like to split the discussion into reboot and restart, > so I can make sure I understand them individually. > > So reboot mode; > Can you explain which parts of this series are needed for reboot mode; > I've managed to do a ke

Re: [PATCH V3 00/22] Live Update [restart]

2021-05-21 Thread Steven Sistare
On 5/20/2021 9:13 AM, Dr. David Alan Gilbert wrote: > On the 'restart' branch of questions; can you explain, > other than the passing of the fd's, why the outgoing side of > qemu's 'migrate exec:' doesn't work for you? I'm not sure what I should describe. Can you be more specific? Do you mean: ca

Re: [RFC 1/1] acceptance tests: rename acceptance to system

2021-05-21 Thread Willian Rampazzo
On Fri, May 21, 2021 at 11:29 AM Peter Maydell wrote: > > On Fri, 21 May 2021 at 15:19, Philippe Mathieu-Daudé wrote: > > If you think these tests belong to tests/tcg/, I am OK to put > > them they, but I don't think adding the Avocado buildsys > > machinery to the already-complex tests/tcg/ Make

Re: [PATCH v3 3/9] qapi: start building an 'if' predicate tree

2021-05-21 Thread Markus Armbruster
Beware, I'm skimming, not really reviewing. John Snow writes: > On 4/29/21 9:40 AM, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> The following patches are going to express schema 'if' conditions in >> a >> target language agnostic way. For that, let's start building a predic

Re: [RFC 1/1] acceptance tests: rename acceptance to system

2021-05-21 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 5/21/21 3:03 PM, Alex Bennée wrote: >> Philippe Mathieu-Daudé writes: >>> On 5/21/21 2:28 PM, Willian Rampazzo wrote: On Fri, May 21, 2021 at 4:16 AM Thomas Huth wrote: > > On 20/05/2021 22.28, Philippe Mathieu-Daudé wrote: >> On 5/20/21 9:

Re: [PATCH v2 0/6] coroutine: new sleep/wake API

2021-05-21 Thread Stefan Hajnoczi
On Mon, May 17, 2021 at 12:05:42PM +0200, Paolo Bonzini wrote: > This is a revamp of the qemu_co_sleep* API that makes it easier to > extend the API: the state that is needed to wake up a coroutine is now > part of the public API instead of hidden behind a pointer-to-pointer; > the API is made more

  1   2   3   >