Re: [PATCH 01/30] bsd-user/arm/target_arch_cpu.h: Move EXCP_ATOMIC to match linux-user

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:23, Warner Losh wrote: > > Move the EXCP_ATOMIC case to match linux-user/arm/cpu_loop.c:cpu_loop > ordering. > > Signed-off-by: Warner Losh > --- > bsd-user/arm/target_arch_cpu.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > Reviewed-by: Peter Maydell

Re: [PATCH v7 0/4] VNC-related HMP/QMP fixes

2022-01-13 Thread Markus Armbruster
Fabian Ebner writes: > Am 28.10.21 um 21:37 schrieb Markus Armbruster: >> Markus Armbruster writes: >> >>> Stefan Reiter writes: >>> Since the removal of the generic 'qmp_change' command, one can no longer replace the 'default' VNC display listen address at runtime (AFAIK). For

Re: [PULL V2 00/13] Net patches

2022-01-13 Thread Philippe Mathieu-Daudé via
On 13/1/22 15:00, Peter Maydell wrote: On Wed, 12 Jan 2022 at 08:32, Jason Wang wrote: The following changes since commit 64c01c7da449bcafc614b27ecf1325bb08031c84: Merge remote-tracking branch 'remotes/philmd/tags/sdmmc-20220108' into staging (2022-01-11 11:39:31 +) are available in

Re: [PATCH v3 kvm/queue 01/16] mm/shmem: Introduce F_SEAL_INACCESSIBLE

2022-01-13 Thread David Hildenbrand
On 06.01.22 14:06, Chao Peng wrote: > On Tue, Jan 04, 2022 at 03:22:07PM +0100, David Hildenbrand wrote: >> On 23.12.21 13:29, Chao Peng wrote: >>> From: "Kirill A. Shutemov" >>> >>> Introduce a new seal F_SEAL_INACCESSIBLE indicating the content of >>> the file is inaccessible from userspace in a

[PATCH v2 0/2] hw/intc/arm_gic: Allow reset of the running priority

2022-01-13 Thread Petr Pavlu
Thank you Peter for review of the first version of the patch. v2 splits the changes into two commits and updates the code as suggested.

[PATCH v2 1/2] hw/intc/arm_gic: Implement read of GICC_IIDR

2022-01-13 Thread Petr Pavlu
From: Petr Pavlu Implement support for reading GICC_IIDR. This register is used by the Linux kernel to recognize that GICv2 with GICC_APRn is present. Signed-off-by: Petr Pavlu --- hw/intc/arm_gic.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gi

[PATCH v2 2/2] hw/intc/arm_gic: Allow reset of the running priority

2022-01-13 Thread Petr Pavlu
From: Petr Pavlu When running Linux on a machine with GICv2, the kernel can crash while processing an interrupt and can subsequently start a kdump kernel from the active interrupt handler. In such a case, the crashed kernel might not gracefully signal the end of interrupt to the GICv2 hardware. T

Re: [PATCH] iotests/MRCE: Write data to source

2022-01-13 Thread Hanna Reitz
On 23.12.21 17:53, Hanna Reitz wrote: This test assumes that mirror flushes the source when entering the READY state, and that the format level will pass that flush on to the protocol level (where we intercept it with blkdebug). However, apparently that does not happen when using a VMDK image wi

Re: [PATCH v12 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-01-13 Thread Akihiko Odaki
On Fri, Jan 14, 2022 at 12:01 AM Vladislav Yaroshchuk wrote: > > Interaction with vmnet.framework in different modes > differs only on configuration stage, so we can create > common `send`, `receive`, etc. procedures and reuse them. > > vmnet.framework supports iov, but writing more than > one iov

Re: [PATCH v5 00/19] iotests: support zstd

2022-01-13 Thread Hanna Reitz
On 23.12.21 17:01, Vladimir Sementsov-Ogievskiy wrote: These series makes tests pass with IMGOPTS='compression_type=zstd' Also, python iotests start to support IMGOPTS (they didn't before). v5: Move patches with unsupported_imgopts to the start of the series 02: add Hanna's r-b 03: - don't

Re: Redesign of QEMU startup & initial configuration

2022-01-13 Thread Markus Armbruster
"Richard W.M. Jones" writes: > Sorry for very delayed reply ... > > On Thu, Dec 02, 2021 at 07:57:38AM +0100, Markus Armbruster wrote: >> 1. QMP only >> >>Management applications need to use QMP for monitoring anyway. They >>may want to use it for initial configuration, too. Libvirt do

Re: [PULL 11/13] numa: Support SGX numa in the monitor and Libvirt interfaces

2022-01-13 Thread Daniel P . Berrangé
On Wed, Dec 15, 2021 at 09:25:13PM +0100, Paolo Bonzini wrote: > From: Yang Zhong > > Add the SGXEPCSection list into SGXInfo to show the multiple > SGX EPC sections detailed info, not the total size like before. > This patch can enable numa support for 'info sgx' command and > QMP interfaces. Th

Re: [PULL 10/13] numa: Enable numa for SGX EPC sections

2022-01-13 Thread Daniel P . Berrangé
On Wed, Dec 15, 2021 at 09:25:12PM +0100, Paolo Bonzini wrote: > From: Yang Zhong > > The basic SGX did not enable numa for SGX EPC sections, which > result in all EPC sections located in numa node 0. This patch > enable SGX numa function in the guest and the EPC section can > work with RAM as on

Re: [PATCH 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-01-13 Thread Stefan Berger
On 1/13/22 05:37, Eric Auger wrote: Representing the CRB cmd/response buffer as a standard RAM region causes some trouble when the device is used with VFIO. Indeed VFIO attempts to DMA_MAP this region as usual RAM but this latter does not have a valid page size alignment causing such an error r

Re: [PATCH 2/2] hw/vfio/common: Silence ram device offset alignment error traces

2022-01-13 Thread Stefan Berger
On 1/13/22 05:37, Eric Auger wrote: Failing to DMA MAP a ram_device should not cause an error message. This is currently happening with the TPM CRB command region and this is causing confusion. We may want to keep the trace for debug purpose though. Signed-off-by: Eric Auger Tested-by: Ste

Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2022-01-13 Thread Markus Armbruster
Peter Xu writes: > On Fri, Dec 31, 2021 at 12:36:40AM +0800, Hyman Huang wrote: >> > > +struct { >> > > +DirtyLimitState *states; >> > > +int max_cpus; >> > > +unsigned long *bmap; /* running thread bitmap */ >> > > +unsigned long nr; >> > > +QemuThread thread; >> > > +} *dirt

[PATCH] build-sys: fix a meson deprecation warning

2022-01-13 Thread marcandre . lureau
From: Marc-André Lureau WARNING: Deprecated features used: * 0.56.0: {'meson.source_root'} Signed-off-by: Marc-André Lureau Reported-by: Peter Maydell --- tests/qtest/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.b

Re: [PATCH 2/2] qapi/ui: introduce change-vnc-listen

2022-01-13 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Mon, Dec 20, 2021 at 04:44:18PM +0100, Vladimir Sementsov-Ogievskiy wrote: >> Add command that can change addresses where VNC server listens for new >> connections. Prior to 6.0 this functionality was available through >> 'change' qmp command which was deleted. >>

Re: [PATCH 2/2] qapi/ui: introduce change-vnc-listen

2022-01-13 Thread Daniel P . Berrangé
On Thu, Jan 13, 2022 at 05:27:08PM +0100, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Mon, Dec 20, 2021 at 04:44:18PM +0100, Vladimir Sementsov-Ogievskiy > > wrote: > >> Add command that can change addresses where VNC server listens for new > >> connections. Prior to 6.0 this

[PATCH v3 0/2] hw/sensor: Add SB-TSI Temperature Sensor Interface

2022-01-13 Thread Patrick Venture
v3: * typofix where I accidentally embedded 'wq' into a string * moved the type sbtsi definition back into the source file * renamed the qtest file to use hyphens only v2: * Split the commit into a separate patch for the qtest * Moved the common registers into the new header * Introduced a n

[PATCH v3 1/2] hw/sensor: Add SB-TSI Temperature Sensor Interface

2022-01-13 Thread Patrick Venture
From: Hao Wu SB Temperature Sensor Interface (SB-TSI) is an SMBus compatible interface that reports AMD SoC's Ttcl (normalized temperature), and resembles a typical 8-pin remote temperature sensor's I2C interface to BMC. This patch implements a basic AMD SB-TSI sensor that is compatible with the

[PATCH v3 2/2] tests: add qtest for hw/sensor/sbtsi

2022-01-13 Thread Patrick Venture
From: Hao Wu Reviewed-by: Doug Evans Signed-off-by: Hao Wu Signed-off-by: Patrick Venture Acked-by: Thomas Huth --- tests/qtest/tmp-sbtsi-test.c | 161 +++ tests/qtest/meson.build | 1 + 2 files changed, 162 insertions(+) create mode 100644 tests/qtest

Re: [PATCH 02/30] bsd-user/signal.c: implement force_sig_fault

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:23, Warner Losh wrote: > > Start to implement the force_sig_fault code. This currently just calls > queue_signal(). The bsd-user fork version of that will handle this the > synchronous nature of this call. Add signal-common.h to hold signal > helper functions like force_si

[PATCH 1/1] virtio: fix the condition for iommu_platform not supported

2022-01-13 Thread Halil Pasic
The commit 04ceb61a40 ("virtio: Fail if iommu_platform is requested, but unsupported") claims to fail the device hotplug when iommu_platform is requested, but not supported by the (vhost) device. On the first glance the condition for detecting that situation looks perfect, but because a certain pec

[PATCH 0/2] Improved support for AMD SEV firmware loading

2022-01-13 Thread Daniel P . Berrangé
The AMD SEV build of EDK2 only emits a single file, intended to be mapped readonly. There is explicitly no separate writable VARS store for persisting non-volatile firmware variables. This can be used with QEMU's traditional pflash configuration mechanism by only populating pflash0, leaving pflash

[PATCH 1/2] hw/i386: refactor logic for setting up SEV firmware

2022-01-13 Thread Daniel P . Berrangé
Currently this logic is only run in the pflash codepath but we want to run it in other scenarios too. Signed-off-by: Daniel P. Berrangé --- hw/i386/pc_sysfw.c| 24 +++- hw/i386/pc_sysfw_ovmf-stubs.c | 10 ++ hw/i386/pc_sysfw_ovmf.c | 27 +

[PATCH 2/2] hw/i386: support loading OVMF using -bios too

2022-01-13 Thread Daniel P . Berrangé
Traditionally the OVMF firmware has been loaded using the pflash mechanism. This is because it is usually provided as a pair of files, one read-only containing the code and one writable to provided persistence of non-volatile firmware variables. The AMD SEV build of EDK2, however, is provided as a

[RFC PATCH] linux-user: expand reserved brk space for 64bit guests

2022-01-13 Thread Alex Bennée
A recent change to fix commpage allocation issues on 32bit hosts revealed another intermittent issue on s390x. The root cause was the headroom we give for the brk space wasn't enough causing the guest to attempt to map something on top of QEMUs own pages. We do not currently do anything to protect

Re: [PATCH 03/30] bsd-user/signal.c: Implement cpu_loop_exit_sigsegv

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:23, Warner Losh wrote: > > First attempt at implementing cpu_loop_exit_sigsegv, mostly copied from > linux-user version of this function. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- Reviewed-by: Peter Maydell thanks --

Re: [PATCH 04/30] bsd-user/signal.c: implement cpu_loop_exit_sigbus

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:26, Warner Losh wrote: > > First attempt at implementing cpu_loop_exit_sigbus, mostly copied from > linux-user version of this function. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- Reviewed-by: Peter Maydell thanks --

[PATCH v3 1/3] linux-user/ppc: deliver SIGTRAP on POWERPC_EXCP_TRAP

2022-01-13 Thread matheus . ferst
From: Matheus Ferst Handle POWERPC_EXCP_TRAP in cpu_loop to deliver SIGTRAP on tw[i]/td[i]. The si_code comes from do_program_check in the kernel source file arch/powerpc/kernel/traps.c Reviewed-by: Richard Henderson Signed-off-by: Matheus Ferst --- linux-user/ppc/cpu_loop.c | 3 ++- 1 file c

[PATCH v3 2/3] tests/tcg/ppc64le: change signal_save_restore_xer to use SIGTRAP

2022-01-13 Thread matheus . ferst
From: Matheus Ferst Now that linux-user delivers the signal on tw, we can change signal_save_restore_xer to use SIGTRAP instead of SIGILL. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Matheus Ferst --- tests/tcg/ppc64le/signal_save_restore_xer.c | 8

[PATCH v2] ppc/ppc405: Fix TLB flushing

2022-01-13 Thread Cédric Le Goater
Commit cd0c6f473532 did not take into account 405 CPUs when adding support to batching of TCG tlb flushes. Set the TLB_NEED_LOCAL_FLUSH flag when the SPR_40x_PID is updated. Cc: Thomas Huth Cc: Christophe Leroy Cc: Fabiano Rosas Fixes: cd0c6f473532 ("ppc: Do some batching of TCG tlb flushes") S

[RFC PATCH v3 3/3] target/ppc: Fix gen_priv_exception error value in mfspr/mtspr

2022-01-13 Thread matheus . ferst
From: Matheus Ferst The code in linux-user/ppc/cpu_loop.c expects POWERPC_EXCP_PRIV exception with error POWERPC_EXCP_PRIV_OPC or POWERPC_EXCP_PRIV_REG, while POWERPC_EXCP_INVAL_SPR is expected in POWERPC_EXCP_INVAL exceptions. This mismatch caused an EXCP_DUMP with the message "Unknown privilege

Re: [PATCH v12 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-01-13 Thread Vladislav Yaroshchuk
Will fix it, thank you! Actually this (wrong) check: #if defined(MAC_OS_VERSION_11_0) && \ MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_11_0 worked fine on Catalina 10.15 for me cause the MAC_OS_VERSION_11_0 was not introduced there and it stopped on the 1st defined(MAC_OS_VERSION_11_0) ch

Re: [PATCH] iotests/testrunner.py: refactor test_field_width

2022-01-13 Thread Kevin Wolf
Am 10.12.2021 um 21:14 hat Vladimir Sementsov-Ogievskiy geschrieben: > A lot of Optional[] types doesn't make code beautiful. > test_field_width defaults to 8, but that is never used in the code. > > More over, if we want some default behavior for single call of > test_run(), it should just print

Re: [PATCH 1/1] virtio: fix the condition for iommu_platform not supported

2022-01-13 Thread Michael S. Tsirkin
On Thu, Jan 13, 2022 at 05:51:31PM +0100, Halil Pasic wrote: > The commit 04ceb61a40 ("virtio: Fail if iommu_platform is requested, but > unsupported") claims to fail the device hotplug when iommu_platform > is requested, but not supported by the (vhost) device. On the first > glance the condition

Re: [PATCH 05/30] bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKPT together

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:26, Warner Losh wrote: > > Implement EXCP_DEBUG and EXCP_BKPT the same, as is done in > linux-user. The prior adjustment of register 15 isn't needed, so remove > that. Remove a redunant comment (that code in FreeBSD never handled > break points). > > Signed-off-by: Warner

Re: /usr/shared/qemu binaries

2022-01-13 Thread Paolo Bonzini
On 1/12/22 14:56, Peter Maydell wrote: Those are UEFI firmware images which are suitable for using with the arm/aarch64 "virt" board. They're only used if the user specifically asks to use them on the command line (eg with "-drive if=pflash,format=raw,file=pc-bios/edk2-aarch64-code.fd" or similar

[PATCH v3 0/3] linux-user/ppc: Deliver SIGTRAP on tw[i]/td[i]

2022-01-13 Thread matheus . ferst
From: Matheus Ferst In the review of 66c6b40aba1, Richard Henderson suggested[1] using "trap" instead of ".long 0x0" to generate the signal to test XER save/restore behavior. However, linux-user aborts when a trap exception is raised, so we kept the patch with SIGILL. This patch series is a foll

[PATCH v13 0/7] Add vmnet.framework based network backend

2022-01-13 Thread Vladislav Yaroshchuk
macOS provides networking API for VMs called 'vmnet.framework': https://developer.apple.com/documentation/vmnet We can provide its support as the new QEMU network backends which represent three different vmnet.framework interface usage modes: * `vmnet-shared`: allows the guest to communicat

Re: [PATCH 06/30] bsd-user/arm/target_arch_cpu.h: Correct code pointer

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:26, Warner Losh wrote: > > The code has moved in FreeBSD since the emulator was started, update the > comment to reflect that change. Remove now-redundant comment saying the > same thing (but incorrectly). > > Signed-off-by: Warner Losh > --- > bsd-user/arm/target_arch_c

[PATCH v13 5/7] net/vmnet: implement bridged mode (vmnet-bridged)

2022-01-13 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- net/vmnet-bridged.m | 105 +--- 1 file changed, 100 insertions(+), 5 deletions(-) diff --git a/net/vmnet-bridged.m b/net/vmnet-bridged.m index 4e42a90391..bc499c6195 100644 --- a/net/vmnet-bridged.m +++ b/net/vmnet-b

[PATCH] Mark remaining global TypeInfo instances as const

2022-01-13 Thread Bernhard Beschow
More than 1k of TypeInfo instances are already marked as const. Mark the remaining ones, too. Signed-off-by: Bernhard Beschow --- hw/core/generic-loader.c | 2 +- hw/core/guest-loader.c | 2 +- hw/display/bcm2835_fb.c| 2 +- hw/display/i2c-ddc.c | 2 +- hw/display/macfb.c

[PATCH v13 7/7] net/vmnet: update MAINTAINERS list

2022-01-13 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index c98a61caee..638d129305 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2641,6 +2641,11 @@ W: http://info.iet.unipi.it/~luigi/netmap/ S: Maintained F: net/n

[PATCH v13 6/7] net/vmnet: update qemu-options.hx

2022-01-13 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- qemu-options.hx | 25 + 1 file changed, 25 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index ec90505d84..81dd34f550 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2732,6 +2732,25 @@ DEF("netdev", HAS_ARG, QE

Re: [PATCH 07/30] bsd-user/arm/target_arch_cpu.h: Use force_sig_fault for EXCP_UDEF

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:27, Warner Losh wrote: > > Use force_sig_fault to implement unknown opcode. This just uninlines > that function, so simplify things by using it. Fold in EXCP_NOCP and > EXCP_INVSTATE, as is done in linux-user. > > Signed-off-by: Warner Losh > --- > bsd-user/arm/target_ar

Re: [PATCH v2] ppc/ppc405: Fix TLB flushing

2022-01-13 Thread Cédric Le Goater
On 1/13/22 18:00, Cédric Le Goater wrote: Commit cd0c6f473532 did not take into account 405 CPUs when adding support to batching of TCG tlb flushes. Set the TLB_NEED_LOCAL_FLUSH flag when the SPR_40x_PID is updated. Cc: Thomas Huth Cc: Christophe Leroy Cc: Fabiano Rosas Fixes: cd0c6f473532 ("

[PATCH v13 1/7] net/vmnet: add vmnet dependency and customizable option

2022-01-13 Thread Vladislav Yaroshchuk
vmnet.framework dependency is added with 'vmnet' option to enable or disable it. Default value is 'auto'. vmnet features to be used are available since macOS 11.0, corresponding probe is created into meson.build. Signed-off-by: Vladislav Yaroshchuk --- meson.build | 16 +++

Re: [PATCH 09/30] bsd-user/signal.c: implement abstract target / host signal translation

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:29, Warner Losh wrote: > > Implement host_to_target_signal and target_to_host_signal. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-user/qemu.h | 2 ++ > bsd-user/signal.c | 11 +++ > 2 files changed, 13 i

[PATCH v13 2/7] net/vmnet: add vmnet backends to qapi/net

2022-01-13 Thread Vladislav Yaroshchuk
Create separate netdevs for each vmnet operating mode: - vmnet-host - vmnet-shared - vmnet-bridged Signed-off-by: Vladislav Yaroshchuk --- net/clients.h | 11 net/meson.build | 7 +++ net/net.c | 10 net/vmnet-bridged.m | 25 + net/vmnet-common.m | 20

[PATCH v13 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-01-13 Thread Vladislav Yaroshchuk
Interaction with vmnet.framework in different modes differs only on configuration stage, so we can create common `send`, `receive`, etc. procedures and reuse them. vmnet.framework supports iov, but writing more than one iov into vmnet interface fails with 'VMNET_INVALID_ARGUMENT'. Collecting provi

[PATCH v13 4/7] net/vmnet: implement host mode (vmnet-host)

2022-01-13 Thread Vladislav Yaroshchuk
Signed-off-by: Vladislav Yaroshchuk --- net/vmnet-host.c | 110 --- 1 file changed, 104 insertions(+), 6 deletions(-) diff --git a/net/vmnet-host.c b/net/vmnet-host.c index 4a5ef99dc7..501b677cb6 100644 --- a/net/vmnet-host.c +++ b/net/vmnet-host.c @@

Re: /usr/shared/qemu binaries

2022-01-13 Thread Peter Maydell
On Thu, 13 Jan 2022 at 17:13, Paolo Bonzini wrote: > > On 1/12/22 14:56, Peter Maydell wrote: > > Those are UEFI firmware images which are suitable for using with > > the arm/aarch64 "virt" board. They're only used if the user specifically > > asks to use them on the command line (eg with > > "-dr

Re: /usr/shared/qemu binaries

2022-01-13 Thread Liviu Ionescu
> On 13 Jan 2022, at 19:13, Paolo Bonzini wrote: > > There must be lots of zeros in there. I confirm, when compressed, those files get significantly smaller. > Maybe we should tell QEMU to unpack firmware .gz or .lzo files? That would be great. I think `.gz` files are easier to create. Liv

Re: [PATCH 08/30] bsd-user/arm/target_arch_cpu.h: Implement data faults

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:29, Warner Losh wrote: > > Update for the richer set of data faults that are now possible. Copied > largely from linux-user/arm/cpu_loop.c > > Signed-off-by: Warner Losh > --- > bsd-user/arm/target_arch_cpu.h | 44 ++ > 1 file changed, 34

Re: /usr/shared/qemu binaries

2022-01-13 Thread BALATON Zoltan
On Thu, 13 Jan 2022, Paolo Bonzini wrote: On 1/12/22 14:56, Peter Maydell wrote: Those are UEFI firmware images which are suitable for using with the arm/aarch64 "virt" board. They're only used if the user specifically asks to use them on the command line (eg with "-drive if=pflash,format=raw,fi

[PATCH v3] ppc/ppc405: Fix TLB flushing

2022-01-13 Thread Cédric Le Goater
Commit cd0c6f473532 did not take into account 405 CPUs when adding support to batching of TCG tlb flushes. Set the TLB_NEED_LOCAL_FLUSH flag when the SPR_40x_PID is set or a TLB updated. Cc: Thomas Huth Cc: Christophe Leroy Cc: Fabiano Rosas Fixes: cd0c6f473532 ("ppc: Do some batching of TCG tl

[PATCH v3 2/6] hw/usb/canokey: Add trace events

2022-01-13 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- hw/usb/canokey.c| 18 ++ hw/usb/trace-events | 17 + 2 files changed, 35 insertions(+) diff --git a/hw/usb/canokey.c b/hw/usb/canokey.c index 6bd4dedfd2..2899515b6e 100644 --- a/hw/usb/canokey.c +++ b/hw/usb/canokey.

[PATCH v3 1/6] hw/usb: Add CanoKey Implementation

2022-01-13 Thread Hongren (Zenithal) Zheng
This commit added a new emulated device called CanoKey to QEMU. CanoKey implements platform independent features in canokey-core https://github.com/canokeys/canokey-core, and leaves the USB implementation to the platform. In this commit the USB part was implemented in QEMU using QEMU's USB APIs,

[PATCH v3 6/6] MAINTAINERS: add myself as CanoKey maintainer

2022-01-13 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f871d759fd..51dae611fa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2296,6 +2296,14 @@ F: hw/timer/mips_gictimer.c F: include/hw/intc/mips_gic.h

[PATCH v3 3/6] meson: Add CanoKey

2022-01-13 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- hw/usb/Kconfig| 5 + hw/usb/meson.build| 3 +++ meson.build | 6 ++ meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 5 files changed, 19 insertions(+) diff --git a/hw/usb

[PATCH v3 4/6] docs: Add CanoKey documentation

2022-01-13 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- docs/system/device-emulation.rst | 1 + docs/system/devices/canokey.rst | 158 +++ 2 files changed, 159 insertions(+) create mode 100644 docs/system/devices/canokey.rst diff --git a/docs/system/device-emulation.rst b/doc

[PATCH v3 0/6] Introduce CanoKey QEMU

2022-01-13 Thread Hongren (Zenithal) Zheng
- One sentense With this patch series, QEMU would fully emulate an open-source secure key, CanoKey, with supports of various features listed below: * U2F / FIDO2 with Ed25519 and HMAC-secret * OpenPGP Card V3.4 with RSA4096, Ed25519 and more * PIV (NIST SP 800-73-4) * HOTP / TOTP - What's Ne

[PATCH v3 5/6] docs/system/devices/usb: Add CanoKey to USB devices examples

2022-01-13 Thread Hongren (Zenithal) Zheng
Signed-off-by: Hongren (Zenithal) Zheng --- docs/system/devices/usb.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/system/devices/usb.rst b/docs/system/devices/usb.rst index afb7d6c226..341694403a 100644 --- a/docs/system/devices/usb.rst +++ b/docs/system/devices/usb.rst @@ -199,

ppc pbr403 vmstate

2022-01-13 Thread Dr. David Alan Gilbert
Hi, Is there any easy way of getting a machine where the pbr403 vmstate would be generated? Given my vague understanding of vmstate subsection naming, I think we need: diff --git a/target/ppc/machine.c b/target/ppc/machine.c index 756d8de5d8..e535edb7c4 100644 --- a/target/ppc/machine.c +++ b

Re: [PATCH 10/30] bsd-user/signal.c: Implement signal_init()

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:29, Warner Losh wrote: > > Initialize the signal state for the emulator. Setup a set of sane > default signal handlers, mirroring the host's signals. For fatal signals > (those that exit by default), establish our own set of signal > handlers. Stub out the actual signal ha

[PATCH 04/17] ppc/pnv: move intbar to PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
This MemoryRegion can also be moved in a single step. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4.c | 18 +- include/hw/pci-host/pnv_phb4.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/p

[PATCH 01/17] ppc/pnv: use PHB4 obj in pnv_pec_stk_pci_xscom_ops

2022-01-13 Thread Daniel Henrique Barboza
The current relationship between PnvPhb4PecStack and PnvPHB4 objects is overly complex. Recent work done in pnv_phb4.c and pnv_phb4_pec.c shows that the stack obj role in the overall design is more of a placeholder for its 'phb' object, having no atributes that stand on its own. This became clearer

[PATCH 07/17] ppc/pnv: move nest_regs[] to PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
stack->nest_regs[] is used in several XSCOM functions and it's one of the main culprits of having to deal with stack->phb pointers around the code. Sure, we're having to add 2 extra stack->phb pointers to ease nest_regs[] migration to PnvPHB4. They'll be dealt with shortly. Signed-off-by: Daniel

[PATCH 00/17] remove PnvPhb4PecStack from Powernv9

2022-01-13 Thread Daniel Henrique Barboza
Hi, After all the done enabling pnv-phb4 user devices, it became clear that the stack object is just a container of the PHB and its resources than something that needs to be maintained by its own. Removing the PnvPhb4PecStack object promotes a simpler code where we're dealing only with PECs and PH

[PATCH 09/17] ppc/pnv: move nest_regs_mr to PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
We're now able to cleanly move nest_regs_mr to the PnvPHB4 device. One thing of notice here is the need to use a phb->stack->pec pointer because pnv_pec_stk_nest_xscom_write requires a PEC object. Another thing that can be noticed in the use of 'stack->stack_no' that still remains throughout the X

[PATCH 02/17] ppc/pnv: move PCI registers to PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
Previous patch changed pnv_pec_stk_pci_xscom_read() and pnv_pec_stk_pci_xscom_write() to use a PnvPHB4 opaque, making it easier to move both pci_regs[] and the pci_regs_mr MemoryRegion to the PnvHB4 object. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4.c | 30 ++

[PATCH 10/17] ppc/pnv: move phb_regs_mr to PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
After recent changes, this MemoryRegion can be migrated to PnvPHB4 without too much trouble. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4.c | 6 +++--- include/hw/pci-host/pnv_phb4.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/pci-host

[PATCH 06/17] ppc/pnv: move mmbar0/mmbar1 and friends to PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
These 2 MemoryRegions, together with mmio(0|1)_base and mmio(0|1)_size variables, are used together in the same functions. We're better of moving them all in a single step. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4.c | 52 +- include/

[PATCH 03/17] ppc/pnv: move phbbar to PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
This MemoryRegion is simple enough to be moved in a single step. A 'stack->phb' pointer had to be introduced in pnv_pec_stk_update_map() because this function isn't ready to be fully converted to use a PnvPHB4 pointer instead. This will be dealt with in the following patches. Signed-off-by: Danie

[PATCH 11/17] ppc/pnv: introduce PnvPHB4 'phb_number' property

2022-01-13 Thread Daniel Henrique Barboza
One of the remaining dependencies we have on the PnvPhb4PecStack object is the stack->stack_no property. This is set as the position the stack occupies in the pec->stacks[] array. We need a way to report this same value in the PnvPHB4. This patch creates a new property called 'phb_number' to be us

[PATCH 12/17] ppc/pnv: introduce PnvPHB4 'pec' property

2022-01-13 Thread Daniel Henrique Barboza
This property will track the owner PEC of this PHB. For now it's redundant since we can retrieve the PEC via phb->stack->pec but it will not be redundant when we get rid of the stack device. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4.c | 20 +++- hw/p

[PATCH 05/17] ppc/pnv: change pnv_phb4_update_regions() to use PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
The function does not rely on stack for anything it does anymore. This is also one less instance of 'stack->phb' that we need to worry about. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/pci-host/

[PATCH 08/17] ppc/pnv: change pnv_pec_stk_update_map() to use PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
stack->nest_regs_mr wasn't migrated to PnvPHB4 together with phb->nest_regs[] in the previous patch. We were unable to cleanly convert its write MemoryRegionOps, pnv_pec_stk_nest_xscom_write(), to use PnvPHB4 instead of PnvPhb4PecStack due to pnv_pec_stk_update_map() using a stack. Thing is, we're

[PATCH 16/17] ppc/pnv: remove PnvPhb4PecStack object

2022-01-13 Thread Daniel Henrique Barboza
All the complexity that was scattered between PnvPhb4PecStack and PnvPHB4 are now centered in the PnvPHB4 device. PnvPhb4PecStack does not serve any purpose in the current code base. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4_pec.c | 34 --

[PATCH 13/17] ppc/pnv: remove stack pointer from PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
This pointer was being used for two reasons: pnv_phb4_update_regions() was using it to access the PHB and phb4_realize() was using it as a way to determine if the PHB was user created. We can determine if the PHB is user created via phb->pec, introduced in the previous patch, and pnv_phb4_update_r

[PATCH 14/17] ppc/pnv: move default_phb_realize() to pec_realize()

2022-01-13 Thread Daniel Henrique Barboza
This is the last step before making the PEC device uses PHB4s directly. Move the current pnv_pec_stk_default_phb_realize() call to pec_realize(), renaming the function to pnv_pec_default_phb_realize(), and set the PHB attributes using the PEC object directly. Signed-off-by: Daniel Henrique Barboza

[PATCH 15/17] ppc/pnv: convert pec->stacks[] into pec->phbs[]

2022-01-13 Thread Daniel Henrique Barboza
This patch changes the design of the PEC device to use PHB4s instead of PecStacks. After all the recent changes, PHB4s now contain all the information needed for their proper functioning, not relying on PecStack in any capacity. All changes are being made in a single patch to avoid renaming parts

Re: [PATCH 11/30] bsd-user/host/arm/host-signal.h: Implement host_signal_*

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:33, Warner Losh wrote: > > Implement host_signal_pc, host_signal_set_pc and host_signal_write for > arm. > > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > +static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc) > +{ > +/* > + * In the F

[PATCH 17/17] ppc/pnv: rename pnv_pec_stk_update_map()

2022-01-13 Thread Daniel Henrique Barboza
This function does not use 'stack' anymore. Rename it to pnv_pec_phb_update_map(). Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c index a9ec42ce2c..d27b62a50

[PATCH v2 1/3] ppc: Fix vmstate_pbr403 subsection name

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The pbr403 subsection is part of the tlb6xx state, so I believe it's name needs to be: .name = "cpu/tlb6xx/pbr403", Signed-off-by: Dr. David Alan Gilbert --- target/ppc/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/

Re: [PATCH 13/30] bsd-user/host/x86_64/host-signal.h: Implement host_signal_*

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:37, Warner Losh wrote: > > Implement host_signal_pc, host_signal_set_pc and host_signal_write for > x86_64. > > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 12/30] bsd-user/host/i386/host-signal.h: Implement host_signal_*

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:29, Warner Losh wrote: > > Implement host_signal_pc, host_signal_set_pc and host_signal_write for > i386. > > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 14/30] bsd-user: Add host signals to the build

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:32, Warner Losh wrote: > > Start to add the host signal functionality to the build. > > Signed-off-by: Warner Losh > --- > bsd-user/meson.build | 1 + > bsd-user/signal.c| 1 + > meson.build | 1 + > 3 files changed, 3 insertions(+) Reviewed-by: Peter Mayde

Re: [PATCH 15/30] bsd-user: Add trace events for bsd-usr

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:36, Warner Losh wrote: > > Add the bsd-user specific events and infrastructure. Only include the > linux-user trace events for linux-user, not bsd-user. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh Typo in subject: should be 'b

Re: [PATCH 16/30] bsd-user/signal.c: host_to_target_siginfo_noswap

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:41, Warner Losh wrote: > > Implement conversion of host to target siginfo. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-user/signal.c | 37 + > 1 file changed, 37 insertions(+) >

Re: [PATCH 17/30] bsd-user/signal.c: Implement rewind_if_in_safe_syscall

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:32, Warner Losh wrote: > > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-user/qemu.h | 2 ++ > bsd-user/signal.c | 12 > 2 files changed, 14 insertions(+) Reviewed-by: Peter Maydell thanks -- PMM

[PATCH v2 3/3] migration: Perform vmsd structure check during tests

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Perform a check on vmsd structures during test runs in the hope of catching any missing terminators and other simple screwups. Signed-off-by: Dr. David Alan Gilbert --- migration/savevm.c | 39 +++ 1 file changed, 39 insertions

[PATCH v2 0/3] vmsd checks

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Aftern the patch the other day where I added a missing END_OF_LIST, Peter suggested adding something more robust. Here I: add a check for a flag at the end of the list add a check that's performed in vmstate_register_with_alias_id only within qtest recursiv

[PATCH v2 2/3] migration: Add canary to VMSTATE_END_OF_LIST

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions; given that the current check is only for ->name being NULL, sometimes we get unlucky and the code apparently works and no one spots the error. Explicitly add a flag, VMS_END that should be set

Re: [PATCH 1/1] virtio: fix the condition for iommu_platform not supported

2022-01-13 Thread Halil Pasic
On Thu, 13 Jan 2022 12:11:42 -0500 "Michael S. Tsirkin" wrote: > On Thu, Jan 13, 2022 at 05:51:31PM +0100, Halil Pasic wrote: > > The commit 04ceb61a40 ("virtio: Fail if iommu_platform is requested, but > > unsupported") claims to fail the device hotplug when iommu_platform > > is requested, but

Re: [PATCH 18/30] bsd-user/signal.c: Implement host_signal_handler

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:40, Warner Losh wrote: > > Implement host_signal_handler to handle signals generated by the host > and to do safe system calls. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-user/signal.c | 105 ++

[PATCH v2 2/2] target/riscv: Add XVentanaCondOps custom extension

2022-01-13 Thread Philipp Tomsich
This adds the decoder and translation for the XVentanaCondOps custom extension (vendor-defined by Ventana Micro Systems), which is documented at https://github.com/ventanamicro/ventana-custom-extensions/releases/download/v1.0.0/ventana-custom-extensions-v1.0.0.pdf This commit then also adds a gua

[PATCH v2 1/2] target/riscv: iterate over a table of decoders

2022-01-13 Thread Philipp Tomsich
To split up the decoder into multiple functions (both to support vendor-specific opcodes in separate files and to simplify maintenance of orthogonal extensions), this changes decode_op to iterate over a table of decoders predicated on guard functions. This commit only adds the new structure and th

<    1   2   3   >