[PATCH v1 11/12] target/riscv: Implement virtual time adjusting with vm state changing

2021-11-19 Thread Yifei Jiang
We hope that virtual time adjusts with vm state changing. When a vm is stopped, guest virtual time should stop counting and kvm_timer should be stopped. When the vm is resumed, guest virtual time should continue to count and kvm_timer should be restored. Signed-off-by: Yifei Jiang Signed-off-by:

[PATCH v1 07/12] target/riscv: Support setting external interrupt by KVM

2021-11-19 Thread Yifei Jiang
Extend riscv_cpu_update_mip() to support setting external interrupt by KVM. It will call kvm_riscv_set_irq() to change the IRQ state in the KVM module When kvm is enabled and the MIP_SEIP bit is set in "mask" In addition, bacause target/riscv/cpu_helper.c is used to TCG, so move

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

2021-11-19 Thread 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 to > set/cancel dirty limit on

[PATCH v1 02/12] target/riscv: Add target/riscv/kvm.c to place the public kvm interface

2021-11-19 Thread Yifei Jiang
Add target/riscv/kvm.c to place kvm_arch_* function needed by kvm/kvm-all.c. Meanwhile, add kvm support in meson.build file. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- meson.build | 2 + target/riscv/kvm.c | 133

[PATCH v1 10/12] target/riscv: Add kvm_riscv_get/put_regs_timer

2021-11-19 Thread Yifei Jiang
Add kvm_riscv_get/put_regs_timer to synchronize virtual time context from KVM. To set register of RISCV_TIMER_REG(state) will occur a error from KVM on kvm_timer_state == 0. It's better to adapt in KVM, but it doesn't matter that adaping in QEMU. Signed-off-by: Yifei Jiang Signed-off-by:

[PATCH v1 05/12] target/riscv: Implement kvm_arch_put_registers

2021-11-19 Thread Yifei Jiang
Put GPR CSR and FP registers to kvm by KVM_SET_ONE_REG ioctl Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- target/riscv/kvm.c | 141 - 1 file changed, 140 insertions(+), 1 deletion(-) diff --git

[PATCH v1 12/12] target/riscv: Support virtual time context synchronization

2021-11-19 Thread Yifei Jiang
Add virtual time context description to vmstate_riscv_cpu. After cpu being loaded, virtual time context is updated to KVM. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li --- target/riscv/machine.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/target/riscv/machine.c

[PATCH v1 09/12] target/riscv: Add host cpu type

2021-11-19 Thread Yifei Jiang
'host' type cpu is set isa to RV32 or RV64 simply, more isa info will obtain from KVM in kvm_arch_init_vcpu() Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- target/riscv/cpu.c | 15 +++ target/riscv/cpu.h | 1 + 2 files changed, 16

[PATCH v1 08/12] target/riscv: Handle KVM_EXIT_RISCV_SBI exit

2021-11-19 Thread Yifei Jiang
Use char-fe to handle console sbi call, which implement early console io while apply 'earlycon=sbi' into kernel parameters. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li --- target/riscv/kvm.c | 42 - target/riscv/sbi_ecall_interface.h | 72

[PATCH v1 01/12] update-linux-headers: Add asm-riscv/kvm.h

2021-11-19 Thread Yifei Jiang
Add asm-riscv/kvm.h for RISC-V KVM, and update linux/kvm.h Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li --- linux-headers/asm-riscv/kvm.h | 128 ++ linux-headers/linux/kvm.h | 8 +++ 2 files changed, 136 insertions(+) create mode 100644

[PATCH v1 04/12] target/riscv: Implement kvm_arch_get_registers

2021-11-19 Thread Yifei Jiang
Get GPR CSR and FP registers from kvm by KVM_GET_ONE_REG ioctl. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- target/riscv/kvm.c | 150 - 1 file changed, 149 insertions(+), 1 deletion(-) diff --git

[PATCH v1 06/12] target/riscv: Support start kernel directly by KVM

2021-11-19 Thread Yifei Jiang
Get kernel and fdt start address in virt.c, and pass them to KVM when cpu reset. In addition, add kvm_riscv.h to place riscv specific interface. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- hw/riscv/boot.c | 11 +++ hw/riscv/virt.c

[PATCH v1 00/12] Add riscv kvm accel support

2021-11-19 Thread Yifei Jiang
This series adds both riscv32 and riscv64 kvm support, and implements migration based on riscv. Because of RISC-V KVM has been merged into the Linux master, so this series are changed from RFC to patch v1. Several steps to use this: 1. Build emulation $ ./configure --target-list=riscv64-softmmu

[PATCH v1 03/12] target/riscv: Implement function kvm_arch_init_vcpu

2021-11-19 Thread Yifei Jiang
Get isa info from kvm while kvm init. Signed-off-by: Yifei Jiang Signed-off-by: Mingwang Li Reviewed-by: Alistair Francis --- target/riscv/kvm.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c index

Re: [PATCH v11 05/26] target/loongarch: Add fixed point shift instruction translation

2021-11-19 Thread Richard Henderson
On 11/19/21 7:13 AM, Song Gao wrote: +static bool gen_shift(DisasContext *ctx, arg_rr_i *a, + void(*func)(TCGv, TCGv, TCGv)) +{ +TCGv dest = gpr_dst(ctx, a->rd, EXT_SIGN); +TCGv src1 = gpr_src(ctx, a->rj, EXT_ZERO); +TCGv src2 = tcg_constant_tl(a->imm); + +

Re: [PATCH v11 04/26] target/loongarch: Add fixed point arithmetic instruction translation

2021-11-19 Thread Richard Henderson
On 11/19/21 7:13 AM, Song Gao wrote: +static bool gen_rrr(DisasContext *ctx, arg_rrr *a, +DisasExtend src1_ext, DisasExtend src2_ext, +DisasExtend dst_ext, void (*func)(TCGv, TCGv, TCGv)) +{ +TCGv dest = gpr_dst(ctx, a->rd, dst_ext); +TCGv src1 =

Re: [PATCH v11 04/26] target/loongarch: Add fixed point arithmetic instruction translation

2021-11-19 Thread Richard Henderson
On 11/19/21 7:13 AM, Song Gao wrote: +static void gen_mulh_w(TCGv dest, TCGv src1, TCGv src2) +{ +tcg_gen_mul_i64(dest, src1, src2); +tcg_gen_sari_i64(dest, dest, 32); +} + +static void gen_mulh_wu(TCGv dest, TCGv src1, TCGv src2) +{ +tcg_gen_mul_i64(dest, src1, src2); +

Re: [RFC PATCH-for-6.2 v3] qdev-monitor: Only allow full --global .= option

2021-11-19 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > When not all fields of the --global option are provided, > QEMU might crash: > > $ qemu-system-x86_64 -global driver=isa-fdc > qemu-system-x86_64: ../../devel/qemu/qapi/string-input-visitor.c:394: > string_input_visitor_new: Assertion `str' failed. >

Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-19 Thread Sean Christopherson
On Fri, Nov 19, 2021, Jason Gunthorpe wrote: > On Fri, Nov 19, 2021 at 10:21:39PM +, Sean Christopherson wrote: > > On Fri, Nov 19, 2021, Jason Gunthorpe wrote: > > > On Fri, Nov 19, 2021 at 07:18:00PM +, Sean Christopherson wrote: > > > > No ideas for the kernel API, but that's also less

Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-19 Thread Jason Gunthorpe
On Fri, Nov 19, 2021 at 10:21:39PM +, Sean Christopherson wrote: > On Fri, Nov 19, 2021, Jason Gunthorpe wrote: > > On Fri, Nov 19, 2021 at 07:18:00PM +, Sean Christopherson wrote: > > > No ideas for the kernel API, but that's also less concerning since > > > it's not set in stone. I'm

Re: [RFC v3 16/19] vfio-user: dma map/unmap operations

2021-11-19 Thread Alex Williamson
On Mon, 8 Nov 2021 16:46:44 -0800 John Johnson wrote: > Signed-off-by: Jagannathan Raman > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > --- > hw/vfio/pci.h | 1 + > hw/vfio/user-protocol.h | 32 +++ > hw/vfio/user.h| 1 + >

Re: [RFC v3 13/19] vfio-user: pci_user_realize PCI setup

2021-11-19 Thread Alex Williamson
On Mon, 8 Nov 2021 16:46:41 -0800 John Johnson wrote: > PCI BARs read from remote device > PCI config reads/writes sent to remote server > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > hw/vfio/pci.c | 89 >

Re: [RFC v3 05/19] Add validation ops vector

2021-11-19 Thread Alex Williamson
Add a prefix on Subject: please. Same for previous in series. On Mon, 8 Nov 2021 16:46:33 -0800 John Johnson wrote: > Validates cases where the return values aren't fully trusted > (prep work for vfio-user, where the return values from the > remote process aren't trusted) > >

Re: [RFC v3 02/19] vfio-user: add VFIO base abstract class

2021-11-19 Thread Alex Williamson
On Mon, 8 Nov 2021 16:46:30 -0800 John Johnson wrote: > Add an abstract base class both the kernel driver > and user socket implementations can use to share code. > > Signed-off-by: John G Johnson > Signed-off-by: Elena Ufimtseva > Signed-off-by: Jagannathan Raman > --- > hw/vfio/pci.h |

Re: [RFC v3 07/19] vfio-user: connect vfio proxy to remote server

2021-11-19 Thread Alex Williamson
On Mon, 8 Nov 2021 16:46:35 -0800 John Johnson wrote: > Signed-off-by: John G Johnson > Signed-off-by: Elena Ufimtseva > Signed-off-by: Jagannathan Raman > --- > hw/vfio/user.h| 78 +++ > include/hw/vfio/vfio-common.h | 2 + > hw/vfio/pci.c

Re: [RFC v3 08/19] vfio-user: define socket receive functions

2021-11-19 Thread Alex Williamson
On Mon, 8 Nov 2021 16:46:36 -0800 John Johnson wrote: > Add infrastructure needed to receive incoming messages > > Signed-off-by: John G Johnson > Signed-off-by: Elena Ufimtseva > Signed-off-by: Jagannathan Raman > --- > hw/vfio/pci.h | 2 +- > hw/vfio/user-protocol.h | 62

Re: [RFC v3 19/19] vfio-user: migration support

2021-11-19 Thread Alex Williamson
On Mon, 8 Nov 2021 16:46:47 -0800 John Johnson wrote: > bug fix: only set qemu file error if there is a file I don't understand this commit log. Is this meant to be a revision log? In general it would be nice to have more detailed commit logs for many of these patches describing any

Re: [RFC v3 06/19] vfio-user: Define type vfio_user_pci_dev_info

2021-11-19 Thread Alex Williamson
On Mon, 8 Nov 2021 16:46:34 -0800 John Johnson wrote: > New class for vfio-user with its class and instance > constructors and destructors, and its pci ops. > > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > hw/vfio/pci.h | 9

Re: [RFC v3 04/19] Add device IO ops vector

2021-11-19 Thread Alex Williamson
On Mon, 8 Nov 2021 16:46:32 -0800 John Johnson wrote: > Used for communication with VFIO driver > (prep work for vfio-user, which will communicate over a socket) > > Signed-off-by: John G Johnson > --- > include/hw/vfio/vfio-common.h | 28 > hw/vfio/common.c | 159 >

Re: [RFC v3 11/19] vfio-user: get region info

2021-11-19 Thread Alex Williamson
On Mon, 8 Nov 2021 16:46:39 -0800 John Johnson wrote: > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > hw/vfio/user-protocol.h | 14 > include/hw/vfio/vfio-common.h | 4 +++- > hw/vfio/common.c | 30

Re: [RFC v3 12/19] vfio-user: region read/write

2021-11-19 Thread Alex Williamson
On Mon, 8 Nov 2021 16:46:40 -0800 John Johnson wrote: > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > Signed-off-by: Jagannathan Raman > --- > hw/vfio/pci.h | 1 + > hw/vfio/user-protocol.h | 12 + > hw/vfio/user.h| 1 + >

Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-19 Thread Sean Christopherson
On Fri, Nov 19, 2021, Jason Gunthorpe wrote: > On Fri, Nov 19, 2021 at 07:18:00PM +, Sean Christopherson wrote: > > No ideas for the kernel API, but that's also less concerning since > > it's not set in stone. I'm also not sure that dedicated APIs for > > each high-ish level use case would be

Re: [PATCH v4 2/6] net/vmnet: add vmnet backends to qapi/net

2021-11-19 Thread Vladislav Yaroshchuk
пт, 19 нояб. 2021 г. в 17:22, Markus Armbruster : > I apologize for taking so long to respond. I spotted v5, but haven't > reviewed it. Please read my response, then assess whether you need v6. > If not, let me know, so I can have a look at v5. > > Not a problem, v5 has not so much difference

[RFC PATCH v4 2/2] s390x: Implement the USER_BUSY capability

2021-11-19 Thread Eric Farman
With the USER_SIGP capability, the kernel will pass most (but not all) SIGP orders to userspace for processing. But that means that the kernel is unable to determine if/when the order has been completed by userspace, and could potentially return an incorrect answer (CC1 with status bits versus CC2

[RFC PATCH v4 1/2] Temporary linux-headers update

2021-11-19 Thread Eric Farman
This should be replaced with ./scripts/update-linux-headers.sh But this is enough for the RFC. Signed-off-by: Eric Farman --- linux-headers/linux/kvm.h | 16 1 file changed, 16 insertions(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index

[RFC PATCH v4 0/2] s390x: Improvements to SIGP handling [QEMU]

2021-11-19 Thread Eric Farman
Here is an update to the SIGP handling series, to correspond to version 4 of the KVM series [1]. This should be very similar to v3, but there is only one IOCTL and it accepts a payload describing the operation. Unfortunately, I lost track of David's suggested improvement [2] and have not

Re: Failure of hot plugging secondary virtio_blk into q35 Windows 2019

2021-11-19 Thread Annie.li
On 11/10/2021 1:12 PM, Annie.li wrote: On 11/9/2021 1:32 PM, Daniel P. Berrangé wrote: On Tue, Nov 09, 2021 at 12:01:30PM -0500, Annie.li wrote: On 11/9/2021 6:19 AM, Daniel P. Berrangé wrote: On Tue, Nov 09, 2021 at 04:40:10PM +0530, Ani Sinha wrote: On Tue, Nov 9, 2021 at 3:23 PM Daniel

Re: [RFC PATCH v3 2/2] s390x: Implement the USER_SIGP_BUSY capability

2021-11-19 Thread Eric Farman
On Thu, 2021-11-11 at 10:01 +0100, David Hildenbrand wrote: > On 10.11.21 21:45, Eric Farman wrote: > > With the USER_SIGP capability, the kernel will pass most (but not > > all) > > SIGP orders to userspace for processing. But that means that the > > kernel > > is unable to determine if/when the

[PATCH v2 0/3] Support fd-based KVM stats

2021-11-19 Thread Mark Kanda
v2: [Paolo] - generalize the interface - add support for querying stat schema and instances - add additional HMP semantic processing for a few exponent/unit combinations (related to seconds and bytes) This patchset adds QEMU support for querying fd-based KVM stats. The kernel support was

[PATCH v2] ui/gtk: new param monitor to specify target monitor for launching QEMU

2021-11-19 Thread Dongwon Kim
Introducing a new integer parameter to specify the monitor where the Qemu window is placed upon launching. Monitor can be any number between 0 and (total number of monitors - 1). It can be used together with full-screen=on, which will make the QEMU window full-screened on the targeted monitor.

Re: [PATCH] audio: Add sndio backend

2021-11-19 Thread Volker Rümelin
Hi Brad, just a few white space and coding style issues. +/* + * stop polling descriptors + */ +static void sndio_poll_clear(SndioVoice *self) +{ +struct pollfd *pfd; +int i; + +for (i = 0; i < self->nfds; i++) { +pfd = >pfds[i]; +qemu_set_fd_handler (pfd->fd, NULL,

Re: Follow-up on the CXL discussion at OFTC

2021-11-19 Thread Ben Widawsky
On 21-11-19 18:53:43, Jonathan Cameron wrote: > On Thu, 18 Nov 2021 17:52:07 -0800 > Ben Widawsky wrote: > > > On 21-11-18 15:20:34, Saransh Gupta1 wrote: > > > Hi Ben and Jonathan, > > > > > > Thanks for your replies. I'm looking forward to the patches. > > > > > > For QEMU, I see hotplug

Re: [PATCH 0/2] Fix broken rST conversion of "submitting-a-patch.rst"

2021-11-19 Thread Eric Blake
On Fri, Nov 19, 2021 at 08:31:16PM +0100, Kashyap Chamarthy wrote: > I completely botched up the merged[0] rST conversion of this document by > accidentally dropping entire hunks (!) of text. :-( I made it very hard > for reviewers to spot it, as the omitted text was buried deep in the >

[PATCH-for-6.2 1/2] hw/scsi/megasas: Fails command if SGL buffer overflows

2021-11-19 Thread Philippe Mathieu-Daudé
If we detect an overflow on the SGL buffer, do not keep processing the command: discard it. TARGET_FAILURE sense code will be returned (MFI_STAT_SCSI_DONE_WITH_ERROR). Reported-by: Alexander Bulekov Resolves: https://gitlab.com/qemu-project/qemu/-/issues/521 Signed-off-by: Philippe Mathieu-Daudé

[PATCH-for-6.2 2/2] tests/qtest/fuzz-megasas-test: Add test for GitLab issue #521

2021-11-19 Thread Philippe Mathieu-Daudé
Without the previous commit, this test triggers: $ make check-qtest-x86_64 [...] Running test qtest-x86_64/fuzz-megasas-test qemu-system-x86_64: softmmu/physmem.c:3229: address_space_unmap: Assertion `mr != NULL' failed. Broken pipe ERROR qtest-x86_64/fuzz-megasas-test - too few

[PATCH-for-6.2 0/2] hw/scsi/megasas: Avoid overflowing the SGL buffer

2021-11-19 Thread Philippe Mathieu-Daudé
Fix issue #521 reported by Alex some months ago: https://gitlab.com/qemu-project/qemu/-/issues/521 Philippe Mathieu-Daudé (2): hw/scsi/megasas: Fails command if SGL buffer overflows tests/qtest/fuzz-megasas-test: Add test for GitLab issue #521 hw/scsi/megasas.c | 1 +

[PATCH v2 3/3] kvm: Support for querying fd-based stats

2021-11-19 Thread Mark Kanda
Add support for querying fd-based KVM stats - as introduced by Linux kernel commit: cb082bfab59a ("KVM: stats: Add fd-based API to read binary stats data") Signed-off-by: Mark Kanda --- accel/kvm/kvm-all.c | 399 qapi/misc.json | 2 +- 2

[PATCH v2 2/3] hmp: Support for querying stats

2021-11-19 Thread Mark Kanda
Leverage the QMP support for querying stats. The interface supports the same arguments as the QMP interface. Examples (with fd-based KVM stats): (qemu) info stats vcpu_1 (kvm-vcpu): guest_mode (instant): 0 directed_yield_successful (cumulative): 0 ... vcpu_0 (kvm-vcpu): guest_mode

[PATCH v2 1/3] qmp: Support for querying stats

2021-11-19 Thread Mark Kanda
Introduce qmp support for querying stats. Provide a framework for adding new stats and support for the following commands: - query-stats Returns a list of all stats, with options for specifying a stat name and schema type. A schema type is the set of stats associated with a given component (e.g.

Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-19 Thread Jason Gunthorpe
On Fri, Nov 19, 2021 at 07:18:00PM +, Sean Christopherson wrote: > On Fri, Nov 19, 2021, David Hildenbrand wrote: > > On 19.11.21 16:19, Jason Gunthorpe wrote: > > > As designed the above looks useful to import a memfd to a VFIO > > > container but could you consider some more generic naming

[PATCH 2/2] docs: List more commit-message tags "in submitting-a-patch"

2021-11-19 Thread Kashyap Chamarthy
Add some more examples of commonly used commit-message tags. (Thanks: Alex Bennée) Signed-off-by: Kashyap Chamarthy --- docs/devel/submitting-a-patch.rst | 4 1 file changed, 4 insertions(+) diff --git a/docs/devel/submitting-a-patch.rst b/docs/devel/submitting-a-patch.rst index

[PATCH 0/2] Fix broken rST conversion of "submitting-a-patch.rst"

2021-11-19 Thread Kashyap Chamarthy
I completely botched up the merged[0] rST conversion of this document by accidentally dropping entire hunks (!) of text. :-( I made it very hard for reviewers to spot it, as the omitted text was buried deep in the document. To fix my hatchet job, I reconverted the "SubmitAPatch" wiki[1] page

[PATCH 1/2] docs: Fix botched rST conversion of 'submitting-a-patch.rst'

2021-11-19 Thread Kashyap Chamarthy
I completely botched up the merged[0] rST conversion of this document by accidentally dropping entire hunks (!) of text. :-( I made it very hard for reviewers to spot it, as the omitted text was buried deep in the document. To fix my hatchet job, I reconverted the "SubmitAPatch" wiki[1] page

Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST

2021-11-19 Thread Sean Christopherson
On Fri, Nov 19, 2021, David Hildenbrand wrote: > On 19.11.21 16:19, Jason Gunthorpe wrote: > > As designed the above looks useful to import a memfd to a VFIO > > container but could you consider some more generic naming than calling > > this 'guest' ? > > +1 the guest terminology is somewhat

Re: [RFC PATCH-for-6.2 v3] qdev-monitor: Only allow full --global .= option

2021-11-19 Thread Philippe Mathieu-Daudé
On 11/19/21 19:46, BALATON Zoltan wrote: > On Fri, 19 Nov 2021, Philippe Mathieu-Daudé wrote: >> When not all fields of the --global option are provided, >> QEMU might crash: >> >>  $ qemu-system-x86_64 -global driver=isa-fdc >>  qemu-system-x86_64:

Re: Follow-up on the CXL discussion at OFTC

2021-11-19 Thread Jonathan Cameron
On Thu, 18 Nov 2021 17:52:07 -0800 Ben Widawsky wrote: > On 21-11-18 15:20:34, Saransh Gupta1 wrote: > > Hi Ben and Jonathan, > > > > Thanks for your replies. I'm looking forward to the patches. > > > > For QEMU, I see hotplug support as an item on the list and would like to > > start working

Re: [RFC PATCH-for-6.2 v3] qdev-monitor: Only allow full --global .= option

2021-11-19 Thread BALATON Zoltan
On Fri, 19 Nov 2021, Philippe Mathieu-Daudé wrote: When not all fields of the --global option are provided, QEMU might crash: $ qemu-system-x86_64 -global driver=isa-fdc qemu-system-x86_64: ../../devel/qemu/qapi/string-input-visitor.c:394: string_input_visitor_new: Assertion `str' failed.

Re: [PATCH-for-7.0 4/5] hw/mips/jazz: Inline vga_mmio_init() and remove it

2021-11-19 Thread BALATON Zoltan
On Fri, 19 Nov 2021, Philippe Mathieu-Daudé wrote: vga_mmio_init() is used only one time and not very helpful, inline and remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/display/vga.h | 6 -- hw/display/vga-mmio.c| 20 hw/mips/jazz.c | 9

Re: [PATCH-for-7.0 3/5] hw/display/vga-mmio: QOM'ify vga_mmio_init() as TYPE_VGA_MMIO

2021-11-19 Thread BALATON Zoltan
On Fri, 19 Nov 2021, Philippe Mathieu-Daudé wrote: Introduce TYPE_VGA_MMIO, a sysbus device. While there is no change in the vga_mmio_init() interface, this is a migration compatibility break of the MIPS Acer Pica 61 Jazz machine (pica61). Suggested-by: Thomas Huth Signed-off-by: Philippe

Re: [PATCH-for-7.0 2/5] hw/display/vga-mmio: Inline vga_mm_init()

2021-11-19 Thread Philippe Mathieu-Daudé
On 11/19/21 19:20, BALATON Zoltan wrote: > On Fri, 19 Nov 2021, Philippe Mathieu-Daudé wrote: >> Inline vga_mm_init() in vga_mmio_init() to simplify the >> next patch review. Kind of. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> hw/display/vga-mmio.c | 27 ++- >> 1

[PATCH for-7.0 v7 08/10] PPC64/TCG: Implement 'rfebb' instruction

2021-11-19 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

[RFC PATCH-for-6.2 v3] qdev-monitor: Only allow full --global .= option

2021-11-19 Thread Philippe Mathieu-Daudé
When not all fields of the --global option are provided, QEMU might crash: $ qemu-system-x86_64 -global driver=isa-fdc qemu-system-x86_64: ../../devel/qemu/qapi/string-input-visitor.c:394: string_input_visitor_new: Assertion `str' failed. Aborted (core dumped) Fix by only allowing

[PATCH for-7.0 v7 07/10] target/ppc/power8-pmu.c: handle overflow bits when PMU is running

2021-11-19 Thread Daniel Henrique Barboza
Up until this moment we were assuming that the counter negative enabled bits, PMC1CE and PMCjCE, would never be changed when the PMU is already started. Turns out that there is no such restriction in the PowerISA v3.1, and software can enable/disable overflow conditions of the counters at any

Re: [PATCH-for-7.0 2/5] hw/display/vga-mmio: Inline vga_mm_init()

2021-11-19 Thread BALATON Zoltan
On Fri, 19 Nov 2021, BALATON Zoltan wrote: On Fri, 19 Nov 2021, Philippe Mathieu-Daudé wrote: Inline vga_mm_init() in vga_mmio_init() to simplify the next patch review. Kind of. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vga-mmio.c | 27 ++- 1 file changed, 10

[PATCH for-7.0 v7 06/10] target/ppc: PMU: handle setting of PMCs while running

2021-11-19 Thread Daniel Henrique Barboza
The initial PMU support were made under the assumption that the counters would be set before running the PMU and read after either freezing the PMU manually or via a performance monitor alert. Turns out that some EBB powerpc kernel tests set the counters after unfreezing the counters. Setting a

[PATCH for-7.0 v7 05/10] target/ppc/power8-pmu.c: add PM_RUN_INST_CMPL (0xFA) event

2021-11-19 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

[PATCH for-7.0 v7 03/10] target/ppc: enable PMU counter overflow with cycle events

2021-11-19 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

[PATCH for-7.0 v7 10/10] target/ppc/excp_helper.c: EBB handling adjustments

2021-11-19 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

[PATCH for-7.0 v7 04/10] target/ppc: enable PMU instruction count

2021-11-19 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

[PATCH for-7.0 v7 09/10] target/ppc: PMU Event-Based exception support

2021-11-19 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

[PATCH for-7.0 v7 01/10] target/ppc: introduce PMUEventType and PMU overflow timers

2021-11-19 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)

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

2021-11-19 Thread Daniel Henrique Barboza
Hi, This new version contains a change in patch 1 requested by David in the v6 review. Changes from v6: - patch 1: * move the PMU overflow timer initialization from spapr_cpu_core.c to init_proc_POWER* functions in cpu_init.c - v6 link:

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

2021-11-19 Thread Daniel Henrique Barboza
This patch adds the barebones of the PMU logic by enabling cycle counting. The overall logic goes as follows: - a helper is added to control the PMU state on each MMCR0 write. This allows for the PMU to start/stop as the frozen counter bit (MMCR0_FC) is cleared or set; - MMCR0 reg initial value

Re: [PATCH-for-7.0 2/5] hw/display/vga-mmio: Inline vga_mm_init()

2021-11-19 Thread BALATON Zoltan
On Fri, 19 Nov 2021, Philippe Mathieu-Daudé wrote: Inline vga_mm_init() in vga_mmio_init() to simplify the next patch review. Kind of. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vga-mmio.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git

Re: [PATCH-for-7.0 1/5] hw/display: Rename VGA_ISA_MM -> VGA_MMIO

2021-11-19 Thread BALATON Zoltan
On Fri, 19 Nov 2021, Philippe Mathieu-Daudé wrote: There is no ISA bus part in the MMIO VGA device, so rename: * hw/display/vga-isa-mm.c -> hw/display/vga-mmio.c * CONFIG_VGA_ISA_MM -> CONFIG_VGA_MMIO * ISAVGAMMState -> VGAMmioState * isa_vga_mm_init() -> vga_mmio_init() Signed-off-by:

Re: [PULL 0/7] Misc bugfixes for 2021-11-19

2021-11-19 Thread Richard Henderson
On 11/19/21 3:45 PM, Paolo Bonzini wrote: The following changes since commit 42f6c9179be4401974dd3a75ee72defd16b5092d: Merge tag 'pull-ppc-2022' of https://github.com/legoater/qemu into staging (2021-11-12 12:28:25 +0100) are available in the Git repository at:

Re: [PATCH v2] hw/arm/virt: Expose empty NUMA nodes through ACPI

2021-11-19 Thread David Hildenbrand
>> I'd really appreciate if we could instead have something that makes virt >> happy as well ("makes no sense in any physical system"), because virt is >> most probably the biggest actual consumer of ACPI memory hotplug out >> there (!). > > No problem with finding such a solution - but it's an

Re: [PATCH v2] hw/arm/virt: Expose empty NUMA nodes through ACPI

2021-11-19 Thread Jonathan Cameron
On Fri, 19 Nov 2021 12:33:27 +0100 David Hildenbrand wrote: > On 19.11.21 11:58, Jonathan Cameron wrote: > > On Thu, 18 Nov 2021 11:23:06 + > > Jonathan Cameron wrote: > > > >> On Thu, 18 Nov 2021 12:06:27 +0100 > >> David Hildenbrand wrote: > >> > >>> On 18.11.21 11:28, Jonathan

Re: [PATCH v1 9/9] hw/arm/xlnx-versal-virt: Connect mt35xu01g flashes to the OSPI

2021-11-19 Thread Edgar E. Iglesias
On Wed, Nov 17, 2021 at 02:18:41PM +, Francisco Iglesias wrote: > Connect Micron Xccela mt35xu01g flashes to the OSPI flash memory > controller. > > Signed-off-by: Francisco Iglesias > --- > hw/arm/xlnx-versal-virt.c | 23 +++ > 1 file changed, 23 insertions(+) > > diff

Re: [PATCH v1 7/9] hw/arm/xlnx-versal: Connect the OSPI flash memory controller model

2021-11-19 Thread Edgar E. Iglesias
On Wed, Nov 17, 2021 at 02:18:39PM +, Francisco Iglesias wrote: > Connect the OSPI flash memory controller model (including the source and > destination DMA). > > Signed-off-by: Francisco Iglesias > --- > hw/arm/xlnx-versal.c | 89 > >

[PATCH-for-7.0 0/5] hw/display: QOM'ify vga_mmio_init() as TYPE_VGA_MMIO

2021-11-19 Thread Philippe Mathieu-Daudé
Convert the open-coded vga_mmio_init() to a sysbus device. Philippe Mathieu-Daudé (5): hw/display: Rename VGA_ISA_MM -> VGA_MMIO hw/display/vga-mmio: Inline vga_mm_init() hw/display/vga-mmio: QOM'ify vga_mmio_init() as TYPE_VGA_MMIO hw/mips/jazz: Inline vga_mmio_init() and remove it

[NOTFORMERGE PATCH 5/5] tests/avocado: Test NetBSD 9.2 on the Jazz Magnum machine

2021-11-19 Thread Philippe Mathieu-Daudé
Test NetBSD 9.2 on the Jazz Magnum machine. As the firmware is not redistributable, it has to be extracted from the floppy configuration disk coming with a Mips Magnum 4000 system, then the NTPROM_BIN_PATH environment variable has to be set. For convenience a NVRAM pre- initialized to boot NetBSD

[PATCH-for-7.0 3/5] hw/display/vga-mmio: QOM'ify vga_mmio_init() as TYPE_VGA_MMIO

2021-11-19 Thread Philippe Mathieu-Daudé
Introduce TYPE_VGA_MMIO, a sysbus device. While there is no change in the vga_mmio_init() interface, this is a migration compatibility break of the MIPS Acer Pica 61 Jazz machine (pica61). Suggested-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vga-mmio.c | 134

[PATCH-for-7.0 2/5] hw/display/vga-mmio: Inline vga_mm_init()

2021-11-19 Thread Philippe Mathieu-Daudé
Inline vga_mm_init() in vga_mmio_init() to simplify the next patch review. Kind of. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vga-mmio.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/hw/display/vga-mmio.c b/hw/display/vga-mmio.c

Re: [PATCH v1 8/9] hw/block/m25p80: Add support for Micron Xccela flash mt35xu01g

2021-11-19 Thread Edgar E. Iglesias
On Wed, Nov 17, 2021 at 02:18:40PM +, Francisco Iglesias wrote: > Add support for Micron Xccela flash mt35xu01g. Reviewed-by: Edgar E. Iglesias > > Signed-off-by: Francisco Iglesias > --- > hw/block/m25p80.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/block/m25p80.c

Re: [PATCH v1 2/9] hw/arm/xlnx-versal: Connect Versal's PMC SLCR

2021-11-19 Thread Edgar E. Iglesias
On Wed, Nov 17, 2021 at 02:18:34PM +, Francisco Iglesias wrote: > Connect Versal's PMC SLCR (system-level control registers) model. Reviewed-by: Edgar E. Iglesias > > Signed-off-by: Francisco Iglesias > --- > hw/arm/xlnx-versal.c | 18 ++ >

Re: [PATCH v1 6/9] hw/ssi: Add a model of Xilinx Versal's OSPI flash memory controller

2021-11-19 Thread Edgar E. Iglesias
On Wed, Nov 17, 2021 at 02:18:38PM +, Francisco Iglesias wrote: > Add a model of Xilinx Versal's OSPI flash memory controller. Thanks Francisco, If you haven't already in this series, I think you should also add yourself in MAINTAINERS for this model. Reviewed-by: Edgar E. Iglesias

[PATCH-for-7.0 1/5] hw/display: Rename VGA_ISA_MM -> VGA_MMIO

2021-11-19 Thread Philippe Mathieu-Daudé
There is no ISA bus part in the MMIO VGA device, so rename: * hw/display/vga-isa-mm.c -> hw/display/vga-mmio.c * CONFIG_VGA_ISA_MM -> CONFIG_VGA_MMIO * ISAVGAMMState -> VGAMmioState * isa_vga_mm_init() -> vga_mmio_init() Signed-off-by: Philippe Mathieu-Daudé ---

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

2021-11-19 Thread Lucas Mateus Martins Araujo e Castro
On 19/11/2021 06:18, Richard Henderson wrote: On 11/18/21 2:25 PM, Lucas Mateus Castro (alqotel) wrote: +    if ((fpscr & FP_VXSOFT) && (fpscr_ve != 0)) { +    error = POWERPC_EXCP_FP_VXSOFT; +    } else if ((fpscr & FP_OX) && (fpscr & FP_OE)) { +    error = POWERPC_EXCP_FP_OX; +    }

[PATCH-for-7.0 4/5] hw/mips/jazz: Inline vga_mmio_init() and remove it

2021-11-19 Thread Philippe Mathieu-Daudé
vga_mmio_init() is used only one time and not very helpful, inline and remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/display/vga.h | 6 -- hw/display/vga-mmio.c| 20 hw/mips/jazz.c | 9 - 3 files changed, 8 insertions(+), 27

[PATCH 06/11] migration: Move iov from pages to params

2021-11-19 Thread Juan Quintela
This will allow us to reduce the number of system calls on the next patch. Signed-off-by: Juan Quintela --- migration/multifd.h | 8 ++-- migration/multifd.c | 30 +- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/migration/multifd.h

[PATCH 09/11] multifd: Remove send_write() method

2021-11-19 Thread Juan Quintela
Everything use now iov's. Signed-off-by: Juan Quintela --- migration/multifd.h | 2 -- migration/multifd-zlib.c | 17 - migration/multifd-zstd.c | 17 - migration/multifd.c | 20 ++-- 4 files changed, 2 insertions(+), 54 deletions(-)

[PATCH 07/11] multifd: Make zlib use iov's

2021-11-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/multifd-zlib.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migration/multifd-zlib.c b/migration/multifd-zlib.c index 40d4cbd0b8..2c385e57bc 100644 --- a/migration/multifd-zlib.c +++ b/migration/multifd-zlib.c @@ -144,6

[PATCH 05/11] multifd: Make zlib compression method not use iovs

2021-11-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/multifd-zlib.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/migration/multifd-zlib.c b/migration/multifd-zlib.c index ab4ba75d75..40d4cbd0b8 100644 --- a/migration/multifd-zlib.c +++ b/migration/multifd-zlib.c @@

[PATCH 08/11] multifd: Make zstd use iov's

2021-11-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/multifd-zstd.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migration/multifd-zstd.c b/migration/multifd-zstd.c index 1dccdbd733..6183d0b26d 100644 --- a/migration/multifd-zstd.c +++ b/migration/multifd-zstd.c @@ -155,6

Re: [PATCH v1 5/9] hw/dma/xlnx_csu_dma: Implement the DMA control interface

2021-11-19 Thread Edgar E. Iglesias
On Wed, Nov 17, 2021 at 02:18:37PM +, Francisco Iglesias wrote: > Implement the DMA control interface for allowing control of DMA operations > from inside models that contain instances of (and reuse) the Xilinx CSU > DMA. Reviewed-by: Edgar E. Iglesias > > Signed-off-by: Francisco

[PATCH 04/11] multifd: Make zstd compression method not use iovs

2021-11-19 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/multifd-zstd.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/migration/multifd-zstd.c b/migration/multifd-zstd.c index 693bddf8c9..1dccdbd733 100644 --- a/migration/multifd-zstd.c +++ b/migration/multifd-zstd.c

[PATCH 01/11] migration: Remove is_zero_range()

2021-11-19 Thread Juan Quintela
It just calls buffer_is_zero(). Just change the callers. Signed-off-by: Juan Quintela --- migration/ram.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index 863035d235..f2a799ff83 100644 --- a/migration/ram.c +++

Re: [PATCH v1 4/9] hw/dma: Add the DMA control interface

2021-11-19 Thread Edgar E. Iglesias
On Wed, Nov 17, 2021 at 02:18:36PM +, Francisco Iglesias wrote: > Add an interface for controlling DMA models that are reused with other > models. This allows a controlling model to start transfers through the > DMA while reusing the DMA's handling of transfer state and completion > signaling.

[PATCH 02/11] dump: Remove is_zero_page()

2021-11-19 Thread Juan Quintela
It just calls buffer_is_zero(). Just change the callers. Signed-off-by: Juan Quintela --- dump/dump.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index 662d0a62cd..a84d8b1598 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -1293,14

  1   2   3   >