Re: Too slow edk2 bios boot?

2021-06-22 Thread Bin Meng
Hi Laszlo, On Wed, Jun 23, 2021 at 12:13 AM Laszlo Ersek wrote: > On 06/18/21 15:06, Bin Meng wrote: > > On Fri, Jun 18, 2021 at 7:46 PM Gerd Hoffmann wrote: > > > >> On Fri, Jun 18, 2021 at 06:46:57PM +0800, Bin Meng wrote: > >>> Hi Laszlo, > >>> > >>> Using the QEMU shipped edk2 bios, for

Re: [PATCH 2/5] usb: drop usb_host_dev_is_scsi_storage hook

2021-06-22 Thread David Gibson
On Tue, Jun 22, 2021 at 02:49:12PM +0200, Gerd Hoffmann wrote: > Introduce an usb device flag instead, set it when usb-host looks at the > device descriptors anyway. Also set it for emulated storage devices, > for consistency. Add an inline helper function to check the flag. > > Signed-off-by:

Re: [PATCH qemu] hw/net/vmxnet3: Remove g_assert_not_reached() when VMXNET3_REG_ICR is written

2021-06-22 Thread Jason Wang
在 2021/6/23 上午10:26, Qiang Liu 写道: From: cyruscyliu A malicious guest user can write VMXNET3_REG_ICR to crash QEMU. This patch remove the g_aasert_not_reached() there and make the access pass. Fixes: 786fd2b0f87 ("VMXNET3 device implementation") Resolves:

Re: [PATCH v5 0/2] target/s390x: Fix SIGILL/SIGFPE/SIGTRAP psw.addr reporting

2021-06-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210623023250.3667563-1-...@linux.ibm.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210623023250.3667563-1-...@linux.ibm.com Subject: [PATCH v5 0/2] target/s390x: Fix

Re: [PATCH] hw/arm/boot: Use NUMA node ID in memory node name

2021-06-22 Thread Gavin Shan
Hi Drew, On 6/22/21 5:13 PM, Andrew Jones wrote: On Tue, Jun 22, 2021 at 06:53:41PM +1000, Gavin Shan wrote: On 6/3/21 2:48 PM, Gavin Shan wrote: On 6/2/21 9:36 PM, Andrew Jones wrote: On Wed, Jun 02, 2021 at 11:09:32AM +1000, Gavin Shan wrote: On 6/1/21 5:50 PM, Andrew Jones wrote: On

[PATCH v5 1/2] target/s390x: Fix SIGILL/SIGFPE/SIGTRAP psw.addr reporting

2021-06-22 Thread Ilya Leoshkevich
For SIGILL, SIGFPE and SIGTRAP the PSW must point after the instruction, and at the instruction for other signals. Currently under qemu-user it always points at the instruction. Fix by advancing psw.addr for these signals. Buglink: https://gitlab.com/qemu-project/qemu/-/issues/319 Signed-off-by:

[PATCH v5 2/2] tests/tcg/s390x: Test SIGILL and SIGSEGV handling

2021-06-22 Thread Ilya Leoshkevich
Verify that s390x-specific uc_mcontext.psw.addr is reported correctly. Signed-off-by: Ilya Leoshkevich --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/signal.c| 165 2 files changed, 166 insertions(+) create mode 100644

[PATCH v5 0/2] target/s390x: Fix SIGILL/SIGFPE/SIGTRAP psw.addr reporting

2021-06-22 Thread Ilya Leoshkevich
qemu-s390x puts a wrong value into SIGILL's siginfo_t's psw.addr: it should be a pointer to the instruction following the illegal instruction, but at the moment it is a pointer to the illegal instruction itself. This breaks OpenJDK, which relies on this value. A similar problem exists for SIGFPE

Re: [PATCH 1/2] linux-user/s390x: signal with SIGFPE on compare-and-trap

2021-06-22 Thread Ilya Leoshkevich
On Mon, 2021-06-21 at 10:14 -0400, Jonathan Albrecht wrote: > Currently when a compare-and-trap instruction is executed, qemu will > always raise a SIGILL signal. On real hardware, a SIGFPE is raised. > > Change the PGM_DATA case in cpu_loop to follow the behavior in > linux kernel

[PATCH qemu] hw/net/vmxnet3: Remove g_assert_not_reached() when VMXNET3_REG_ICR is written

2021-06-22 Thread Qiang Liu
From: cyruscyliu A malicious guest user can write VMXNET3_REG_ICR to crash QEMU. This patch remove the g_aasert_not_reached() there and make the access pass. Fixes: 786fd2b0f87 ("VMXNET3 device implementation") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/309 Buglink:

[v3] migration: fix the memory overwriting risk in add_to_iovec

2021-06-22 Thread Lin Feng
From: Feng Lin When testing migration, a Segmentation fault qemu core is generated. 0 error_free (err=0x1) 1 0x7f8b862df647 in qemu_fclose (f=f@entry=0x55e06c247640) 2 0x7f8b8516d59a in migrate_fd_cleanup (s=s@entry=0x55e06c0e1ef0) 3 0x7f8b8516d66c in migrate_fd_cleanup_bh

[v2] migration: fix the memory overwriting risk in add_to_iovec

2021-06-22 Thread Lin Feng
From: Feng Lin When testing migration, a Segmentation fault qemu core is generated. 0 error_free (err=0x1) 1 0x7f8b862df647 in qemu_fclose (f=f@entry=0x55e06c247640) 2 0x7f8b8516d59a in migrate_fd_cleanup (s=s@entry=0x55e06c0e1ef0) 3 0x7f8b8516d66c in migrate_fd_cleanup_bh

Re: [RFC PATCH 0/5] ebpf: Added ebpf helper for libvirtd.

2021-06-22 Thread Jason Wang
在 2021/6/22 下午5:09, Toke Høiland-Jørgensen 写道: Daniel P. Berrangé writes: On Tue, Jun 22, 2021 at 10:25:19AM +0200, Toke Høiland-Jørgensen wrote: Jason Wang writes: 在 2021/6/22 上午11:29, Yuri Benditovich 写道: On Mon, Jun 21, 2021 at 12:20 PM Jason Wang wrote: 在 2021/6/19 上午4:03, Andrew

[PATCH] hw/audio/sb16: Restrict I/O sampling rate range for command 41h/42h

2021-06-22 Thread Qiang Liu
The I/O sampling rate range is enforced to 5000 to 45000HZ according to commit a2cd86a9. Setting I/O sampling rate with command 41h/42h, a guest user can break this assumption and trigger an assertion in audio_calloc via command 0xd4. This patch restricts the I/O sampling rate range for command

Re: [PATCH v1 1/1] migration: Unregister yank if migration setup fails

2021-06-22 Thread Leonardo Bras Soares Passos
On Tue, Jun 22, 2021 at 2:38 PM Peter Xu wrote: [...] > Yes, looks right to me: > > Reviewed-by: Peter Xu > > -- > Peter Xu Thanks Peter!

RE: [PATCH v5 10/14] target/hexagon: import parser for idef-parser

2021-06-22 Thread Taylor Simpson
> -Original Message- > From: Alessandro Di Federico > Sent: Saturday, June 19, 2021 3:37 AM > To: qemu-devel@nongnu.org > Cc: Taylor Simpson ; Brian Cain > ; bab...@rev.ng; ni...@rev.ng; phi...@redhat.com; > richard.hender...@linaro.org; Alessandro Di Federico > Subject: [PATCH v5

Re: [PATCH RFC 0/6] i386/pc: Fix creation of >= 1Tb guests on AMD systems with IOMMU

2021-06-22 Thread Alex Williamson
On Tue, 22 Jun 2021 16:48:59 +0100 Joao Martins wrote: > Hey, > > This series lets Qemu properly spawn i386 guests with >= 1Tb with VFIO, > particularly > when running on AMD systems with an IOMMU. > > Since Linux v5.4, VFIO validates whether the IOVA in DMA_MAP ioctl is valid > and it >

Re: [PATCH v2 1/2] sev/i386: Introduce sev_add_kernel_loader_hashes for measured linux boot

2021-06-22 Thread Connor Kuehl
On 6/21/21 2:05 PM, Dov Murik wrote: > +static void fill_sev_hash_table_entry(SevHashTableEntry *e, const uint8_t > *guid, > + const uint8_t *hash, size_t hash_len) > +{ > +memcpy(e->guid, guid, sizeof(e->guid)); > +e->len = sizeof(*e); > +

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

2021-06-22 Thread Emanuele Giuseppe Esposito
On 22/06/2021 12:39, Vladimir Sementsov-Ogievskiy wrote: 22.06.2021 13:20, Paolo Bonzini wrote: On 22/06/21 11:36, Vladimir Sementsov-Ogievskiy wrote: It does.  If it returns true, you still want the load of finished to happen before the reads that follow. Hmm.. The worst case if we use

Re: [PATCH v2 2/2] x86/sev: generate SEV kernel loader hashes in x86_load_linux

2021-06-22 Thread Connor Kuehl
On 6/21/21 2:05 PM, Dov Murik wrote: > If SEV is enabled and a kernel is passed via -kernel, pass the hashes of > kernel/initrd/cmdline in an encrypted guest page to OVMF for SEV > measured boot. > > Co-developed-by: James Bottomley > Signed-off-by: James Bottomley > Signed-off-by: Dov Murik >

Re: SD/MMC host controller + 64-bit system bus

2021-06-22 Thread Philippe Mathieu-Daudé
Hi Joanne, On 6/22/21 8:07 PM, Joanne Koong wrote: > Hello! I noticed that the default SD/MMC host controller only supports a > 32-bit system bus. Is there a reason 64-bit system buses aren't > supported by default? We aim to support the spec v2.00, so this is a bug in the model, 64-bit system

Re: [PATCH v3 03/24] modules: generate modinfo.c

2021-06-22 Thread Jose R. Ziviani
On Fri, Jun 18, 2021 at 06:53:32AM +0200, Gerd Hoffmann wrote: > Add script to generate C source with a small > database containing the module meta-data. > > Signed-off-by: Gerd Hoffmann > --- > scripts/modinfo-generate.py | 84 + > include/qemu/module.h

Re: [PATCH] target/mips: fix emulation of nanoMIPS BPOSGE32 instruction

2021-06-22 Thread Philippe Mathieu-Daudé
Hi Filip and Aleksandar, On 6/15/21 7:33 PM, Philippe Mathieu-Daudé wrote: > On 6/15/21 7:22 PM, Aleksandar Rikalo wrote: >> Per the "MIPS® Architecture Extension: nanoMIPS32 DSP Technical >> Reference Manual — Revision 0.04" p. 88 "BPOSGE32C", offset argument (imm) >> should be left-shifted

Re: [PATCH 0/1] Add features and cpu models

2021-06-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210622201923.150205-1-borntrae...@de.ibm.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210622201923.150205-1-borntrae...@de.ibm.com Subject: [PATCH 0/1] Add features and

Re: [PATCH v2] coreaudio: Lock only the buffer

2021-06-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210622201740.38005-1-akihiko.od...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210622201740.38005-1-akihiko.od...@gmail.com Subject: [PATCH v2] coreaudio: Lock

[PATCH 1/1] s390x/cpumodel: add 3931 and 3932

2021-06-22 Thread Christian Borntraeger
This defines 5 new facilities and the new 3931 and 3932 machines. As before the name is not yet known and we do use gen16a and gen16b. The new features are part of the full model. The default model is still empty (same as z15) and will be added in a separate patch at a later point in time. Also

[PATCH 0/1] Add features and cpu models

2021-06-22 Thread Christian Borntraeger
5 new features and 2 new models Christian Borntraeger (1): s390x/cpumodel: add 3931 and 3932 target/s390x/cpu_features_def.h.inc | 5 + target/s390x/cpu_models.c | 6 ++ target/s390x/gen-features.c | 14 ++ 3 files changed, 25 insertions(+) -- 2.31.1

Re: [PATCH v3 7/7] tests/acceptance: Handle cpu tag on x86_cpu_model_versions tests

2021-06-22 Thread Willian Rampazzo
On Fri, Apr 30, 2021 at 10:35 AM Wainer dos Santos Moschetta wrote: > > Some test cases on x86_cpu_model_versions.py are corner cases because they > need to pass extra options to the -cpu argument. Once the avocado_qemu > framework will set -cpu automatically, the value should be reset. This

[PATCH v2] coreaudio: Lock only the buffer

2021-06-22 Thread Akihiko Odaki
On macOS 11.3.1, Core Audio calls AudioDeviceIOProc after calling an internal function named HALB_Mutex::Lock(), which locks a mutex in HALB_IOThread::Entry(void*). HALB_Mutex::Lock() is also called in AudioObjectGetPropertyData, which is called by coreaudio driver. Therefore, a deadlock will

[Bug 1776920] Re: qemu-img convert on Mac OSX creates corrupt images

2021-06-22 Thread Juan Niño
Hey there! I tested @wkozaczuk's suggested minimal steps and THEY WORKED FOR ME!! The steps executed on my mac: 1. dd if=boot.bin of=image.img > /dev/null 2>&1 2. dd if=lzloader.elf of=image.img conv=notrunc seek=128 > /dev/null 2>&1 3. qemu-img convert image.img -O qcow2 image.qemu 4. qemu-img

Re: [PATCH v3 6/7] tests/acceptance: Add set_vm_arg() to the Test class

2021-06-22 Thread Willian Rampazzo
On Fri, Apr 30, 2021 at 10:35 AM Wainer dos Santos Moschetta wrote: > > The set_vm_arg method is added to avocado_qemu.Test class on this > change. Use that method to set (or replace) an argument to the list of > arguments given to the QEMU binary. > > Suggested-by: Cleber Rosa > Signed-off-by:

Re: [PATCH 5/6] tests/acceptance: add replay kernel test for alpha

2021-06-22 Thread Willian Rampazzo
On Thu, Jun 10, 2021 at 8:25 AM Pavel Dovgalyuk wrote: > > This patch adds record/replay test which boots Linux > kernel on alpha platform. The test uses kernel binaries > taken from boot_linux_console test. > > Signed-off-by: Pavel Dovgalyuk > --- > tests/acceptance/replay_kernel.py | 17

Re: [PATCH 4/6] tests/acceptance: add replay kernel test for nios2

2021-06-22 Thread Willian Rampazzo
On Thu, Jun 10, 2021 at 8:25 AM Pavel Dovgalyuk wrote: > > This patch adds record/replay test which boots Linux > kernel on nios2 platform. The test uses kernel binaries > taken from boot_linux_console test. > > Signed-off-by: Pavel Dovgalyuk > --- > tests/acceptance/replay_kernel.py | 11

Re: [PATCH 3/6] tests/acceptance: add replay kernel test for openrisc

2021-06-22 Thread Willian Rampazzo
On Thu, Jun 10, 2021 at 8:25 AM Pavel Dovgalyuk wrote: > > This patch adds record/replay test which boots Linux > kernel on openrisc platform. The test uses kernel binaries > taken from boot_linux_console test. > > Signed-off-by: Pavel Dovgalyuk > --- > tests/acceptance/replay_kernel.py | 11

Re: [PATCH 2/6] tests/acceptance: add replay kernel test for ppc64

2021-06-22 Thread Willian Rampazzo
On Thu, Jun 10, 2021 at 8:25 AM Pavel Dovgalyuk wrote: > > This patch adds record/replay test which boots Linux > kernel on ppc64 platform. The test uses kernel binaries > taken from boot_linux_console test. > > Signed-off-by: Pavel Dovgalyuk > --- > tests/acceptance/boot_linux_console.py |

Re: [PATCH 1/6] tests/acceptance: add replay kernel test for s390

2021-06-22 Thread Willian Rampazzo
On Thu, Jun 10, 2021 at 8:24 AM Pavel Dovgalyuk wrote: > > This patch adds record/replay test which boots Linux > kernel on s390x platform. The test uses kernel binaries > taken from boot_linux_console test. > > Signed-off-by: Pavel Dovgalyuk > --- > tests/acceptance/replay_kernel.py | 16

Re: RFC: Implementation of QMP documentation retrieval command

2021-06-22 Thread Niteesh G. S.
Hi Stefan, On Tue, Jun 22, 2021 at 3:05 PM Stefan Hajnoczi wrote: > On Mon, Jun 21, 2021 at 11:56:30PM +0530, Niteesh G. S. wrote: > > TLDR: The goal of this mail wasn't to review the dummy command I had > posted > > but > > rather start a discussion regarding the implementation of the QMP > >

Re: [PATCH 2/2] target/ppc: Drop PowerPCCPUClass::interrupts_big_endian()

2021-06-22 Thread Fabiano Rosas
Greg Kurz writes: > This isn't used anymore. > > Signed-off-by: Greg Kurz Reviewed-by: Fabiano Rosas > --- > target/ppc/cpu-qom.h | 1 - > target/ppc/cpu_init.c | 17 - > 2 files changed, 18 deletions(-) > > diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h > index

Re: [PATCH 1/2] target/ppc: Introduce ppc_interrupts_little_endian()

2021-06-22 Thread Fabiano Rosas
Greg Kurz writes: > PowerPC CPUs use big endian by default but starting with POWER7, > server grade CPUs use the ILE bit of the LPCR special purpose > register to decide on the endianness to use when handling > interrupts. This gives a clue to QEMU on the endianness the > guest kernel is

RE: Denormal input handling

2021-06-22 Thread Michael Morrell
OK, I've done more testing. I'm not sure if we need any specialization, but the setting for float_flag_inorm_denormal isn't right for x86. It is set unconditionally when flush_inputs_to_zero is false, but it needs to take into account the other operand(s). Given "denorm / 0" or any

Re: [PATCH v3 03/24] modules: generate modinfo.c

2021-06-22 Thread Jose R. Ziviani
Hello, Just a small change. On Fri, Jun 18, 2021 at 06:53:32AM +0200, Gerd Hoffmann wrote: > Add script to generate C source with a small > database containing the module meta-data. > > Signed-off-by: Gerd Hoffmann > --- > scripts/modinfo-generate.py | 84 +

SD/MMC host controller + 64-bit system bus

2021-06-22 Thread Joanne Koong
Hello! I noticed that the default SD/MMC host controller only supports a 32-bit system bus. Is there a reason 64-bit system buses aren't supported by default? Thanks!

Re: [PATCH v2 2/1] qemu-img: Add "backing":true to unallocated map segments

2021-06-22 Thread Vladimir Sementsov-Ogievskiy
22.06.2021 18:38, Kevin Wolf wrote: Am 11.06.2021 um 21:03 hat Eric Blake geschrieben: To save the user from having to check 'qemu-img info --backing-chain' or other followup command to determine which "depth":n goes beyond the chain, add a boolean field "backing" that is set only for

Re: [PATCH] tcg: Avoid including 'trace-tcg.h' in target translate.c

2021-06-22 Thread Richard Henderson
On 6/22/21 9:15 AM, Philippe Mathieu-Daudé wrote: The root trace-events only declares a single TCG event: $ git grep -w tcg trace-events trace-events:115:# tcg/tcg-op.c trace-events:137:vcpu tcg guest_mem_before(TCGv vaddr, uint16_t info) "info=%d", "vaddr=0x%016"PRIx64" info=%d" and

Re: [RFC PATCH v4 0/7] hw/arm/virt: Introduce cpu topology support

2021-06-22 Thread Daniel P . Berrangé
On Tue, Jun 22, 2021 at 07:29:34PM +0200, Andrew Jones wrote: > On Tue, Jun 22, 2021 at 06:14:25PM +0100, Daniel P. Berrangé wrote: > > On Tue, Jun 22, 2021 at 05:40:13PM +0200, Igor Mammedov wrote: > > > On Tue, 22 Jun 2021 16:29:15 +0200 > > > Andrew Jones wrote: > > > > > > > On Tue, Jun 22,

Re: [PATCH v1 1/1] migration: Unregister yank if migration setup fails

2021-06-22 Thread Peter Xu
On Mon, Jun 21, 2021 at 11:42:36PM -0300, Leonardo Bras wrote: > Currently, if a qemu instance is started with "-incoming defer" and > an incorect parameter is passed to "migrate_incoming", it will print the > expected error and reply with "duplicate yank instance" for any upcoming >

Re: [PATCH v3 3/3] avocado_qemu: Add Intel iommu tests

2021-06-22 Thread Peter Xu
Hi, Eric, On Mon, Jun 21, 2021 at 10:08:24AM +0200, Eric Auger wrote: > Add Intel IOMMU functional tests based on fedora 31. > Different configs are checked: > - strict > - caching mode, strict > - passthrough. > > Signed-off-by: Eric Auger Acked-by: Peter Xu Thanks for adding this test! --

Re: [RFC PATCH v4 0/7] hw/arm/virt: Introduce cpu topology support

2021-06-22 Thread Andrew Jones
On Tue, Jun 22, 2021 at 06:14:25PM +0100, Daniel P. Berrangé wrote: > On Tue, Jun 22, 2021 at 05:40:13PM +0200, Igor Mammedov wrote: > > On Tue, 22 Jun 2021 16:29:15 +0200 > > Andrew Jones wrote: > > > > > On Tue, Jun 22, 2021 at 03:10:57PM +0100, Daniel P. Berrangé wrote: > > > > On Tue, Jun

Re: [RFC PATCH v4 0/7] hw/arm/virt: Introduce cpu topology support

2021-06-22 Thread Daniel P . Berrangé
On Tue, Jun 22, 2021 at 05:40:13PM +0200, Igor Mammedov wrote: > On Tue, 22 Jun 2021 16:29:15 +0200 > Andrew Jones wrote: > > > On Tue, Jun 22, 2021 at 03:10:57PM +0100, Daniel P. Berrangé wrote: > > > On Tue, Jun 22, 2021 at 10:04:52PM +0800, wangyanan (Y) wrote: > > > > Hi Daniel, > > > > >

Re: [PULL 0/9] Linux user for 6.1 patches

2021-06-22 Thread Peter Maydell
On Mon, 21 Jun 2021 at 12:07, Laurent Vivier wrote: > > The following changes since commit 1ea06abceec61b6f3ab33dadb0510b6e09fb61e2: > > Merge remote-tracking branch > 'remotes/berrange-gitlab/tags/misc-fixes-pull-request' into staging > (2021-06-14 15:59:13 +0100) > > are available in the

Re: [PATCH 3/4] modules: module.h kerneldoc annotations

2021-06-22 Thread Jose R. Ziviani
Hello Gerd, On Tue, Jun 22, 2021 at 02:51:09PM +0200, Gerd Hoffmann wrote: > --- > include/qemu/module.h | 59 +-- > 1 file changed, 45 insertions(+), 14 deletions(-) This header has a copyright date from 2009. Not sure if it requires an update. > >

Re: [RFC PATCH v4 0/7] hw/arm/virt: Introduce cpu topology support

2021-06-22 Thread Andrew Jones
On Tue, Jun 22, 2021 at 05:40:13PM +0200, Igor Mammedov wrote: > On Tue, 22 Jun 2021 16:29:15 +0200 > Andrew Jones wrote: > > > On Tue, Jun 22, 2021 at 03:10:57PM +0100, Daniel P. Berrangé wrote: > > > On Tue, Jun 22, 2021 at 10:04:52PM +0800, wangyanan (Y) wrote: > > > > Hi Daniel, > > > > >

Re: [PATCH v2 2/1] qemu-img: Add "backing":true to unallocated map segments

2021-06-22 Thread Nir Soffer
On Fri, Jun 11, 2021 at 10:03 PM Eric Blake wrote: > > To save the user from having to check 'qemu-img info --backing-chain' > or other followup command to determine which "depth":n goes beyond the > chain, add a boolean field "backing" that is set only for unallocated > portions of the disk. > >

Re: [PATCH v2 2/1] qemu-img: Add "backing":true to unallocated map segments

2021-06-22 Thread Nir Soffer
On Tue, Jun 22, 2021 at 6:38 PM Kevin Wolf wrote: > > Am 11.06.2021 um 21:03 hat Eric Blake geschrieben: > > To save the user from having to check 'qemu-img info --backing-chain' > > or other followup command to determine which "depth":n goes beyond the > > chain, add a boolean field "backing"

Re: [PATCH 3/4] export/fuse: Let permissions be adjustable

2021-06-22 Thread Kevin Wolf
Am 22.06.2021 um 17:22 hat Max Reitz geschrieben: > On 22.06.21 17:02, Kevin Wolf wrote: > > Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: > > > Allow changing the file mode, UID, and GID through SETATTR. > > > > > > This only really makes sense with allow-other, though (because without > > >

[PATCH] tcg: Avoid including 'trace-tcg.h' in target translate.c

2021-06-22 Thread Philippe Mathieu-Daudé
The root trace-events only declares a single TCG event: $ git grep -w tcg trace-events trace-events:115:# tcg/tcg-op.c trace-events:137:vcpu tcg guest_mem_before(TCGv vaddr, uint16_t info) "info=%d", "vaddr=0x%016"PRIx64" info=%d" and only a tcg/tcg-op.c uses it: $ git grep -l

Re: Too slow edk2 bios boot?

2021-06-22 Thread Laszlo Ersek
On 06/18/21 15:06, Bin Meng wrote: > On Fri, Jun 18, 2021 at 7:46 PM Gerd Hoffmann wrote: > >> On Fri, Jun 18, 2021 at 06:46:57PM +0800, Bin Meng wrote: >>> Hi Laszlo, >>> >>> Using the QEMU shipped edk2 bios, for i386, it boots very quickly to >>> the EFI shell. >>> >>> $ qemu-system-i386

[Bug 1907497] Re: [OSS-Fuzz] Issue 28435 qemu:qemu-fuzz-i386-target-generic-fuzz-intel-hda: Stack-overflow in ldl_le_dma

2021-06-22 Thread Mauro Matteo Cascella
Just FYI, this issue was assigned CVE-2021-3611 by Red Hat. ** CVE added: https://cve.mitre.org/cgi-bin/cvename.cgi?name=2021-3611 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1907497 Title:

[PATCH RFC 5/6] i386/acpi: Fix SRAT ranges in accordance to usable IOVA

2021-06-22 Thread Joao Martins
On configurations that lead to the creation of an SRAT with PXM entries (-numa ...) because E820 and SRAT do not match, Linux tends to ignore the ranges from SRAT, thus breaking NUMA topology in the guest. When we start adding the ranges after 4G hole, use the newly added iterator in

Re: [PATCH 0/4] modules: update developer documentation

2021-06-22 Thread Paolo Bonzini
On 22/06/21 14:51, Gerd Hoffmann wrote: Depends on the "modules: add meta-data database" patch series. Gerd Hoffmann (4): modules: add documentation for module sourcesets modules: add module_obj() note to QOM docs modules: module.h kerneldoc annotations modules: hook up modules.h to

[PATCH RFC 4/6] i386/pc: Keep PCI 64-bit hole within usable IOVA space

2021-06-22 Thread Joao Martins
pci_memory initialized by q35 and i440fx is set to a range of 0 .. UINT64_MAX, and as a consequence when ACPI and pci-host pick the hole64_start it does not account for allowed IOVA ranges. Rather than blindly returning, round up the hole64_start value to the allowable IOVA range, such that it

Re: [PATCH v3 02/24] modules: collect module meta-data

2021-06-22 Thread Paolo Bonzini
On 21/06/21 14:52, Gerd Hoffmann wrote: ninja: error: 'libui-curses.a.p/meson-generated_.._config-host.h.o', needed by 'ui-curses.modinfo.test', missing and no known rule to make it Hmm, not sure where this comes from. meson doesn't try to link config-host.h.o into libui-curses.a, so why does

[PATCH RFC 3/6] pc/cmos: Adjust CMOS above 4G memory size according to 1Tb boundary

2021-06-22 Thread Joao Martins
CMOS doesn't have the notion of reserved spaces, much like E820, so limit the amount of memory above 4G to not acount for the memory above 1Tb. Suggested-by: David Edmondson Signed-off-by: Joao Martins --- hw/i386/pc.c | 14 -- include/hw/i386/x86.h | 4 2 files

[PATCH RFC 1/6] i386/pc: Account IOVA reserved ranges above 4G boundary

2021-06-22 Thread Joao Martins
It is assumed that the whole GPA space is available to be DMA addressable, within a given address space limit. Since v5.4 based that is not true, and VFIO will validate whether the selected IOVA is indeed valid i.e. not reserved by IOMMU on behalf of some specific devices or platform-defined. AMD

[PATCH RFC 6/6] i386/pc: Add a machine property for AMD-only enforcing of valid IOVAs

2021-06-22 Thread Joao Martins
The added enforcing is only relevant in the case of AMD where the range right before the 1TB is restricted and cannot be DMA mapped by the kernel consequently leading to IOMMU INVALID_DEVICE_REQUEST or possibly other kinds of IOMMU events in the AMD IOMMU. Although, there's a case where it may

Re: [PATCH] virtiofsd: Don't allow file creation with FUSE_OPEN

2021-06-22 Thread Greg Kurz
On Mon, 21 Jun 2021 14:36:12 +0100 Stefan Hajnoczi wrote: > On Thu, Jun 17, 2021 at 04:15:18PM +0200, Greg Kurz wrote: > > A well behaved FUSE client uses FUSE_CREATE to create files. It isn't > > supposed to pass O_CREAT along a FUSE_OPEN request, as documented in > > the "fuse_lowlevel.h"

[PATCH RFC 2/6] i386/pc: Round up the hotpluggable memory within valid IOVA ranges

2021-06-22 Thread Joao Martins
When accounting for allowed IOVA above 4G hole we also need to consider the hotplug memory sits within allowed ranges. Failure to do such validation, means that when we hotplug memory and DMA map it, the DMA_MAP ioctl() fails given invalid IOVA use but also leading to a catastrophic failure and

[PATCH RFC 0/6] i386/pc: Fix creation of >= 1Tb guests on AMD systems with IOMMU

2021-06-22 Thread Joao Martins
Hey, This series lets Qemu properly spawn i386 guests with >= 1Tb with VFIO, particularly when running on AMD systems with an IOMMU. Since Linux v5.4, VFIO validates whether the IOVA in DMA_MAP ioctl is valid and it will return -EINVAL on those cases. On x86, Intel hosts aren't particularly

[PATCH v3 13/15] target/cris: Improve JMP_INDIRECT

2021-06-22 Thread Richard Henderson
Use movcond instead of brcond to set env_pc. Discard the btarget and btaken variables to improve register allocation and avoid unnecessary writeback. Signed-off-by: Richard Henderson --- target/cris/translate.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff

[PATCH v3 15/15] target/cris: Do not exit tb for X_FLAG changes

2021-06-22 Thread Richard Henderson
We always know the exact value of X, that's all that matters. This avoids splitting the TB e.g. between "ax" and "addq". Signed-off-by: Richard Henderson --- target/cris/translate.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index

[PATCH v3 11/15] target/cris: Add DISAS_DBRANCH

2021-06-22 Thread Richard Henderson
Move delayed branch handling to tb_stop, where we can re-use other end-of-tb code, e.g. the evaluation of flags. Honor single stepping. Validate that we aren't losing state by overwriting is_jmp. Signed-off-by: Richard Henderson --- target/cris/translate.c | 96

[PATCH v3 08/15] target/cris: Mark static arrays const

2021-06-22 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/cris/translate.c | 19 ++- target/cris/translate_v10.c.inc | 6 +++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index eabede5251..e14b7acb10 100644 ---

[PATCH v3 12/15] target/cris: Use tcg_gen_lookup_and_goto_ptr

2021-06-22 Thread Richard Henderson
We can use this in gen_goto_tb and for DISAS_JUMP to indirectly chain to the next TB. Signed-off-by: Richard Henderson --- target/cris/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index

[PATCH v3 05/15] target/cris: Fix use_goto_tb

2021-06-22 Thread Richard Henderson
Do not skip the page check for user-only -- mmap/mprotect can still change page mappings. Only check dc->base.pc_first, not dc->ppc -- the start page is the only one that's relevant. Signed-off-by: Richard Henderson --- target/cris/translate.c | 9 ++--- 1 file changed, 2 insertions(+), 7

[PATCH v3 10/15] target/cris: Add DISAS_UPDATE_NEXT

2021-06-22 Thread Richard Henderson
Move this pc update into tb_stop. We will be able to re-use this code shortly. Signed-off-by: Richard Henderson --- target/cris/translate.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index

Re: [PATCH v4 0/6] acpi: Error Record Serialization Table, ERST, support for QEMU

2021-06-22 Thread Igor Mammedov
On Fri, 11 Jun 2021 14:31:17 -0400 Eric DeVolder wrote: > This patchset introduces support for the ACPI Error Record > Serialization Table, ERST. > > Linux uses the persistent storage filesystem, pstore, to record > information (eg. dmesg tail) upon panics and shutdowns. Pstore is >

[PATCH v3 07/15] target/cris: Mark helper_raise_exception noreturn

2021-06-22 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/cris/helper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/cris/helper.h b/target/cris/helper.h index 20d21c4358..3abf608682 100644 --- a/target/cris/helper.h +++ b/target/cris/helper.h @@ -1,4 +1,4 @@

[PATCH v3 04/15] target/cris: Mark exceptions as DISAS_NORETURN

2021-06-22 Thread Richard Henderson
After we've raised the exception, we have left the TB. Signed-off-by: Richard Henderson --- target/cris/translate.c | 5 +++-- target/cris/translate_v10.c.inc | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index

[PATCH v3 14/15] target/cris: Remove dc->flagx_known

2021-06-22 Thread Richard Henderson
Ever since 2a44f7f17364, flagx_known is always true. Fold away all of the tests against the flag. Signed-off-by: Richard Henderson --- target/cris/translate.c | 99 - target/cris/translate_v10.c.inc | 6 +- 2 files changed, 24 insertions(+), 81

[PATCH v3 09/15] target/cris: Fold unhandled X_FLAG changes into cpustate_changed

2021-06-22 Thread Richard Henderson
We really do this already, by including them into the same test. This just hoists the expression up a bit. Signed-off-by: Richard Henderson --- target/cris/translate.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/target/cris/translate.c

[PATCH v3 06/15] target/cris: Convert to TranslatorOps

2021-06-22 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/cris/translate.c | 317 ++-- 1 file changed, 174 insertions(+), 143 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index 9e1f2f9239..eabede5251 100644 --- a/target/cris/translate.c +++

[PATCH v3 00/15] target/cris: Convert to TranslatorOps

2021-06-22 Thread Richard Henderson
Changes for v3: * Fix delayed branch changes vs cpustate_changed. * Tidy some X_FLAG handling. Changes for v2: * Fix (drop) singlestep check for max_insns. We already do that generically. * Move delay branch handling to tb_stop. * Improve tcg_gen_lookup_and_goto_ptr patch. * Patch

[PATCH v3 03/15] target/cris: Replace DISAS_TB_JUMP with DISAS_NORETURN

2021-06-22 Thread Richard Henderson
The only semantic of DISAS_TB_JUMP is that we've done goto_tb, which is the same as DISAS_NORETURN -- we've exited the tb. Signed-off-by: Richard Henderson --- target/cris/translate.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/cris/translate.c

[PATCH v3 02/15] target/cris: Remove DISAS_SWI

2021-06-22 Thread Richard Henderson
This value is unused. Signed-off-by: Richard Henderson --- target/cris/translate.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/cris/translate.c b/target/cris/translate.c index bed7a7ed10..8c1bad9564 100644 --- a/target/cris/translate.c +++ b/target/cris/translate.c @@ -56,7

[PATCH v3 01/15] target/cris: Add DisasContextBase to DisasContext

2021-06-22 Thread Richard Henderson
Migrate the is_jmp, tb and singlestep_enabled fields from DisasContext into the base. Signed-off-by: Richard Henderson --- target/cris/translate.c | 49 + target/cris/translate_v10.c.inc | 4 +-- 2 files changed, 27 insertions(+), 26 deletions(-) diff

Re: [PATCH 2/4] Python QEMU utils: introduce a generic feature list

2021-06-22 Thread John Snow
On 6/8/21 10:09 AM, Cleber Rosa wrote: Which can be used to check for any "feature" that is available as a QEMU command line option, and that will return its list of available options. This is a generalization of the list_accel() utility function, which is itself re-implemented in terms of the

Re: [RFC PATCH v4 0/7] hw/arm/virt: Introduce cpu topology support

2021-06-22 Thread Igor Mammedov
On Tue, 22 Jun 2021 16:29:15 +0200 Andrew Jones wrote: > On Tue, Jun 22, 2021 at 03:10:57PM +0100, Daniel P. Berrangé wrote: > > On Tue, Jun 22, 2021 at 10:04:52PM +0800, wangyanan (Y) wrote: > > > Hi Daniel, > > > > > > On 2021/6/22 20:41, Daniel P. Berrangé wrote: > > > > On Tue, Jun 22,

Re: [PATCH v2 2/1] qemu-img: Add "backing":true to unallocated map segments

2021-06-22 Thread Kevin Wolf
Am 11.06.2021 um 21:03 hat Eric Blake geschrieben: > To save the user from having to check 'qemu-img info --backing-chain' > or other followup command to determine which "depth":n goes beyond the > chain, add a boolean field "backing" that is set only for unallocated > portions of the disk. > >

Re: [PATCH 4/4] iotests/308: Test allow-other

2021-06-22 Thread Max Reitz
On 22.06.21 17:08, Kevin Wolf wrote: Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: We cannot reasonably test the main point of allow-other, which is to allow users other than the current one to access the FUSE export, because that would require access to sudo, which this test most likely

Re: [PATCH v4 3/6] ACPI ERST: support for ACPI ERST feature

2021-06-22 Thread Igor Mammedov
On Fri, 11 Jun 2021 14:31:20 -0400 Eric DeVolder wrote: > This change implements the support for the ACPI ERST feature[1,2]. > > To utilize ACPI ERST, a memory-backend-file object and acpi-erst > device must be created, for example: > > qemu ... > -object

Re: [PATCH 3/4] export/fuse: Let permissions be adjustable

2021-06-22 Thread Max Reitz
On 22.06.21 17:02, Kevin Wolf wrote: Am 14.06.2021 um 16:44 hat Max Reitz geschrieben: Allow changing the file mode, UID, and GID through SETATTR. This only really makes sense with allow-other, though (because without it, the effective access mode is fixed to be 0600 (u+rw) with qemu's user

Auditing QEMU to replace NULL with _abort

2021-06-22 Thread John Snow
One of our Bite-Sized tasks on the wiki was to audit QEMU and, where applicable, replace NULL with _abort. Everywhere else where it is intentional, we ought to add a comment or some other indication explaining why it's the right thing to do in that case. That task was ported to GitLab here:

Re: [RFC PATCH v4 0/7] hw/arm/virt: Introduce cpu topology support

2021-06-22 Thread Daniel P . Berrangé
On Tue, Jun 22, 2021 at 04:29:15PM +0200, Andrew Jones wrote: > On Tue, Jun 22, 2021 at 03:10:57PM +0100, Daniel P. Berrangé wrote: > > On Tue, Jun 22, 2021 at 10:04:52PM +0800, wangyanan (Y) wrote: > > > Hi Daniel, > > > > > > On 2021/6/22 20:41, Daniel P. Berrangé wrote: > > > > On Tue, Jun 22,

[PATCH v7 1/7] virtiofsd: Fix fuse setxattr() API change issue

2021-06-22 Thread Vivek Goyal
With kernel header updates fuse_setxattr_in struct has grown in size. But this new struct size only takes affect if user has opted in for fuse feature FUSE_SETXATTR_EXT otherwise fuse continues to send "fuse_setxattr_in" of older size. Older size is determined by FUSE_COMPAT_SETXATTR_IN_SIZE. Fix

[PATCH v7 5/7] virtiofsd: Add capability to change/restore umask

2021-06-22 Thread Vivek Goyal
When parent directory has default acl and a file is created in that directory, then umask is ignored and final file permissions are determined using default acl instead. (man 2 umask). Currently, fuse applies the umask and sends modified mode in create request accordingly. fuse server can set

[PATCH v7 2/7] virtiofsd: Fix xattr operations overwriting errno

2021-06-22 Thread Vivek Goyal
getxattr/setxattr/removexattr/listxattr operations handle regualar and non-regular files differently. For the case of non-regular files we do fchdir(/proc/self/fd) and the xattr operation and then revert back to original working directory. After this we are saving errno and that's buggy because

[PATCH v7 7/7] virtiofsd: Add an option to enable/disable posix acls

2021-06-22 Thread Vivek Goyal
fuse has an option FUSE_POSIX_ACL which needs to be opted in by fuse server to enable posix acls. As of now we are not opting in for this, so posix acls are disabled on virtiofs by default. Add virtiofsd option "-o posix_acl/no_posix_acl" to let users enable/disable posix acl support. By default

[PATCH v7 6/7] virtiofsd: Switch creds, drop FSETID for system.posix_acl_access xattr

2021-06-22 Thread Vivek Goyal
When posix access acls are set on a file, it can lead to adjusting file permissions (mode) as well. If caller does not have CAP_FSETID and it also does not have membership of owner group, this will lead to clearing SGID bit in mode. Current fuse code is written in such a way that it expects file

[PATCH v7 0/7] virtiofsd: Add support to enable/disable posix acls

2021-06-22 Thread Vivek Goyal
Hi, This is V7 of the patches. Changes since V6. - Dropped kernel header update patch as somebody else did it. - Fixed coding style issues. Currently posix ACL support does not work well with virtiofs and bunch of tests fail when I run xfstests "./check -g acl". This patches series fixes the

[PATCH v7 4/7] virtiofsd: Add umask to seccom allow list

2021-06-22 Thread Vivek Goyal
Patches in this series are going to make use of "umask" syscall. So allow it. Signed-off-by: Vivek Goyal Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/passthrough_seccomp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virtiofsd/passthrough_seccomp.c

  1   2   3   >