[Bug 1906905] Re: qemu-system-sparc stucked while booting using ss20_v2.25_rom

2020-12-04 Thread yapkv
I have just compiled a few version from source code: 4.1.1 worked: able to boot up with -bios ss20_v2.25.rom 5.0.0 worked: able to boot up with -bios ss20_v2.25.rom 5.1.0 not working. Stuck after "Power-On Reset" SS5.bin worked for 5.1.0 -- You received this bug notification because you

[Bug 1906905] [NEW] qemu-system-sparc stucked while booting using ss20_v2.25_rom

2020-12-04 Thread yapkv
Public bug reported: I cannot boot up OBP using the current (5.1) version of qemu with ss20_v2.25_rom. It just stuck at "Power-ON reset" and hanged. However using the previous version from 2015 I can successfully both up the OBP. qemu-system-sparc -M SS-20 -m 256 -bios ss20_v2.25.rom -nographic

[Bug 1906156] Re: Host OS Reboot Required, for Guest kext to Load (Fully)

2020-12-04 Thread Russell Morris
OK, found my issue! :-). Still a bit odd, but virt-manager complaints about the custom QEMU executable => but virsh still works. So I did get the VM running, with, QEMU emulator version 5.1.93 (v5.2.0-rc3) Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers But it still

[Bug 1906156] Re: Host OS Reboot Required, for Guest kext to Load (Fully)

2020-12-04 Thread Russell Morris
My apologies, but I'm somewhat stuck here :-(. Trying to run the latest (upstream) version of QEMU, but no luck getting it to execute. I even tried setting securit_driver = "none", as captured here, https://gitlab.com/apparmor/apparmor/-/wikis/Libvirt But no luck. Open to any suggestions.

[Bug 1906193] Re: riscv32 user mode emulation: fork return values broken

2020-12-04 Thread Andreas K . Hüttel
This is the (statically linked) binary resulting from the source; with it the problem can be demonstrated "standalone", without any other rv32 libraries or a complete chroot, just running the binary with qemu- riscv32. Generated with (riscv-ilp32 chroot) farino /tmp # gcc -static -o

Re: x86 TCG helpers clobbered registers

2020-12-04 Thread Stephane Duverger
On Fri, Dec 04, 2020 at 01:35:55PM -0600, Richard Henderson wrote: Thank you Richard for your answer. I don't want to generate a debate, or defend the way I've done things initially. Really want to clarify these internals. Hope it will benefit to other QEMU enthusiasts. > You can't just inject a

[PATCH v4 4/5] configure,meson: support Control-Flow Integrity

2020-12-04 Thread Daniele Buono
This patch adds a flag to enable/disable control flow integrity checks on indirect function calls. This feature only allows indirect function calls at runtime to functions with compatible signatures. This feature is only provided by LLVM/Clang, and depends on link-time optimization which is

[PATCH v4 5/5] docs: Add CFI Documentation

2020-12-04 Thread Daniele Buono
Document how to compile with CFI and how to maintain CFI-safe code Signed-off-by: Daniele Buono --- docs/devel/control-flow-integrity.rst | 137 ++ 1 file changed, 137 insertions(+) create mode 100644 docs/devel/control-flow-integrity.rst diff --git

[PATCH v4 1/5] configure,meson: add option to enable LTO

2020-12-04 Thread Daniele Buono
This patch allows to compile QEMU with link-time optimization (LTO). Compilation with LTO is handled directly by meson. This patch only adds the option in configure and forwards the request to meson Tested with all major versions of clang from 6 to 12 Signed-off-by: Daniele Buono --- configure

[PATCH v4 3/5] check-block: enable iotests with cfi-icall

2020-12-04 Thread Daniele Buono
cfi-icall is a form of Control-Flow Integrity for indirect function calls implemented by llvm. It is enabled with a -fsanitize flag. iotests are currently disabled when -fsanitize options is used, with the exception of SafeStack. This patch implements a generic filtering mechanism to allow

[PATCH v4 2/5] cfi: Initial support for cfi-icall in QEMU

2020-12-04 Thread Daniele Buono
LLVM/Clang, supports runtime checks for forward-edge Control-Flow Integrity (CFI). CFI on indirect function calls (cfi-icall) ensures that, in indirect function calls, the function called is of the right signature for the pointer type defined at compile time. For this check to work, the code

[PATCH v4 0/5] Add support for Control-Flow Integrity

2020-12-04 Thread Daniele Buono
This patch adds supports for Control-Flow Integrity checks on indirect function calls. Requires the use of clang, and link-time optimizations Since it's been a month, and some of the patches are being merged independently, I thought of rebasing, retesting and sending an updated version. Also,

[PATCH] target/mips: Simplify gen_msa_BxZ() 'if' condition

2020-12-04 Thread Philippe Mathieu-Daudé
As gen_check_zero_element() already produces a boolean, replace 'if (x) tcg_gen_setcondi_tl()' by tcg_gen_xori_tl(x) which already contains the if (x). Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <20201202184415.1434484-1-f4...@amsat.org> ---

Re: [PATCH v2 7/7] qapi: More complex uses of QAPI_LIST_APPEND

2020-12-04 Thread Eric Blake
On 11/19/20 2:50 AM, Markus Armbruster wrote: > Eric Blake writes: > >> These cases require a bit more thought to review; in each case, the >> code was appending to a list, but not with a FOOList **tail variable. >> +++ b/hw/core/machine-qmp-cmds.c > [...] >> @@ -294,41 +281,31 @@ void

Re: [PATCH 9/9] target/mips: Explode gen_msa_branch() as gen_msa_BxZ_V/BxZ()

2020-12-04 Thread Philippe Mathieu-Daudé
On 12/4/20 6:04 PM, Richard Henderson wrote: > On 12/2/20 12:44 PM, Philippe Mathieu-Daudé wrote: >> +static bool gen_msa_BxZ(DisasContext *ctx, int df, int wt, int s16, bool >> if_not) >> +{ >> +check_msa_access(ctx); >> + >> +if (ctx->hflags & MIPS_HFLAG_BMASK) { >> +

Re: [PATCH 6/9] target/mips: Alias MSA vector registers on FPU scalar registers

2020-12-04 Thread Philippe Mathieu-Daudé
On 12/4/20 5:28 PM, Richard Henderson wrote: > On 12/2/20 12:44 PM, Philippe Mathieu-Daudé wrote: >> Commits 863f264d10f ("add msa_reset(), global msa register") and >> cb269f273fd ("fix multiple TCG registers covering same data") >> removed the FPU scalar registers and replaced them by aliases to

[PATCH 3/5] target/mips: Do not initialize MT registers if MT ASE absent

2020-12-04 Thread Philippe Mathieu-Daudé
Do not initialize MT-related config registers if the MT ASE is not present. As some functions access the 'mvp' structure, we still zero-allocate it. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate_init.c.inc | 4 1 file changed, 4 insertions(+) diff --git

[PATCH 2/5] target/mips: Introduce ase_mt_available() helper

2020-12-04 Thread Philippe Mathieu-Daudé
Instead of accessing CP0_Config3 directly and checking the 'Multi-Threading Present' bit, introduce an helper to simplify code review. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/cpu.h| 7 +++ hw/mips/cps.c| 3 +-- target/mips/cp0_helper.c | 2 +-

Re: [PATCH] block/nvme: Do not allow image creation with NVMe block driver

2020-12-04 Thread Philippe Mathieu-Daudé
On 12/4/20 5:57 PM, Philippe Mathieu-Daudé wrote: > The NVMe driver does not support image creation. > The full drive has to be passed to the guest. > > Before: > > $ qemu-img create -f raw nvme://:04:00.0/1 20G > Formatting 'nvme://:04:00.0/1', fmt=raw size=21474836480 > > $

[PATCH 5/5] hw/mips/malta: Rewrite CP0_MVPConf0 access using deposit()

2020-12-04 Thread Philippe Mathieu-Daudé
PTC field has 8 bits, PVPE has 4. We plan to use the "hw/registerfields.h" API with MIPS CPU definitions (target/mips/cpu.h). Meanwhile we use magic 8 and 4. Signed-off-by: Philippe Mathieu-Daudé --- We want to move that to mips_cpu_reset() later, because this is not Malta specific but

[PATCH 0/5] mips: Sanitize Multi-Threading ASE

2020-12-04 Thread Philippe Mathieu-Daudé
Reviewing the MIPS code, ASE after ASE. Time for MT ASE. - Introduce/use ase_mt_available() helper to check if MT ASE is present - Avoid setting MT specific registers if MT ASE is absent Philippe Mathieu-Daudé (5): target/mips: Remove mips_def_t unused argument from mvp_init() target/mips:

[PATCH 4/5] hw/mips/malta: Do not initialize MT registers if MT ASE absent

2020-12-04 Thread Philippe Mathieu-Daudé
Do not initialize MT-related config register if the MT ASE is not present. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 9d1a3b50b7a..350b92b4d79 100644 ---

[PATCH 1/5] target/mips: Remove mips_def_t unused argument from mvp_init()

2020-12-04 Thread Philippe Mathieu-Daudé
mvp_init() doesn't require any CPU definition (beside the information accessible via CPUMIPSState). Remove the unused argument. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/translate.c | 2 +- target/mips/translate_init.c.inc | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH v14 13/13] block: apply COR-filter to block-stream jobs

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
From: Andrey Shinkevich This patch completes the series with the COR-filter applied to block-stream operations. Adding the filter makes it possible in future implement discarding copied regions in backing files during the block-stream job, to reduce the disk overuse (we need control on

[Bug 1673976] Re: linux-user clone() can't handle glibc posix_spawn() (causes locale-gen to assert)

2020-12-04 Thread Davide Palma
any solution? trying to emulate a closed source amd64 app on my raspberry and i'm getting this error with qemu 5.2.0-rc4 and glibc 2.27. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1673976 Title:

[PATCH v14 08/13] copy-on-read: skip non-guest reads if no copy needed

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
From: Andrey Shinkevich If the flag BDRV_REQ_PREFETCH was set, skip idling read/write operations in COR-driver. It can be taken into account for the COR-algorithms optimization. That check is being made during the block stream job by the moment. Add the BDRV_REQ_PREFETCH flag to the

[PATCH v14 12/13] block/stream: add s->target_bs

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
Add a direct link to target bs for convenience and to simplify following commit which will insert COR filter above target bs. This is a part of original commit written by Andrey. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/stream.c | 23 ++- 1 file changed, 10

[PATCH v14 09/13] stream: skip filters when writing backing file name to QCOW2 header

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
From: Andrey Shinkevich Avoid writing a filter JSON file name and a filter format name to QCOW2 image when the backing file is being changed after the block stream job. It can occur due to a concurrent commit job on the same backing chain. A user is still able to assign the 'backing-file'

[PATCH v14 11/13] iotests: 30: prepare to COR filter insertion by stream job

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
test_stream_parallel run parallel stream jobs, intersecting so that top of one is base of another. It's OK now, but it would be a problem if insert the filter, as one job will want to use another job's filter as above_base node. Correct thing to do is move to new interface: "bottom" argument

[PATCH v14 07/13] block: include supported_read_flags into BDS structure

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
From: Andrey Shinkevich Add the new member supported_read_flags to the BlockDriverState structure. It will control the flags set for copy-on-read operations. Make the block generic layer evaluate supported read flags before they go to a block driver. Suggested-by: Vladimir Sementsov-Ogievskiy

[PATCH v14 05/13] qapi: create BlockdevOptionsCor structure for COR driver

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
From: Andrey Shinkevich Create the BlockdevOptionsCor structure for COR driver specific options splitting it off form the BlockdevOptionsGenericFormat. The only option 'bottom' node in the structure denotes an image file that limits the COR operations in the backing chain. We are going to use

[PATCH v14 10/13] qapi: block-stream: add "bottom" argument

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
The code already don't freeze base node and we try to make it prepared for the situation when base node is changed during the operation. In other words, block-stream doesn't own base node. Let's introduce a new interface which should replace the current one, which will in better relations with

[PATCH v14 02/13] block: add API function to insert a node

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
From: Andrey Shinkevich Provide API for insertion a node to backing chain. Suggested-by: Max Reitz Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 2 ++ block.c | 25 + 2 files changed, 27

[PATCH v14 04/13] qapi: add filter-node-name to block-stream

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
From: Andrey Shinkevich Provide the possibility to pass the 'filter-node-name' parameter to the block-stream job as it is done for the commit block job. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 6 ++

[PATCH v14 03/13] copy-on-read: add filter drop function

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
From: Andrey Shinkevich Provide API for the COR-filter removal. Also, drop the filter child permissions for an inactive state when the filter node is being removed. To insert the filter, the block generic layer function bdrv_insert_node() can be used. The new function bdrv_cor_filter_drop() may

[PATCH v14 06/13] iotests: add #310 to test bottom node in COR driver

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
From: Andrey Shinkevich The test case #310 is similar to #216 by Max Reitz. The difference is that the test #310 involves a bottom node to the COR filter driver. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/310 | 114

[PATCH v14 01/13] copy-on-read: support preadv/pwritev_part functions

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
From: Andrey Shinkevich Add support for the recently introduced functions bdrv_co_preadv_part() and bdrv_co_pwritev_part() to the COR-filter driver. Signed-off-by: Andrey Shinkevich Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/copy-on-read.c | 28 1 file

[PATCH v14 00/13] Apply COR-filter to the block-stream permanently

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
Hi all! I decided to post v14 myself, to show how to keep the test with parallel stream jobs. So, main addition in v14 is "bottom" argument for stream job. Next week I'll send a follow-up with deprecation for old "base" API. Also, I already finished my work on updating permissions, so that we

[PATCH] target/i386/sev: add the support to query the attestation report

2020-12-04 Thread Brijesh Singh
The SEV FW >= 0.23 added a new command that can be used to query the attestation report containing the SHA-256 digest of the guest memory and VMSA encrypted with the LAUNCH_UPDATE and sign it with the PEK. Note, we already have a command (LAUNCH_MEASURE) that can be used to query the SHA-256

Re: [PATCH v13 00/10] Apply COR-filter to the block-stream permanently

2020-12-04 Thread Vladimir Sementsov-Ogievskiy
I still think we should keep dropped iotest by introducing "bottom" interface for stream job. And deprecate old interfaces. Patch is better than arguing, so I decided to try it myself. Now I'm close to complete v14, so, will send it soon. 02.12.2020 21:30, Andrey Shinkevich wrote: The

Re: [PATCH qemu v10] spapr: Implement Open Firmware client interface

2020-12-04 Thread Greg Kurz
On Fri, 4 Dec 2020 19:32:05 +0100 Greg Kurz wrote: > > That's all for now. > Just one last item. I'm observing failures with nvram in the guest: [root@vir76 ~]# nvram --print-config [ 88.179444] nvram[936]: unhandled signal 11 at 7fffc83a nip 00012d802110 lr 00012d802118

Re: [PATCH 2/2] nbd/server: Quiesce coroutines on context switch

2020-12-04 Thread Eric Blake
On 12/4/20 10:53 AM, Sergio Lopez wrote: > When switching between AIO contexts we need to me make sure that both > recv_coroutine and send_coroutine are not scheduled to run. Otherwise, > QEMU may crash while attaching the new context with an error like > this one: > > aio_co_schedule: Co-routine

Re: [PATCH v4 04/11] hvf: Introduce hvf vcpu struct

2020-12-04 Thread Alex Bennée
Alexander Graf writes: > We will need more than a single field for hvf going forward. To keep > the global vcpu struct uncluttered, let's allocate a special hvf vcpu > struct, similar to how hax does it. > > Signed-off-by: Alexander Graf > Reviewed-by: Roman Bolshakov > Tested-by: Roman

Re: [PATCH v3 08/10] arm/hvf: Add a WFI handler

2020-12-04 Thread Roman Bolshakov
On Thu, Dec 03, 2020 at 10:18:14AM -0800, Peter Collingbourne wrote: > On Thu, Dec 3, 2020 at 2:39 AM Roman Bolshakov wrote: > > > > On Wed, Dec 02, 2020 at 08:04:06PM +0100, Alexander Graf wrote: > > > From: Peter Collingbourne > > > > > > Sleep on WFI until the VTIMER is due but allow

Re: [RFC v7 15/22] cpu: Move tlb_fill to tcg_ops

2020-12-04 Thread Claudio Fontana
On 12/4/20 6:37 PM, Eduardo Habkost wrote: > On Fri, Dec 04, 2020 at 06:14:07PM +0100, Philippe Mathieu-Daudé wrote: >> On 11/30/20 3:35 AM, Claudio Fontana wrote: >>> From: Eduardo Habkost >>> >>> Signed-off-by: Eduardo Habkost >>> --- >>> accel/tcg/cputlb.c | 6 +++--- >>>

Re: [PATCH v4 08/11] arm: Add Hypervisor.framework build target

2020-12-04 Thread Alex Bennée
Alexander Graf writes: > Now that we have all logic in place that we need to handle > Hypervisor.framework > on Apple Silicon systems, let's add CONFIG_HVF for aarch64 as well so that we > can build it. > > Signed-off-by: Alexander Graf > > --- > > v1 -> v2: > > - Fix build on 32bit arm >

Re: [PATCH v2] tests/acceptance: test hot(un)plug of ccw devices

2020-12-04 Thread Wainer dos Santos Moschetta
On 12/4/20 11:08 AM, Cornelia Huck wrote: On Fri, 4 Dec 2020 11:05:34 -0300 Wainer dos Santos Moschetta wrote: Hi, On 12/4/20 9:14 AM, Cornelia Huck wrote: Hotplug a virtio-net-ccw device, and then hotunplug it again. Signed-off-by: Cornelia Huck --- v1->v2: - switch device id - clear

Re: [RFC v7 12/22] cpu: Introduce TCGCpuOperations struct

2020-12-04 Thread Claudio Fontana
On 12/4/20 6:10 PM, Philippe Mathieu-Daudé wrote: > On 11/30/20 3:35 AM, Claudio Fontana wrote: >> From: Eduardo Habkost >> >> The TCG-specific CPU methods will be moved to a separate struct, >> to make it easier to move accel-specific code outside generic CPU >> code in the future. Start by

Re: [RFC v7 12/22] cpu: Introduce TCGCpuOperations struct

2020-12-04 Thread Claudio Fontana
On 12/4/20 7:04 PM, Claudio Fontana wrote: > On 12/4/20 6:28 PM, Eduardo Habkost wrote: >> On Fri, Dec 04, 2020 at 06:10:49PM +0100, Philippe Mathieu-Daudé wrote: >>> On 11/30/20 3:35 AM, Claudio Fontana wrote: From: Eduardo Habkost The TCG-specific CPU methods will be moved to a

Re: [PATCH qemu v10] spapr: Implement Open Firmware client interface

2020-12-04 Thread Greg Kurz
On Tue, 13 Oct 2020 13:19:11 +1100 Alexey Kardashevskiy wrote: > The PAPR platform which describes an OS environment that's presented by > a combination of a hypervisor and firmware. The features it specifies > require collaboration between the firmware and the hypervisor. > > Since the

Re: [RFC v7 15/22] cpu: Move tlb_fill to tcg_ops

2020-12-04 Thread Philippe Mathieu-Daudé
On 12/4/20 6:37 PM, Eduardo Habkost wrote: > On Fri, Dec 04, 2020 at 06:14:07PM +0100, Philippe Mathieu-Daudé wrote: >> On 11/30/20 3:35 AM, Claudio Fontana wrote: >>> From: Eduardo Habkost >>> >>> Signed-off-by: Eduardo Habkost >>> --- >>> accel/tcg/cputlb.c | 6 +++--- >>>

Re: x86 TCG helpers clobbered registers

2020-12-04 Thread Richard Henderson
On 12/4/20 9:36 AM, Stephane Duverger wrote: > Hello, > > While looking at tcg/i386/tcg-target.c.inc:tcg_out_qemu_st(), I > discovered that the TCG generates a call to a store helper at the end > of the TB which is executed on TLB miss and get back to the remaining > translated ops. I tried to

Re: [RFC v7 12/22] cpu: Introduce TCGCpuOperations struct

2020-12-04 Thread Claudio Fontana
On 12/4/20 6:28 PM, Eduardo Habkost wrote: > On Fri, Dec 04, 2020 at 06:10:49PM +0100, Philippe Mathieu-Daudé wrote: >> On 11/30/20 3:35 AM, Claudio Fontana wrote: >>> From: Eduardo Habkost >>> >>> The TCG-specific CPU methods will be moved to a separate struct, >>> to make it easier to move

Re: [RFC v7 12/22] cpu: Introduce TCGCpuOperations struct

2020-12-04 Thread Eduardo Habkost
On Fri, Dec 04, 2020 at 07:07:09PM +0100, Claudio Fontana wrote: > On 12/4/20 7:04 PM, Claudio Fontana wrote: > > On 12/4/20 6:28 PM, Eduardo Habkost wrote: > >> On Fri, Dec 04, 2020 at 06:10:49PM +0100, Philippe Mathieu-Daudé wrote: > >>> On 11/30/20 3:35 AM, Claudio Fontana wrote: > From:

Re: [RFC v7 15/22] cpu: Move tlb_fill to tcg_ops

2020-12-04 Thread Philippe Mathieu-Daudé
On 12/4/20 7:14 PM, Claudio Fontana wrote: > On 12/4/20 7:00 PM, Philippe Mathieu-Daudé wrote: >> On 12/4/20 6:37 PM, Eduardo Habkost wrote: >>> On Fri, Dec 04, 2020 at 06:14:07PM +0100, Philippe Mathieu-Daudé wrote: On 11/30/20 3:35 AM, Claudio Fontana wrote: > From: Eduardo Habkost

Re: [RFC v7 15/22] cpu: Move tlb_fill to tcg_ops

2020-12-04 Thread Claudio Fontana
On 12/4/20 7:00 PM, Philippe Mathieu-Daudé wrote: > On 12/4/20 6:37 PM, Eduardo Habkost wrote: >> On Fri, Dec 04, 2020 at 06:14:07PM +0100, Philippe Mathieu-Daudé wrote: >>> On 11/30/20 3:35 AM, Claudio Fontana wrote: From: Eduardo Habkost Signed-off-by: Eduardo Habkost ---

Re: [RFC v7 00/22] i386 cleanup [hw/core/cpu.c common]

2020-12-04 Thread Eduardo Habkost
On Fri, Dec 04, 2020 at 05:07:21PM +0100, Paolo Bonzini wrote: > Il ven 4 dic 2020, 14:54 Claudio Fontana ha scritto: > > > On 11/30/20 3:35 AM, Claudio Fontana wrote: > > > Hi all, this is v7 of the i386 cleanup, > > > > This is fairly broken still and I am fixing it up, > > > > but a question

Re: [PATCH 7/9] target/mips: Extract msa_translate_init() from mips_tcg_init()

2020-12-04 Thread Richard Henderson
On 12/4/20 11:23 AM, Philippe Mathieu-Daudé wrote: > On 12/4/20 5:30 PM, Richard Henderson wrote: >> On 12/2/20 12:44 PM, Philippe Mathieu-Daudé wrote: >>> Extract the logic initialization of the MSA registers from >>> the generic initialization. >>> >>> Signed-off-by: Philippe Mathieu-Daudé >>>

Re: [RFC v7 12/22] cpu: Introduce TCGCpuOperations struct

2020-12-04 Thread Eduardo Habkost
On Fri, Dec 04, 2020 at 06:10:49PM +0100, Philippe Mathieu-Daudé wrote: > On 11/30/20 3:35 AM, Claudio Fontana wrote: > > From: Eduardo Habkost > > > > The TCG-specific CPU methods will be moved to a separate struct, > > to make it easier to move accel-specific code outside generic CPU > > code

Re: [PATCH 6/9] target/mips: Alias MSA vector registers on FPU scalar registers

2020-12-04 Thread Richard Henderson
On 12/2/20 12:44 PM, Philippe Mathieu-Daudé wrote: > Commits 863f264d10f ("add msa_reset(), global msa register") and > cb269f273fd ("fix multiple TCG registers covering same data") > removed the FPU scalar registers and replaced them by aliases to > the MSA vector registers. > While this might be

Re: [RFC v7 00/22] i386 cleanup [hw/core/cpu.c common]

2020-12-04 Thread Claudio Fontana
On 12/4/20 5:07 PM, Paolo Bonzini wrote: > Il ven 4 dic 2020, 14:54 Claudio Fontana ha scritto: > >> On 11/30/20 3:35 AM, Claudio Fontana wrote: >>> Hi all, this is v7 of the i386 cleanup, >> >> This is fairly broken still and I am fixing it up, >> >> but a question arises while hunting bugs

Re: [PATCH for-6.0 00/11] target/arm: enforce alignment

2020-12-04 Thread Richard Henderson
On 12/4/20 12:17 AM, Pavel Dovgalyuk wrote: > On 03.12.2020 19:14, Peter Maydell wrote: >> On Thu, 3 Dec 2020 at 16:10, Pavel Dovgalyuk >> wrote: >>> >>> On 03.12.2020 15:30, Philippe Mathieu-Daudé wrote: Cc'ing Pavel On 12/1/20 4:55 PM, Peter Maydell wrote: > On Wed, 25 Nov

Re: [PATCH v4 07/11] hvf: Add Apple Silicon support

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:53AM +0100, Alexander Graf wrote: > With Apple Silicon available to the masses, it's a good time to add support > for driving its virtualization extensions from QEMU. > > This patch adds all necessary architecture specific code to get basic VMs > working. It's still

Re: [PATCH v5 0/4] Introducing QMP query-netdev command

2020-12-04 Thread Alexey Kirillov
ping againPatchwork page: http://patchwork.ozlabs.org/project/qemu-devel/list/?series=212983 09.11.2020, 03:02, "Alexey Kirillov" :This patch series introduces a new QMP command "query-netdev" to getinformation about currently attached backend network devices (netdevs).Also, since the "info_str"

Re: [RFC v7 15/22] cpu: Move tlb_fill to tcg_ops

2020-12-04 Thread Eduardo Habkost
On Fri, Dec 04, 2020 at 06:14:07PM +0100, Philippe Mathieu-Daudé wrote: > On 11/30/20 3:35 AM, Claudio Fontana wrote: > > From: Eduardo Habkost > > > > Signed-off-by: Eduardo Habkost > > --- > > accel/tcg/cputlb.c | 6 +++--- > > accel/tcg/user-exec.c | 6 +++--- > >

Re: [RFC v7 15/22] cpu: Move tlb_fill to tcg_ops

2020-12-04 Thread Philippe Mathieu-Daudé
On 11/30/20 3:35 AM, Claudio Fontana wrote: > From: Eduardo Habkost > > Signed-off-by: Eduardo Habkost > --- > accel/tcg/cputlb.c | 6 +++--- > accel/tcg/user-exec.c | 6 +++--- > include/hw/core/cpu.h | 9 - > include/hw/core/tcg-cpu-ops.h | 12

Re: [RFC v7 12/22] cpu: Introduce TCGCpuOperations struct

2020-12-04 Thread Philippe Mathieu-Daudé
On 11/30/20 3:35 AM, Claudio Fontana wrote: > From: Eduardo Habkost > > The TCG-specific CPU methods will be moved to a separate struct, > to make it easier to move accel-specific code outside generic CPU > code in the future. Start by moving tcg_initialize(). Good idea! One minor comment

Re: [RFC v7 14/22] cpu: Move cpu_exec_* to tcg_ops

2020-12-04 Thread Philippe Mathieu-Daudé
On 11/30/20 3:35 AM, Claudio Fontana wrote: > From: Eduardo Habkost > > Signed-off-by: Eduardo Habkost > --- > accel/tcg/cpu-exec.c| 12 ++-- > include/hw/core/cpu.h | 6 -- > include/hw/core/tcg-cpu-ops.h | 9 + > target/alpha/cpu.c |

Re: [PATCH 7/9] target/mips: Extract msa_translate_init() from mips_tcg_init()

2020-12-04 Thread Philippe Mathieu-Daudé
On 12/4/20 5:30 PM, Richard Henderson wrote: > On 12/2/20 12:44 PM, Philippe Mathieu-Daudé wrote: >> Extract the logic initialization of the MSA registers from >> the generic initialization. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> target/mips/translate.c | 35

[PATCH 7/8] x86: ich9: factor out "guest_cpu_hotplug_features"

2020-12-04 Thread Igor Mammedov
it will be reused by next patch to check validity of unplug feature. Signed-off-by: Igor Mammedov --- hw/isa/lpc_ich9.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 087a18d04d..da80430144 100644 --- a/hw/isa/lpc_ich9.c

Re: [RFC v7 13/22] cpu: Move synchronize_from_tb() to tcg_ops

2020-12-04 Thread Philippe Mathieu-Daudé
On 11/30/20 3:35 AM, Claudio Fontana wrote: > From: Eduardo Habkost > > Signed-off-by: Eduardo Habkost > --- > accel/tcg/cpu-exec.c | 4 ++-- > include/hw/core/cpu.h | 8 > include/hw/core/tcg-cpu-ops.h | 14 +++--- > target/arm/cpu.c | 2 +- >

Re: [PATCH for-6.0 00/11] target/arm: enforce alignment

2020-12-04 Thread Peter Maydell
On Fri, 4 Dec 2020 at 06:17, Pavel Dovgalyuk wrote: > > On 03.12.2020 19:14, Peter Maydell wrote: > > On Thu, 3 Dec 2020 at 16:10, Pavel Dovgalyuk > > wrote: > >> > >> On 03.12.2020 15:30, Philippe Mathieu-Daudé wrote: > >>> Cc'ing Pavel > >>> > >>> On 12/1/20 4:55 PM, Peter Maydell wrote: >

[PATCH 6/8] tests/acpi: update expected files

2020-12-04 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 21 tests/data/acpi/pc/DSDT | Bin 5060 -> 5067 bytes tests/data/acpi/pc/DSDT.acpihmat| Bin 6385 -> 6392 bytes tests/data/acpi/pc/DSDT.bridge | Bin

[PATCH 4/8] tests/acpi: allow expected files change

2020-12-04 Thread Igor Mammedov
Change that will be introduced by following patch: @@ -557,6 +557,8 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPCDSDT", 0x0001) CINS, 1, CRMV, 1, CEJ0, 1, +, 1, +CEJF, 1,

Re: [PATCH v4 11/11] hvf: arm: Implement -cpu host

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:57AM +0100, Alexander Graf wrote: > Now that we have working system register sync, we push more target CPU > properties into the virtual machine. That might be useful in some > situations, but is not the typical case that users want. > > So let's add a -cpu host

[PATCH 1/8] hw: add compat machines for 6.0

2020-12-04 Thread Igor Mammedov
From: Cornelia Huck Add 6.0 machine types for arm/i440fx/q35/s390x/spapr. Signed-off-by: Cornelia Huck Signed-off-by: Igor Mammedov --- include/hw/boards.h| 3 +++ include/hw/i386/pc.h | 3 +++ hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++

Re: [PATCH v4 08/11] arm: Add Hypervisor.framework build target

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:54AM +0100, Alexander Graf wrote: > Now that we have all logic in place that we need to handle > Hypervisor.framework > on Apple Silicon systems, let's add CONFIG_HVF for aarch64 as well so that we > can build it. > Reviewed-by: Roman Bolshakov on x86: Tested-by:

Re: [RFC 08/15] target/riscv: rvb: single-bit instructions

2020-12-04 Thread Frank Chang
On Fri, Nov 20, 2020 at 5:04 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 11/19/20 12:35 PM, Richard Henderson wrote: > > On 11/18/20 12:29 AM, frank.ch...@sifive.com wrote: > >> +static bool trans_sbset(DisasContext *ctx, arg_sbset *a) > >> +{ > >> +REQUIRE_EXT(ctx, RVB);

[PATCH 0/8] add support for cpu hot-unplug with SMI broadcast enabled

2020-12-04 Thread Igor Mammedov
Changelog: since RFC: - split one big patch on smaller chunks - clear bit #4 in CPU eject - drop bit #4 toggle semantics and let it set only to 1 from guest side - do not allow unplug without hotplug - update expected ACPI tables to let CI pass It's QEMU side to support CPU hot-unplug

[PATCH 2/8] acpi: cpuhp: introduce 'firmware performs eject' status/control bits

2020-12-04 Thread Igor Mammedov
Adds bit #4 to status/control field of CPU hotplug MMIO interface. New bit will be used OSPM to mark CPUs as pending for removal by firmware, when it calls _EJ0 method on CPU device node. Later on, when firmware sees this bit set, it will perform CPU eject which will clear bit #4 as well.

[PATCH 3/8] x86: acpi: introduce AcpiPmInfo::smi_on_cpu_unplug

2020-12-04 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 1f5c211245..9036e5594c 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -96,6 +96,7 @@ typedef struct AcpiPmInfo {

Re: [PATCH v4 00/11] hvf: Implement Apple Silicon Support

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:46AM +0100, Alexander Graf wrote: > Now that Apple Silicon is widely available, people are obviously excited > to try and run virtualized workloads on them, such as Linux and Windows. > > This patch set implements a fully functional version to get the ball > going on

[PATCH 5/8] x86: acpi: let the firmware handle pending "CPU remove" events in SMM

2020-12-04 Thread Igor Mammedov
if firmware and QEMU negotiated CPU hotunplug support, generate _EJ0 method so that it will mark CPU for removal by firmware and pass control to it by triggering SMI. Signed-off-by: Igor Mammedov --- include/hw/acpi/cpu.h | 1 + hw/acpi/cpu.c | 15 +-- hw/i386/acpi-build.c

[PATCH 8/8] x86: ich9: let firmware negotiate 'CPU hot-unplug with SMI' feature

2020-12-04 Thread Igor Mammedov
Keep CPU hotunplug with SMI disabled on 5.2 and older and enable it by default on newer machine types. Signed-off-by: Igor Mammedov --- v1: - ensure that unplug can't be enabled without hotplug (Laszlo) --- hw/i386/pc.c | 4 +++- hw/isa/lpc_ich9.c | 8 +++- 2 files changed, 10

Re: [PATCH v4 10/11] hvf: arm: Add support for GICv3

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:56AM +0100, Alexander Graf wrote: > We currently only support GICv2 emulation. To also support GICv3, we will > need to pass a few system registers into their respective handler functions. > > This patch adds handling for all of the required system registers, so that

Re: [PATCH 9/9] target/mips: Explode gen_msa_branch() as gen_msa_BxZ_V/BxZ()

2020-12-04 Thread Richard Henderson
On 12/2/20 12:44 PM, Philippe Mathieu-Daudé wrote: > +static bool gen_msa_BxZ(DisasContext *ctx, int df, int wt, int s16, bool > if_not) > +{ > +check_msa_access(ctx); > + > +if (ctx->hflags & MIPS_HFLAG_BMASK) { > +generate_exception_end(ctx, EXCP_RI); > +return true; > +

Re: [PATCH v4 09/11] arm/hvf: Add a WFI handler

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:55AM +0100, Alexander Graf wrote: > From: Peter Collingbourne > > Sleep on WFI until the VTIMER is due but allow ourselves to be woken > up on IPI. > > In this implementation IPI is blocked on the CPU thread at startup and > pselect() is used to atomically unblock

Re: [for-6.0 v5 12/13] securable guest memory: Alter virtio default properties for protected guests

2020-12-04 Thread Cornelia Huck
On Fri, 4 Dec 2020 16:44:14 +1100 David Gibson wrote: > The default behaviour for virtio devices is not to use the platforms normal > DMA paths, but instead to use the fact that it's running in a hypervisor > to directly access guest memory. That doesn't work if the guest's memory > is

[PATCH] block/nvme: Do not allow image creation with NVMe block driver

2020-12-04 Thread Philippe Mathieu-Daudé
The NVMe driver does not support image creation. The full drive has to be passed to the guest. Before: $ qemu-img create -f raw nvme://:04:00.0/1 20G Formatting 'nvme://:04:00.0/1', fmt=raw size=21474836480 $ qemu-img info nvme://:04:00.0/1 image: nvme://:04:00.0/1

Re: [PATCH 1/2] virtio-blk: Acquire context while switching them on dataplane start

2020-12-04 Thread Eric Blake
On 12/4/20 10:53 AM, Sergio Lopez wrote: > On dataplane start, acquire the new AIO context before calling > 'blk_set_aio_context', releasing it immediately afterwards. This > prevents reaching the AIO context attach/detach notifier functions > without having acquired it first. > > It was also the

[PATCH v1 1/1] intc/ibex_plic: Clear interrupts that occur during claim process

2020-12-04 Thread Alistair Francis
Previously if an interrupt occured during the claim process (after the interrupt is claimed but before it's completed) it would never be cleared. This patch ensures that we also clear the hidden_pending bits as well. Signed-off-by: Alistair Francis --- hw/intc/ibex_plic.c | 13 ++--- 1

Re: [PATCH 8/9] target/mips: Remove CPUMIPSState* argument from gen_msa*() methods

2020-12-04 Thread Richard Henderson
On 12/2/20 12:44 PM, Philippe Mathieu-Daudé wrote: > The gen_msa*() methods don't use the "CPUMIPSState *env" > argument. Remove it to simplify. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/mips/translate.c | 57 - > 1 file changed, 28

x86 TCG helpers clobbered registers

2020-12-04 Thread Stephane Duverger
Hello, While looking at tcg/i386/tcg-target.c.inc:tcg_out_qemu_st(), I discovered that the TCG generates a call to a store helper at the end of the TB which is executed on TLB miss and get back to the remaining translated ops. I tried to mimick this behavior around the fast path (right between

Re: [PATCH 7/9] target/mips: Extract msa_translate_init() from mips_tcg_init()

2020-12-04 Thread Richard Henderson
On 12/2/20 12:44 PM, Philippe Mathieu-Daudé wrote: > Extract the logic initialization of the MSA registers from > the generic initialization. > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/mips/translate.c | 35 --- > 1 file changed, 20 insertions(+),

[PATCH 2/2] nbd/server: Quiesce coroutines on context switch

2020-12-04 Thread Sergio Lopez
When switching between AIO contexts we need to me make sure that both recv_coroutine and send_coroutine are not scheduled to run. Otherwise, QEMU may crash while attaching the new context with an error like this one: aio_co_schedule: Co-routine was already scheduled in 'aio_co_schedule' To

[PATCH 1/2] virtio-blk: Acquire context while switching them on dataplane start

2020-12-04 Thread Sergio Lopez
On dataplane start, acquire the new AIO context before calling 'blk_set_aio_context', releasing it immediately afterwards. This prevents reaching the AIO context attach/detach notifier functions without having acquired it first. It was also the only place where 'blk_set_aio_context' was called

Re: [RFC v7 00/22] i386 cleanup [hw/core/cpu.c common]

2020-12-04 Thread Paolo Bonzini
Il ven 4 dic 2020, 14:54 Claudio Fontana ha scritto: > On 11/30/20 3:35 AM, Claudio Fontana wrote: > > Hi all, this is v7 of the i386 cleanup, > > This is fairly broken still and I am fixing it up, > > but a question arises while hunting bugs here. > > Silent bugs are introduced when trying to

Re: [PATCH v4 06/11] hvf: Simplify post reset/init/loadvm hooks

2020-12-04 Thread Roman Bolshakov
On Fri, Dec 04, 2020 at 12:48:52AM +0100, Alexander Graf wrote: > The hooks we have that call us after reset, init and loadvm really all > just want to say "The reference of all register state is in the QEMU > vcpu struct, please push it". > > We already have a working pushing mechanism though

Re: [PATCH 3/4] block/io: bdrv_check_byte_request(): drop bdrv_is_inserted()

2020-12-04 Thread Alberto Garcia
On Thu 03 Dec 2020 11:27:12 PM CET, Vladimir Sementsov-Ogievskiy wrote: > Move bdrv_is_inserted() calls into callers. > > We are going to make bdrv_check_byte_request() a clean thing. > bdrv_is_inserted() is not about checking the request, it's about > checking the bs. So, it should be separate. >

Re: [PATCH 2/4] block/io: bdrv_refresh_limits(): use ERRP_GUARD

2020-12-04 Thread Alberto Garcia
On Thu 03 Dec 2020 11:27:11 PM CET, Vladimir Sementsov-Ogievskiy wrote: > This simplifies following commit. > > Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Berto

  1   2   >