Re: [RFC PATCH] vhost-vdpa: Do not send empty IOTLB update batches

2021-08-05 Thread Eugenio Perez Martin
On Thu, Aug 5, 2021 at 8:16 AM Jason Wang wrote: > > On Wed, Aug 4, 2021 at 10:44 PM Eugenio Pérez wrote: > > > > With the introduction of the batch hinting, meaningless batches can be > > created with no IOTLB updates if the memory region was skipped by > > vhost_vdpa_listener_skipped_section. T

[Bug 1905297] Re: Zynq7000 UART clock reset initialization

2021-08-05 Thread Philippe Mathieu-Daudé
Michael your patch is still missing your Signed-off-tag. Can you re-attach it including it? You can also use https://sr.ht/ to send the patch directly to the list. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpa

Re: [RFC PATCH] vhost-vdpa: Do not send empty IOTLB update batches

2021-08-05 Thread Jason Wang
在 2021/8/5 下午3:04, Eugenio Perez Martin 写道: On Thu, Aug 5, 2021 at 8:16 AM Jason Wang wrote: On Wed, Aug 4, 2021 at 10:44 PM Eugenio Pérez wrote: With the introduction of the batch hinting, meaningless batches can be created with no IOTLB updates if the memory region was skipped by vhost_vd

Re: [PATCH 0/7] floppy: build as modules.

2021-08-05 Thread Gerd Hoffmann
On Wed, Aug 04, 2021 at 05:19:02PM +0200, Philippe Mathieu-Daudé wrote: > +Mark > > On 8/4/21 4:27 PM, Gerd Hoffmann wrote: > > Some code shuffling needed beforehand due to floppy being part of > > several platforms. While being at it also make floppy optional > > in pc machine type. > > > flo

Re: [RFC PATCH 00/13] Support UXL field in mstatus

2021-08-05 Thread LIU Zhiwei
On 2021/8/5 下午2:01, Alistair Francis wrote: On Thu, Aug 5, 2021 at 12:55 PM LIU Zhiwei wrote: This patch set implements UXL field in mstatus register. Programmer can change UXLEN by writting to this field. So that you can run a 32 bit program on a 64 bit CPU. Awesome! Do you have any steps f

Re: [RFC PATCH 00/13] Support UXL field in mstatus

2021-08-05 Thread Bin Meng
On Thu, Aug 5, 2021 at 3:16 PM LIU Zhiwei wrote: > > > On 2021/8/5 下午2:01, Alistair Francis wrote: > > On Thu, Aug 5, 2021 at 12:55 PM LIU Zhiwei wrote: > >> This patch set implements UXL field in mstatus register. Programmer can > >> change > >> UXLEN by writting to this field. So that you can

[PATCH v3 0/3] Add support for Fujitsu A64FX processor

2021-08-05 Thread Shuuichirou Ishii
This is the v3 patch series. v3: When we created the v2 patch series, we based it on the v1 patch series that had not been merged into the upstream, so we created the v3 patch series as a patch series that can be applied independently. v2: No features have been added or removed from the v1 patch

[PATCH v3 3/3] tests/arm-cpu-features: Add A64FX processor related tests

2021-08-05 Thread Shuuichirou Ishii
Signed-off-by: Shuuichirou Ishii --- tests/qtest/arm-cpu-features.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 8252b85bb8..979c6f82f8 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c

[PATCH v3 1/3] target-arm: cpu64: Add support for Fujitsu A64FX

2021-08-05 Thread Shuuichirou Ishii
Add a definition for the Fujitsu A64FX processor. The A64FX processor does not implement the AArch32 Execution state, so there are no associated AArch32 Identification registers. Signed-off-by: Shuuichirou Ishii --- target/arm/cpu64.c | 44 1 file ch

[PATCH v3 2/3] hw/arm/virt: target-arm: Add A64FX processor support to virt machine

2021-08-05 Thread Shuuichirou Ishii
Add -cpu a64fx to use A64FX processor when -machine virt option is specified. In addition, add a64fx to the Supported guest CPU types in the virt.rst document. Signed-off-by: Shuuichirou Ishii --- docs/system/arm/virt.rst | 1 + hw/arm/virt.c| 1 + 2 files changed, 2 insertions(+)

[RFC PATCH v0 2/2] ppc,spapr: Handle KVM_EXIT_ESN

2021-08-05 Thread Bharata B Rao
Handle KVM_EXIT_ESN exit by issuing subvention notification interrupt to the guest. Guests supporting async-pf feature will need this interrupt to wake up tasks that are waiting for the expropriated pages to be available. Note: Updates to linux-headers/linux/kvm.h are temporary pending headers upd

[RFC PATCH v0 1/2] spapr: Add H_REG_SNS hcall

2021-08-05 Thread Bharata B Rao
Add support for H_REG_SNS hcall so that asynchronous page fault mechanism can be supported on PowerKVM guests. This hcall essentially issues KVM_PPC_SET_SNS to let the host map and pin the memory containing the Subvention Notification Structure. It also claims SPAPR_IRQ_SNS to be used as subventio

[RFC PATCH v0 0/2] Support for H_REG_SNS hcall

2021-08-05 Thread Bharata B Rao
Add support for H_REG_SNS hcall which will be used by the guest to make use of Expropriation/Subvention Notification option aka asynchronous page fault support. The kernel enablement patches are posted here: https://lore.kernel.org/linuxppc-dev/20210805072439.501481-1-bhar...@linux.ibm.com/T/#t B

Re: [PATCH v3 3/7] migration/ram: Don't passs RAMState to migration_clear_memory_region_dirty_bitmap_*()

2021-08-05 Thread Philippe Mathieu-Daudé
On 7/30/21 10:52 AM, David Hildenbrand wrote: > The parameter is unused, let's drop it. > > Signed-off-by: David Hildenbrand > --- > migration/ram.c | 13 + > 1 file changed, 5 insertions(+), 8 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC PATCH v0 2/2] ppc,spapr: Handle KVM_EXIT_ESN

2021-08-05 Thread Laurent Vivier
On 05/08/2021 09:32, Bharata B Rao wrote: > Handle KVM_EXIT_ESN exit by issuing subvention notification > interrupt to the guest. Guests supporting async-pf feature > will need this interrupt to wake up tasks that are waiting > for the expropriated pages to be available. > > Note: Updates to linux

Re: [RESEND RFC] hw/arm/smmuv3: add device properties to disable cached iotlb

2021-08-05 Thread chenxiang (M)
Hi Eric, 在 2021/8/5 0:26, Eric Auger 写道: Hi Chenxiang, On 8/4/21 10:49 AM, chenxiang wrote: From: Xiang Chen It splits invalidations into ^2 range invalidations in the patch 6d9cd115b(" hw/arm/smmuv3: Enforce invalidation on a power of two range"). So for some scenarios such as the size of

Re: [PATCH v3 6/7] migration/postcopy: Handle RAMBlocks with a RamDiscardManager on the destination

2021-08-05 Thread Philippe Mathieu-Daudé
On 7/30/21 10:52 AM, David Hildenbrand wrote: > Currently, when someone (i.e., the VM) accesses discarded parts inside a > RAMBlock with a RamDiscardManager managing the corresponding mapped memory > region, postcopy will request migration of the corresponding page from the > source. The source, ho

Re: [PATCH v3 7/7] migration/ram: Handle RAMBlocks with a RamDiscardManager on background snapshots

2021-08-05 Thread Philippe Mathieu-Daudé
On 7/30/21 10:52 AM, David Hildenbrand wrote: > We already don't ever migrate memory that corresponds to discarded ranges > as managed by a RamDiscardManager responsible for the mapped memory region > of the RAMBlock. > > virtio-mem uses this mechanism to logically unplug parts of a RAMBlock. > Ri

Re: [PATCH v3 6/7] migration/postcopy: Handle RAMBlocks with a RamDiscardManager on the destination

2021-08-05 Thread David Hildenbrand
On 05.08.21 09:48, Philippe Mathieu-Daudé wrote: On 7/30/21 10:52 AM, David Hildenbrand wrote: Currently, when someone (i.e., the VM) accesses discarded parts inside a RAMBlock with a RamDiscardManager managing the corresponding mapped memory region, postcopy will request migration of the corres

Re: [PATCH v3 6/7] migration/postcopy: Handle RAMBlocks with a RamDiscardManager on the destination

2021-08-05 Thread David Hildenbrand
On 05.08.21 02:04, Peter Xu wrote: On Fri, Jul 30, 2021 at 10:52:48AM +0200, David Hildenbrand wrote: Currently, when someone (i.e., the VM) accesses discarded parts inside a RAMBlock with a RamDiscardManager managing the corresponding mapped memory region, postcopy will request migration of the

Re: [RESEND RFC] hw/arm/smmuv3: add device properties to disable cached iotlb

2021-08-05 Thread Eric Auger
Hi Chenxiang, On 8/5/21 9:48 AM, chenxiang (M) wrote: > Hi Eric, > > > 在 2021/8/5 0:26, Eric Auger 写道: >> Hi Chenxiang, >> >> On 8/4/21 10:49 AM, chenxiang wrote: >>> From: Xiang Chen >>> >>> It splits invalidations into ^2 range invalidations in the patch >>> 6d9cd115b(" hw/arm/smmuv3: Enforce in

Re: [RFC PATCH 00/13] Support UXL field in mstatus

2021-08-05 Thread LIU Zhiwei
On 2021/8/5 下午3:20, Bin Meng wrote: On Thu, Aug 5, 2021 at 3:16 PM LIU Zhiwei wrote: On 2021/8/5 下午2:01, Alistair Francis wrote: On Thu, Aug 5, 2021 at 12:55 PM LIU Zhiwei wrote: This patch set implements UXL field in mstatus register. Programmer can change UXLEN by writting to this field

Re: [PATCH v3 7/7] migration/ram: Handle RAMBlocks with a RamDiscardManager on background snapshots

2021-08-05 Thread David Hildenbrand
On 05.08.21 10:04, Philippe Mathieu-Daudé wrote: On 7/30/21 10:52 AM, David Hildenbrand wrote: We already don't ever migrate memory that corresponds to discarded ranges as managed by a RamDiscardManager responsible for the mapped memory region of the RAMBlock. virtio-mem uses this mechanism to

Re: [PATCH v3 6/7] migration/postcopy: Handle RAMBlocks with a RamDiscardManager on the destination

2021-08-05 Thread Philippe Mathieu-Daudé
On 8/5/21 10:07 AM, David Hildenbrand wrote: > On 05.08.21 09:48, Philippe Mathieu-Daudé wrote: >> On 7/30/21 10:52 AM, David Hildenbrand wrote: >>> Currently, when someone (i.e., the VM) accesses discarded parts inside a >>> RAMBlock with a RamDiscardManager managing the corresponding mapped >>> m

Re: [PATCH v3 6/7] migration/postcopy: Handle RAMBlocks with a RamDiscardManager on the destination

2021-08-05 Thread David Hildenbrand
On 05.08.21 10:17, Philippe Mathieu-Daudé wrote: On 8/5/21 10:07 AM, David Hildenbrand wrote: On 05.08.21 09:48, Philippe Mathieu-Daudé wrote: On 7/30/21 10:52 AM, David Hildenbrand wrote: Currently, when someone (i.e., the VM) accesses discarded parts inside a RAMBlock with a RamDiscardManage

Re: [PATCH v3 7/7] migration/ram: Handle RAMBlocks with a RamDiscardManager on background snapshots

2021-08-05 Thread Philippe Mathieu-Daudé
On 8/5/21 10:11 AM, David Hildenbrand wrote: > On 05.08.21 10:04, Philippe Mathieu-Daudé wrote: >> On 7/30/21 10:52 AM, David Hildenbrand wrote: >>> We already don't ever migrate memory that corresponds to discarded >>> ranges >>> as managed by a RamDiscardManager responsible for the mapped memory

Re: [PATCH v3 7/7] migration/ram: Handle RAMBlocks with a RamDiscardManager on background snapshots

2021-08-05 Thread David Hildenbrand
On 05.08.21 10:21, Philippe Mathieu-Daudé wrote: On 8/5/21 10:11 AM, David Hildenbrand wrote: On 05.08.21 10:04, Philippe Mathieu-Daudé wrote: On 7/30/21 10:52 AM, David Hildenbrand wrote: We already don't ever migrate memory that corresponds to discarded ranges as managed by a RamDiscardManag

Re: [PATCH v2] block/io_uring: resubmit when result is -EAGAIN

2021-08-05 Thread Stefano Garzarella
On Wed, Aug 04, 2021 at 06:52:15PM +0200, Kevin Wolf wrote: Am 04.08.2021 um 16:50 hat Stefano Garzarella geschrieben: On Mon, Aug 02, 2021 at 02:40:36PM +0200, Kevin Wolf wrote: > Am 29.07.2021 um 11:10 hat Fabian Ebner geschrieben: > > Linux SCSI can throw spurious -EAGAIN in some corner cases

Re: [RFC PATCH v0 2/2] ppc,spapr: Handle KVM_EXIT_ESN

2021-08-05 Thread Bharata B Rao
On Thu, Aug 05, 2021 at 09:48:04AM +0200, Laurent Vivier wrote: > On 05/08/2021 09:32, Bharata B Rao wrote: > > Handle KVM_EXIT_ESN exit by issuing subvention notification > > interrupt to the guest. Guests supporting async-pf feature > > will need this interrupt to wake up tasks that are waiting >

Re: [PATCH v5 05/10] ACPI ERST: support for ACPI ERST feature

2021-08-05 Thread Igor Mammedov
On Wed, 4 Aug 2021 17:13:40 -0500 Eric DeVolder wrote: > On 7/27/21 7:52 AM, Igor Mammedov wrote: > > On Mon, 26 Jul 2021 15:01:05 -0500 > > Eric DeVolder wrote: > > > >> On 7/26/21 5:42 AM, Igor Mammedov wrote: > >>> On Wed, 21 Jul 2021 11:07:40 -0500 > >>> Eric DeVolder wrote: > >>>

Re: [PATCH 1/2] docs: remove non-reference uses of single backticks

2021-08-05 Thread Peter Maydell
On Thu, 5 Aug 2021 at 01:48, John Snow wrote: > > The single backtick markup in ReST is the "default role". Currently, > Sphinx's default role is called "content". Sphinx suggests you can use > the "Any" role instead to turn any single-backtick enclosed item into a > cross-reference. > > This is u

Re: [PATCH v3] hw/acpi: add an assertion check for non-null return from acpi_get_i386_pci_host

2021-08-05 Thread Igor Mammedov
On Mon, 26 Jul 2021 22:27:43 +0530 Ani Sinha wrote: > All existing code using acpi_get_i386_pci_host() checks for a non-null > return value from this function call. Instead of returning early when the > value > returned is NULL, assert instead. Since there are only two possible host buses > for

Re: [PATCH] MAINTAINERS: Added myself as a reviewer for acpi/smbios subsystem

2021-08-05 Thread Igor Mammedov
On Fri, 30 Jul 2021 23:25:14 +0530 Ani Sinha wrote: > I have developed an interest in this space and hopefully can lend some > helping hand to Igor and Michael in reviewing simpler patches. > > Signed-off-by: Ani Sinha Acked-by: Igor Mammedov > --- > MAINTAINERS | 1 + > 1 file changed, 1 i

[PATCH-for-6.1 v2] softmmu/physmem: fix wrong assertion in qemu_ram_alloc_internal()

2021-08-05 Thread David Hildenbrand
When adding RAM_NORESERVE, we forgot to remove the old assertion when adding the updated one, most probably when reworking the patches or rebasing. We can easily crash QEMU by adding -object memory-backend-ram,id=mem0,size=500G,reserve=off to the QEMU cmdline: qemu-system-x86_64: ../softmmu/phy

Re: [PATCH] hw/i386/acpi-build: Get NUMA information from struct NumaState

2021-08-05 Thread Igor Mammedov
On Tue, 3 Aug 2021 14:30:05 +0800 Jingqi Liu wrote: > The NUMA information in PCMachineState is copied from MachineState. > We get this information uniformly from struct NumaState in MachineState. Is there a another reason behind this patch? As cleanup it's not complete, why do you keep PCMachi

Re: [PATCH v8] tests/tcg/s390x: Test SIGILL and SIGSEGV handling

2021-08-05 Thread David Hildenbrand
On 05.08.21 00:51, Ilya Leoshkevich wrote: Verify that s390x-specific uc_mcontext.psw.addr is reported correctly and that signal handling interacts properly with debugging. Signed-off-by: Ilya Leoshkevich --- v7: https://lists.nongnu.org/archive/html/qemu-devel/2021-08/msg00463.html v7 -> v8:

Re: [PATCH v4 02/14] doc: update AMD SEV to include Live migration flow

2021-08-05 Thread Ashish Kalra
Hello Dov, On Thu, Aug 05, 2021 at 09:34:42AM +0300, Dov Murik wrote: > > > On 04/08/2021 14:53, Ashish Kalra wrote: > > From: Brijesh Singh > > > > Signed-off-by: Brijesh Singh > > Signed-off-by: Ashish Kalra > > --- > > docs/amd-memory-encryption.txt | 46 +

Re: [PATCH 0/6] docs/devel: Organize devel manual into further subsections

2021-08-05 Thread Peter Maydell
On Wed, 4 Aug 2021 at 01:56, John Snow wrote: > > It's a bit cluttered. On my way to converting the QAPI/QMP documents to > ReST I thought it could do with another organizational level to help > make sense of things a bit more quickly. > > John Snow (6): > docs/devel: create "Community & Governa

Re: [PATCH v4 03/14] migration.json: add AMD SEV specific migration parameters

2021-08-05 Thread Dov Murik
On 04/08/2021 14:54, Ashish Kalra wrote: > From: Brijesh Singh > > AMD SEV migration flow requires that target machine's public Diffie-Hellman > key (PDH) and certificate chain must be passed before initiating the guest > migration. User can use QMP 'migrate-set-parameters' to pass the certifi

[Bug] x86 EFLAGS refresh is not happening correctly

2021-08-05 Thread Stevie Lavern
Hello, I'm posting this here instead of opening an issue as it is not clear to me if this is a bug or not. The issue is located in function "cpu_compute_eflags" in target/i386/cpu.h (https://gitlab.com/qemu-project/qemu/-/blob/master/target/i386/cpu.h#L2071) This function is exectued in an out o

Re: [PATCH v8] tests/tcg/s390x: Test SIGILL and SIGSEGV handling

2021-08-05 Thread Ilya Leoshkevich
On Thu, 2021-08-05 at 11:37 +0200, David Hildenbrand wrote: > On 05.08.21 00:51, Ilya Leoshkevich wrote: > > Verify that s390x-specific uc_mcontext.psw.addr is reported > > correctly > > and that signal handling interacts properly with debugging. > > > > Signed-off-by: Ilya Leoshkevich > > --- >

Re: [PATCH v8] tests/tcg/s390x: Test SIGILL and SIGSEGV handling

2021-08-05 Thread David Hildenbrand
On 05.08.21 11:57, Ilya Leoshkevich wrote: On Thu, 2021-08-05 at 11:37 +0200, David Hildenbrand wrote: On 05.08.21 00:51, Ilya Leoshkevich wrote: Verify that s390x-specific uc_mcontext.psw.addr is reported correctly and that signal handling interacts properly with debugging. Signed-off-by: Ily

Re: [PATCH] linux-user: fix guest/host address mixup in i386 setup_rt_frame()

2021-08-05 Thread Laurent Vivier
Le 03/08/2021 à 19:18, Ilya Leoshkevich a écrit : > setup_rt_frame() passes siginfo and ucontext host addresses to guest > signal handlers, causing problems when e.g. emulating x86_64 on s390x. > > Signed-off-by: Ilya Leoshkevich > --- > linux-user/i386/signal.c | 8 > 1 file changed, 4

Re: [PATCH] linux-user/elfload: byteswap i386 registers when dumping core

2021-08-05 Thread Laurent Vivier
Le 03/08/2021 à 19:20, Ilya Leoshkevich a écrit : > Core dumps from emulating x86_64 on big-endian hosts contain incorrect > register values. > > Signed-off-by: Ilya Leoshkevich > --- > linux-user/elfload.c | 88 ++-- > 1 file changed, 44 insertions(+), 44

Re: [PATCH v2 02/11] chardev/socket: print a more correct command-line address

2021-08-05 Thread Daniel P . Berrangé
On Wed, Aug 04, 2021 at 07:48:39PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Better reflect the command line version of the socket address arguments, > following the now recommended long-form opt=on syntax. > > Complement/fixes commit 9d902d51 "chardev: do not use s

Re: [PATCH v2 05/11] chardev: mark explicitly first argument as poisoned

2021-08-05 Thread Daniel P . Berrangé
On Wed, Aug 04, 2021 at 07:48:42PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Since commit 9894dc0cdcc397ee5b26370bc53da6d360a363c2 "char: convert > from GIOChannel to QIOChannel", the first argument to the watch callback > can actually be a QIOChannel, which is not a

Re: [PATCH v2 06/11] chardev: fix fd_chr_add_watch() when in != out

2021-08-05 Thread Daniel P . Berrangé
On Wed, Aug 04, 2021 at 07:48:43PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Create child sources for the different streams, and dispatch on the > parent source with the synthesized conditions. > > Signed-off-by: Marc-André Lureau > --- > chardev/char-fd.c | 78 ++

Re: [PATCH v2 07/11] chardev: fix qemu_chr_open_fd() being called with fd=-1

2021-08-05 Thread Daniel P . Berrangé
On Wed, Aug 04, 2021 at 07:48:44PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The "file" chardev may call qemu_chr_open_fd() with fd_in=-1. This may > cause invalid system calls, as the QIOChannel is assumed to be properly > initialized later on. > > Signed-off-by: M

Re: [PATCH v2 05/11] chardev: mark explicitly first argument as poisoned

2021-08-05 Thread Marc-André Lureau
Hi On Thu, Aug 5, 2021 at 2:37 PM Daniel P. Berrangé wrote: > On Wed, Aug 04, 2021 at 07:48:42PM +0400, marcandre.lur...@redhat.com > wrote: > > From: Marc-André Lureau > > > > Since commit 9894dc0cdcc397ee5b26370bc53da6d360a363c2 "char: convert > > from GIOChannel to QIOChannel", the first arg

Re: [PATCH v2 08/11] chardev: fix qemu_chr_open_fd() with fd_in==fd_out

2021-08-05 Thread Daniel P . Berrangé
On Wed, Aug 04, 2021 at 07:48:45PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The "serial" chardev calls qemu_chr_open_fd() with the same fd. This > may lead to double-close as each QIOChannel owns the fd. > > Instead, share the reference to the same QIOChannel. > >

Re: [PATCH v2 10/11] chardev: report a simpler error about duplicated id

2021-08-05 Thread Daniel P . Berrangé
On Wed, Aug 04, 2021 at 07:48:47PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Report: > "Chardev with id 'char2' already exists" > Rather than: > "Failed to add chardev 'char2': duplicate yank instance" > > Signed-off-by: Marc-André Lureau > --- > chardev/char.

Re: [PATCH v6 02/11] qapi: wrap Sequence[str] in an object

2021-08-05 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Mon, Aug 2, 2021 at 1:21 PM Markus Armbruster wrote: > >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > Except for the special casing assert in _make_implicit_object_type(), >> > which needs to handle schema objects, it's a m

Re: [PATCH v2 11/11] chardev: reuse qmp_chardev_new()

2021-08-05 Thread Daniel P . Berrangé
On Wed, Aug 04, 2021 at 07:48:48PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > qemu_chardev_new() and qmp_chardev_add() are similar, let's factorize > the code a bit. > > Signed-off-by: Marc-André Lureau > --- > chardev/char.c | 27 ++- > 1 f

Re: [PATCH v2 05/11] chardev: mark explicitly first argument as poisoned

2021-08-05 Thread Daniel P . Berrangé
On Thu, Aug 05, 2021 at 02:39:28PM +0400, Marc-André Lureau wrote: > Hi > > On Thu, Aug 5, 2021 at 2:37 PM Daniel P. Berrangé > wrote: > > > On Wed, Aug 04, 2021 at 07:48:42PM +0400, marcandre.lur...@redhat.com > > wrote: > > > From: Marc-André Lureau > > > > > > Since commit 9894dc0cdcc397ee5b

Re: [PATCH RFC 1/1] accel/tcg: Clear PAGE_WRITE before translation

2021-08-05 Thread Ilya Leoshkevich
On Wed, 2021-08-04 at 14:30 -1000, Richard Henderson wrote: > On 8/4/21 12:46 PM, Ilya Leoshkevich wrote: > > translate_insn() implementations fetch instruction bytes piecemeal, > > which can cause qemu-user to generate inconsistent translations if > > another thread modifies them concurrently [1].

Re: [Bug] x86 EFLAGS refresh is not happening correctly

2021-08-05 Thread Paolo Bonzini
On 05/08/21 11:51, Stevie Lavern wrote: Shouldn't it be: eflags = cpu_cc_compute_all(env, CC_OP) | (env->df & DF_MASK); as eflags is entirely reevaluated by "cpu_cc_compute_all" ? No, both are wrong. env->eflags contains flags other than the arithmetic flags (OF/SF/ZF/AF/PF/CF) and those hav

Re: [PATCH v3 1/3] target-arm: cpu64: Add support for Fujitsu A64FX

2021-08-05 Thread Andrew Jones
On Thu, Aug 05, 2021 at 04:30:43PM +0900, Shuuichirou Ishii wrote: > Add a definition for the Fujitsu A64FX processor. > > The A64FX processor does not implement the AArch32 Execution state, > so there are no associated AArch32 Identification registers. > > Signed-off-by: Shuuichirou Ishii > ---

Re: [Bug] x86 EFLAGS refresh is not happening correctly

2021-08-05 Thread Paolo Bonzini
On 05/08/21 13:24, Paolo Bonzini wrote: On 05/08/21 11:51, Stevie Lavern wrote: Shouldn't it be: eflags = cpu_cc_compute_all(env, CC_OP) | (env->df & DF_MASK); as eflags is entirely reevaluated by "cpu_cc_compute_all" ? No, both are wrong.  env->eflags contains flags other than the arithmeti

Re: [PATCH 1/6] docs/devel: create "Community & Governance" subsection

2021-08-05 Thread Alex Bennée
John Snow writes: > Plonk the Code of Conduct and Conflict Resolution Policy guides into a > new "Community & Governance" subsection. > > Signed-off-by: John Snow Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v7 04/10] qapi: introduce QAPISchemaIfCond.cgen()

2021-08-05 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Instead of building prepocessor conditions from a list of string, use > the result generated from QAPISchemaIfCond.cgen() and hide the > implementation details. > > Note: this patch introduces a minor regression, generating a redun

Re: [PATCH 2/6] docs/devel: create "Developing QEMU" subsection

2021-08-05 Thread Alex Bennée
John Snow writes: > Signed-off-by: John Snow Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v7 05/10] qapidoc: introduce QAPISchemaIfCond.docgen()

2021-08-05 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Instead of building the condition documentation from a list of string, > use the result generated from QAPISchemaIfCond.docgen(). > > This changes the generated documentation from: > - COND1, COND2... (where COND1, COND2 are Litera

Re: [PATCH v7 05/10] qapidoc: introduce QAPISchemaIfCond.docgen()

2021-08-05 Thread Marc-André Lureau
Hi On Thu, Aug 5, 2021 at 3:55 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Instead of building the condition documentation from a list of string, > > use the result generated from QAPISchemaIfCond.docgen(). > > > > This changes the gen

Re: [PATCH 3/6] docs/devel: create "Testing & Debugging" subsection

2021-08-05 Thread Alex Bennée
John Snow writes: > Signed-off-by: John Snow Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 4/6] docs/devel: create TCG subsection

2021-08-05 Thread Alex Bennée
John Snow writes: > Signed-off-by: John Snow modulo Peter's comments re decodetree: Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v3] hw/acpi: add an assertion check for non-null return from acpi_get_i386_pci_host

2021-08-05 Thread Ani Sinha
On Thu, 5 Aug 2021, Igor Mammedov wrote: > On Mon, 26 Jul 2021 22:27:43 +0530 > Ani Sinha wrote: > > > All existing code using acpi_get_i386_pci_host() checks for a non-null > > return value from this function call. Instead of returning early when the > > value > > returned is NULL, assert in

Re: [PATCH 5/6] docs/devel: create "Subsystem APIs" subsection

2021-08-05 Thread Alex Bennée
John Snow writes: > Signed-off-by: John Snow Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH 6/6] docs/devel: create "Miscellaneous Topics" subsection

2021-08-05 Thread Alex Bennée
John Snow writes: > The hallmark of any truly great taxonomical reorganization: the bin of > leftover bits and pieces that didn't neatly fit elsewhere. > > Signed-off-by: John Snow > --- > docs/devel/index.rst| 9 + > docs/devel/section-misc.rst | 15 +++ > 2 file

Re: [PATCH v4 04/14] confidential guest support: introduce ConfidentialGuestMemoryEncryptionOps for encrypted VMs

2021-08-05 Thread Dov Murik
On 04/08/2021 14:55, Ashish Kalra wrote: > From: Brijesh Singh > > When memory encryption is enabled in VM, the guest RAM will be encrypted > with the guest-specific key, to protect the confidentiality of data while > in transit we need to platform specific hooks to save or migrate the > guest

[PATCH v2] accel/tcg: Clear PAGE_WRITE before translation

2021-08-05 Thread Ilya Leoshkevich
translate_insn() implementations fetch instruction bytes piecemeal, which can cause qemu-user to generate inconsistent translations if another thread modifies them concurrently [1]. Fix by making translation block pages non-writable right before loading instruction bytes from them. [1] https://li

[PATCH v5 1/5] hw/arm/virt: Only describe cpu topology to guest since virt 6.2

2021-08-05 Thread Yanan Wang
On existing older machine types, without cpu topology described in ACPI or DT, the guest will populate one by default. With the topology described, it will read the information and set up its topology as instructed, but that may not be the same as what was getting used by default. It's possible tha

[PATCH for-6.2 v5 2/5] device_tree: Add qemu_fdt_add_path

2021-08-05 Thread Yanan Wang
qemu_fdt_add_path() works like qemu_fdt_add_subnode(), except it also adds all missing subnodes from the given path. We'll use it in a coming patch where we will add cpu-map to the device tree. And we also tweak an error message of qemu_fdt_add_subnode(). Reviewed-by: David Gibson Cc: David Gibs

[PATCH for-6.2 v5 0/5] hw/arm/virt: Introduce cpu topology support

2021-08-05 Thread Yanan Wang
Hi, This is a new version (v5) of the series [1] that I posted to introduce support for generating cpu topology descriptions to virt machine guest. Once the view of an accurate virtual cpu topology is provided to guest, with a well-designed vCPU pinning to the pCPU we may get a huge benefit, e.g.

[PATCH for-6.2 v5 3/5] hw/arm/virt: Add cpu-map to device tree

2021-08-05 Thread Yanan Wang
From: Andrew Jones Support device tree CPU topology descriptions. In accordance with the Devicetree Specification, the Linux Doc "arm/cpus.yaml" requires that cpus and cpu nodes in the DT are present. And we have already met the requirement by generating /cpus/cpu@* nodes for members within ms->

[PATCH for-6.2 v5 5/5] hw/acpi/aml-build: Generate PPTT table

2021-08-05 Thread Yanan Wang
From: Andrew Jones Add the Processor Properties Topology Table (PPTT) to expose CPU topology information defined by users to ACPI guests. Note, a DT-boot Linux guest with a non-flat CPU topology will see socket and core IDs being sequential integers starting from zero, which is different from AC

[PATCH for-6.2 v5 4/5] hw/acpi/aml-build: Add Processor hierarchy node structure

2021-08-05 Thread Yanan Wang
Add a generic API to build Processor hierarchy node structure (Type 0), which is strictly consistent with descriptions in ACPI 6.2: 5.2.29.1. This function will be used to build ACPI PPTT table for cpu topology. Reviewed-by: Andrew Jones Co-developed-by: Ying Fang Co-developed-by: Henglong Fan

Re: [Bug] x86 EFLAGS refresh is not happening correctly

2021-08-05 Thread Stevie Lavern
Thank for your reply! It's still a bit cryptic for me. I think i need to precise that I'm using a x86_64 custom user-mode,base on linux user-mode, that i'm developing (unfortunately i cannot share the code) with modifications in the translation loop (I've added cpu loop exits on specific instructi

Re: [PATCH v3 6/7] migration/postcopy: Handle RAMBlocks with a RamDiscardManager on the destination

2021-08-05 Thread Peter Xu
On Thu, Aug 05, 2021 at 10:10:38AM +0200, David Hildenbrand wrote: > On 05.08.21 02:04, Peter Xu wrote: > > On Fri, Jul 30, 2021 at 10:52:48AM +0200, David Hildenbrand wrote: > > > Currently, when someone (i.e., the VM) accesses discarded parts inside a > > > RAMBlock with a RamDiscardManager manag

[PULL 0/8] chardev fixes for 6.1

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau The following changes since commit bccabb3a5d60182645c7749e89f21a9ff307a9eb: Update version for v6.1.0-rc2 release (2021-08-04 16:56:14 +0100) are available in the Git repository at: g...@gitlab.com:marcandre.lureau/qemu.git tags/chr-fix-pull-request for you to fet

[PULL 1/8] util: fix abstract socket path copy

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau Commit 776b97d360 "qemu-sockets: add abstract UNIX domain socket support" neglected to update socket_sockaddr_to_address_unix() and copied the whole sun_path without taking "salen" into account. Later, commit 3b14b4ec49 "sockets: Fix socket_sockaddr_to_address_unix() for

[PULL 2/8] chardev/socket: print a more correct command-line address

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau Better reflect the command line version of the socket address arguments, following the now recommended long-form opt=on syntax. Complement/fixes commit 9d902d51 "chardev: do not use short form boolean options in non-QemuOpts character device descriptions". Signed-off-by:

[PULL 4/8] chardev: fix fd_chr_add_watch() when in != out

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau Create child sources for the different streams, and dispatch on the parent source with the synthesized conditions. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- chardev/char-fd.c | 78 ++- 1 file change

[PULL 3/8] chardev: mark explicitly first argument as poisoned

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau Since commit 9894dc0cdcc397ee5b26370bc53da6d360a363c2 "char: convert from GIOChannel to QIOChannel", the first argument to the watch callback can actually be a QIOChannel, which is not a GIOChannel (but a QEMU Object). Even though we never used that pointer, change the ca

[PULL 5/8] chardev: fix qemu_chr_open_fd() being called with fd=-1

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau The "file" chardev may call qemu_chr_open_fd() with fd_in=-1. This may cause invalid system calls, as the QIOChannel is assumed to be properly initialized later on. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- chardev/char-fd.c | 26

[PULL 7/8] chardev: give some context on chardev-add error

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau Description from Daniel P. Berrangé: > The original code reported: > > "attempt to add duplicate property 'char2' to object (type 'container')" > > Since adding yank support, the current code reports > > "duplicate yank instance" > > With this patch applied it now report

[PULL 6/8] chardev: fix qemu_chr_open_fd() with fd_in==fd_out

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau The "serial" chardev calls qemu_chr_open_fd() with the same fd. This may lead to double-close as each QIOChannel owns the fd. Instead, share the reference to the same QIOChannel. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- chardev/char-fd.c |

[PULL 8/8] chardev: report a simpler error about duplicated id

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau Report: "Chardev with id 'char2' already exists" Rather than: "Failed to add chardev 'char2': duplicate yank instance" Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- chardev/char.c | 5 + 1 file changed, 5 insertions(+) diff --git a/chard

[PATCH v1] s390x/tcg: fix and optimize SPX (SET PREFIX)

2021-08-05 Thread David Hildenbrand
We not only invalidate the translation of the range 0x0-0x2000, we also invalidate the translation of the new prefix range and the translation of the old prefix range -- because real2abs would return different results for all of these ranges when changing the prefix location. This fixes the kvm-un

Re: [PATCH v3] hw/acpi: add an assertion check for non-null return from acpi_get_i386_pci_host

2021-08-05 Thread Ani Sinha
On Thu, 5 Aug 2021, Ani Sinha wrote: > > > On Thu, 5 Aug 2021, Igor Mammedov wrote: > > > On Mon, 26 Jul 2021 22:27:43 +0530 > > Ani Sinha wrote: > > > > > All existing code using acpi_get_i386_pci_host() checks for a non-null > > > return value from this function call. Instead of returning ea

Re: [PATCH v4 05/14] target/i386: sev: provide callback to setup outgoing context

2021-08-05 Thread Dov Murik
On 04/08/2021 14:56, Ashish Kalra wrote: > From: Brijesh Singh > > The user provides the target machine's Platform Diffie-Hellman key (PDH) > and certificate chain before starting the SEV guest migration. Cache the > certificate chain as we need them while creating the outgoing context. > > S

Re: [PATCH v7 06/10] qapi: replace if condition list with dict {'all': [...]}

2021-08-05 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Replace the simple list sugar form with a recursive structure that will > accept other operators in the following commits (all, any or not). > > Signed-off-by: Marc-André Lureau > --- > scripts/qapi/common.py

Re: [PATCH v1] s390x/tcg: fix and optimize SPX (SET PREFIX)

2021-08-05 Thread Claudio Imbrenda
On Thu, 5 Aug 2021 14:59:38 +0200 David Hildenbrand wrote: > We not only invalidate the translation of the range 0x0-0x2000, we > also invalidate the translation of the new prefix range and the > translation of the old prefix range -- because real2abs would return > different results for all of

Re: [PATCH v7 08/10] qapi: Use 'if': { 'any': ... } where appropriate

2021-08-05 Thread Markus Armbruster
marcandre.lur...@redhat.com writes: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Reviewed-by: Stefan Hajnoczi > Tested-by: John Snow > Reviewed-by: Markus Armbruster > --- > qapi/machine-target.json | 20 > qapi/misc-target.json| 12 +++- >

[PATCH v3 01/18] ui/vdagent: fix leak on error path

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau "info" was leaked when more than 10 entries. Signed-off-by: Marc-André Lureau --- include/ui/clipboard.h | 2 ++ ui/vdagent.c | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h index b45b984

[PATCH v3 03/18] ui/gtk-clipboard: use existing macros

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau Hardcoding strings is error prone, use dedicated macros instead. Signed-off-by: Marc-André Lureau --- ui/gtk-clipboard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/gtk-clipboard.c b/ui/gtk-clipboard.c index bff28d2030..5e817ae55c 100644

[PATCH v3 00/18] Clipboard fixes (for 6.1?)

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau Hi, Here is a few fixes I have collected while working on clipboard-related code. There are some obvious code improvements/fixes, and better handling of release & unregister to avoid dangling pointers and improve user experience. v3: - add a migration blocker - improv

[PATCH v3 05/18] ui/clipboard: add helper to retrieve current clipboard

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- include/ui/clipboard.h | 9 + ui/clipboard.c | 15 +++ 2 files changed, 24 insertions(+) diff --git a/include/ui/clipboard.h b/include/ui/clipboard.h index eb789a285a..e9fcb15c66 100644 --- a/include/ui/c

[PATCH v3 04/18] ui/gtk-clipboard: fix clipboard enum typo

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/gtk-clipboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/gtk-clipboard.c b/ui/gtk-clipboard.c index 5e817ae55c..2c78de9500 100644 --- a/ui/gtk-clipboard.c +++ b/ui/gtk-clipboard.c @@ -155,7 +155,7 @@ s

Re: [PATCH v7 06/10] qapi: replace if condition list with dict {'all': [...]}

2021-08-05 Thread Marc-André Lureau
Hi On Thu, Aug 5, 2021 at 5:42 PM Markus Armbruster wrote: > marcandre.lur...@redhat.com writes: > > > From: Marc-André Lureau > > > > Replace the simple list sugar form with a recursive structure that will > > accept other operators in the following commits (all, any or not). > > > > Signed-of

[PATCH v3 02/18] ui/vdagent: remove copy-pasta comment

2021-08-05 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/vdagent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vdagent.c b/ui/vdagent.c index f6ef8d1993..5ae5734c81 100644 --- a/ui/vdagent.c +++ b/ui/vdagent.c @@ -516,7 +516,7 @@ static void vdagent_chr_recv_cl

  1   2   3   >