[PATCH v6 03/19] qdev: unplug blocker for devices

2022-02-17 Thread Jagannathan Raman
Add blocker to prevent hot-unplug of devices Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/hw/qdev-core.h | 35 +++ softmmu/qdev-monitor.c | 26 ++ 2 files changed, 61 insertions

[PATCH v6 02/19] tests/avocado: Specify target VM argument to helper routines

2022-02-17 Thread Jagannathan Raman
Specify target VM for exec_command and exec_command_and_wait_for_pattern routines Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Beraldo Leal Reviewed-by: Stefan Hajnoczi --- tests/avocado/avocad

[PATCH v6 10/19] vfio-user: run vfio-user context

2022-02-17 Thread Jagannathan Raman
Setup a handler to run vfio-user context. The context is driven by messages to the file descriptor associated with it - get the fd for the context and hook up the handler with it Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- qapi/misc.json

[PATCH v6 08/19] vfio-user: instantiate vfio-user context

2022-02-17 Thread Jagannathan Raman
create a context with the vfio-user library to run a PCI device Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/remote/vfio-user-obj.c | 80 +++ 1 file changed, 80 insertions(+) diff --git a/hw/remote/vfi

[PATCH v6 12/19] vfio-user: IOMMU support for remote device

2022-02-17 Thread Jagannathan Raman
Assign separate address space for each device in the remote processes. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/hw/remote/iommu.h | 18 + hw/remote/iommu.c | 78 +++ MAINTAINERS

[PATCH v6 06/19] vfio-user: build library

2022-02-17 Thread Jagannathan Raman
add the libvfio-user library as a submodule. build it as a cmake subproject. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- configure | 19 +- meson.build| 44 +++

[PATCH v6 13/19] vfio-user: handle DMA mappings

2022-02-17 Thread Jagannathan Raman
Define and register callbacks to manage the RAM regions used for device DMA Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- hw/remote/machine.c | 5 hw/remote/vfio-user-obj.c | 55 ++

Re: [PATCH 2/3] tests/x86: Use 'pc' machine type for hotplug tests

2022-02-17 Thread Thomas Huth
On 15/02/2022 17.25, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Hotplug tests need a bridge setting up on q35, for now keep them on 'pc'. Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/device-plug-test.c | 20 +-- tests/qtest/drive_del-test.c

[PATCH v6 14/19] vfio-user: handle PCI BAR accesses

2022-02-17 Thread Jagannathan Raman
Determine the BARs used by the PCI device and register handlers to manage the access to the same. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/exec/memory.h | 3 + hw/remote/vfio-user-obj.c | 166 +++

[PATCH v6 16/19] softmmu/vl: defer backend init

2022-02-17 Thread Jagannathan Raman
Allow deferred initialization of backends. TYPE_REMOTE_MACHINE is agnostic to QEMU's RUN_STATE. It's state is driven by the QEMU client via the vfio-user protocol. Whereas, the backends presently defer initialization if QEMU is in RUN_STATE_INMIGRATE. Since the remote machine can't use RUN_STATE*,

[PATCH v6 07/19] vfio-user: define vfio-user-server object

2022-02-17 Thread Jagannathan Raman
Define vfio-user object which is remote process server for QEMU. Setup object initialization functions and properties necessary to instantiate the object Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi --- qapi/qom.jso

Re: [PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-17 Thread Michael S. Tsirkin
On Thu, Feb 17, 2022 at 08:46:55AM +0100, Thomas Huth wrote: > On 16/02/2022 18.57, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Wed, Feb 16, 2022 at 05:40:44PM +, Dr. David Alan Gilbert wrote: > > > > * Thomas Huth (th...@redhat.com) wrote: > > >

[PATCH v6 17/19] vfio-user: register handlers to facilitate migration

2022-02-17 Thread Jagannathan Raman
Store and load the device's state during migration. use libvfio-user's handlers for this purpose Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/block/block.h | 1 + include/migration/vmstate.h | 2 + migration/savevm.h

[PATCH v6 18/19] vfio-user: handle reset of remote device

2022-02-17 Thread Jagannathan Raman
Adds handler to reset a remote device Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/remote/vfio-user-obj.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/remote/vfio-user-obj.c b/hw/remote/vfio-user-obj.c index

Re: [PATCH] ppc/spapr: Advertise StoreEOI for POWER10 compat guests

2022-02-17 Thread Cédric Le Goater
[ adding a few people for the comments ] On 2/16/22 23:17, Daniel Henrique Barboza wrote: On 2/14/22 11:11, Cédric Le Goater wrote: When an interrupt has been handled, the OS notifies the interrupt controller with a EOI sequence. On a POWER9 and POWER10 systems using nit:  s/a EOI sequence/

[PATCH v6 19/19] vfio-user: avocado tests for vfio-user

2022-02-17 Thread Jagannathan Raman
Avocado tests for libvfio-user in QEMU - tests startup, hotplug and migration of the server object Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- MAINTAINERS| 1 + tests/avocado/vfio-user.py | 234

Re: [PATCH v8 3/3] qapi/monitor: allow VNC display id in set/expire_password

2022-02-17 Thread Markus Armbruster
Fabian Ebner writes: > Am 09.02.22 um 15:07 schrieb Markus Armbruster: >> Fabian Ebner writes: >> >>> From: Stefan Reiter >>> >>> It is possible to specify more than one VNC server on the command line, >>> either with an explicit ID or the auto-generated ones à la "default", >>> "vnc2", "vnc3"

Re: [PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-17 Thread Gerd Hoffmann
Hi, > Other heretic question: Should we maybe get rid of the default machine type > for *all* targets? ... so that we do not continue to run into this issue > again and again and again... /me votes "yes". take care, Gerd

Re: [PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-17 Thread Thomas Huth
On 16/02/2022 18.40, Dr. David Alan Gilbert wrote: * Thomas Huth (th...@redhat.com) wrote: On 16/02/2022 12.01, Dr. David Alan Gilbert wrote: * Gerd Hoffmann (kra...@redhat.com) wrote: Hi, Given the semantic differences from 'i440fx', changing the default machine type has effects that are

Re: [RFC PATCH 3/3] tests/tcg/ppc64le: Use vector types instead of __int128

2022-02-17 Thread Cédric Le Goater
On 2/8/22 21:31, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst LLVM/Clang doesn't like inline asm with __int128, use a vector type instead. Signed-off-by: Matheus Ferst --- Alternatively, we could pass VSR values in GPR pairs, as we did in tests/tcg/ppc64le/non_signalling_xscv.c --

Re: [PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests

2022-02-17 Thread Thomas Huth
On 15/02/2022 17.25, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" For tests that rely on old hardware, e.g. floppies or IDE drives, explicitly select the 'pc' machine type. Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/fdc-test.c| 2 +- tests/qtest/hd-geo

Re: [PATCH 28/31] vdpa: Expose VHOST_F_LOG_ALL on SVQ

2022-02-17 Thread Eugenio Perez Martin
On Thu, Feb 17, 2022 at 7:02 AM Jason Wang wrote: > > On Wed, Feb 16, 2022 at 11:54 PM Eugenio Perez Martin > wrote: > > > > On Tue, Feb 8, 2022 at 9:25 AM Jason Wang wrote: > > > > > > > > > 在 2022/2/1 下午7:45, Eugenio Perez Martin 写道: > > > > On Sun, Jan 30, 2022 at 7:50 AM Jason Wang wrote: >

Re: [PATCH 2/3] tests/x86: Use 'pc' machine type for hotplug tests

2022-02-17 Thread Michael S. Tsirkin
On Tue, Feb 15, 2022 at 04:25:32PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Hotplug tests need a bridge setting up on q35, for now > keep them on 'pc'. > > Signed-off-by: Dr. David Alan Gilbert I'd really much rather we actually tested q35. > --- > test

Re: [PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-17 Thread Michael S. Tsirkin
On Thu, Feb 17, 2022 at 09:08:52AM +0100, Gerd Hoffmann wrote: > Hi, > > > Other heretic question: Should we maybe get rid of the default machine type > > for *all* targets? ... so that we do not continue to run into this issue > > again and again and again... > > /me votes "yes". > > take car

Re: [PATCH v5 1/3] s390x/tcg: Implement Miscellaneous-Instruction-Extensions Facility 3 for the s390x

2022-02-17 Thread Christian Borntraeger
Am 16.02.22 um 21:34 schrieb David Miller: resolves: https://gitlab.com/qemu-project/qemu/-/issues/737 implements: AND WITH COMPLEMENT (NCRK, NCGRK) NAND (NNRK, NNGRK) NOT EXCLUSIVE OR (NXRK, NXGRK) NOR (NORK, NOGRK) OR WITH COMPLEMENT(OCRK, OCGRK)

Re: [PATCH v3 3/3] hw/smbios: add assertion to ensure handles of tables 19 and 32 do not collide

2022-02-17 Thread Igor Mammedov
On Mon, 14 Feb 2022 19:42:36 +0530 Ani Sinha wrote: > Since change b3cddba9c14b034 ("hw/smbios: fix table memory corruption with > large memory vms") > we reserve additional space between handle numbers of tables 17 and 19 for > large VMs. This may cause table 19 to collide with table 32 in thei

Re: [PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests

2022-02-17 Thread Michael S. Tsirkin
On Tue, Feb 15, 2022 at 04:25:31PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > For tests that rely on old hardware, e.g. floppies or IDE drives, > explicitly select the 'pc' machine type. > > Signed-off-by: Dr. David Alan Gilbert This makes sense regardless

RE: [PATCH 2/2] Allow VIRTIO_F_IN_ORDER to be negotiated for vdpa devices

2022-02-17 Thread Gautam Dawar
-Original Message- From: Jason Wang Sent: Thursday, February 17, 2022 12:46 PM To: Gautam Dawar Cc: mst ; qemu-devel ; eperezma ; Martin Petrus Hubertus Habets ; Harpreet Singh Anand ; Gautam Dawar ; Tanuj Murlidhar Kamde ; Pablo Cascon Subject: Re: [PATCH 2/2] Allow VIRTIO_F_IN_ORDE

Re: [PATCH v3 2/3] hw/smbios: fix table memory corruption with large memory vms

2022-02-17 Thread Igor Mammedov
On Mon, 14 Feb 2022 19:42:35 +0530 Ani Sinha wrote: > The current smbios table implementation splits the main memory in 16 GiB > (DIMM like) chunks. With the current smbios table assignment code, we can have > only 512 such chunks before the 16 bit handle numbers in the header for tables > 17 and

Re: [PATCH 2/2] Allow VIRTIO_F_IN_ORDER to be negotiated for vdpa devices

2022-02-17 Thread Michael S. Tsirkin
On Thu, Feb 17, 2022 at 08:27:14AM +, Gautam Dawar wrote: > [GD>>] Yes , I agree a complete solution that will support the > emulated virtio device with in_order rx/tx virtqueue functions will > definitely be better but at the same time it will take considerable > amount of time and effort. I a

Re: [PATCH 2/2] Allow VIRTIO_F_IN_ORDER to be negotiated for vdpa devices

2022-02-17 Thread Eugenio Perez Martin
On Thu, Feb 17, 2022 at 8:16 AM Jason Wang wrote: > > On Tue, Feb 15, 2022 at 3:23 PM Gautam Dawar wrote: > > > > This patch adds the ability to negotiate VIRTIO_F_IN_ORDER bit > > for vhost-vdpa backend when the underlying device supports this > > feature. > > This would aid in reaping performan

Re: [PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-17 Thread Kashyap Chamarthy
On Thu, Feb 17, 2022 at 08:57:19AM +0100, Thomas Huth wrote: > On 16/02/2022 18.40, Dr. David Alan Gilbert wrote: [...] > > So just adding something like the following under 'System emulator > > machines': > > > > x86 default machine type > > > > > > x86 currently defau

Re: [PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-17 Thread Daniel P . Berrangé
On Thu, Feb 17, 2022 at 03:17:04AM -0500, Michael S. Tsirkin wrote: > On Thu, Feb 17, 2022 at 09:08:52AM +0100, Gerd Hoffmann wrote: > > Hi, > > > > > Other heretic question: Should we maybe get rid of the default machine > > > type > > > for *all* targets? ... so that we do not continue to run

Re: [PATCH 1/1] numa: check mem or memdev in numa configuration

2022-02-17 Thread Igor Mammedov
On Wed, 16 Feb 2022 17:36:13 +0100 Li Zhang wrote: > If there is no mem or memdev in numa configuration, it always > reports the error as the following: > > total memory for NUMA nodes (0x0) should equal RAM size (0x1) > > This error is confusing and the reason is that total memory of n

Re: [PATCH v5] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-17 Thread Christian Schoenebeck
On Mittwoch, 16. Februar 2022 19:18:21 CET Vitaly Chikunov wrote: > `struct dirent' returned from readdir(3) could be shorter (or longer) > than `sizeof(struct dirent)', thus memcpy of sizeof length will overread > into unallocated page causing SIGSEGV. Example stack trace: > > #0 0x559e

Re: Portable inline asm to get address of TLS variable

2022-02-17 Thread Stefan Hajnoczi
On Wed, Feb 16, 2022 at 09:46:02PM +0100, Florian Weimer wrote: > * Stefan Hajnoczi: > > > I'm basically asking whether the &tls_var input operand is treated as > > volatile and part of the inline assembly or whether it's just regular > > C code that the compiler may optimize with the surrounding

Re: [PATCH 1/1] numa: check mem or memdev in numa configuration

2022-02-17 Thread Li Zhang
On 2/17/22 10:10 AM, Igor Mammedov wrote: On Wed, 16 Feb 2022 17:36:13 +0100 Li Zhang wrote: If there is no mem or memdev in numa configuration, it always reports the error as the following: total memory for NUMA nodes (0x0) should equal RAM size (0x1) This error is confusing and the

Re: [PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-17 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Wed, Feb 16, 2022 at 05:57:02PM +, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Wed, Feb 16, 2022 at 05:40:44PM +, Dr. David Alan Gilbert wrote: > > > > * Thomas Huth (th...@redhat.com) wr

Re: Portable inline asm to get address of TLS variable

2022-02-17 Thread Stefan Hajnoczi
On Wed, Feb 16, 2022 at 09:40:34PM +0100, Florian Weimer wrote: > * Stefan Hajnoczi: > > > On Wed, 16 Feb 2022 at 18:14, Florian Weimer wrote: > >> > >> * Stefan Hajnoczi: > >> > >> > I've been trying to make the inline asm that gets the address of a TLS > >> > variable for QEMU coroutines pass Q

Re: [PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-17 Thread Daniel P . Berrangé
On Wed, Feb 16, 2022 at 05:57:02PM +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Wed, Feb 16, 2022 at 05:40:44PM +, Dr. David Alan Gilbert wrote: > > > * Thomas Huth (th...@redhat.com) wrote: > > > > On 16/02/2022 12.01, Dr. David Alan Gilbert w

[PULL v2 00/29] Misc mostly build system patches for 2022-02-15

2022-02-17 Thread Paolo Bonzini
The following changes since commit ad38520bdeb2b1e0b487db317f29119e94c1c88d: Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/block-pull-request' into staging (2022-02-15 19:30:33 +) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream

Re: [PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-17 Thread Igor Mammedov
On Thu, 17 Feb 2022 03:17:04 -0500 "Michael S. Tsirkin" wrote: > On Thu, Feb 17, 2022 at 09:08:52AM +0100, Gerd Hoffmann wrote: > > Hi, > > > > > Other heretic question: Should we maybe get rid of the default machine > > > type > > > for *all* targets? ... so that we do not continue to run

RE: [PATCH 1/2] linux headers: update against Linux 5.17-rc4

2022-02-17 Thread Gautam Dawar
-Original Message- From: Jason Wang Sent: Thursday, February 17, 2022 12:47 PM To: Gautam Dawar Cc: mst ; qemu-devel ; eperezma ; Martin Petrus Hubertus Habets ; Harpreet Singh Anand ; Gautam Dawar ; Tanuj Murlidhar Kamde ; Pablo Cascon Subject: Re: [PATCH 1/2] linux headers: update

[PATCH v4 0/7] malta: Fix PCI IRQ levels to be preserved during migration, cleanup

2022-02-17 Thread Bernhard Beschow
Tested with [1]: qemu-system-mipsel -M malta -kernel vmlinux-3.2.0-4-4kc-malta -hda \ debian_wheezy_mipsel_standard.qcow2 -append "root=/dev/sda1 console=tty0" It was possible to log in as root and `poweroff` the machine. [1] https://people.debian.org/~aurel32/qemu/mips/ v4: As suggested

[PATCH v4 2/7] malta: Move PCI interrupt handling from gt64xxx_pci to piix4

2022-02-17 Thread Bernhard Beschow
Handling PCI interrupts in piix4 increases cohesion and reduces differences between piix4 and piix3. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/piix4.c | 55 ++ hw/mips/gt64xxx_pci.c | 60 --

[PATCH v4 5/7] hw/isa/piix4: Resolve global instance variable

2022-02-17 Thread Bernhard Beschow
Now that piix4_set_irq's opaque parameter references own PIIX4State, piix4_dev becomes redundant. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Acked-by: Michael S. Tsirkin --- hw/isa/piix4.c| 10 +++--- include/hw/southbridge/piix.h | 2 -- 2 files c

[PATCH v4 1/7] hw/mips/gt64xxx_pci: Fix PCI IRQ levels to be preserved during migration

2022-02-17 Thread Bernhard Beschow
Based on commit e735b55a8c11dd455e31ccd4420e6c9485191d0c: piix_pci: eliminate PIIX3State::pci_irq_levels PIIX3State::pci_irq_levels are redundant which is already tracked by PCIBus layer. So eliminate them. The IRQ levels in the PCIBus layer are already preserved during migration. By reusi

[PATCH v4 3/7] hw/isa/piix4: Resolve redundant i8259[] attribute

2022-02-17 Thread Bernhard Beschow
This is a follow-up on patch "malta: Move PCI interrupt handling from gt64xxx_pci to piix4" where i8259[] was moved from MaltaState to PIIX4State to make the code movement more obvious. However, i8259[] seems redundant to *isa, so remove it. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe M

Re: [PATCH 1/1] numa: check mem or memdev in numa configuration

2022-02-17 Thread Igor Mammedov
On Thu, 17 Feb 2022 10:38:32 +0100 Li Zhang wrote: > On 2/17/22 10:10 AM, Igor Mammedov wrote: > > On Wed, 16 Feb 2022 17:36:13 +0100 > > Li Zhang wrote: > > > >> If there is no mem or memdev in numa configuration, it always > >> reports the error as the following: > >> > >> total memory for

[PATCH v4 7/7] hw/mips/gt64xxx_pci: Resolve gt64120_register()

2022-02-17 Thread Bernhard Beschow
Now that gt64120_register() lost its pic parameter, there is an opportunity to remove it. gt64120_register() is old style by wrapping qdev API, and the new style is to use qdev directly. So take the opportunity and modernize the code. Suggested-by: BALATON Zoltan Signed-off-by: Bernhard Beschow

[PATCH] linux-headers: update to 5.17

2022-02-17 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- include/standard-headers/asm-x86/kvm_para.h | 1 + include/standard-headers/drm/drm_fourcc.h | 11 ++ include/standard-headers/linux/ethtool.h | 1 + include/standard-headers/linux/fuse.h | 60 +++- include/standard-headers/linux/pci_r

[PATCH v4 4/7] hw/isa/piix4: Pass PIIX4State as opaque parameter for piix4_set_irq()

2022-02-17 Thread Bernhard Beschow
Passing PIIX4State rather than just the qemu_irq allows for resolving the global piix4_dev variable. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Acked-by: Michael S. Tsirkin --- hw/isa/piix4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 de

[PATCH v3] arm: Remove swift-bmc machine

2022-02-17 Thread Joel Stanley
It was scheduled for removal in 7.0. Signed-off-by: Joel Stanley -- v2: also remove from docs/about/deprecated.rst v3: remove strap define, add note to removed-features.rst --- docs/about/deprecated.rst | 7 docs/about/removed-features.rst | 5 +++ docs/system/arm/aspeed.rst |

[PATCH v4 6/7] hw/isa/piix4: Replace some magic IRQ constants

2022-02-17 Thread Bernhard Beschow
This is a follow-up on patch "malta: Move PCI interrupt handling from gt64xxx_pci to piix4". gt64xxx_pci used magic constants, and probably didn't want to use piix4-specific constants. Now that the interrupt handing resides in piix4, its constants can be used. Signed-off-by: Bernhard Beschow Revi

[PATCH v3] docs/system/i386: Add measurement calculation details to amd-memory-encryption

2022-02-17 Thread Dov Murik
Add a section explaining how the Guest Owner should calculate the expected guest launch measurement for SEV and SEV-ES. Also update the name and links to the SEV API Spec document. Signed-off-by: Dov Murik Suggested-by: Daniel P. Berrangé --- v2: - Explain that firmware must be built without

Re: [PATCH 1/1] numa: check mem or memdev in numa configuration

2022-02-17 Thread Li Zhang
On 2/17/22 11:25 AM, Igor Mammedov wrote: On Thu, 17 Feb 2022 10:38:32 +0100 Li Zhang wrote: On 2/17/22 10:10 AM, Igor Mammedov wrote: On Wed, 16 Feb 2022 17:36:13 +0100 Li Zhang wrote: If there is no mem or memdev in numa configuration, it always reports the error as the following: to

Re: [PATCH] ppc/spapr: Advertise StoreEOI for POWER10 compat guests

2022-02-17 Thread Daniel Henrique Barboza
On 2/17/22 04:51, Cédric Le Goater wrote: [ adding a few people for the comments ] On 2/16/22 23:17, Daniel Henrique Barboza wrote: On 2/14/22 11:11, Cédric Le Goater wrote: When an interrupt has been handled, the OS notifies the interrupt controller with a EOI sequence. On a POWER9 and P

Re: [PATCH] ppc/spapr: Advertise StoreEOI for POWER10 compat guests

2022-02-17 Thread Daniel Henrique Barboza
On 2/14/22 11:11, Cédric Le Goater wrote: When an interrupt has been handled, the OS notifies the interrupt controller with a EOI sequence. On a POWER9 and POWER10 systems using the XIVE interrupt controller, this can be done with a load or a store operation on the ESB interrupt management pag

Re: Portable inline asm to get address of TLS variable

2022-02-17 Thread Paolo Bonzini
On 2/17/22 10:28, Stefan Hajnoczi wrote: But going against ABI and toolchain in this way is really no long-term solution. You need to switch to stackless co-routines, or we need to provide proper ABI-level support for this. Today it's the thread pointer, tomorrow it's the shadow stack pointer,

Re: Should we apply for GitLab's open source program?

2022-02-17 Thread Daniel P . Berrangé
On Fri, Sep 04, 2020 at 04:35:34PM +0100, Alex Bennée wrote: > > Hi, > > Given our growing reliance on GitLab and the recent announcement about > free tier minutes: > > https://about.gitlab.com/pricing/faq-consumption-cicd/ > > is it time we officially apply for GitLab's Open Source Program:

[PULL 00/10] Misc next patches

2022-02-17 Thread Daniel P . Berrangé
The following changes since commit ad38520bdeb2b1e0b487db317f29119e94c1c88d: Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/block-pull-request' into staging (2022-02-15 19:30:33 +) are available in the Git repository at: https://gitlab.com/berrange/qemu tags/misc-next-pull-

[PULL 03/10] block: print the server key type and fingerprint on failure

2022-02-17 Thread Daniel P . Berrangé
When validating the server key fingerprint fails, it is difficult for the user to know what they got wrong. The fingerprint accepted by QEMU is received in a different format than OpenSSH displays. There can also be keys for multiple different ciphers in known_hosts. It may not be obvious which cip

[PULL 10/10] docs: expand firmware descriptor to allow flash without NVRAM

2022-02-17 Thread Daniel P . Berrangé
The current firmware descriptor schema for flash requires that both the executable to NVRAM template paths be provided. This is fine for the most common usage of EDK2 builds in virtualization where the separate _CODE and _VARS files are provided. With confidential computing technology like AMD SEV

[PULL 02/10] block: support sha256 fingerprint with pre-blockdev options

2022-02-17 Thread Daniel P . Berrangé
When support for sha256 fingerprint checking was aded in commit bf783261f0aee6e81af3916bff7606d71ccdc153 Author: Daniel P. Berrangé Date: Tue Jun 22 12:51:56 2021 +0100 block/ssh: add support for sha256 host key fingerprints it was only made to work with -blockdev. Getting it workin

[PULL 01/10] block: better document SSH host key fingerprint checking

2022-02-17 Thread Daniel P . Berrangé
The docs still illustrate host key fingerprint checking using the old md5 hashes which are considered insecure and obsolete. Change it to illustrate using a sha256 hash. Also show how to extract the hash value from the known_hosts file. Reviewed-by: Hanna Reitz Signed-off-by: Daniel P. Berrangé

[PULL 04/10] seccomp: allow action to be customized per syscall

2022-02-17 Thread Daniel P . Berrangé
We're currently tailoring whether to use kill process or return EPERM based on the syscall set. This is not flexible enough for future requirements where we also need to be able to return a variety of actions on a per-syscall granularity. Acked-by: Eduardo Otubo Signed-off-by: Daniel P. Berrangé

[PULL 08/10] seccomp: block setns, unshare and execveat syscalls

2022-02-17 Thread Daniel P . Berrangé
setns/unshare are used to change namespaces which is not something QEMU needs to be able todo. execveat is a new variant of execve so should be blocked just like execve already is. Acked-by: Eduardo Otubo Signed-off-by: Daniel P. Berrangé --- softmmu/qemu-seccomp.c | 5 + 1 file changed, 5

[PATCH v2 09/12] ui/shader: fix potential leak of shader on error

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau Value of 0 for program and shaders are silently ignored and indicate error. Signed-off-by: Marc-André Lureau --- ui/shader.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/shader.c b/ui/shader.c index e8b8d321b7c7..4c80fc831f68 100644 --- a

[PULL 07/10] seccomp: block use of clone3 syscall

2022-02-17 Thread Daniel P . Berrangé
Modern glibc will use clone3 instead of clone, when it detects that it is available. We need to compare flags in order to decide whether to allow clone (thread create vs process fork), but in clone3 the flags are hidden inside a struct. Seccomp can't currently match on data inside a struct, so our

[PULL 05/10] seccomp: add unit test for seccomp filtering

2022-02-17 Thread Daniel P . Berrangé
The handling of some syscalls / libc function is quite subtle. For example, 'fork' at a libc level doesn't always correspond to 'fork' at a syscall level, since the 'clone' syscall is preferred usually. The unit test will help to detect these kind of problems. A point of difficulty in writing a te

[PULL 09/10] MAINTAINERS: take over seccomp from Eduardo Otubo

2022-02-17 Thread Daniel P . Berrangé
Eduardo has indicated that he no longer has time to be involved in a QEMU maintainership role. As one of the more frequent contributors of patches and design ideas to seccomp, I'll take over in an "Odd Fixes" role. Acked-by: Eduardo Otubo Signed-off-by: Daniel P. Berrangé --- MAINTAINERS | 4 ++

[PULL 06/10] seccomp: fix blocking of process spawning

2022-02-17 Thread Daniel P . Berrangé
When '-sandbox on,spawn=deny' is given, we are supposed to block the ability to spawn processes. We naively blocked the 'fork' syscall, forgetting that any modern libc will use the 'clone' syscall instead. We can't simply block the 'clone' syscall though, as that will break thread creation. We thu

Re: [PATCH v6 01/19] configure, meson: override C compiler for cmake

2022-02-17 Thread Peter Maydell
On Thu, 17 Feb 2022 at 07:56, Jagannathan Raman wrote: > > The compiler path that cmake gets from meson is corrupted. It results in > the following error: > | -- The C compiler identification is unknown > | CMake Error at CMakeLists.txt:35 (project): > | The CMAKE_C_COMPILER: > | /opt/rh/devtoolse

[PATCH v2 01/12] ui/console: fix crash when using gl context with non-gl listeners

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau The commit 7cc712e98 ("ui: dispatch GL events to all listener") mechanically replaced the dpy_gl calls with a dispatch loop, using the same pre-conditions. However, it didn't take into account that all listeners do not have to implement the GL callbacks. Add the missing p

Re: [PATCH v3 1/7] hw/mips/gt64xxx_pci: Fix PCI IRQ levels to be preserved during migration

2022-02-17 Thread Peter Maydell
On Wed, 16 Feb 2022 at 22:45, Bernhard Beschow wrote: > > Based on commit e735b55a8c11dd455e31ccd4420e6c9485191d0c: > > piix_pci: eliminate PIIX3State::pci_irq_levels > > PIIX3State::pci_irq_levels are redundant which is already tracked by > PCIBus layer. So eliminate them. > > The IRQ level

[PATCH v2 00/12] GL & D-Bus display related fixes

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau Hi, In the thread "[PATCH 0/6] ui/dbus: Share one listener for a console", Akihiko Odaki reported a number of issues with the GL and D-Bus display. His series propose a different design, and reverting some of my previous generic console changes to fix those issues. Howev

[PATCH v2 02/12] ui/console: fix texture leak when calling surface_gl_create_texture()

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau Make surface_gl_create_texture() idempotent: if the surface is already bound to a texture, do not create a new one. This fixes texture leaks when there are multiple DBus listeners, for example. Reported-by: Akihiko Odaki Signed-off-by: Marc-André Lureau --- ui/console

[PATCH v2 03/12] ui: do not create a surface when resizing a GL scanout

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau qemu_console_resize() will create a blank surface and replace the current scanout with it if called while the current scanout is GL (texture or dmabuf). This is not only very costly, but also can produce glitches on the display/listener side. Instead, compare the current

[PATCH v2 05/12] ui/console: move dcl compatiblity check to a callback

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau As expected from the "compatible_dcl" comment, a simple comparison of ops isn't enough. The following patch will fix a regression introduced by this limited check by extending the compatibility callback for egl-headless. For now, this patch simply replaces the the "compat

[PATCH v2 06/12] ui/console: egl-headless is compatible with non-gl listeners

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau Fix a regression introduced by commit 5e79d516e ("ui: split the GL context in a different object"). Reported-by: Akihiko Odaki Signed-off-by: Marc-André Lureau --- ui/egl-headless.c | 8 1 file changed, 8 insertions(+) diff --git a/ui/egl-headless.c b/ui/egl-

[PATCH v2 04/12] ui/console: move check for compatible GL context

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau Move GL context compatibility check in dpy_compatible_with(), and use recommended error reporting. Signed-off-by: Marc-André Lureau --- ui/console.c | 21 ++--- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/ui/console.c b/ui/console.c in

[PATCH v2 08/12] ui/console: move console compatibility check to dcl_display_console()

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau The current checks are done at registration time only. However, if a DCL has no specific console specified, it may be switched dynamically with console_select() later on. Let's move the checks when displaychangelistener_display_console() is called, which includes registra

[PATCH v2 07/12] ui/dbus: associate the DBusDisplayConsole listener with the given console

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau DBusDisplayConsole is specific to a given QemuConsole. Fixes: commit 142ca628 ("ui: add a D-Bus display backend") Reported-by: Akihiko Odaki Signed-off-by: Marc-André Lureau --- ui/dbus.h | 3 +++ ui/dbus-console.c | 27 +-- ui/dbus.c

RE: [PATCH v2 1/3] virtio-crypto: header update

2022-02-17 Thread Gonglei (Arei)
> -Original Message- > From: zhenwei pi [mailto:pizhen...@bytedance.com] > Sent: Friday, February 11, 2022 4:44 PM > To: Gonglei (Arei) ; m...@redhat.com > Cc: jasow...@redhat.com; virtualizat...@lists.linux-foundation.org; > linux-cry...@vger.kernel.org; qemu-devel@nongnu.org; > helei.s

Re: [PATCH 1/1] numa: check mem or memdev in numa configuration

2022-02-17 Thread Li Zhang
On 2/17/22 11:25 AM, Igor Mammedov wrote: On Thu, 17 Feb 2022 10:38:32 +0100 Li Zhang wrote: On 2/17/22 10:10 AM, Igor Mammedov wrote: On Wed, 16 Feb 2022 17:36:13 +0100 Li Zhang wrote: If there is no mem or memdev in numa configuration, it always reports the error as the following: to

[PATCH v2 10/12] ui/shader: free associated programs

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- ui/shader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/shader.c b/ui/shader.c index 4c80fc831f68..ab448c41d4c6 100644 --- a/ui/shader.c +++ b/ui/shader.c @@ -172,5 +172,8 @@ void qemu_gl_fini_shader(QemuGLShader *gls)

[PATCH v2 11/12] ui/console: add a dpy_gfx_switch callback helper

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau Slight code improvement. Signed-off-by: Marc-André Lureau --- ui/console.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/ui/console.c b/ui/console.c index d3ecbb215736..102fcf0a5068 100644 --- a/ui/console.c +++ b/ui/conso

Fwd: [PATCH v2 12/12] ui/dbus: fix texture sharing

2022-02-17 Thread Akihiko Odaki
I mistakenly dropped CC (again). My apologies. -- Forwarded message - From: Akihiko Odaki Date: Thu, Feb 17, 2022 at 9:38 PM Subject: Re: [PATCH v2 12/12] ui/dbus: fix texture sharing To: Marc-André Lureau On Thu, Feb 17, 2022 at 9:02 PM wrote: > > From: Marc-André Lureau > >

[PATCH v2 12/12] ui/dbus: fix texture sharing

2022-02-17 Thread marcandre . lureau
From: Marc-André Lureau The DBus listener naively create, update and destroy textures without taking into account other listeners. The texture were shared, but texture update was unnecessarily duplicated. Teach DisplayGLCtx to do optionally shared texture handling. This is only implemented for D

Re: [PATCH 18/31] vhost: Shadow virtqueue buffers forwarding

2022-02-17 Thread Eugenio Perez Martin
On Tue, Feb 8, 2022 at 9:16 AM Jason Wang wrote: > > > 在 2022/2/1 下午7:25, Eugenio Perez Martin 写道: > > On Sun, Jan 30, 2022 at 7:47 AM Jason Wang wrote: > >> > >> 在 2022/1/22 上午4:27, Eugenio Pérez 写道: > >>> @@ -272,6 +590,28 @@ void vhost_svq_set_svq_kick_fd(VhostShadowVirtqueue > >>> *svq, int

Re: [PATCH v3 10/37] target/ppc: Move Vector Compare Not Equal or Zero to decodetree

2022-02-17 Thread Matheus K. Ferst
On 11/02/2022 01:41, Richard Henderson wrote: On 2/10/22 23:34, matheus.fe...@eldorado.org.br wrote: +static void gen_vcmpnez_vec(unsigned vece, TCGv_vec t, TCGv_vec a, TCGv_vec b) +{ +    TCGv_vec t0, t1, zero; + +    t0 = tcg_temp_new_vec_matching(t); +    t1 = tcg_temp_new_vec_matching(t); +

Re: [PATCH v2 00/12] GL & D-Bus display related fixes

2022-02-17 Thread Akihiko Odaki
On Thu, Feb 17, 2022 at 8:58 PM wrote: > > From: Marc-André Lureau > > Hi, > > In the thread "[PATCH 0/6] ui/dbus: Share one listener for a console", Akihiko > Odaki reported a number of issues with the GL and D-Bus display. His series > propose a different design, and reverting some of my previo

Re: [PATCH v1 11/11] tests/tcg: add vectorised sha512 versions

2022-02-17 Thread Matheus K. Ferst
On 14/02/2022 12:14, Alex Bennée wrote: "Matheus K. Ferst" writes: On 11/02/2022 13:03, Alex Bennée wrote: This builds vectorised versions of sha512 to exercise the vector code: - aarch64 (AdvSimd) - i386 (SSE) - s390x (MVX) - ppc64 (vector) Signed-off-by: Alex Bennée Reviewe

Re: [PATCH v4 04/12] mm/shmem: Support memfile_notifier

2022-02-17 Thread Chao Peng
On Tue, Feb 08, 2022 at 08:29:56PM +0200, Mike Rapoport wrote: > Hi, > > On Tue, Jan 18, 2022 at 09:21:13PM +0800, Chao Peng wrote: > > It maintains a memfile_notifier list in shmem_inode_info structure and > > implements memfile_pfn_ops callbacks defined by memfile_notifier. It > > then exposes t

Analysis of slow distro boots in check-avocado (BootLinuxAarch64.test_virt_tcg*)

2022-02-17 Thread Alex Bennée
Hi, TL;DR: - pc-bios/edk2-aarch64-code.fd should be rebuilt without debug - -cpu max needs pauth-impdef=on - PageDesc->code_bitmap is wastefully thrown away - the kernels memmap_init_range interacts badly with pages containing firmware code - kernel features like KFENCE also contribut

Re: [PATCH v5] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-17 Thread Greg Kurz
On Wed, 16 Feb 2022 21:18:21 +0300 Vitaly Chikunov wrote: > `struct dirent' returned from readdir(3) could be shorter (or longer) > than `sizeof(struct dirent)', thus memcpy of sizeof length will overread > into unallocated page causing SIGSEGV. Example stack trace: > > #0 0x559ebeed v

Re: [PATCH v4 01/12] mm/shmem: Introduce F_SEAL_INACCESSIBLE

2022-02-17 Thread Chao Peng
On Mon, Feb 07, 2022 at 01:24:42PM +0100, Vlastimil Babka wrote: > On 1/18/22 14:21, Chao Peng wrote: > > From: "Kirill A. Shutemov" > > > > /* > > diff --git a/mm/shmem.c b/mm/shmem.c > > index 18f93c2d68f1..72185630e7c4 100644 > > --- a/mm/shmem.c > > +++ b/mm/shmem.c > > @@ -1098,6 +1098,13 @

Re: [PATCH v4 7/7] hw/mips/gt64xxx_pci: Resolve gt64120_register()

2022-02-17 Thread BALATON Zoltan
On Thu, 17 Feb 2022, Bernhard Beschow wrote: Now that gt64120_register() lost its pic parameter, there is an opportunity to remove it. gt64120_register() is old style by wrapping qdev API, and the new style is to use qdev directly. So take the opportunity and modernize the code. Suggested-by: BA

Re: [PATCH v4 01/12] mm/shmem: Introduce F_SEAL_INACCESSIBLE

2022-02-17 Thread Chao Peng
On Fri, Feb 11, 2022 at 03:33:35PM -0800, Andy Lutomirski wrote: > On 1/18/22 05:21, Chao Peng wrote: > > From: "Kirill A. Shutemov" > > > > Introduce a new seal F_SEAL_INACCESSIBLE indicating the content of > > the file is inaccessible from userspace through ordinary MMU access > > (e.g., read/w

Re: [Virtio-fs] [PULL 00/12] virtiofs queue

2022-02-17 Thread Dr. David Alan Gilbert
* Vivek Goyal (vgo...@redhat.com) wrote: > On Wed, Feb 16, 2022 at 07:40:14PM +, Dr. David Alan Gilbert wrote: > > * Dr. David Alan Gilbert (git) (dgilb...@redhat.com) wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > The following changes since commit > > > c13b8e9973635f34f3ce4356af2

  1   2   3   >