Re: [RFC PATCH v2 00/21] QEMU gmem implemention

2023-09-22 Thread Xiaoyao Li
On 9/21/2023 5:11 PM, David Hildenbrand wrote: 3. What is KVM_X86_SW_PROTECTED_VM going to look like? and do we need it? Why implement it when you have to ask others for a motivation? 😉 Personally, I'm not sure if it is really useful, especially in this state. Yeah, as of today, KVM_X86_S

Re: [PATCH v4] hw/i386/pc: improve physical address space bound check for 32-bit x86 systems

2023-09-22 Thread David Hildenbrand
On 22.09.23 06:16, Ani Sinha wrote: 32-bit x86 systems do not have a reserved memory for hole64. On those 32-bit systems without PSE36 or PAE CPU features, hotplugging memory devices are not supported by QEMU as QEMU always places hotplugged memory above 4 GiB boundary which is beyond the physica

Re: [RFC PATCH v2 02/21] RAMBlock: Add support of KVM private gmem

2023-09-22 Thread David Hildenbrand
On 22.09.23 02:22, Xiaoyao Li wrote: On 9/21/2023 4:55 PM, David Hildenbrand wrote: On 14.09.23 05:50, Xiaoyao Li wrote: From: Chao Peng Add KVM gmem support to RAMBlock so both normal hva based memory and kvm gmem fd based private memory can be associated in one RAMBlock. Introduce new flag

Re: [RFC PATCH v2 00/21] QEMU gmem implemention

2023-09-22 Thread David Hildenbrand
On 22.09.23 09:03, Xiaoyao Li wrote: On 9/21/2023 5:11 PM, David Hildenbrand wrote: 3. What is KVM_X86_SW_PROTECTED_VM going to look like? and do we need it? Why implement it when you have to ask others for a motivation? 😉 Personally, I'm not sure if it is really useful, especially in this s

Re: [RFC PATCH v2 07/21] i386/pc: Drop pc_machine_kvm_type()

2023-09-22 Thread David Hildenbrand
On 22.09.23 02:24, Xiaoyao Li wrote: On 9/21/2023 4:51 PM, David Hildenbrand wrote: On 14.09.23 05:51, Xiaoyao Li wrote: pc_machine_kvm_type() was introduced by commit e21be724eaf5 ("i386/xen: add pc_machine_kvm_type to initialize XEN_EMULATE mode") to do Xen specific initialization by utilizin

Re: [PATCH v1 16/22] backends/iommufd: Introduce the iommufd object

2023-09-22 Thread CĂ©dric Le Goater
On 8/30/23 12:37, Zhenzhong Duan wrote: From: Eric Auger Introduce an iommufd object which allows the interaction with the host /dev/iommu device. The /dev/iommu can have been already pre-opened outside of qemu, in which case the fd can be passed directly along with the iommufd object: This a

Re: [Bug 1819289] Re: Windows 95 and Windows 98 will not install or run

2023-09-22 Thread Michael Tokarev
21.09.2023 19:26, John M wrote: This is happening again in 8.1. I used Windows 95 for a while in 6.1 and it was fine, but when I tried to upgrade to 8.1, it started happening again. I tried reducing the memory and it still happens. Not an urgent issue though. Can you show me a way to install &

Re: [PATCH 1/2] migration: Fix rdma migration failed

2023-09-22 Thread Zhijian Li (Fujitsu)
On 20/09/2023 20:46, Fabiano Rosas wrote: > Li Zhijian writes: > >> From: Li Zhijian >> >> Destination will fail with: >> qemu-system-x86_64: rdma: Too many requests in this message >> (3638950032).Bailing. >> >> migrate with RDMA is different from tcp. RDMA has its own control >> message, an

Re: [PATCH v13 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-09-22 Thread Alyssa Ross
Akihiko Odaki writes: > Practically there is very low chance to hit the bug. I think only > fuzzers and malicious actors will trigger it, and probably no one will > dare using virtio-gpu-rutabaga or virtio-gpu-gl in a security-sensitive > context. Well, this is exactly what Chrome OS does, al

[PATCH] Update AMD memory encryption document links.

2023-09-22 Thread Jianlin Li
The previous links for the white paper and programmer's manual are no longer available. Replace them with the new ones. Signed-off-by: Jianlin Li --- docs/system/i386/amd-memory-encryption.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/system/i386/amd-memory-

Re: [PATCH 11/52] migration/rdma: Drop rdma_add_block() error handling

2023-09-22 Thread Zhijian Li (Fujitsu)
On 21/09/2023 19:15, Markus Armbruster wrote: > "Zhijian Li (Fujitsu)" writes: > >> On 18/09/2023 22:41, Markus Armbruster wrote: >>> rdma_add_block() can't fail. Return void, and drop the unreachable >>> error handling. >>> >>> Signed-off-by: Markus Armbruster >>> --- >>>migration/rdma.c

Re: [PATCH 12/52] migration/rdma: Drop qemu_rdma_search_ram_block() error handling

2023-09-22 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > qemu_rdma_search_ram_block() can't fail. Return void, and drop the > unreachable error handling. > > Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian

Re: [PATCH 13/52] migration/rdma: Make qemu_rdma_buffer_mergable() return bool

2023-09-22 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > qemu_rdma_buffer_mergable() is semantically a predicate. It returns > int 0 or 1. Return bool instead. > > Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian

Re: [PATCH v13 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-09-22 Thread Akihiko Odaki
On 2023/09/22 16:42, Alyssa Ross wrote: Akihiko Odaki writes: Practically there is very low chance to hit the bug. I think only fuzzers and malicious actors will trigger it, and probably no one will dare using virtio-gpu-rutabaga or virtio-gpu-gl in a security-sensitive context. Well, this i

Re: [PATCH 14/52] migration/rdma: Use bool for two RDMAContext flags

2023-09-22 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > @error_reported and @received_error are flags. The latter is even > assigned bool true. Change them from int to bool. > > Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian > --- > migration/rdma.c | 6 +++--- > 1 file changed, 3 ins

RE: [PATCH v1 0/4] vfio: report NUMA nodes for device memory

2023-09-22 Thread Ankit Agrawal
> >> > >> Typically, a command line for a virt machine with NUMA nodes would > >> look like : > >> > >> -object memory-backend-ram,id=ram-node0,size=1G \ > >> -numa node,nodeid=0,memdev=ram-node0 \ > >> -object memory-backend-ram,id=ram-node1,size=1G \ > >> -numa node,nodeid=1,cpus=

Re: [PATCH v1 0/4] vfio: report NUMA nodes for device memory

2023-09-22 Thread David Hildenbrand
On 22.09.23 10:11, Ankit Agrawal wrote: Typically, a command line for a virt machine with NUMA nodes would look like : -object memory-backend-ram,id=ram-node0,size=1G \ -numa node,nodeid=0,memdev=ram-node0 \ -object memory-backend-ram,id=ram-node1,size=1G \ -numa node,nodeid

Re: [PATCH v4 2/3] i386: Explicitly ignore unsupported BUS_MCEERR_AO MCE on AMD guest

2023-09-22 Thread William Roche
On 9/21/23 19:41, Yazen Ghannam wrote: On 9/20/23 7:13 AM, Joao Martins wrote: On 18/09/2023 23:00, William Roche wrote: [...] So it looks like the mechanism works fine... unless the VM has migrated between the SRAO error and the first time it really touches the poisoned page to get an SRAR err

RE: [PATCH v1 16/22] backends/iommufd: Introduce the iommufd object

2023-09-22 Thread Duan, Zhenzhong
>-Original Message- >From: CĂ©dric Le Goater >Sent: Friday, September 22, 2023 3:16 PM ... >> +int iommufd_backend_map_dma(IOMMUFDBackend *be, uint32_t ioas, >hwaddr iova, >> +ram_addr_t size, void *vaddr, bool readonly) >> +{ >> +int ret; >> +struct io

Re: [PATCH 15/52] migration/rdma: Ditch useless numeric error codes in error messages

2023-09-22 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > Several error messages include numeric error codes returned by failed > functions: > > * ibv_poll_cq() returns an unspecified negative value. Useless. > > * rdma_accept and rmda_get_cm_event() return -1. Useless. s/rmda_get_cm_event/rdma_get_c

Re: [PATCH 16/52] migration/rdma: Fix io_writev(), io_readv() methods to obey contract

2023-09-22 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > QIOChannelClass methods qio_channel_rdma_readv() and > qio_channel_rdma_writev() violate their method contract when > rdma->error_state is non-zero: > > 1. They return whatever is in rdma->error_state then. Only -1 will be > fine. -2 will be

Re: [PATCH 17/52] migration/rdma: Replace dangerous macro CHECK_ERROR_STATE()

2023-09-22 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > Hiding return statements in macros is a bad idea. Use a function > instead, and open code the return part. > > Signed-off-by: Markus Armbruster Reviewed-by: Li Zhijian > --- > migration/rdma.c | 43 +++---

Re: [PATCH 18/52] migration/rdma: Fix qemu_rdma_broken_ipv6_kernel() to set error

2023-09-22 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > qemu_rdma_resolve_host() and qemu_rdma_dest_init() try addresses until > they find on that works. If none works, they return the first Error > set by qemu_rdma_broken_ipv6_kernel(), or else return a generic one. > > qemu_rdma_broken_ipv6_kernel()

Re: [PATCH 19/52] migration/rdma: Fix qemu_get_cm_event_timeout() to always set error

2023-09-22 Thread Zhijian Li (Fujitsu)
On 18/09/2023 22:41, Markus Armbruster wrote: > qemu_get_cm_event_timeout() neglects to set an error when it fails > because rdma_get_cm_event() fails. Harmless, as its caller > qemu_rdma_connect() substitutes a generic error then. Fix it anyway. > > qemu_rdma_connect() also sets the generic e

Re: [PATCH 1/2] pc_piix: remove pc-i440fx-1.4 up to pc-i440fx-1.7

2023-09-22 Thread Paolo Bonzini
Il ven 22 set 2023, 08:43 Thomas Huth ha scritto: > > While you're at it ... do we maybe want to start deprecating the next > batch > of machine types already? (Say pc-i440fx-2.0 up to pc-i440fx-2.2 maybe?) > It depends on the benefit. We would have to check the compat options that are not neede

Re: [PATCH 2/2] seabios: remove PCI drivers from bios.bin

2023-09-22 Thread Paolo Bonzini
Il ven 22 set 2023, 08:49 Thomas Huth ha scritto: > On 21/09/2023 14.10, Paolo Bonzini wrote: > > bios.bin is now used only by ISA PC, so PCI drivers are not necessary. > > > > Signed-off-by: Paolo Bonzini > > --- > > pc-bios/bios.bin | Bin 131072 -> 131072 bytes > > roms/config.seab

[PULL 03/12] qemu/timer: Add host ticks function for RISC-V

2023-09-22 Thread Paolo Bonzini
From: LIU Zhiwei Signed-off-by: LIU Zhiwei Message-ID: <20230911063223.742-1-zhiwei_...@linux.alibaba.com> Signed-off-by: Paolo Bonzini --- include/qemu/timer.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/include/qemu/timer.h b/include/qemu/timer.h index 9a91cb1

[PULL 00/12] Audio, i386 patches for 2022-09-22

2023-09-22 Thread Paolo Bonzini
The following changes since commit 005ad32358f12fe9313a4a01918a55e60d4f39e5: Merge tag 'pull-tpm-2023-09-12-3' of https://github.com/stefanberger/qemu-tpm into staging (2023-09-13 13:41:57 -0400) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream

[PULL 01/12] target/i386: enumerate bit 56 of MSR_IA32_VMX_BASIC

2023-09-22 Thread Paolo Bonzini
On parts that enumerate IA32_VMX_BASIC MSR bit as 1, any exception vector can be delivered with or without an error code if the other consistency checks are satisfied. Signed-off-by: Paolo Bonzini --- scripts/kvm/vmxcap | 1 + target/i386/cpu.c | 1 + target/i386/cpu.h | 1 + 3 files changed,

[PULL 02/12] target/i386: Export GDS_NO bit to guests

2023-09-22 Thread Paolo Bonzini
From: Pawan Gupta Gather Data Sampling (GDS) is a side-channel attack using Gather instructions. Some Intel processors will set ARCH_CAP_GDS_NO bit in MSR IA32_ARCH_CAPABILITIES to report that they are not vulnerable to GDS. Make this bit available to guests. Closes: https://lore.kernel.org/qe

[PULL 05/12] hw/input/tsc210x: Extract common init code into new function

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander This deduplicates several lines and will make future changes more concise. Signed-off-by: Martin Kletzander Reviewed-by: Daniel P. Berrangé Message-ID: <1d75877cf4cc2a38f87633ff16f9fea3e1bb0c03.1650874791.git.mklet...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/i

[PULL 12/12] audio: Require AudioState in AUD_add_capture

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander Since all callers require a valid audiodev this function can now safely abort in case of missing AudioState. Signed-off-by: Martin Kletzander Message-ID: Signed-off-by: Paolo Bonzini --- audio/audio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff -

[PULL 07/12] hw/audio/lm4549: Add errp error reporting to init function

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander This will be used in future commit. Signed-off-by: Martin Kletzander Reviewed-by: Daniel P. Berrangé Message-ID: Signed-off-by: Paolo Bonzini --- hw/audio/lm4549.c | 3 ++- hw/audio/lm4549.h | 3 ++- hw/audio/pl041.c | 2 +- 3 files changed, 5 insertions(+), 3 dele

[PULL 09/12] tests/qtest: Specify audiodev= and -audiodev

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander This will enable removing deprecated default audiodev support. I did not figure out how to make the audiodev represented as an interface node, so this is a workaround. I am not sure what would be the proper way. Signed-off-by: Martin Kletzander Reviewed-by: Daniel P. B

[PULL 11/12] ui/vnc: Require audiodev= to enable audio

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander Signed-off-by: Martin Kletzander Message-ID: Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 8 +++- docs/about/removed-features.rst | 6 ++ ui/vnc.c| 10 -- 3 files changed, 17 insertions(+), 7 deletions(-)

[PULL 10/12] audio/spiceaudio: Fail initialisation when not using spice

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander The caller would already fail, but this way the message can better express the reason for the failure. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2043498 Signed-off-by: Martin Kletzander Message-ID: <5db1fdef0330f20ed6ae306b5a71dad1b5e9b44c.1650874791.git.mk

[PULL 08/12] hw/display/xlnx_dp.c: Add audiodev property

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander There was no way to set this and we need that for it to be able to properly initialise. Signed-off-by: Martin Kletzander Message-ID: <16963256573fcbfa7720aa2fd000ba74a4055222.1650874791.git.mklet...@redhat.com> Signed-off-by: Paolo Bonzini --- hw/display/xlnx_dp.c | 6

[PULL 04/12] audio: remove QEMU_AUDIO_* and -audio-help support

2023-09-22 Thread Paolo Bonzini
These have been deprecated for a long time, and the introduction of -audio in 7.1.0 has cemented the new way of specifying an audio backend. Remove all the associated baggage, including the concept of "can_be_default" audio drivers. Signed-off-by: Paolo Bonzini --- audio/alsaaudio.c

[PULL 06/12] hw/audio: Simplify hda audio init

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander No return values are used anywhere, so switch the functions to be void and add support for error reporting using errp for use in next patches. Signed-off-by: Martin Kletzander Reviewed-by: Daniel P. Berrangé Message-ID: Signed-off-by: Paolo Bonzini --- hw/audio/hda-

Re: [PATCH for-8.1] vfio/display: Fix missing update to set backing fields

2023-09-22 Thread CĂ©dric Le Goater
On 9/13/23 21:18, Alex Williamson wrote: Hi Gerd, Some consultation would be appreciated on this thread to get this patch out of limbo. Is there a better solution that what I've proposed? This does fix a regression reproducible on systems with an Intel Gen 8, my T480 laptop for instance. Te

Re: [PATCH 15/52] migration/rdma: Ditch useless numeric error codes in error messages

2023-09-22 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:41, Markus Armbruster wrote: >> Several error messages include numeric error codes returned by failed >> functions: >> >> * ibv_poll_cq() returns an unspecified negative value. Useless. >> >> * rdma_accept and rmda_get_cm_event() return -1. Us

[PATCH 8/9] audio: Make AUD_register_card fallible and require audiodev=

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander Now that all callers support error reporting with errp and all machine-default devices use an explicit audiodev, this can be changed. To make the detection easier make AUD_register_card() return false on error. Signed-off-by: Martin Kletzander Signed-off-by: Paolo Bonzi

[PATCH 4/9] hw/arm: Support machine-default audiodev with fallback

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander Signed-off-by: Martin Kletzander Signed-off-by: Paolo Bonzini --- hw/arm/integratorcp.c | 10 +- hw/arm/musicpal.c | 11 +-- hw/arm/nseries.c | 4 hw/arm/omap2.c| 8 hw/arm/palm.c | 2 ++ hw/arm/realview.c |

[PATCH 2/9] Introduce machine property "audiodev"

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander Many machine types have default audio devices with no way to set the underlying audiodev. Instead of adding an option for each and every one of them, this new property can be used as a default during machine initialisation when creating such devices. Signed-off-by: Marti

[PATCH 1/9] audio: Add easy dummy audio initialiser

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander In case of sound devices which are created by default (some of them even with -nodefaults) it would not be nice to users if qemu required explicit: -audiodev driver=none,id=audio0 -machine audiodev=audio0 when they just want to run a VM and not care about any audio out

[PATCH 9/9] audio: Be more strict during audio backend initialisation

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander Now that audiodev= is required and audio_init() will not be called without and AudioDev we can remove the fallback functionality and error out in case audio drivers fail initialisation or when the driver does not exist. Signed-off-by: Martin Kletzander Signed-off-by: Pao

[PATCH 3/9] vl: support -audio BACKEND without model

2023-09-22 Thread Paolo Bonzini
For machines with an embedded audio device, "-audio BACKEND" will set the audiodev property of the machine itself. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 5a1413da2aa..70c

[PATCH 6/9] vt82c686: Support machine-default audiodev with fallback

2023-09-22 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/isa/vt82c686.c | 2 ++ hw/mips/fuloong2e.c | 12 +--- hw/ppc/pegasos2.c | 10 -- hw/ppc/sam460ex.c | 2 ++ 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 57bdfb4e78c..3ec8e4370

[PATCH 7/9] vl: recognize audiodev groups in configuration files

2023-09-22 Thread Paolo Bonzini
This is necessary for the q35 configuration tests to pass, once audiodev becomes mandatory. Signed-off-by: Paolo Bonzini --- docs/config/q35-emulated.cfg | 4 docs/config/q35-virtio-graphical.cfg | 4 softmmu/vl.c | 10 ++ 3 files changed, 18 i

[PATCH 5/9] hw/ppc: Support machine-default audiodev with fallback

2023-09-22 Thread Paolo Bonzini
From: Martin Kletzander Signed-off-by: Martin Kletzander Signed-off-by: Paolo Bonzini --- hw/ppc/prep.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index f6fd35fcb9e..739ff0ea8ad 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -45,6 +45,7 @@ #incl

[PATCH 0/9] audio: make sound cards require the audiodev property

2023-09-22 Thread Paolo Bonzini
This is the remaining part of Martin's patches to remove the deprecations connected to audio backend configuration. With these patches, all sound cards have to be configured with an audio backend; only embedded cards get the luxury of a default backend that emits or records no audio at all. Fortun

Re: [PATCH for-8.1] vfio/display: Fix missing update to set backing fields

2023-09-22 Thread Michael Tokarev
22.09.2023 12:38, Cédric Le Goater wrote: On 9/13/23 21:18, Alex Williamson wrote: Hi Gerd, Some consultation would be appreciated on this thread to get this patch out of limbo.  Is there a better solution that what I've proposed? This does fix a regression reproducible on systems with an In

Re: [PATCH 1/2] pc_piix: remove pc-i440fx-1.4 up to pc-i440fx-1.7

2023-09-22 Thread Thomas Huth
On 22/09/2023 11.19, Paolo Bonzini wrote: Il ven 22 set 2023, 08:43 Thomas Huth > ha scritto: While you're at it ... do we maybe want to start deprecating the next batch of machine types already? (Say pc-i440fx-2.0 up to pc-i440fx-2.2 maybe?) It depends on

Re: [PATCH v2 17/22] util/vhost-user-server: Clean up local variable shadowing

2023-09-22 Thread Michael S. Tsirkin
On Mon, Sep 04, 2023 at 06:12:29PM +0200, Philippe Mathieu-DaudĂ© wrote: > Fix: > > util/vhost-user-server.c: In function ‘set_watch’: > util/vhost-user-server.c:274:20: warning: declaration of ‘vu_fd_watch’ > shadows a previous local [-Wshadow=compatible-local] > 274 | VuFdWatch *

Re: [PATCH] hw/sd/sdhci: Block Size Register bits [14:12] is lost

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/12/22 09:54, Gao, Lu wrote: Hello, Just want to check whether we can have it merged? Any other comments? Oops sorry, I see I had this patch tagged for a merge request but I lost track of it (likely when switching emails). Patch queued! Thanks a lot! B.R. -Original Message- F

Re: Help wanted for enabling -Wshadow=local

2023-09-22 Thread Ani Sinha
> On 22-Sep-2023, at 3:07 PM, Markus Armbruster wrote: > > Devices > --- > ACPI/SMBIOS > M: Michael S. Tsirkin > M: Igor Mammedov > R: Ani Sinha >hw/acpi/cpu_hotplug.c >hw/i386/acpi-build.c(*3*) >hw/smbios/smbios.c I will look into this after enabling diff --git a/meson.bu

Re: [PATCH 3/3] hw/arm/smmuv3: Advertise SMMUv3.1-XNX feature

2023-09-22 Thread Mostafa Saleh
Hi Peter, On Thu, Sep 14, 2023 at 03:57:05PM +0100, Peter Maydell wrote: > The SMMUv3.1-XNX feature is mandatory for an SMMUv3.1 if S2P is > supported, so we should theoretically have implemented it as part of > the recent S2P work. Fortunately, for us the implementation is a > no-op. > > This f

Re: Help wanted for enabling -Wshadow=local

2023-09-22 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 04:03:27PM +0530, Ani Sinha wrote: > > > > On 22-Sep-2023, at 3:07 PM, Markus Armbruster wrote: > > > > Devices > > --- > > ACPI/SMBIOS > > M: Michael S. Tsirkin > > M: Igor Mammedov > > R: Ani Sinha > >hw/acpi/cpu_hotplug.c > >hw/i386/acpi-build.c(*3*) >

[Bug 1819289] Re: Windows 95 and Windows 98 will not install or run

2023-09-22 Thread Michael Tokarev
I found a win98 iso image and gave this a try with qemu 8.1. It works here just fine - either kvm or tcg mode, either qemu x86_64 or i386. Without any extra options, just this: qemu-system-i386 -cdrom w98.iso -drive file=w98.img,format=raw It also works fine with a few previous versions of qe

Re: [PATCH 0/3] hw/arm/smmuv3: Advertise SMMUv3.1-XNX

2023-09-22 Thread Mostafa Saleh
Hi Peter, On Thu, Sep 14, 2023 at 03:57:02PM +0100, Peter Maydell wrote: > The SMMUv3.1-XNX feature is mandatory for an SMMUv3.1 if S2P is > supported, so we should theoretically have implemented it as part of > the recent S2P work. Fortunately, for us the implementation is a > no-op. Oh, I misse

Re: [PATCH 0/9] Replace remaining target_ulong in system-mode accel

2023-09-22 Thread Anton Johansson via
On 21/09/23, Michael Tokarev wrote: > 07.08.2023 18:56, Anton Johansson via wrote: > > This patchset replaces the remaining uses of target_ulong in the accel/ > > directory. Specifically, the address type of a few kvm/hvf functions > > is widened to vaddr, and the address type of the cpu_[st|ld]*(

Re: [PATCH 3/3] hw/arm/smmuv3: Advertise SMMUv3.1-XNX feature

2023-09-22 Thread Peter Maydell
On Fri, 22 Sept 2023 at 11:34, Mostafa Saleh wrote: > > Hi Peter, > > On Thu, Sep 14, 2023 at 03:57:05PM +0100, Peter Maydell wrote: > > The SMMUv3.1-XNX feature is mandatory for an SMMUv3.1 if S2P is > > supported, so we should theoretically have implemented it as part of > > the recent S2P work.

[PATCH] test-throttle: don't shadow 'index' variable in do_test_accounting()

2023-09-22 Thread Alberto Garcia
Fixes build with -Wshadow=local Signed-off-by: Alberto Garcia --- tests/unit/test-throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test-throttle.c b/tests/unit/test-throttle.c index cb587e33e7..ac35d65d19 100644 --- a/tests/unit/test-throttle.c +++ b/test

Re: [PATCH for-8.1] vfio/display: Fix missing update to set backing fields

2023-09-22 Thread CĂ©dric Le Goater
On 9/22/23 11:49, Michael Tokarev wrote: 22.09.2023 12:38, Cédric Le Goater wrote: On 9/13/23 21:18, Alex Williamson wrote: Hi Gerd, Some consultation would be appreciated on this thread to get this patch out of limbo.  Is there a better solution that what I've proposed? This does fix a reg

Re: [PATCH v23 01/20] CPU topology: extend with s390 specifics

2023-09-22 Thread Nina Schoetterl-Glausch
On Wed, 2023-09-20 at 13:11 +0200, Markus Armbruster wrote: > Nina Schoetterl-Glausch writes: > > > From: Pierre Morel > > > > S390 adds two new SMP levels, drawers and books to the CPU > > topology. > > S390 CPUs have specific topology features like dedication and > > entitlement. These indica

Re: Help wanted for enabling -Wshadow=local

2023-09-22 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Fri, Sep 22, 2023 at 04:03:27PM +0530, Ani Sinha wrote: >> >> >> > On 22-Sep-2023, at 3:07 PM, Markus Armbruster wrote: >> > >> > Devices >> > --- >> > ACPI/SMBIOS >> > M: Michael S. Tsirkin >> > M: Igor Mammedov >> > R: Ani Sinha >> >hw/acpi/cpu_h

Re: [PATCH v4] hw/i386/pc: improve physical address space bound check for 32-bit x86 systems

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 06:16, Ani Sinha wrote: 32-bit x86 systems do not have a reserved memory for hole64. On those 32-bit systems without PSE36 or PAE CPU features, hotplugging memory devices are not supported by QEMU as QEMU always places hotplugged memory above 4 GiB boundary which is beyond the physical

Re: [PATCH 1/9] audio: Add easy dummy audio initialiser

2023-09-22 Thread Marc-André Lureau
Hi On Fri, Sep 22, 2023 at 1:46 PM Paolo Bonzini wrote: > > From: Martin Kletzander > > In case of sound devices which are created by default (some of them even with > -nodefaults) it would not be nice to users if qemu required explicit: > > -audiodev driver=none,id=audio0 -machine audiodev=au

[PATCH v6 4/5] vhost-user-scsi: start vhost when guest kicks

2023-09-22 Thread Li Feng
Let's keep the same behavior as vhost-user-blk. Some old guests kick virtqueue before setting VIRTIO_CONFIG_S_DRIVER_OK. Signed-off-by: Li Feng --- hw/scsi/vhost-user-scsi.c | 48 +++ 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/hw/scsi/vhos

[PATCH v6 2/5] vhost: move and rename the conn retry times

2023-09-22 Thread Li Feng
Multiple devices need this macro, move it to a common header. Signed-off-by: Li Feng Reviewed-by: Raphael Norwitz --- hw/block/vhost-user-blk.c | 4 +--- hw/virtio/vhost-user-gpio.c | 3 +-- include/hw/virtio/vhost.h | 2 ++ 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/

[PATCH v6 0/5] Implement reconnect for vhost-user-scsi

2023-09-22 Thread Li Feng
Changes for v6: - [PATCH] vhost-user: fix lost reconnect - Fix missing assign event_cb. Changes for v5: - No logic has been changed, just move part of the code from patch 4 to patch 5. Changes for v4: - Merge https://lore.kernel.org/all/20230830045722.611224-1-fen...@smartx.com/ to this ser

[PATCH v6 5/5] vhost-user: fix lost reconnect

2023-09-22 Thread Li Feng
When the vhost-user is reconnecting to the backend, and if the vhost-user fails at the get_features in vhost_dev_init(), then the reconnect will fail and it will not be retriggered forever. The reason is: When the vhost-user fails at get_features, the vhost_dev_cleanup will be called immediately.

[PATCH v6 1/5] vhost-user-common: send get_inflight_fd once

2023-09-22 Thread Li Feng
Currently the get_inflight_fd will be sent every time the device is started, and the backend will allocate shared memory to save the inflight state. If the backend finds that it receives the second get_inflight_fd, it will release the previous shared memory, which breaks inflight working logic. Th

[PATCH v6 3/5] vhost-user-scsi: support reconnect to backend

2023-09-22 Thread Li Feng
If the backend crashes and restarts, the device is broken. This patch adds reconnect for vhost-user-scsi. This patch also improves the error messages, and reports some silent errors. Tested with spdk backend. Signed-off-by: Li Feng --- hw/scsi/vhost-scsi-common.c | 16 +- hw/scsi/vh

Re: [PATCH v4] hw/i386/pc: improve physical address space bound check for 32-bit x86 systems

2023-09-22 Thread Ani Sinha
> On 22-Sep-2023, at 4:12 PM, Philippe Mathieu-Daudé wrote: > > On 22/9/23 06:16, Ani Sinha wrote: >> 32-bit x86 systems do not have a reserved memory for hole64. On those 32-bit >> systems without PSE36 or PAE CPU features, hotplugging memory devices are not >> supported by QEMU as QEMU alway

Re: [PATCH 0/2] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough'

2023-09-22 Thread Vitaly Kuznetsov
Vitaly Kuznetsov writes: > Vitaly Kuznetsov writes: > >> Vitaly Kuznetsov writes: >> >>> Hyper-V Gen1 guests are getting stuck on boot when 'hv-passthrough' is >>> used. While 'hv-passthrough' is a debug only feature, this significantly >>> limit its usefullness. While debugging the problem, I

Re: [PATCH 6/9] vt82c686: Support machine-default audiodev with fallback

2023-09-22 Thread BALATON Zoltan
On Fri, 22 Sep 2023, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini --- hw/isa/vt82c686.c | 2 ++ hw/mips/fuloong2e.c | 12 +--- hw/ppc/pegasos2.c | 10 -- hw/ppc/sam460ex.c | 2 ++ 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/

[PATCH RESEND 2/2] i386: Exclude 'hv-syndbg' from 'hv-passthrough'

2023-09-22 Thread Vitaly Kuznetsov
Windows with Hyper-V role enabled doesn't boot with 'hv-passthrough' when no debugger is configured, this significantly limits the usefulness of the feature as there's no support for subtracting Hyper-V features from CPU flags at this moment (e.g. "-cpu host,hv-passthrough,-hv-syndbg" does not work

[PATCH RESEND 1/2] i386: Fix conditional CONFIG_SYNDBG enablement

2023-09-22 Thread Vitaly Kuznetsov
Putting HYPERV_FEAT_SYNDBG entry under "#ifdef CONFIG_SYNDBG" in 'kvm_hyperv_properties' array is wrong: as HYPERV_FEAT_SYNDBG is not the highest feature number, the result is an empty (zeroed) entry in the array (and not a skipped entry!). hyperv_feature_supported() is designed to check that all C

[PATCH RESEND 0/2] i386: Fix Hyper-V Gen1 guests stuck on boot with 'hv-passthrough'

2023-09-22 Thread Vitaly Kuznetsov
Hyper-V Gen1 guests are getting stuck on boot when 'hv-passthrough' is used. While 'hv-passthrough' is a debug only feature, this significantly limit its usefullness. While debugging the problem, I found that there are two loosely connected issues: - 'hv-passthrough' enables 'hv-syndbg' and this is

Re: [PATCH v3 19/19] target/riscv/cpu: move priv spec functions to tcg-cpu.c

2023-09-22 Thread Philippe Mathieu-Daudé
On 20/9/23 13:20, Daniel Henrique Barboza wrote: Priv spec validation is TCG specific. Move it to the TCG accel class. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Andrew Jones --- target/riscv/cpu.c | 38 -- target/riscv/cpu.h | 2

Re: [PATCH v6 2/2] tpm: add backend for mssim

2023-09-22 Thread Stefan Berger
On 9/22/23 02:00, Markus Armbruster wrote: Found this cleaning out old mail, sorry for missing it until now! I think we owe James a quick decision wether we're willing to take the feature. Stefan, thoughts? I thought we discusses it back then. Does it handle snapshotting and migration corr

[PATCH] hw/acpi: changes towards enabling -Wshadow=local

2023-09-22 Thread Ani Sinha
Code changes in acpi that addresses all compiler complaints coming from enabling -Wshadow flags. Enabling -Wshadow catches cases of local variables shadowing other local variables or parameters. These makes the code confusing and/or adds bugs that are difficult to catch. The code is tested to buil

Re: [PATCH v4] hw/i386/pc: improve physical address space bound check for 32-bit x86 systems

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 14:00, Ani Sinha wrote: On 22-Sep-2023, at 4:12 PM, Philippe Mathieu-Daudé wrote: On 22/9/23 06:16, Ani Sinha wrote: 32-bit x86 systems do not have a reserved memory for hole64. On those 32-bit systems without PSE36 or PAE CPU features, hotplugging memory devices are not supporte

Re: [PATCH v6 2/2] tpm: add backend for mssim

2023-09-22 Thread Daniel P . Berrangé
On Fri, Sep 22, 2023 at 08:41:19AM -0400, Stefan Berger wrote: > > On 9/22/23 02:00, Markus Armbruster wrote: > > Found this cleaning out old mail, sorry for missing it until now! > > > > I think we owe James a quick decision wether we're willing to take the > > feature. Stefan, thoughts? > > I

Re: [PATCH v4] hw/i386/pc: improve physical address space bound check for 32-bit x86 systems

2023-09-22 Thread Ani Sinha
> On 22-Sep-2023, at 6:26 PM, Philippe Mathieu-Daudé wrote: > > On 22/9/23 14:00, Ani Sinha wrote: >>> On 22-Sep-2023, at 4:12 PM, Philippe Mathieu-Daudé >>> wrote: >>> >>> On 22/9/23 06:16, Ani Sinha wrote: 32-bit x86 systems do not have a reserved memory for hole64. On those 32

Re: [PATCH 8/9] audio: Make AUD_register_card fallible and require audiodev=

2023-09-22 Thread Philippe Mathieu-Daudé
On 22/9/23 11:44, Paolo Bonzini wrote: From: Martin Kletzander Now that all callers support error reporting with errp and all machine-default devices use an explicit audiodev, this can be changed. To make the detection easier make AUD_register_card() return false on error. Signed-off-by: Mart

Re: [PATCH v23 01/20] CPU topology: extend with s390 specifics

2023-09-22 Thread Markus Armbruster
Nina Schoetterl-Glausch writes: > On Wed, 2023-09-20 at 13:11 +0200, Markus Armbruster wrote: >> Nina Schoetterl-Glausch writes: >> >> > From: Pierre Morel >> > >> > S390 adds two new SMP levels, drawers and books to the CPU >> > topology. >> > S390 CPUs have specific topology features like d

[PATCH] target/arm: Fix CNTPCT_EL0 trapping from EL0 when HCR_EL2.E2H is 0

2023-09-22 Thread Michal Orzel
On an attempt to access CNTPCT_EL0 from EL0 using a guest running on top of Xen, a trap from EL2 was observed which is something not reproducible on HW (also, Xen does not trap accesses to physical counter). This is because gt_counter_access() checks for an incorrect bit (1 instead of 0) of CNTHCT

Re: [Qemu-devel] [PATCH 08/19] aspeed/timer: Fix behaviour running Linux

2023-09-22 Thread CĂ©dric Le Goater
Joel, Andrew, On 5/25/19 17:12, CĂ©dric Le Goater wrote: From: Joel Stanley The Linux kernel driver was updated in commit 4451d3f59f2a ("clocksource/drivers/fttmr010: Fix set_next_event handler) to fix an issue observed on hardware: > RELOAD register is loaded into COUNT register when the as

Re: [PATCH v6 2/2] tpm: add backend for mssim

2023-09-22 Thread Stefan Berger
On 9/22/23 09:02, Daniel P. Berrangé wrote: On Fri, Sep 22, 2023 at 08:41:19AM -0400, Stefan Berger wrote: On 9/22/23 02:00, Markus Armbruster wrote: Found this cleaning out old mail, sorry for missing it until now! I think we owe James a quick decision wether we're willing to take the featu

Re: [PATCH 6/9] vt82c686: Support machine-default audiodev with fallback

2023-09-22 Thread Paolo Bonzini
On Fri, Sep 22, 2023 at 2:17 PM BALATON Zoltan wrote: > > mc->default_cpu_type = POWERPC_CPU_TYPE_NAME("460exb"); > > mc->default_ram_size = 512 * MiB; > > mc->default_ram_id = "ppc4xx.sdram"; > > + > > +machine_add_audiodev_property(mc); > > This hunk has nothing to do with vt8268

Re: [PATCH 3/3] hw/arm/smmuv3: Advertise SMMUv3.1-XNX feature

2023-09-22 Thread Mostafa Saleh
Hi Peter, On Fri, Sep 22, 2023 at 11:54:06AM +0100, Peter Maydell wrote: > On Fri, 22 Sept 2023 at 11:34, Mostafa Saleh wrote: > > > > Hi Peter, > > > > On Thu, Sep 14, 2023 at 03:57:05PM +0100, Peter Maydell wrote: > > > The SMMUv3.1-XNX feature is mandatory for an SMMUv3.1 if S2P is > > > suppo

Re: [PATCH v2 09/12] hw/pci-host/gpex: Define properties for MMIO ranges

2023-09-22 Thread Sunil V L
Hi Igor, On Thu, Aug 24, 2023 at 07:59:39PM +0530, Sunil V L wrote: > ACPI DSDT generator needs information like ECAM range, PIO range, 32-bit > and 64-bit PCI MMIO range etc related to the PCI host bridge. Instead of > making these values machine specific, create properties for the GPEX host > br

[PATCH 1/1] configure: support passthrough of -Dxxx args to meson

2023-09-22 Thread Daniel P . Berrangé
This can be useful for setting some meson global options, such as the optimization level or debug state, which don't have an analogous option explicitly defined in QEMU's configure wrapper script. Signed-off-by: Daniel P. Berrangé --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH 0/1] Improve _FORTIFY_SOURCE robustness

2023-09-22 Thread Daniel P . Berrangé
This ensures that we don't turn on _FORTIFY_SOURCE when the user turns off optimizations via CFLAGS env variable. See patch 2 for the full details. Daniel P. Berrangé (1): configure: support passthrough of -Dxxx args to meson configure | 2 ++ 1 file changed, 2 insertions(+) -- 2.41.0

[PATCH 2/2] osdep: set _FORTIFY_SOURCE=2 when optimization is enabled

2023-09-22 Thread Daniel P . Berrangé
Currently we set _FORTIFY_SOURCE=2 as a compiler argument when the meson 'optimization' setting is non-zero, the compiler is GCC and the target is Linux. While the default QEMU optimization level is 2, user could override this by setting CFLAGS="-O0" or --extra-cflags="-O0" when running configure

[PATCH 0/2] Improve _FORTIFY_SOURCE robustness

2023-09-22 Thread Daniel P . Berrangé
This ensures that we don't turn on _FORTIFY_SOURCE when the user turns off optimizations via CFLAGS env variable. See patch 2 for the full details. Daniel P. Berrangé (2): configure: support passthrough of -Dxxx args to meson osdep: set _FORTIFY_SOURCE=2 when optimization is enabled configur

[PATCH 1/2] configure: support passthrough of -Dxxx args to meson

2023-09-22 Thread Daniel P . Berrangé
This can be useful for setting some meson global options, such as the optimization level or debug state, which don't have an analogous option explicitly defined in QEMU's configure wrapper script. Signed-off-by: Daniel P. Berrangé --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git

Re: [PATCH 09/11] hw/rx/rx62n: Use qdev_prop_set_array()

2023-09-22 Thread Markus Armbruster
Kevin Wolf writes: > Instead of manually setting "foo-len" and "foo[i]" properties, build a > QList and use the new qdev_prop_set_array() helper to set the whole > array property with a single call. > > Signed-off-by: Kevin Wolf > --- > hw/rx/rx62n.c | 19 ++- > 1 file changed,

  1   2   3   >