[PATCH v4] hw/arm/smmuv3: Add GBPA register

2023-02-10 Thread Mostafa Saleh
GBPA register can be used to globally abort all transactions. It is described in the SMMU manual in "6.3.14 SMMU_GBPA". ABORT reset value is IMPLEMENTATION DEFINED, it is chosen to be zero(Do not abort incoming transactions). Other fields have default values of Use Incoming. If UPDATE is not

[PULL 00/10] xenpvh machine

2023-02-10 Thread Stefano Stabellini
The following changes since commit 90595cc9396bb910b148391fea2e78dd8c6c8b27: Merge tag 'migration-20230209-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-02-10 10:50:21 +) are available in the Git repository at: https://gitlab.com/sstabellini/qemu.git xenpvh

[PULL 10/10] meson.build: enable xenpv machine build for ARM

2023-02-10 Thread Stefano Stabellini
From: Vikram Garhwal Add CONFIG_XEN for aarch64 device to support build for ARM targets. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Reviewed-by: Alex Bennée --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build

[PULL 02/10] hw/i386/xen: rearrange xen_hvm_init_pc

2023-02-10 Thread Stefano Stabellini
From: Vikram Garhwal In preparation to moving most of xen-hvm code to an arch-neutral location, move non IOREQ references to: - xen_get_vmport_regs_pfn - xen_suspend_notifier - xen_wakeup_notifier - xen_ram_init towards the end of the xen_hvm_init_pc() function. This is done to keep the common

Re: [PATCH 15/22] target/arm: Use get_phys_addr_with_struct in S1_ptw_translate

2023-02-10 Thread Peter Maydell
On Tue, 24 Jan 2023 at 00:01, Richard Henderson wrote: > > Do not provide a fast-path for physical addresses, > as those will need to be validated for GPC. > > Signed-off-by: Richard Henderson > --- > target/arm/ptw.c | 35 ++- > 1 file changed, 14 insertions(+),

Re: [PATCH 16/22] target/arm: Move s1_is_El0 into S1Translate

2023-02-10 Thread Peter Maydell
On Tue, 24 Jan 2023 at 00:02, Richard Henderson wrote: > > Instead of passing this to get_phys_addr_lpae, stash it > in the S1Translate structure. > > Signed-off-by: Richard Henderson > --- > target/arm/ptw.c | 21 +++-- > 1 file changed, 7 insertions(+), 14 deletions(-) > >

Re: [PATCH v15 00/11] s390x: CPU Topology

2023-02-10 Thread Pierre Morel
On 2/9/23 18:14, Nina Schoetterl-Glausch wrote: IMO this series looks good overall and like it's nearing the final stages. Thank you for your helping this. You use "polarity" instead of "polarization" a lot. Since the PoP uses polarization I think that term would be preferred. OK

Re: [PATCH v10 30/59] hw/xen: Implement EVTCHNOP_close

2023-02-10 Thread Paul Durrant
On 01/02/2023 14:31, David Woodhouse wrote: From: David Woodhouse It calls an internal close_port() helper which will also be used from EVTCHNOP_reset and will actually do the work to disconnect/unbind a port once any of that is actually implemented in the first place. That in turn calls a

Re: [PATCH] include/hw: Do not include hw.h from headers

2023-02-10 Thread Bastian Koppelmann
On Fri, Feb 10, 2023 at 12:28:35PM +0100, Thomas Huth wrote: > This include is not needed here, so drop that line. > > Signed-off-by: Thomas Huth > --- > include/hw/ssi/ibex_spi_host.h | 1 - > include/hw/tricore/tricore_testdevice.h | 1 - > 2 files changed, 2 deletions(-) > > diff

Re: [PATCH 17/22] target/arm: Use get_phys_addr_with_struct for stage2

2023-02-10 Thread Peter Maydell
On Tue, 24 Jan 2023 at 00:01, Richard Henderson wrote: > > This fixes a bug in which we failed to initialize > the result attributes properly after the memset. > > Signed-off-by: Richard Henderson > --- > target/arm/ptw.c | 13 + > 1 file changed, 1 insertion(+), 12 deletions(-) > >

Re: QAPI unions as branches / unifying struct and union types (was: [PATCH v2 2/6] migration: Updated QAPI format for 'migrate' qemu monitor command)

2023-02-10 Thread Het Gala
On 10/02/23 12:54 pm, Markus Armbruster wrote: Daniel P. Berrangé writes: [...] +## +# @MigrateAddress: +# +# The options available for communication transport mechanisms for migration +# +# Since 8.0 +## +{ 'union' : 'MigrateAddress', + 'base' : { 'transport' : 'MigrateTransport'}, +

Re: [PATCH] target/i386: Remove pointless env_archcpu() in helper_rdmsr()

2023-02-10 Thread Daniel Henrique Barboza
On 2/10/23 09:57, Philippe Mathieu-Daudé wrote: We have a X86CPU *cpu pointer available at the start of the function. Inspired-by: Daniel Henrique Barboza Signed-off-by: Philippe Mathieu-Daudé --- Reviewed-by: Daniel Henrique Barboza target/i386/tcg/sysemu/misc_helper.c | 2 +- 1

Re: [PATCH v10 31/59] hw/xen: Implement EVTCHNOP_unmask

2023-02-10 Thread Paul Durrant
On 01/02/2023 14:31, David Woodhouse wrote: From: David Woodhouse This finally comes with a mechanism for actually injecting events into the guest vCPU, with all the atomic-test-and-set that's involved in setting the bit in the shinfo, then the index in the vcpu_info, and injecting either the

Re: [PATCH 18/22] target/arm: Add GPC syndrome

2023-02-10 Thread Peter Maydell
On Tue, 24 Jan 2023 at 00:02, Richard Henderson wrote: > > The function takes the fields as filled in by > the Arm ARM pseudocode for TakeGPCException. > > Signed-off-by: Richard Henderson > --- > target/arm/syndrome.h | 9 + > 1 file changed, 9 insertions(+) > > diff --git

[PATCH 04/11] target/riscv: introduce riscv_cpu_cfg()

2023-02-10 Thread Daniel Henrique Barboza
We're going to do changes that requires accessing the RISCVCPUConfig struct from the RISCVCPU, having access only to a CPURISCVState 'env' pointer. Add a helper to make the code easier to read. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.h | 5 + 1 file changed, 5

[PATCH 11/11] target/riscv/cpu: remove CPUArchState::features and friends

2023-02-10 Thread Daniel Henrique Barboza
The attribute is no longer used since we can retrieve all the enabled features in the hart by using cpu->cfg instead. Remove env->feature, riscv_feature() and riscv_set_feature(). We also need to bump vmstate_riscv_cpu version_id and minimal_version_id since 'features' is no longer being

[PATCH 09/11] hw/riscv/virt.c: do not use RISCV_FEATURE_MMU in create_fdt_socket_cpus()

2023-02-10 Thread Daniel Henrique Barboza
Read cpu_ptr->cfg.mmu directly. As a bonus, use cpu_ptr in riscv_isa_string(). Signed-off-by: Daniel Henrique Barboza --- hw/riscv/virt.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 86c4adc0c9..8ab6a3ec16 100644 ---

[PATCH 02/11] target/riscv: allow users to actually write the MISA CSR

2023-02-10 Thread Daniel Henrique Barboza
At this moment, and apparently since ever, we have no way of enabling RISCV_FEATURE_MISA. This means that all the code from write_misa(), all the nuts and bolts that handles how to properly write this CSR, has always been a no-op as well because write_misa() will always exit earlier. This seems

[PATCH 07/11] target/riscv: remove RISCV_FEATURE_EPMP

2023-02-10 Thread Daniel Henrique Barboza
RISCV_FEATURE_EPMP is always set to the same value as the cpu->cfg.epmp flag. Use the flag directly. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 10 +++--- target/riscv/cpu.h | 1 - target/riscv/csr.c | 2 +- target/riscv/pmp.c | 4 ++-- 4 files changed, 6

[PATCH 05/11] target/riscv: remove RISCV_FEATURE_DEBUG

2023-02-10 Thread Daniel Henrique Barboza
RISCV_FEATURE_DEBUG will always follow the value defined by cpu->cfg.debug flag. Read the flag instead. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c| 6 +- target/riscv/cpu.h| 1 - target/riscv/cpu_helper.c | 2 +- target/riscv/csr.c| 2 +-

Re: [PULL 00/17] Migration 20230209 patches

2023-02-10 Thread Peter Maydell
On Thu, 9 Feb 2023 at 23:35, Juan Quintela wrote: > > The following changes since commit 417296c8d8588f782018d01a317f88957e9786d6: > > tests/qtest/netdev-socket: Raise connection timeout to 60 seconds > (2023-02-09 11:23:53 +) > > are available in the Git repository at: > >

[PATCH 00/11] enable write_misa() and RISCV_FEATURE_* cleanups

2023-02-10 Thread Daniel Henrique Barboza
Hi, Initially this was supposed to be just the first 2 patches, where we enable users to be able to actually write the MISA CSR (yes, at this moment all the code in write_misa() is a no-op). During an internal discussion of that code, Andrew Jones pointed out that I was setting

[PATCH 01/11] target/riscv: do not mask unsupported QEMU extensions in write_misa()

2023-02-10 Thread Daniel Henrique Barboza
The masking done using env->misa_ext_mask already filters any extension that QEMU doesn't support. If the hart supports the extension then QEMU supports it as well. If the masking done by env->misa_ext_mask is somehow letting unsupported QEMU extensions pass by, misa_ext_mask itself needs to be

[PATCH 08/11] target/riscv: remove RISCV_FEATURE_PMP

2023-02-10 Thread Daniel Henrique Barboza
RISCV_FEATURE_PMP is being set via riscv_set_feature() by mirroring the cpu->cfg.pmp flag. Use the flag instead. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.c| 4 target/riscv/cpu.h| 1 - target/riscv/cpu_helper.c | 2 +- target/riscv/csr.c| 2 +-

[PATCH 10/11] target/riscv: remove RISCV_FEATURE_MMU

2023-02-10 Thread Daniel Henrique Barboza
RISCV_FEATURE_MMU is set whether cpu->cfg.mmu is set, so let's just use the flag directly instead. With this change the enum is also removed. It is worth noticing that this enum, and all the RISCV_FEATURES_* that were contained in it, predates the existence of the cpu->cfg object. Today, using

[PATCH 03/11] target/riscv: remove RISCV_FEATURE_MISA

2023-02-10 Thread Daniel Henrique Barboza
This enum is no longer used after write_misa() started reading the value from cpu->cfg.misa_w. Signed-off-by: Daniel Henrique Barboza --- target/riscv/cpu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 103963b386..6509ffa951 100644 ---

[PATCH 06/11] target/riscv/cpu.c: error out if EPMP is enabled without PMP

2023-02-10 Thread Daniel Henrique Barboza
Instead of silently ignoring the EPMP setting if there is no PMP available, error out informing the user that EPMP depends on PMP support: $ ./qemu-system-riscv64 -cpu rv64,pmp=false,x-epmp=true qemu-system-riscv64: Invalid configuration: EPMP requires PMP support This will force users to pick

Re: [PATCH v3 13/15] qapi: add HOTPLUG_STATE event

2023-02-10 Thread Vladimir Sementsov-Ogievskiy
On 10.02.23 15:01, Markus Armbruster wrote: What do @hotplug-device and @device name? Are these qdev-id? What kind of paths are @hotplug-path and @path? Are these paths to an object device in the QOM tree? Which object? device / path is same name and path as for DEVICE_DELETED Got it. But

[PATCH] vhost: avoid a potential use of an uninitialized variable in vhost_svq_poll()

2023-02-10 Thread Carlos López
In vhost_svq_poll(), if vhost_svq_get_buf() fails due to a device providing invalid descriptors, len is left uninitialized and returned to the caller, potentally leaking stack data or causing undefined behavior. Fix this by initializing len to 0. Found with GCC 13 and -fanalyzer (abridged):

[PATCH v1] Adding new machine Yosemitev2 in QEMU

2023-02-10 Thread Karthikeyan Pasupathi
This patch support Yosemitev2 in QEMU environment. Signed-off-by: Karthikeyan Pasupathi --- hw/arm/aspeed.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 27dda58338..74dc07190d 100644 --- a/hw/arm/aspeed.c +++

Re: [RFC PATCH] Do not include "qemu/error-report.h" in headers that do not need it

2023-02-10 Thread Markus Armbruster
Thomas Huth writes: > Include it in the .c files instead that use the error reporting > functions. > > Signed-off-by: Thomas Huth > --- > RFC since it's more lines of code - but I think it's still cleaner > this way. Yes, please! Reviewed-by: Markus Armbruster

[PATCH] libvhost-user: check for NULL when allocating a virtqueue element

2023-02-10 Thread Carlos López
Check the return value for malloc(), avoiding a NULL pointer dereference, and propagate error in function callers. Found with GCC 13 and -fanalyzer: ../subprojects/libvhost-user/libvhost-user.c: In function ‘virtqueue_alloc_element’: ../subprojects/libvhost-user/libvhost-user.c:2556:19: error:

[PATCH v1] Adding new machine Tiogapass in QEMU

2023-02-10 Thread Karthikeyan Pasupathi
This patch support tiogapass in QEMU environment. Signed-off-by: Karthikeyan Pasupathi --- hw/arm/aspeed.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 27dda58338..279ba60743 100644 --- a/hw/arm/aspeed.c +++

Re: [PATCH v10 32/59] hw/xen: Implement EVTCHNOP_bind_virq

2023-02-10 Thread Paul Durrant
On 01/02/2023 14:31, David Woodhouse wrote: From: David Woodhouse Add the array of virq ports to each vCPU so that we can deliver timers, debug ports, etc. Global virqs are allocated against vCPU 0 initially, but can be migrated to other vCPUs (when we implement that). The kernel needs to

Re: [PATCH v3 14/15] qapi: introduce DEVICE_ON event

2023-02-10 Thread Vladimir Sementsov-Ogievskiy
On 10.02.23 00:37, Philippe Mathieu-Daudé wrote: On 9/2/23 21:08, Vladimir Sementsov-Ogievskiy wrote: We have DEVICE_DELETED event, that signals that device_del command is actually complited. But we don't have a counter-part for device_add. Still it's sensible for SHPC and PCIe-native hotplug,

Re: [PATCH 19/22] target/arm: Implement GPC exceptions

2023-02-10 Thread Peter Maydell
On Tue, 24 Jan 2023 at 00:02, Richard Henderson wrote: > > Handle GPC Fault types in arm_deliver_fault, reporting as > either a GPC exception at EL3, or falling through to insn > or data aborts at various exception levels. > > Signed-off-by: Richard Henderson > +static unsigned

Re: [PATCH v3 15/15] qapi: introduce query-hotplug command

2023-02-10 Thread Vladimir Sementsov-Ogievskiy
On 10.02.23 13:09, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add a command that returns same information like HOTPLUG_STATE event. Signed-off-by: Vladimir Sementsov-Ogievskiy Events and queries commonly come paired: management applications want the event so they don't

Re: [PATCH v10 33/59] hw/xen: Implement EVTCHNOP_bind_ipi

2023-02-10 Thread Paul Durrant
On 01/02/2023 14:31, David Woodhouse wrote: From: David Woodhouse Signed-off-by: David Woodhouse --- hw/i386/kvm/xen_evtchn.c | 69 +++ hw/i386/kvm/xen_evtchn.h | 2 ++ target/i386/kvm/xen-emu.c | 15 + 3 files changed, 86 insertions(+)

Re: [PATCH v10 06/12] vfio/migration: Block multiple devices migration

2023-02-10 Thread Cédric Le Goater
On 2/9/23 20:20, Avihai Horon wrote: Currently VFIO migration doesn't implement some kind of intermediate quiescent state in which P2P DMAs are quiesced before stopping or running the device. This can cause problems in multi-device migration where the devices are doing P2P DMAs, since the

Re: [PATCH v10 34/59] hw/xen: Implement EVTCHNOP_send

2023-02-10 Thread Paul Durrant
On 01/02/2023 14:31, David Woodhouse wrote: From: David Woodhouse Signed-off-by: David Woodhouse --- hw/i386/kvm/xen_evtchn.c | 180 ++ hw/i386/kvm/xen_evtchn.h | 2 + target/i386/kvm/xen-emu.c | 12 +++ 3 files changed, 194 insertions(+)

Re: [PATCH v3 7/7] qapi: remove JSON value FIXME

2023-02-10 Thread Markus Armbruster
John Snow writes: > With the two major JSON-ish type hierarchies clarified for distinct > purposes; QAPIExpression for parsed expressions and JSONValue for The comment you remove talks about _ExprValue, not QAPIExpression. > introspection data, remove this FIXME as no longer an action item. >

Re: [PATCH v3 5/7] qapi/parser: add QAPIExpression type

2023-02-10 Thread Markus Armbruster
John Snow writes: > This patch creates a new type, QAPIExpression, which represents a parsed > expression complete with QAPIDoc and QAPISourceInfo. > > This patch turns parser.exprs into a list of QAPIExpression instead, > and adjusts expr.py to match. > > This allows the types we specify in

Re: [PATCH v2 6/7] CI: Stop building docs on centos8

2023-02-10 Thread Paolo Bonzini
Il ven 10 feb 2023, 19:09 Peter Maydell ha scritto: > On Fri, 10 Feb 2023 at 17:55, John Snow wrote: > > (The problem with just allowing sphinx to be a black box and > > continuing to happily use the 3.6-based versions is that we are > > using QAPIDoc extensions from our own codebase, which

[PATCH 1/3] hw/rtc/mc146818rtc: Rename RTCState -> MC146818RtcState

2023-02-10 Thread Philippe Mathieu-Daudé
RTCState only represents a Motorola MC146818 model, not any RTC chipset. Rename the structure as MC146818RtcState using: $ sed -i -e s/RTCState/MC146818RtcState/g $(git grep -wl RTCState) Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/piix4.c | 2 +- hw/isa/vt82c686.c

Re: [PATCH] target/riscv: avoid env_archcpu() in cpu_get_tb_cpu_state()

2023-02-10 Thread weiwei
On 2023/2/10 20:38, Daniel Henrique Barboza wrote: We have a RISCVCPU *cpu pointer available at the start of the function. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Weiwei Li Regards, Weiwei Li --- target/riscv/cpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v1 RFC Zisslpcfi 1/9] target/riscv: adding zimops and zisslpcfi extension to RISCV cpu config

2023-02-10 Thread weiwei
On 2023/2/9 14:23, Deepak Gupta wrote: Introducing riscv `zisslpcfi` extension to riscv target. `zisslpcfi` extension provides hardware assistance to riscv hart to enable control flow integrity (CFI) for software. `zisslpcfi` extension expects hart to implement `zimops`. `zimops` stands for

[PATCH 0/3] hw/rtc: Rename RTCState -> MC146818RtcState and adapt API

2023-02-10 Thread Philippe Mathieu-Daudé
rtc_get_memory() and rtc_set_memory() helpers only work with MC146818 RTC devices, not any ISA device. Rename accordingly including 'MC146818' in the method names. Philippe Mathieu-Daudé (3): hw/rtc/mc146818rtc: Rename RTCState -> MC146818RtcState hw/rtc/mc146818rtc: Pass MC146818RtcState

[PATCH 2/3] hw/rtc/mc146818rtc: Pass MC146818RtcState instead of ISADevice argument

2023-02-10 Thread Philippe Mathieu-Daudé
rtc_get_memory() and rtc_set_memory() methods can not take any TYPE_ISA_DEVICE object. They expect a TYPE_MC146818_RTC one. Simplify the API by passing a MC146818RtcState. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/microvm.c| 6 ++ hw/i386/pc.c | 16

[PATCH 3/3] hw/rtc: Rename rtc_[get|set]_memory -> mc146818rtc_[get|set]_cmos_data

2023-02-10 Thread Philippe Mathieu-Daudé
rtc_get_memory() and rtc_set_memory() helpers only work with TYPE_MC146818_RTC devices. 'memory' in their name refer to the CMOS region. Rename them as mc146818rtc_get_cmos_data() and mc146818rtc_set_cmos_data() to be explicit about what they are doing. Mechanical change doing: $ sed -i -e

Re: [PATCH 02/11] target/riscv: allow users to actually write the MISA CSR

2023-02-10 Thread weiwei
On 2023/2/10 21:36, Daniel Henrique Barboza wrote: At this moment, and apparently since ever, we have no way of enabling RISCV_FEATURE_MISA. This means that all the code from write_misa(), all the nuts and bolts that handles how to properly write this CSR, has always been a no-op as well

[PATCH 6/9] bsd-user: common routine do_freebsd_sysctl_oid for all sysctl variants

2023-02-10 Thread Warner Losh
From: Juergen Lock do_freebsd_sysctl_oid filters out some of the binary and special sysctls where host != target. This commit focuses on the simple sysctls that can be done in a few lines. Signed-off-by: Juergen Lock Co-Authored-by: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Warner

[PATCH 7/9] bsd-user: do_freebsd_sysctl helper for sysctl(2)

2023-02-10 Thread Warner Losh
From: Kyle Evans Implement the wrapper function for sysctl(2). This puts the oid arguments into a standard form and calls the common do_freebsd_sysctl_oid. Signed-off-by: Kyle Evans Co-Authored-by: Juergen Lock Signed-off-by: Juergen Lock Co-Authored-by: Stacey Son Signed-off-by: Stacey Son

[PATCH 8/9] bsd-user: implement sysctlbyname(2)

2023-02-10 Thread Warner Losh
From: Kyle Evans do_freebsd_sysctlbyname needs to translate the 'name' back down to a OID so we can intercept the special ones. Do that and call the common wrapper do_freebsd_sysctl_oid. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 58

[PATCH 3/9] bsd-user: Add sysarch syscall

2023-02-10 Thread Warner Losh
From: Stacey Son Connect up the sysarch system call. Signed-off-by: Juergen Lock Co-authored-by: Juergen Lock Signed-off-by: Stacey Son Reviewed-by: Warner Losh Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 1/9] bsd-user: Don't truncate the return value from freebsd_syscall

2023-02-10 Thread Warner Losh
From: Doug Rabson System call return values on FreeBSD are in a register (which is spelled api_long in qemu). This was being assigned into an int variable which causes problems for 64bit targets. Resolves: https://github.com/qemu-bsd-user/qemu-bsd-user/issues/40 Signed-off-by: Doug Rabson

[PATCH 2/9] build: Don't specify -no-pie for --static user-mode programs

2023-02-10 Thread Warner Losh
When building with clang, -no-pie gives a warning on every single build, so remove it. Signed-off-by: Warner Losh --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 64960c6000f..eb284ccf308 100755 --- a/configure +++ b/configure @@

[PATCH 5/9] bsd-user: sysctl helper funtions: sysctl_name2oid and sysctl_oidfmt

2023-02-10 Thread Warner Losh
From: Juergen Lock Helper functions for sysctl implementations. sysctl_name2oid and sysctl_oidfmt convert oids between host and targets Signed-off-by: Juergen Lock Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 18 ++ 1 file changed, 18 insertions(+) diff --git

Re: [PATCH 01/11] target/riscv: do not mask unsupported QEMU extensions in write_misa()

2023-02-10 Thread weiwei
On 2023/2/10 21:36, Daniel Henrique Barboza wrote: The masking done using env->misa_ext_mask already filters any extension that QEMU doesn't support. If the hart supports the extension then QEMU supports it as well. If the masking done by env->misa_ext_mask is somehow letting unsupported QEMU

Re: [PATCH v3 6/7] qapi: remove _JSONObject

2023-02-10 Thread Markus Armbruster
John Snow writes: > We can remove this alias as it only has two usages now, and no longer > pays for the confusion of "yet another type". > > Signed-off-by: John Snow Reviewed-by: Markus Armbruster

[PULL 04/10] xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common

2023-02-10 Thread Stefano Stabellini
From: Stefano Stabellini This patch does following: 1. creates arch_handle_ioreq() and arch_xen_set_memory(). This is done in preparation for moving most of xen-hvm code to an arch-neutral location, move the x86-specific portion of xen_set_memory to arch_xen_set_memory. Also, move

[PULL 09/10] hw/arm: introduce xenpvh machine

2023-02-10 Thread Stefano Stabellini
From: Vikram Garhwal Add a new machine xenpvh which creates a IOREQ server to register/connect with Xen Hypervisor. Optional: When CONFIG_TPM is enabled, it also creates a tpm-tis-device, adds a TPM emulator and connects to swtpm running on host machine via chardev socket and support TPM

[PULL 03/10] hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState

2023-02-10 Thread Stefano Stabellini
From: Stefano Stabellini In preparation to moving most of xen-hvm code to an arch-neutral location, move: - shared_vmport_page - log_for_dirtybit - dirty_bitmap - suspend - wakeup out of XenIOState struct as these are only used on x86, especially the ones related to dirty logging. Updated

[PULL 06/10] hw/xen/xen-hvm-common: skip ioreq creation on ioreq registration failure

2023-02-10 Thread Stefano Stabellini
From: Stefano Stabellini On ARM it is possible to have a functioning xenpv machine with only the PV backends and no IOREQ server. If the IOREQ server creation fails continue to the PV backends initialization. Also, moved the IOREQ registration and mapping subroutine to new function

[PULL 05/10] include/hw/xen/xen_common: return error from xen_create_ioreq_server

2023-02-10 Thread Stefano Stabellini
From: Stefano Stabellini This is done to prepare for enabling xenpv support for ARM architecture. On ARM it is possible to have a functioning xenpv machine with only the PV backends and no IOREQ server. If the IOREQ server creation fails, continue to the PV backends initialization.

[PULL 07/10] hw/xen/xen-hvm-common: Use g_new and error_report

2023-02-10 Thread Stefano Stabellini
From: Vikram Garhwal Replace g_malloc with g_new and perror with error_report. Signed-off-by: Vikram Garhwal Reviewed-by: Stefano Stabellini Reviewed-by: Paul Durrant --- hw/xen/xen-hvm-common.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

[PULL 01/10] hw/i386/xen/: move xen-mapcache.c to hw/xen/

2023-02-10 Thread Stefano Stabellini
From: Vikram Garhwal xen-mapcache.c contains common functions which can be used for enabling Xen on aarch64 with IOREQ handling. Moving it out from hw/i386/xen to hw/xen to make it accessible for both aarch64 and x86. Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini

[PULL 08/10] meson.build: do not set have_xen_pci_passthrough for aarch64 targets

2023-02-10 Thread Stefano Stabellini
From: Stefano Stabellini have_xen_pci_passthrough is only used for Xen x86 VMs. Signed-off-by: Stefano Stabellini Reviewed-by: Alex Bennée --- meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meson.build b/meson.build index c626ccfa82..fb9fb97bb1 100644 --- a/meson.build +++

Re: [PATCH v1 RFC Zisslpcfi 2/9] target/riscv: zisslpcfi CSR, bit positions and other definitions

2023-02-10 Thread weiwei
On 2023/2/9 14:23, Deepak Gupta wrote: `zisslpcfi` extension adds two new CSRs. CSR_SSP and CSR_LPLR. - CSR_SSP: This CSR holds shadow stack pointer for current privilege mode CSR_SSP is accessible in all modes. Each mode must establish it's own CSR_SSP. - CSR_LPLR:

[PATCH v2] [PING^3] target/i386/gdbstub: Fix a bug about order of FPU stack in 'g' packets.

2023-02-10 Thread TaiseiIto
This is a ping to the patch below. https://patchew.org/QEMU/ty0pr0101mb4285923fbe9ad97ce832d95ba4...@ty0pr0101mb4285.apcprd01.prod.exchangelabs.com/ Before this commit, when GDB attached an OS working on QEMU, order of FPU stack registers printed by GDB command 'info float' was wrong. There was

Re: [PATCH v4 4/4] ram: Document migration ram flags

2023-02-10 Thread Eric Blake
On Fri, Feb 10, 2023 at 12:37:30AM +0100, Juan Quintela wrote: > 0x80 is RAM_SAVE_FLAG_HOOK, it is in qemu-file now. > Bigger usable flag is 0x200, noticing that. > We can reuse RAM_SAVe_FLAG_FULL. SAVE > > Signed-off-by: Juan Quintela > --- > migration/ram.c | 12 > 1 file

[PATCH 0/9] 2023 Q1 bsd-user upstreaming: bugfixes and sysctl

2023-02-10 Thread Warner Losh
This group of patches gets the basic framework for sysctl upstreamed. There's a lot more to translate far too many binary blobs the kernel publishes via sysctls, but I'm leaving those out in the name of simplicity. There's also a bug fix from Doug Rabson that fixes a long int confusion leading to

[PATCH 4/9] bsd-user: Two helper routines oidfmt and sysctl_oldcvt

2023-02-10 Thread Warner Losh
From: Stacey Son oidfmt uses undocumented system call to get the type of the sysctl. sysctl_oldcvt does the byte swapping in the data to return it to the target. Co-Authored-by: Sean Bruno Signed-off-by: Sean Bruno Co-Authored-by: Juergen Lock Signed-off-by: Juergen Lock Co-Authored-by:

[PATCH 9/9] bsd-user: Add -strict

2023-02-10 Thread Warner Losh
Most of the time, it's useful to make our best effort, but sometimes we want to know right away when we don't implement something. First place we use it is for unknown syscalls. Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 4 bsd-user/main.c | 5 -

Re: [PATCH] xen/pt: fix igd passthrough for pc machine with xen accelerator

2023-02-10 Thread Stefano Stabellini
On Tue, 7 Feb 2023, Chuck Zmudzinski wrote: > Commit 998250e97661 ("xen, gfx passthrough: register host bridge specific > to passthrough") uses the igd-passthrough-i440FX pci host device with > the xenfv machine type and igd-passthru=on, but using it for the pc > machine type, xen accelerator, and

Re: [PATCH v2 2/6] migration: Updated QAPI format for 'migrate' qemu monitor command

2023-02-10 Thread Het Gala
On 09/02/23 6:52 pm, Daniel P. Berrangé wrote: On Thu, Feb 09, 2023 at 06:41:41PM +0530, Het Gala wrote: On 09/02/23 3:59 pm, Daniel P. Berrangé wrote: On Wed, Feb 08, 2023 at 09:35:56AM +, Het Gala wrote: Existing 'migrate' QAPI design enforces transport mechanism, ip address of

Re: Expose support for HyperV features via QMP

2023-02-10 Thread manish.mishra
On 09/02/23 7:47 pm, Vitaly Kuznetsov wrote: Alex Bennée writes: "manish.mishra" writes: Hi Everyone, Checking if there is any feedback on this. I've expanded the CC list to some relevant maintainers and people who have touched that code in case this was missed. Thanks Manish Mishra

Re: [PATCH] hw/misc/sga: Remove the deprecated "sga" device

2023-02-10 Thread Gerd Hoffmann
On Thu, Feb 09, 2023 at 05:15:40PM +0100, Thomas Huth wrote: > It's been deprecated since QEMU v6.2, so it should be OK to > finally remove this now. > > Signed-off-by: Thomas Huth Acked-by: Gerd Hoffmann

VM crashed while hot-plugging memory

2023-02-10 Thread Yangming via
Hello all: I found VM crashed while hot-plugging memory. Base infomation: qemu version: qemu-master requirements: hugepages, virtio-gpu It happens by the following steps: 1. Booting a VM with hugepages and a virtio-gpu device. 2. Connecting VNC of the VM. 3. After the VM booted, hot-plugging

Re: [PULL 01/30] migration: Fix migration crash when target psize larger than host

2023-02-10 Thread Michael Tokarev
07.02.2023 03:56, Juan Quintela wrote: From: Peter Xu Commit d9e474ea56 overlooked the case where the target psize is even larger than the host psize. One example is Alpha has 8K page size and migration will start to crash the source QEMU when running Alpha migration on x86. Fix it by

Re: [PATCH v3 15/15] qapi: introduce query-hotplug command

2023-02-10 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add a command that returns same information like HOTPLUG_STATE event. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Events and queries commonly come paired: management applications want the event so they don't have to poll, and they want the query so

Re: [PATCH v2 2/6] migration: Updated QAPI format for 'migrate' qemu monitor command

2023-02-10 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, Feb 09, 2023 at 10:23:43AM +, Daniel P. Berrangé wrote: [...] >> I don't know the backstory on this limitation. Is it something that >> is very difficult to resolve ? I think it is highly desirable to have >> 'socket': 'SocketAddress' here. It would be

Re: [PATCH v2 6/7] CI: Stop building docs on centos8

2023-02-10 Thread Peter Maydell
On Fri, 10 Feb 2023 at 00:31, John Snow wrote: > > CentOS 8 does not ship with a sphinx new enough for our purposes (It > necessarily uses Python 3.6), so drop this from this build. We can > resume building docs on CentOS 9 if we wish, but we also currently test > and build docs on Fedora,

Re: [PATCH v3 13/15] qapi: add HOTPLUG_STATE event

2023-02-10 Thread Vladimir Sementsov-Ogievskiy
On 10.02.23 00:28, Philippe Mathieu-Daudé wrote: On 9/2/23 21:08, Vladimir Sementsov-Ogievskiy wrote: For PCIe and SHPC hotplug it's important to track led indicators, especially the power led. Add an event that helps. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   qapi/qdev.json   |

Re: [PATCH V2 1/4] qapi: strList_from_string

2023-02-10 Thread Markus Armbruster
Steven Sistare writes: > On 2/9/2023 1:59 PM, Markus Armbruster wrote: >> Steven Sistare writes: >>> On 2/9/2023 11:46 AM, Markus Armbruster wrote: Steven Sistare writes: [...] > For more context, this patch has been part of my larger series for live > update, > and I am

Re: [PULL 09/11] target/i386: Fix BEXTR instruction

2023-02-10 Thread Michael Tokarev
08.02.2023 20:19, Paolo Bonzini wrote: From: Richard Henderson There were two problems here: not limiting the input to operand bits, and not correctly handling large extraction length. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1372 Signed-off-by: Richard Henderson Message-Id:

Re: [PATCH v3 13/15] qapi: add HOTPLUG_STATE event

2023-02-10 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > For PCIe and SHPC hotplug it's important to track led indicators, > especially the power led. Add an event that helps. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > qapi/qdev.json | 62 >

Re: [PATCH 5/7] testing: Add Python >= 3.7 to Centos, OpenSuSE

2023-02-10 Thread Daniel P . Berrangé
On Thu, Feb 09, 2023 at 10:40:32AM -0500, John Snow wrote: > This is just a proof-of-concept patch, as these files are lcitool > generated. The real fix will involve updating the lcitool configuration > and updating these files that way. Paolo has been working on this

Re: [PATCH v2 3/7] configure: Look for auxiliary Python installations

2023-02-10 Thread Paolo Bonzini
On 2/10/23 01:31, John Snow wrote: At the moment, we look for just "python3" and "python", which is good enough almost all of the time. But ... if you are on a platform that uses an older Python by default and only offers a newer Python as an option, you'll have to specify --python=/usr/bin/foo

Re: [PULL 0/6] Block patches

2023-02-10 Thread Peter Maydell
On Thu, 9 Feb 2023 at 15:25, Stefan Hajnoczi wrote: > > The following changes since commit 417296c8d8588f782018d01a317f88957e9786d6: > > tests/qtest/netdev-socket: Raise connection timeout to 60 seconds > (2023-02-09 11:23:53 +) > > are available in the Git repository at: > >

Re: [PATCH V2 0/4] string list functions

2023-02-10 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Tue, Feb 07, 2023 at 10:48:43AM -0800, Steve Sistare wrote: >> Add some handy string list functions, for general use now, and for >> eventual use in the cpr/live update patches. >> >> Steve Sistare (4): >> qapi: strList_from_string >> qapi: QAPI_LIST_LENGTH

Re: [PATCH v3 2/6] migration: Updated QAPI format for 'migrate' qemu monitor command

2023-02-10 Thread Markus Armbruster
Just a quick one on naming before I forget: Het Gala writes: > Existing 'migrate' QAPI design enforces transport mechanism, ip address > of destination interface and corresponding port number in the form > of a unified string 'uri' parameter for initiating a migration stream. > This scheme has

Re: [PATCH v2 0/7] Python: Drop support for Python 3.6

2023-02-10 Thread Markus Armbruster
First, a plea. Supporting 3.6 has made a few of us prisoners dragging ball and chain. So, please, *please* let us cut of these leg irons! The series does not include follow-up cleanups. Fine with me.

Re: [PATCH 6/7] CI: Stop building docs on centos8

2023-02-10 Thread Paolo Bonzini
On 2/10/23 00:32, John Snow wrote: It's possible to teach lcitool to use pip instead to install docutils, sphinx and sphinx-rtd-theme I will say that once upon a time, Peter Maydell expressed a preference to use the version(s) of sphinx managed by the distro instead of swallowing it into the

[PATCH] include/hw/i386: Clean up includes in x86.h

2023-02-10 Thread Thomas Huth
nmi.h and notify.h are not needed here. Signed-off-by: Thomas Huth --- include/hw/i386/x86.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index 62fa5774f8..b5dd3979a0 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -18,11

Re: [PATCH v3 13/15] qapi: add HOTPLUG_STATE event

2023-02-10 Thread Philippe Mathieu-Daudé
On 10/2/23 11:47, Vladimir Sementsov-Ogievskiy wrote: On 10.02.23 00:28, Philippe Mathieu-Daudé wrote: On 9/2/23 21:08, Vladimir Sementsov-Ogievskiy wrote: For PCIe and SHPC hotplug it's important to track led indicators, especially the power led. Add an event that helps. Signed-off-by:

Re: [PATCH RFC 0/7] revert RNG seed mess

2023-02-10 Thread Daniel P . Berrangé
On Wed, Feb 08, 2023 at 04:12:23PM -0500, Michael S. Tsirkin wrote: > All attempts to fix up passing RNG seed via setup_data entry failed. > Let's just rip out all of it. We'll start over. > > > Warning: all I did was git revert the relevant patches and resolve the > (trivial) conflicts. Not

Re: [PATCH v3 13/15] qapi: add HOTPLUG_STATE event

2023-02-10 Thread Vladimir Sementsov-Ogievskiy
On 10.02.23 13:23, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: For PCIe and SHPC hotplug it's important to track led indicators, especially the power led. Add an event that helps. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/qdev.json | 62

Re: [PATCH 12/22] target/arm: NSTable is RES0 for the RME EL3 regime

2023-02-10 Thread Peter Maydell
On Tue, 24 Jan 2023 at 00:01, Richard Henderson wrote: > > Test in_space instead of in_secure so that we don't switch > out of Root space. Handle the output space change immediately, > rather than try and combine the NSTable and NS bits later. > > Signed-off-by: Richard Henderson > --- >

Re: [PATCH 14/22] target/arm: Handle no-execute for Realm and Root regimes

2023-02-10 Thread Peter Maydell
On Tue, 24 Jan 2023 at 00:02, Richard Henderson wrote: > > While Root and Realm may read and write data from other spaces, > neither may execute from other pa spaces. > > This happens for Stage1 EL3, EL2, EL2&0, but stage2 EL1&0. > > Signed-off-by: Richard Henderson > --- > target/arm/ptw.c |

Re: [PATCH v3 13/15] qapi: add HOTPLUG_STATE event

2023-02-10 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 10.02.23 13:23, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> For PCIe and SHPC hotplug it's important to track led indicators, >>> especially the power led. Add an event that helps. >>> >>> Signed-off-by: Vladimir

  1   2   3   >