[PATCH v5 04/22] target/riscv: Create xl field in env

2021-11-25 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei --- target/riscv/cpu.c| 1 + target/riscv/cpu.h| 3 +++ target/riscv/cpu_helper.c | 3 ++- target/riscv/csr.c| 2 ++ target/riscv/machine.c| 5 +++-- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/target/riscv/cpu.c b/target/r

[PATCH v5 08/22] target/riscv: Relax debug check for pm write

2021-11-25 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/csr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index d4ee897be2..bfafd3bd96 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -

[PATCH v5 18/22] target/riscv: Ajdust vector atomic check with XLEN

2021-11-25 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/insn_trans/trans_rvv.c.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/riscv/insn_trans/trans_rvv.c.inc b/target/riscv/insn_trans/trans_rvv.c.inc index 17ee3

[PATCH v5 17/22] target/riscv: Remove VILL field in VTYPE

2021-11-25 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei Acked-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index ef1d87af38..347428ffdc 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -106,7 +

[PATCH v5 11/22] target/riscv: Alloc tcg global for cur_pm[mask|base]

2021-11-25 Thread LIU Zhiwei
Replace the array of pm_mask/pm_base with scalar variables. Remove the cached array value in DisasContext. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/translate.c | 32 1 file changed, 8 insertions(+),

[PATCH v5 20/22] target/riscv: Adjust vector address with mask

2021-11-25 Thread LIU Zhiwei
The mask comes from the pointer masking extension, or the max value corresponding to XLEN bits. Signed-off-by: LIU Zhiwei Acked-by: Alistair Francis --- target/riscv/vector_helper.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/target/riscv/vector_

[PATCH v5 13/22] target/riscv: Split pm_enabled into mask and base

2021-11-25 Thread LIU Zhiwei
Use cached cur_pmmask and cur_pmbase to infer the current PM mode. This may decrease the TCG IR by one when pm_enabled is true and pm_base_enabled is false. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.h| 3 ++- target/ri

[PATCH v5 14/22] target/riscv: Split out the vill from vtype

2021-11-25 Thread LIU Zhiwei
We need not specially process vtype when XLEN changes. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.h | 1 + target/riscv/cpu_helper.c| 3 +-- target/riscv/csr.c | 13 - target/riscv/machine.c

[PATCH v5 22/22] target/riscv: Enable uxl field write

2021-11-25 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu_bits.h | 2 ++ target/riscv/csr.c | 8 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h index 9913fa9f77..510

[PATCH v5 16/22] target/riscv: Adjust vsetvl according to XLEN

2021-11-25 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.h | 5 + target/riscv/vector_helper.c | 7 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 2cee98f152..

[PATCH v5 15/22] target/riscv: Fix RESERVED field length in VTYPE

2021-11-25 Thread LIU Zhiwei
Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 1e56405243..2cee98f152 100644 --- a/target/riscv/cpu.h +++ b/target/ris

[PATCH v5 19/22] target/riscv: Fix check range for first fault only

2021-11-25 Thread LIU Zhiwei
Only check the range that has passed the address translation. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis --- target/riscv/vector_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/riscv/vector_helper.c b/target/ri

[PATCH v5 21/22] target/riscv: Adjust scalar reg in vector with XLEN

2021-11-25 Thread LIU Zhiwei
When sew <= 32bits, not need to extend scalar reg. When sew > 32bits, if xlen is less that sew, we should sign extend the scalar register, except explicitly specified by the spec. Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvv.c.inc | 44 ++--- 1 file changed

Re: [RFC PATCH 0/2] QEMU/openbios: PPC Software TLB support in the G4 family

2021-11-25 Thread Cédric Le Goater
On 11/25/21 01:45, BALATON Zoltan wrote: On Wed, 24 Nov 2021, Fabiano Rosas wrote: Fabiano Rosas writes: Hi all, We have this bug in QEMU which indicates that we haven't been able to run openbios on a 7450 cpu for quite a long time: https://gitlab.com/qemu-project/qemu/-/issues/86 OK:   $

Re: [RFC PATCH v2 21/30] hw/intc: Add LoongArch extioi interrupt controller(EIOINTC)

2021-11-25 Thread yangxiaojuan
Hi Mark, On 11/11/2021 10:49 PM, Mark Cave-Ayland wrote: > On 11/11/2021 01:35, Xiaojuan Yang wrote: > >> This patch realize the EIOINTC interrupt controller. >> >> Signed-off-by: Xiaojuan Yang >> Signed-off-by: Song Gao >> --- >> hw/intc/Kconfig| 3 + >> hw/intc/loonga

Re: [PATCH 1/2] virito-balloon: process all in sgs for free_page_vq

2021-11-25 Thread David Hildenbrand
On 25.11.21 03:20, Jason Wang wrote: > We only process the first in sg which may lead to the bitmap of the > pages belongs to following sgs were not cleared. This may result more > pages to be migrated. Fixing this by process all in sgs for > free_page_vq. > > Signed-off-by: Jason Wang > --- > h

Re: [PATCH 1/2] virito-balloon: process all in sgs for free_page_vq

2021-11-25 Thread Philippe Mathieu-Daudé
On 11/25/21 03:20, Jason Wang wrote: > We only process the first in sg which may lead to the bitmap of the > pages belongs to following sgs were not cleared. This may result more > pages to be migrated. Fixing this by process all in sgs for > free_page_vq. > > Signed-off-by: Jason Wang > --- > h

Re: [PATCH 1/2] hw/arm/virt: Rename default_bus_bypass_iommu

2021-11-25 Thread Markus Armbruster
Jean-Philippe Brucker writes: > Hi Markus, > > On Thu, Nov 25, 2021 at 08:11:04AM +0100, Markus Armbruster wrote: >> Peter, this patch fixes a bug that became a regression when the fix >> missed 6.1. It's been stuck on the list since August. Please have a >> look, and if it's good, get it merge

[PATCH] linux-user: move target_signal.h generic definitions to generic/signal.h

2021-11-25 Thread Song Gao
No code change Suggested-by: Richard Henderson Signed-off-by: Song Gao --- linux-user/aarch64/target_signal.h| 18 -- linux-user/arm/target_signal.h| 18 -- linux-user/cris/target_signal.h | 18 -- linux-user/generic/signal.h

Re: [PATCH 2/2] hw/i386: Rename default_bus_bypass_iommu

2021-11-25 Thread Markus Armbruster
"Michael S. Tsirkin" writes: > On Thu, Nov 25, 2021 at 08:12:25AM +0100, Markus Armbruster wrote: >> Michael & Marcel, this patch fixes a bug that became a regression when >> the fix missed 6.1. It's been stuck on the list since August. Please >> have a look, and if it's good, get it merged. >

[PATCH] linux-user: target_syscall.h remove definition TARGET_MINSIGSTKSZ

2021-11-25 Thread Song Gao
TARGET_MINSIGSTKSZ has been defined in generic/signal.h or target_signal.h, We don't need to define it again. Signed-off-by: Song Gao --- linux-user/aarch64/target_syscall.h| 1 - linux-user/alpha/target_syscall.h | 1 - linux-user/arm/target_syscall.h| 1 - linux-user/cris/targ

Re: [PATCH v1 1/2] monitor: move monitor destruction to the very end of qemu cleanup

2021-11-25 Thread Markus Armbruster
Denis Plotnikov writes: > This is needed to keep sending DEVICE_DELETED events on qemu cleanup. > The event may happen in the rcu thread and we're going to flush the rcu queue > explicitly before qemu exiting in the next patch. So move the monitor > destruction to the very end of qemu cleanup to

Re: [OpenBIOS] Re: [RFC PATCH 0/2] QEMU/openbios: PPC Software TLB support in the G4 family

2021-11-25 Thread Segher Boessenkool
Hi! On Thu, Nov 25, 2021 at 01:45:00AM +0100, BALATON Zoltan wrote: > As for guests, those running on the said PowerMac G4 should have support > for these CPUs so maybe you can try some Mac OS X versions (or maybe OSX uses hardware pagetables. > MorphOS but that is not the best for debugging a

Re: [PATCH] linux-user: move target_signal.h generic definitions to generic/signal.h

2021-11-25 Thread Laurent Vivier
Le 25/11/2021 à 09:55, Song Gao a écrit : No code change Suggested-by: Richard Henderson Signed-off-by: Song Gao --- linux-user/aarch64/target_signal.h| 18 -- linux-user/arm/target_signal.h| 18 -- linux-user/cris/target_signal.h | 18

Re: [PATCH] linux-user: target_syscall.h remove definition TARGET_MINSIGSTKSZ

2021-11-25 Thread Laurent Vivier
Le 25/11/2021 à 09:58, Song Gao a écrit : TARGET_MINSIGSTKSZ has been defined in generic/signal.h or target_signal.h, We don't need to define it again. Signed-off-by: Song Gao --- linux-user/aarch64/target_syscall.h| 1 - linux-user/alpha/target_syscall.h | 1 - linux-user/arm/targ

Re: Other pages for docs/devel/ [Was: Re: ... Update URLs of "SubmitAPatch" ...]

2021-11-25 Thread Kashyap Chamarthy
On Wed, Nov 24, 2021 at 08:35:35PM +0100, Paolo Bonzini wrote: > On 11/19/21 11:15, Kashyap Chamarthy wrote: > > Noted; so these two pages: > > > > -https://www.qemu.org/contribute/security-process/ > > -https://www.qemu.org/contribute/report-a-bug/ I posted a series for above two here: http

Re: [PATCH] linux-user: move target_signal.h generic definitions to generic/signal.h

2021-11-25 Thread WANG Xuerui
Hi, On 2021/11/25 16:55, Song Gao wrote: > diff --git a/linux-user/generic/signal.h b/linux-user/generic/signal.h > index 943bc1a..ceaf8a8 100644 > --- a/linux-user/generic/signal.h > +++ b/linux-user/generic/signal.h > @@ -55,6 +55,22 @@ > #define TARGET_SIG_UNBLOCK1/* for unblocking

Re: [PATCH v11 19/26] linux-user: Add LoongArch signal support

2021-11-25 Thread Richard Henderson
On 11/25/21 4:03 AM, gaosong wrote: I also see that TARGET_SIGSTKSZ is not used.  I think  we should delete it. Agreed. This constant will have been baked into the guest executable. r~

Re: [PATCH] linux-user: target_syscall.h remove definition TARGET_MINSIGSTKSZ

2021-11-25 Thread Philippe Mathieu-Daudé
On 11/25/21 09:58, Song Gao wrote: > TARGET_MINSIGSTKSZ has been defined in generic/signal.h > or target_signal.h, We don't need to define it again. > > Signed-off-by: Song Gao > --- > linux-user/aarch64/target_syscall.h| 1 - > linux-user/alpha/target_syscall.h | 1 - > linux-user/arm/

[PATCH v2 0/2] vdpa: Fix SIGSEGV on failed vdpa devices

2021-11-25 Thread Eugenio Pérez
Qemu falls back on userland handlers even if vhost-user and vhost-vdpa cases. These assumes a tap device can handle the packets. If a vdpa device fail to start, it can trigger a sigsegv because of that. Add dummy receivers that return no progress so it can keep running. Tested with a modified ver

[PATCH v2 2/2] virtio-net: Fix log message

2021-11-25 Thread Eugenio Pérez
The message has never been true in the case of non tap networking, so only tell that userland networking will be used if possible. Signed-off-by: Eugenio Pérez --- hw/net/virtio-net.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/vir

Re: [PATCH v3 1/3] target/ppc: Fixed call to deferred exception

2021-11-25 Thread Richard Henderson
On 11/24/21 6:25 PM, Lucas Mateus Castro (alqotel) wrote: mtfsf, mtfsfi and mtfsb1 instructions call helper_float_check_status after updating the value of FPSCR, but helper_float_check_status checks fp_status and fp_status isn't updated based on FPSCR and since the value of fp_status is reset ear

Re: [PATCH v6 01/16] linux-user: Untabify all safe-syscall.inc.S

2021-11-25 Thread Warner Losh
On Tue, Nov 23, 2021 at 10:38 AM Richard Henderson < richard.hender...@linaro.org> wrote: > Suggested-by: Peter Maydell > Signed-off-by: Richard Henderson > --- > linux-user/host/aarch64/safe-syscall.inc.S | 110 +++--- > linux-user/host/arm/safe-syscall.inc.S | 134

[PATCH v2 1/2] vdpa: Add dummy receive callback

2021-11-25 Thread Eugenio Pérez
Qemu falls back on userland handlers even if vhost-user and vhost-vdpa cases. These assumes a tap device can handle the packets. If a vdpa device fail to start, it can trigger a sigsegv because of that. Add dummy receiver that returns no progress so it can keep running. Fixes: 1e0a84ea49 ("vhost-

Re: [PATCH v3 2/3] test/tcg/ppc64le: test mtfsf

2021-11-25 Thread Richard Henderson
On 11/24/21 6:25 PM, Lucas Mateus Castro (alqotel) wrote: Added tests for the mtfsf to check if FI bit of FPSCR is being set and if exception calls are being made correctly. Signed-off-by: Lucas Mateus Castro (alqotel) --- tests/tcg/ppc64/Makefile.target | 1 + tests/tcg/ppc64le/Makefile.

Re: [PATCH v6 04/16] linux-user/host/mips: Add safe-syscall.inc.S

2021-11-25 Thread Warner Losh
On Tue, Nov 23, 2021 at 10:38 AM Richard Henderson < richard.hender...@linaro.org> wrote: > Signed-off-by: Richard Henderson > --- > linux-user/host/mips/hostdep.h | 3 + > linux-user/host/mips/safe-syscall.inc.S | 123 > 2 files changed, 126 insertions(+) >

Re: [PATCH v6 03/16] linux-user: Move syscall error detection into safe_syscall_base

2021-11-25 Thread Warner Losh
On Tue, Nov 23, 2021 at 10:38 AM Richard Henderson < richard.hender...@linaro.org> wrote: > The current api from safe_syscall_base() is to return -errno, which is > the interface provided by *some* linux kernel abis. The wrapper macro, > safe_syscall(), detects error, stores into errno, and retur

Re: Give the fosshost.org VM a purpose or a retirement

2021-11-25 Thread Warner Losh
On Wed, Nov 24, 2021 at 7:56 AM Philippe Mathieu-Daudé wrote: > On 11/24/21 15:16, Cleber Rosa wrote: > > Hi, > > > > Fosshost.org was kind enough to supply the QEMU project with a public > > VM hosted by them. The original use case we anticipated was to set up > > a GitLab CI runner, because we

Re: Give the fosshost.org VM a purpose or a retirement

2021-11-25 Thread Daniel P . Berrangé
On Wed, Nov 24, 2021 at 03:55:55PM +0100, Philippe Mathieu-Daudé wrote: > On 11/24/21 15:16, Cleber Rosa wrote: > > Hi, > > > > Fosshost.org was kind enough to supply the QEMU project with a public > > VM hosted by them. The original use case we anticipated was to set up > > a GitLab CI runner, b

Re: [PATCH v4 1/3] hw/block/fdc: Extract blk_create_empty_drive()

2021-11-25 Thread Hanna Reitz
On 24.11.21 17:15, Philippe Mathieu-Daudé wrote: We are going to re-use this code in the next commit, so extract it as a new blk_create_empty_drive() function. Inspired-by: Hanna Reitz :) Signed-off-by: Philippe Mathieu-Daudé --- hw/block/fdc.c | 9 +++-- 1 file changed, 7 insertion

Re: [PATCH v5 07/18] target/riscv: setup everything so that riscv128-softmmu compiles

2021-11-25 Thread Alistair Francis
On Wed, Nov 24, 2021 at 5:33 PM Philippe Mathieu-Daudé wrote: > > Hi Frédéric, > > On 11/24/21 07:55, Frédéric Pétrot wrote: > > On 24/11/2021 07:12, Alistair Francis wrote: > >> On Sat, Nov 13, 2021 at 1:16 AM Frédéric Pétrot > >> wrote: > >>> > >>> This patch is kind of a mess because several f

Re: [PATCH v4 3/3] tests/qtest/fdc-test: Add a regression test for CVE-2021-20196

2021-11-25 Thread Hanna Reitz
On 24.11.21 17:15, Philippe Mathieu-Daudé wrote: Without the previous commit, when running 'make check-qtest-i386' with QEMU configured with '--enable-sanitizers' we get: AddressSanitizer:DEADLYSIGNAL = ==287878==ERROR: Add

Re: [PATCH v2 12/15] hw/nvme: Initialize capability structures for primary/secondary controllers

2021-11-25 Thread Łukasz Gieryk
On Wed, Nov 24, 2021 at 03:26:30PM +0100, Łukasz Gieryk wrote: > On Wed, Nov 24, 2021 at 09:04:31AM +0100, Klaus Jensen wrote: > > On Nov 16 16:34, Łukasz Gieryk wrote: > > > With four new properties: > > > - sriov_v{i,q}_flexible, > > > - sriov_max_v{i,q}_per_vf, > > > one can configure the numb

[PATCH-for-6.2] docs: add a word of caution on x-native-hotplug property for pcie-root-ports

2021-11-25 Thread Ani Sinha
x-native-hotplug property, when used in order to disable HPC bit on the PCIE root ports, can lead to unexpected results from the guest operating system. Users are strongly advised not to touch this property in order to manipulte the HPC bit. Add a word of caution in the pcie.txt doc file to documen

Re: [PATCH v4 3/3] tests/qtest/fdc-test: Add a regression test for CVE-2021-20196

2021-11-25 Thread Philippe Mathieu-Daudé
On 11/25/21 12:57, Hanna Reitz wrote: > On 24.11.21 17:15, Philippe Mathieu-Daudé wrote: >> Without the previous commit, when running 'make check-qtest-i386' >> with QEMU configured with '--enable-sanitizers' we get: >> >>    AddressSanitizer:DEADLYSIGNAL >>    =

Re: [PATCH v5 3/3] cpus-common: implement dirty limit on vCPU

2021-11-25 Thread Hyman Huang
在 2021/11/24 23:33, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle vCPU until it reachs the quota dirtyrate given by user. Introduce qmp commands set-dirty-limit/cancel-dirty-limit

Re: SEV guest attestation

2021-11-25 Thread Dov Murik
[+cc jejb, tobin, jim, hubertus] On 25/11/2021 9:14, Sergio Lopez wrote: > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: >> * Daniel P. Berrangé (berra...@redhat.com) wrote: >>> On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler Fanelli wrote: Hi, We recently

Re: [RFC PATCH v3 0/5] QMP support for cold-plugging devices

2021-11-25 Thread Damien Hedde
On 11/24/21 15:51, Markus Armbruster wrote: Daniel P. Berrangé writes: On Wed, Nov 24, 2021 at 02:50:11PM +0100, Markus Armbruster wrote: Damien Hedde writes: The biggest difference is the fw_cfg option I think: it is related with the rom_set_order_override()/rom_reset_order_override()

Re: [PATCH] linux-user: move target_signal.h generic definitions to generic/signal.h

2021-11-25 Thread gaosong
Hi, On 2021/11/25 下午6:08, WANG Xuerui wrote: + +#define TARGET_MINSIGSTKSZ 2048 While all the architectures you de-duplicated here have TARGET_MINSIGSTACKSZ as 2048, some others specify a different value (mostly 4096, e.g. alpha), as can be seen in your next patch (which should belong to thi

Re: [RFC PATCH v3 0/5] QMP support for cold-plugging devices

2021-11-25 Thread Daniel P . Berrangé
On Wed, Nov 24, 2021 at 03:51:23PM +0100, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Wed, Nov 24, 2021 at 02:50:11PM +0100, Markus Armbruster wrote: > >> Damien Hedde writes: > >> > >> > The biggest difference is the fw_cfg option I think: it is related > >> > with the rom_s

Re: Questions about losing the write lock of raw-format disks after migration

2021-11-25 Thread Hanna Reitz
On 24.11.21 13:56, Peng Liang via wrote: Hi folks, When we test migration with raw-format disk, we found that the QEMU process in the dst will lose the write lock after migration. However, the QEMU process in the dst will still hold the write lock for qcow2-format disk. After reading some bloc

unable to execute QEMU command 'qom-get': Property 'sgx-epc.unavailable-features' not found

2021-11-25 Thread Yang Zhong
Hello Paolo, Our customer used the Libvirt XML to start a SGX VM, but failed. libvirt.libvirtError: internal error: unable to execute QEMU command 'qom-get': Property 'sgx-epc.unavailable-features' not found The XML file, The new compound property command shou

Re: SEV guest attestation

2021-11-25 Thread Dr. David Alan Gilbert
* Sergio Lopez (s...@redhat.com) wrote: > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler Fanelli wrote: > > > > Hi, > > > > > > > > We recently discussed a way for r

Re: SEV guest attestation

2021-11-25 Thread Daniel P . Berrangé
On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler Fanelli wrote: > > > Hi, > > > > > > We recently discussed a way for remote SEV guest attestation through QEMU. > > > My i

Re: SEV guest attestation

2021-11-25 Thread Daniel P . Berrangé
On Thu, Nov 25, 2021 at 08:14:28AM +0100, Sergio Lopez wrote: > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler Fanelli wrote: > > > > Hi, > > > > > > > > We recently

Re: SEV guest attestation

2021-11-25 Thread Daniel P . Berrangé
On Thu, Nov 25, 2021 at 02:44:51PM +0200, Dov Murik wrote: > [+cc jejb, tobin, jim, hubertus] > > > On 25/11/2021 9:14, Sergio Lopez wrote: > > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > >> * Daniel P. Berrangé (berra...@redhat.com) wrote: > >>> On Wed, Nov 24, 2021

Re: SEV guest attestation

2021-11-25 Thread Dov Murik
On 25/11/2021 15:27, Daniel P. Berrangé wrote: > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: >> * Daniel P. Berrangé (berra...@redhat.com) wrote: >>> On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler Fanelli wrote: Hi, We recently discussed a way for remo

Re: SEV guest attestation

2021-11-25 Thread Daniel P . Berrangé
On Thu, Nov 25, 2021 at 08:14:28AM +0100, Sergio Lopez wrote: > For SEV-SNP, this is pretty much the end of the story, because the > attestation exchange is driven by an agent inside the guest. Well, > there's also the need to have in the VM a well-known vNIC bridged to a > network that's routed to

[PATCH 0/2] block-backend: Retain permissions after migration

2021-11-25 Thread Hanna Reitz
Hi, Peng Liang has reported an issue regarding migration of raw images here: https://lists.nongnu.org/archive/html/qemu-block/2021-11/msg00673.html It turns out that after migrating, all permissions are shared when they weren’t before. The cause of the problem is that we deliberately delay restr

[PATCH 2/2] iotests/migration-permissions: New test

2021-11-25 Thread Hanna Reitz
This test checks that a raw image in use by a virtio-blk device does not share the WRITE permission both before and after migration. Signed-off-by: Hanna Reitz --- .../qemu-iotests/tests/migration-permissions | 101 ++ .../tests/migration-permissions.out | 5 + 2 fil

[PATCH 1/2] block-backend: Retain permissions after migration

2021-11-25 Thread Hanna Reitz
After migration, the permissions the guest device wants to impose on its BlockBackend are stored in blk->perm and blk->shared_perm. In blk_root_activate(), we take our permissions, but keep all shared permissions open by calling `blk_set_perm(blk->perm, BLK_PERM_ALL)`. Only afterwards (immediatel

Re: [PATCH v5 3/3] cpus-common: implement dirty limit on vCPU

2021-11-25 Thread Markus Armbruster
Hyman Huang writes: > 在 2021/11/24 23:33, Markus Armbruster 写道: >> huang...@chinatelecom.cn writes: >> >>> From: Hyman Huang(黄勇) >>> >>> Implement dirtyrate calculation periodically basing on >>> dirty-ring and throttle vCPU until it reachs the quota >>> dirtyrate given by user. >>> >>> Introdu

Re: SEV guest attestation

2021-11-25 Thread Dov Murik
On 25/11/2021 15:52, Daniel P. Berrangé wrote: > On Thu, Nov 25, 2021 at 08:14:28AM +0100, Sergio Lopez wrote: >> For SEV-SNP, this is pretty much the end of the story, because the >> attestation exchange is driven by an agent inside the guest. Well, >> there's also the need to have in the VM a

Re: SEV guest attestation

2021-11-25 Thread Dov Murik
[+cc Tom, Brijesh] On 25/11/2021 15:42, Daniel P. Berrangé wrote: > On Thu, Nov 25, 2021 at 02:44:51PM +0200, Dov Murik wrote: >> [+cc jejb, tobin, jim, hubertus] >> >> >> On 25/11/2021 9:14, Sergio Lopez wrote: >>> On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: * Dan

Re: SEV guest attestation

2021-11-25 Thread Daniel P . Berrangé
On Thu, Nov 25, 2021 at 03:50:46PM +0200, Dov Murik wrote: > > > On 25/11/2021 15:27, Daniel P. Berrangé wrote: > > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > >> * Daniel P. Berrangé (berra...@redhat.com) wrote: > >>> On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler

Re: [RFC PATCH 0/2] QEMU/openbios: PPC Software TLB support in the G4 family

2021-11-25 Thread BALATON Zoltan
On Thu, 25 Nov 2021, Cédric Le Goater wrote: On 11/25/21 01:45, BALATON Zoltan wrote: On Wed, 24 Nov 2021, Fabiano Rosas wrote: Fabiano Rosas writes: Hi all, We have this bug in QEMU which indicates that we haven't been able to run openbios on a 7450 cpu for quite a long time: https://gitl

Re: [PATCH v3 1/3] target/ppc: Fixed call to deferred exception

2021-11-25 Thread BALATON Zoltan
On Thu, 25 Nov 2021, David Gibson wrote: On Thu, Nov 25, 2021 at 01:49:46AM +0100, BALATON Zoltan wrote: On Wed, 24 Nov 2021, Lucas Mateus Castro (alqotel) wrote: mtfsf, mtfsfi and mtfsb1 instructions call helper_float_check_status after updating the value of FPSCR, but helper_float_check_statu

Re: [PATCH 1/2] block-backend: Retain permissions after migration

2021-11-25 Thread Philippe Mathieu-Daudé
On 11/25/21 14:53, Hanna Reitz wrote: > After migration, the permissions the guest device wants to impose on its > BlockBackend are stored in blk->perm and blk->shared_perm. In > blk_root_activate(), we take our permissions, but keep all shared > permissions open by calling `blk_set_perm(blk->perm

Re: [PATCH v2 00/15] hw/nvme: SR-IOV with Virtualization Enhancements

2021-11-25 Thread Łukasz Gieryk
On Wed, Nov 24, 2021 at 09:03:06AM +0100, Klaus Jensen wrote: > Hi Lukasz, > > I've been through this. I have a couple of review comments, but overall > looks good for inclusion in nvme-next. Would be nice to get this in > early in the cycle so it can mature there for 7.0. We (I’m speaking on beh

Re: [RFC PATCH 0/2] QEMU/openbios: PPC Software TLB support in the G4 family

2021-11-25 Thread Cédric Le Goater
 https://qemu.readthedocs.io/en/latest/system/target-ppc.html Yes, I thought about that but haven't got to it yet. I'm also not sure what should I put in that doc so if you have time feel free to copy from the above URLs what you think is better to have in the docs. Otherwise I'll do it somet

Re: [PATCH v5 07/18] target/riscv: setup everything so that riscv128-softmmu compiles

2021-11-25 Thread Frédéric Pétrot
On 25/11/2021 12:47, Alistair Francis wrote: On Wed, Nov 24, 2021 at 5:33 PM Philippe Mathieu-Daudé wrote: Hi Frédéric, On 11/24/21 07:55, Frédéric Pétrot wrote: On 24/11/2021 07:12, Alistair Francis wrote: On Sat, Nov 13, 2021 at 1:16 AM Frédéric Pétrot wrote: This patch is kind of a me

[Bug 1603636] Re: Guest has not initialized the display yet on ubuntu 16.10 PPC

2021-11-25 Thread Paul White
** Changed in: ubuntu Status: New => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1603636 Title: Guest has not initialized the display yet on ubuntu 16.10 PPC Status in QEMU: Fix

Re: SEV guest attestation

2021-11-25 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, Nov 25, 2021 at 08:14:28AM +0100, Sergio Lopez wrote: > > For SEV-SNP, this is pretty much the end of the story, because the > > attestation exchange is driven by an agent inside the guest. Well, > > there's also the need to have in the VM

[PATCH v8 00/10] PMU-EBB support for PPC64 TCG

2021-11-25 Thread Daniel Henrique Barboza
Hi, In this new version considerable changes were made based on David's feedback of the previous version. All the counter frozen logic was moved from the body of helper_store_mmcr0 to pmc_get_event() via a new PMUEventType called PMU_EVENT_INACTIVE. The function pmu_update_cycles() is now called i

[PATCH v8 01/10] target/ppc: introduce PMUEventType and PMU overflow timers

2021-11-25 Thread Daniel Henrique Barboza
This patch starts an IBM Power8+ compatible PMU implementation by adding the representation of PMU events that we are going to sample, PMUEventType. This enum represents a Perf event that is being sampled by a specific counter 'sprn'. Events that aren't available (i.e. no event was set in MMCR1) wi

[PATCH v8 02/10] target/ppc: PMU basic cycle count for pseries TCG

2021-11-25 Thread Daniel Henrique Barboza
This patch adds the barebones of the PMU logic by enabling cycle counting. The overall logic goes as follows: - MMCR0 reg initial value is set to 0x8000 (MMCR0_FC set) to avoid having to spin the PMU right at system init; - to retrieve the events that are being profiled, pmc_get_event() will

[PATCH v8 04/10] target/ppc: PMU: update counters on MMCR1 write

2021-11-25 Thread Daniel Henrique Barboza
MMCR1 determines the events to be sampled by the PMU. Updating the counters at every MMCR1 write ensures that we're not sampling more or less events by looking only at MMCR0 and the PMCs. It is worth noticing that both the Book3S PowerPC PMU, and this IBM Power8+ PMU that we're modeling, also uses

[PATCH v8 06/10] target/ppc: enable PMU instruction count

2021-11-25 Thread Daniel Henrique Barboza
The PMU is already counting cycles by calculating time elapsed in nanoseconds. Counting instructions is a different matter and requires another approach. This patch adds the capability of counting completed instructions (Perf event PM_INST_CMPL) by counting the amount of instructions translated in

[PATCH v8 03/10] target/ppc: PMU: update counters on PMCs r/w

2021-11-25 Thread Daniel Henrique Barboza
Calling pmu_update_cycles() on every PMC read/write operation ensures that the values being fetched are up to date with the current PMU state. In theory we can get away by just trapping PMCs reads, but we're going to trap PMC writes to deal with counter overflow logic later on. Let's put the requ

[PATCH v8 08/10] PPC64/TCG: Implement 'rfebb' instruction

2021-11-25 Thread Daniel Henrique Barboza
An Event-Based Branch (EBB) allows applications to change the NIA when a event-based exception occurs. Event-based exceptions are enabled by setting the Branch Event Status and Control Register (BESCR). If the event-based exception is enabled when the exception occurs, an EBB happens. The followin

[PATCH v8 09/10] target/ppc: PMU Event-Based exception support

2021-11-25 Thread Daniel Henrique Barboza
From: Gustavo Romero Following up the rfebb implementation, this patch adds the EBB exception support that are triggered by Performance Monitor alerts. This exception occurs when an enabled PMU condition or event happens and both MMCR0_EBE and BESCR_PME are set. The supported PM alerts will cons

[PATCH v8 07/10] target/ppc/power8-pmu.c: add PM_RUN_INST_CMPL (0xFA) event

2021-11-25 Thread Daniel Henrique Barboza
PM_RUN_INST_CMPL, instructions completed with the run latch set, is the architected PowerISA v3.1 event defined with PMC4SEL = 0xFA. Implement it by checking for the CTRL RUN bit before incrementing the counter. To make this work properly we also need to force a new translation block each time SPR

[PATCH v8 05/10] target/ppc: enable PMU counter overflow with cycle events

2021-11-25 Thread Daniel Henrique Barboza
The PowerISA v3.1 defines that if the proper bits are set (MMCR0_PMC1CE for PMC1 and MMCR0_PMCjCE for the remaining PMCs), counter negative conditions are enabled. This means that if the counter value overflows (i.e. exceeds 0x8000) a performance monitor alert will occur. This alert can trigger

Re: SEV guest attestation

2021-11-25 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Wed, Nov 24, 2021 at 11:34:16AM -0500, Tyler Fanelli wrote: > > > > Hi, > > > > > > > > We recently discussed a

[PATCH v8 10/10] target/ppc/excp_helper.c: EBB handling adjustments

2021-11-25 Thread Daniel Henrique Barboza
The current logic is only considering event-based exceptions triggered by the performance monitor. This is true now, but we might want to add support for external event-based exceptions in the future. Let's make it a bit easier to do so by adding the bit logic that would happen in case we were dea

Re: [PATCH] hw/intc: cannot clear GICv3 ITS CTLR[Enabled] bit

2021-11-25 Thread Alex Bennée
Shashi Mallela writes: > When Enabled bit is cleared in GITS_CTLR,ITS feature continues > to be enabled.This patch fixes the issue. > > Signed-off-by: Shashi Mallela Tested-by: Alex Bennée in so far as it doesn't break the kvm-unit-tests but it also doesn't solve the: irq 55: nobody car

Re: SEV guest attestation

2021-11-25 Thread Sergio Lopez
On Thu, Nov 25, 2021 at 02:44:51PM +0200, Dov Murik wrote: > [+cc jejb, tobin, jim, hubertus] > > > On 25/11/2021 9:14, Sergio Lopez wrote: > > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > >> * Daniel P. Berrangé (berra...@redhat.com) wrote: > >>> On Wed, Nov 24, 2021

Re: SEV guest attestation

2021-11-25 Thread Dr. David Alan Gilbert
* Sergio Lopez (s...@redhat.com) wrote: > On Thu, Nov 25, 2021 at 02:44:51PM +0200, Dov Murik wrote: > > [+cc jejb, tobin, jim, hubertus] > > > > > > On 25/11/2021 9:14, Sergio Lopez wrote: > > > On Wed, Nov 24, 2021 at 06:29:07PM +, Dr. David Alan Gilbert wrote: > > >> * Daniel P. Berrangé (

[PATCH v2 1/7] accel/tcg: introduce CF_NOIRQ

2021-11-25 Thread Alex Bennée
Here we introduce a new compiler flag to disable the checking of exit request (icount_decr.u32). This is useful when we want to ensure the next block cannot be preempted by an asynchronous event. Suggested-by: Richard Henderson Signed-off-by: Alex Bennée --- v2 - split from larger patch - r

[PATCH v2 6/7] MAINTAINERS: Remove me as a reviewer for the build and test/avocado

2021-11-25 Thread Alex Bennée
From: Willian Rampazzo Remove me as a reviewer for the Build and test automation and the Integration Testing with the Avocado Framework and add Beraldo Leal. Signed-off-by: Willian Rampazzo Reviewed-by: Beraldo Leal Message-Id: <20211122191124.31620-1-willi...@redhat.com> Signed-off-by: Alex B

[PATCH for 6.2 v2 0/7] more tcg, plugin, test and build fixes

2021-11-25 Thread Alex Bennée
Hi, As the release process rolls on here if the current state of my for-6.2 tree. There are fixes for TCG, plugins, build and test. For v2 I split the CF_NOIRQ patches and simplified a little bit. I tested with a custom trace point while using watchpoints on the x86_64 memory TCG test. A proper t

[PATCH v2 3/7] tests/avocado: fix tcg_plugin mem access count test

2021-11-25 Thread Alex Bennée
When we cleaned up argument handling the test was missed. Fixes: 5ae589faad ("tests/plugins/mem: introduce "track" arg and make args not positional") Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211123205729.2205806-4-alex.ben...@

[PATCH v2 2/7] accel/tcg: suppress IRQ check for special TBs

2021-11-25 Thread Alex Bennée
When we set cpu->cflags_next_tb it is because we want to carefully control the execution of the next TB. Currently there is a race that causes the second stage of watchpoint handling to get ignored if an IRQ is processed before we finish executing the instruction that triggers the watchpoint. Use t

[PATCH v2 4/7] plugins/meson.build: fix linker issue with weird paths

2021-11-25 Thread Alex Bennée
Signed-off-by: Alex Bennée Tested-by: Stefan Weil Fixes: https://gitlab.com/qemu-project/qemu/-/issues/712 Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211123205729.2205806-5-alex.ben...@linaro.org> --- plugins/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

[PATCH v2 7/7] MAINTAINERS: Add section for Aarch64 GitLab custom runner

2021-11-25 Thread Alex Bennée
From: Philippe Mathieu-Daudé Add a MAINTAINERS section to cover the GitLab YAML config file containing the jobs run on the custom runner sponsored by the Works On Arm project [*]. [*] https://developer.arm.com/solutions/infrastructure/works-on-arm Suggested-by: Thomas Huth Signed-off-by: Phili

Re: [PATCH] hw/intc: cannot clear GICv3 ITS CTLR[Enabled] bit

2021-11-25 Thread Peter Maydell
On Wed, 24 Nov 2021 at 18:22, Shashi Mallela wrote: > > When Enabled bit is cleared in GITS_CTLR,ITS feature continues > to be enabled.This patch fixes the issue. > > Signed-off-by: Shashi Mallela > --- > hw/intc/arm_gicv3_its.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > >

Re: [PATCH] hw/intc: cannot clear GICv3 ITS CTLR[Enabled] bit

2021-11-25 Thread Peter Maydell
On Thu, 25 Nov 2021 at 15:19, Alex Bennée wrote: > > > Shashi Mallela writes: > > > When Enabled bit is cleared in GITS_CTLR,ITS feature continues > > to be enabled.This patch fixes the issue. > > > > Signed-off-by: Shashi Mallela > > > Tested-by: Alex Bennée > > in so far as it doesn't break t

[PATCH v2 5/7] gdbstub: handle a potentially racing TaskState

2021-11-25 Thread Alex Bennée
When dealing with multi-threaded userspace programs there is a race condition with the addition of cpu->opaque (aka TaskState). This is due to cpu_copy calling cpu_create which updates the global vCPU list. However the task state isn't set until later. This shouldn't be a problem because the new th

Re: SEV guest attestation

2021-11-25 Thread Daniel P . Berrangé
On Thu, Nov 25, 2021 at 03:40:36PM +, Dr. David Alan Gilbert wrote: > * Sergio Lopez (s...@redhat.com) wrote: > > On Thu, Nov 25, 2021 at 02:44:51PM +0200, Dov Murik wrote: > > > > > > SEV-ES has pre-launch measurement and secret injection, just like SEV > > > (except that the measurement incl

Re: SEV guest attestation

2021-11-25 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Thu, Nov 25, 2021 at 03:40:36PM +, Dr. David Alan Gilbert wrote: > > * Sergio Lopez (s...@redhat.com) wrote: > > > On Thu, Nov 25, 2021 at 02:44:51PM +0200, Dov Murik wrote: > > > > > > > > SEV-ES has pre-launch measurement and secret inje

  1   2   >