Re: [PATCH 1/2] ui/vnc: refactor arrays of addresses to SocketAddressList

2021-12-21 Thread Marc-André Lureau
Hi On Mon, Dec 20, 2021 at 10:21 PM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > Let's use SocketAddressList instead of dynamic arrays. > Benefits: > - Automatic cleanup: don't need specific freeing function and drop >some gotos. > - Less indirection: no triple asterix

Re: [PATCH v2 1/9] hw/intc: sifive_plic: Add a reset function

2021-12-21 Thread Bin Meng
On Thu, Dec 16, 2021 at 12:54 PM Alistair Francis wrote: > > From: Alistair Francis > > Signed-off-by: Alistair Francis > --- > hw/intc/sifive_plic.c | 18 ++ > 1 file changed, 18 insertions(+) > Reviewed-by: Bin Meng

Re: powernv gitlab ci regression

2021-12-21 Thread Cédric Le Goater
On 12/21/21 03:37, Daniel Henrique Barboza wrote: Hey, On 12/20/21 18:35, Richard Henderson wrote: Hi guys, Somewhere within Merge tag 'pull-ppc-20211217' of https://github.com/legoater/qemu into staging ppc 7.0 queue: * General cleanup for Mac machines (Peter) * Fixes for FPU exceptions

RE: [PATCH] tests/qtest: Make the filter tests independent from a specific NIC

2021-12-21 Thread Zhang, Chen
> -Original Message- > From: Thomas Huth > Sent: Tuesday, December 21, 2021 3:35 PM > To: Zhang, Chen ; qemu-devel@nongnu.org; > Laurent Vivier > Cc: Paolo Bonzini > Subject: Re: [PATCH] tests/qtest: Make the filter tests independent from a > specific NIC > > On 21/12/2021 07.38,

Re: [PATCH 2/4] ui: Remove unnecessary checks

2021-12-21 Thread Alexander Orzechowski
On 12/21/21 02:40, Marc-André Lureau wrote: Hi On Sun, Dec 19, 2021 at 6:32 AM Alexander Orzechowski wrote: These conditionals should never be false as scale_x and scale_y should scale the fbw and fbh variables such that the ww and wh variables always have a greater

[PULL v2 34/36] ui/dbus: add chardev backend & interface

2021-12-21 Thread marcandre . lureau
From: Marc-André Lureau Add a new chardev backend which allows D-Bus client to handle the chardev stream & events. Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- qapi/char.json| 27 include/chardev/char-socket.h | 2 + include/qemu/dbus.h | 5

[PATCH] MAINTAINERS: Update COLO Proxy section

2021-12-21 Thread Zhang Chen
Signed-off-by: Zhang Chen --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1de6ce6e44..5479b9376e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2983,6 +2983,7 @@ F: docs/colo-proxy.txt F: net/colo* F: net/filter-rewriter.c F:

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

2021-12-21 Thread Marc-André Lureau
Hi On Mon, Dec 20, 2021 at 10:24 PM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > Add command that can change addresses where VNC server listens for new > connections. Prior to 6.0 this functionality was available through > 'change' qmp command which was deleted. > >

Re: [PATCH v11 00/31] LoongArch64 port of QEMU TCG

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/21/21 06:40, WANG Xuerui wrote: > Hi all, > > This is a port of QEMU TCG to the brand-new CPU architecture LoongArch, > introduced by Loongson with their 3A5000 chips. > > Everything is tested on real 3A5000 board (system emulation, linux-user, > make check) and GitLab (CI jobs), and

Re: [RFC v2 2/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/20/21 10:34, David Edmondson wrote: > Provide information on the number of bytes copied in the pre-copy, > downtime and post-copy phases of migration. > > Signed-off-by: David Edmondson > --- > migration/migration.c | 3 +++ > migration/ram.c | 7 +++ > monitor/hmp-cmds.c|

[PATCH] target/riscv/pmp: fix no pmp illegal intrs

2021-12-21 Thread Nikita Shubin
From: Nikita Shubin As per the privilege specification, any access from S/U mode should fail if no pmp region is configured and pmp is present, othwerwise access should succeed. Fixes: d102f19a208 (target/riscv/pmp: Raise exception if no PMP entry is configured) Resolves:

Re: [PATCH] tests/qtest: Make the filter tests independent from a specific NIC

2021-12-21 Thread Thomas Huth
On 21/12/2021 07.38, Zhang, Chen wrote: -Original Message- From: Qemu-devel On Behalf Of Thomas Huth Sent: Monday, December 20, 2021 6:30 PM To: qemu-devel@nongnu.org; Laurent Vivier Cc: Paolo Bonzini ; Yang Hongyang ; Zhang Chen Subject: [PATCH] tests/qtest: Make the filter tests

Re: [PATCH] vl: Add opts to device opts list when using JSON syntax for -device

2021-12-21 Thread Philippe Mathieu-Daudé
Cc'ing Markus. On 12/20/21 09:45, MkfsSion wrote: > When using JSON syntax for -device, -set option can not find device > specified in JSON by id field. The following commandline is an example: > > $ qemu-system-x86_64 -device '{"id":"foo"}' -set device.foo.bar=1 > qemu-system-x86_64: -set

Re: [PATCH 4/4] ui: Fix gtk/gl when the scaled virtual console does not fit the window

2021-12-21 Thread Alexander Orzechowski
On 12/21/21 02:48, Marc-André Lureau wrote: Hi On Sun, Dec 19, 2021 at 6:32 AM Alexander Orzechowski wrote: gtk/gl was incorrectly always rendering as if the 'Zoom to Fit' was always checked even if it wasn't. This is now using logic closer to what is being used for the

Re: [PATCH v2 4/9] hw/intc: sifive_plic: Cleanup remaining functions

2021-12-21 Thread Bin Meng
On Thu, Dec 16, 2021 at 12:55 PM Alistair Francis wrote: > > From: Alistair Francis > > We can remove the original sifive_plic_irqs_pending() function and > instead just use the sifive_plic_claim() function (renamed to > sifive_plic_claimed()) to determine if any interrupts are pending. > > This

Re: [PATCH] MAINTAINERS: Update COLO Proxy section

2021-12-21 Thread Philippe Mathieu-Daudé
Cc'ing qemu-trivial@ On 12/21/21 09:04, Zhang Chen wrote: > Signed-off-by: Zhang Chen > --- > MAINTAINERS | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 1de6ce6e44..5479b9376e 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -2983,6 +2983,7 @@ F:

Re: [RFC v2 1/2] migration: Introduce ram_transferred_add()

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/20/21 10:34, David Edmondson wrote: > ...and use it. FYI Not all mails readers / git tools display subject along with content, so it is more helpful to rewrite the subject. > Signed-off-by: David Edmondson > --- > migration/ram.c | 23 ++- > 1 file changed, 14

[PATCH v3 1/2] migration: Introduce ram_transferred_add()

2021-12-21 Thread David Edmondson
Replace direct manipulation of ram_counters.transferred with a function. Signed-off-by: David Edmondson Reviewed-by: Philippe Mathieu-Daudé --- migration/ram.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index

Re: [PATCH 3/5] migration: ram_release_pages() always receive 1 page as argument

2021-12-21 Thread Juan Quintela
Philippe Mathieu-Daudé wrote: > On 12/16/21 10:13, Juan Quintela wrote: >> Remove the pages argument. And s/pages/page/ >> >> Signed-off-by: Juan Quintela >> --- >> migration/ram.c | 8 >> 1 file changed, 4 insertions(+), 4 deletions(-) > >> -static void ram_release_pages(const char

[PATCH v3 2/2] migration: Tally pre-copy, downtime and post-copy bytes independently

2021-12-21 Thread David Edmondson
Provide information on the number of bytes copied in the pre-copy, downtime and post-copy phases of migration. Signed-off-by: David Edmondson Reviewed-by: Philippe Mathieu-Daudé --- migration/migration.c | 3 +++ migration/ram.c | 7 +++ monitor/hmp-cmds.c| 12

Re: [PATCH v2 5/6] migration: simplify do_compress_ram_page

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/21/21 13:52, Juan Quintela wrote: > The goto is not needed at all. > > Signed-off-by: Juan Quintela > --- > migration/ram.c | 11 +++ > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/migration/ram.c b/migration/ram.c > index 4ee0369d6f..eddc85ffb0 100644 > ---

Re: [PATCH RFC] MAINTAINERS: split out s390x sections

2021-12-21 Thread Halil Pasic
On Mon, 20 Dec 2021 12:54:19 +0100 Cornelia Huck wrote: > Split out some more specialized devices etc., so that we can build > smarter lists of people to be put on cc: in the future. > > Signed-off-by: Cornelia Huck LGTM Acked-by: Halil Pasic

Re: [RFC PATCH v2 02/14] job.h: categorize fields in struct Job

2021-12-21 Thread Emanuele Giuseppe Esposito
On 16/12/2021 17:21, Stefan Hajnoczi wrote: On Thu, Nov 04, 2021 at 10:53:22AM -0400, Emanuele Giuseppe Esposito wrote: Categorize the fields in struct Job to understand which ones need to be protected by the job mutex and which don't. Signed-off-by: Emanuele Giuseppe Esposito ---

[PATCH v3 03/15] pcie: Add a helper to the SR/IOV API

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk Convenience function for retrieving the PCIDevice object of the N-th VF. Signed-off-by: Łukasz Gieryk Reviewed-by: Knut Omang --- hw/pci/pcie_sriov.c | 10 +- include/hw/pci/pcie_sriov.h | 5 + 2 files changed, 14 insertions(+), 1 deletion(-) diff

[PATCH v3 08/15] hw/nvme: Implement the Function Level Reset

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk This patch implements the Function Level Reset, a feature currently not implemented for the Nvme device, while listed as a mandatory ("shall") in the 1.4 spec. The implementation reuses FLR-related building blocks defined for the pci-bridge module, and follows the same

[PATCH v3 04/15] pcie: Add 1.2 version token for the Power Management Capability

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk Signed-off-by: Łukasz Gieryk --- include/hw/pci/pci_regs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/pci/pci_regs.h b/include/hw/pci/pci_regs.h index 77ba64b931..a590140962 100644 --- a/include/hw/pci/pci_regs.h +++ b/include/hw/pci/pci_regs.h @@ -4,5

[PATCH v3 06/15] hw/nvme: Add support for Primary Controller Capabilities

2021-12-21 Thread Lukasz Maniak
Implementation of Primary Controller Capabilities data structure (Identify command with CNS value of 14h). Currently, the command returns only ID of a primary controller. Handling of remaining fields are added in subsequent patches implementing virtualization enhancements. Signed-off-by: Lukasz

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

2021-12-21 Thread Vladimir Sementsov-Ogievskiy
21.12.2021 17:15, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: Add command that can change addresses where VNC server listens for new connections. Prior to 6.0 this functionality was available through 'change' qmp command which was deleted. Signed-off-by: Vladimir

[PATCH] acpi: validate hotplug selector on access

2021-12-21 Thread Michael S. Tsirkin
When bus is looked up on a pci write, we didn't validate that the lookup succeeded. Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer. Fixes: b32bd763a1 ("pci: introduce acpi-index property for PCI device") Cc: "Igor Mammedov" Fixes:

[PATCH v3 02/15] mm/memfd: Introduce MFD_INACCESSIBLE flag

2021-12-21 Thread Chao Peng
Introduce a new memfd_create() flag indicating the content of the created memfd is inaccessible from userspace. It does this by force setting F_SEAL_INACCESSIBLE seal when the file is created. It also set F_SEAL_SEAL to prevent future sealing, which means, it can not coexist with

[PATCH v3 13/15] KVM: Handle page fault for private memory

2021-12-21 Thread Chao Peng
When a page fault from the secondary page table while the guest is running happens in a memslot with KVM_MEM_PRIVATE, we need go different paths for private access and shared access. - For private access, KVM checks if the page is already allocated in the memory backend, if yes KVM

[PATCH v3 15/15] KVM: Register/unregister private memory slot to memfd

2021-12-21 Thread Chao Peng
Expose KVM_MEM_PRIVATE flag and register/unregister private memory slot to memfd when userspace sets the flag. KVM_MEM_PRIVATE is disallowed by default but architecture code can turn it on by implementing kvm_arch_private_memory_supported(). Signed-off-by: Yu Zhang Signed-off-by: Chao Peng ---

[PATCH v3 11/15] KVM: Implement fd-based memory fallocation

2021-12-21 Thread Chao Peng
KVM gets notified through memfd_notifier when user space allocate space via fallocate() on the fd which is used for guest memory. KVM can set up the mapping in the secondary MMU page tables at this time. This patch adds function in KVM to map pfn to gfn when the page is allocated in the memory

Re: QOM

2021-12-21 Thread abhijeet inamdar
Hi, How did we decide the NUM_IRQ_LINES 64 for stellaris? BR. Abhijeet. On Tue, 21 Dec, 2021, 13:22 abhijeet inamdar, wrote: > As we have almost 80 irq lines and 40-45 NVIC_irq's. > > Where can I define them? > > BR. > Abhijeet. > > On Tue, 21 Dec, 2021, 13:18 abhijeet inamdar, < >

[PATCH 0/3] build: some cleanups for common-user/ infrastructure

2021-12-21 Thread Paolo Bonzini
A belated review of the patches that introduced common-user/. Limiting the interface that it expects from bsd-user/ and linux-user/ to an include/ subdirectory, and simplifying the mesonry that builds the new directory. Paolo Bonzini (3): meson: reuse common_user_inc when building files

[PATCH v3 11/15] hw/nvme: Calculate BAR attributes in a function

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk An NVMe device with SR-IOV capability calculates the BAR size differently for PF and VF, so it makes sense to extract the common code to a separate function. Signed-off-by: Łukasz Gieryk --- hw/nvme/ctrl.c | 45 +++-- 1 file changed,

Re: [PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device

2021-12-21 Thread Paolo Bonzini
On 12/21/21 13:58, Markus Armbruster wrote: Is this a regression? I suspect commit 5dacda5167 "vl: Enable JSON syntax for -device" (v6.2.0). Obviously not a regression: everything that used to work still works. FWIW I think -set should be deprecated. I'm not aware of any particularly

Re: [PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device

2021-12-21 Thread Markus Armbruster
Paolo Bonzini writes: > On 12/21/21 13:58, Markus Armbruster wrote: >>> Is this a regression? I suspect commit 5dacda5167 "vl: Enable JSON >>> syntax for -device" (v6.2.0). >> >> Obviously not a regression: everything that used to work still works. > > FWIW I think -set should be deprecated.

Re: [PATCH RFC] MAINTAINERS: split out s390x sections

2021-12-21 Thread Cornelia Huck
On Tue, Dec 21 2021, Thomas Huth wrote: > On 20/12/2021 12.54, Cornelia Huck wrote: >> Split out some more specialized devices etc., so that we can build >> smarter lists of people to be put on cc: in the future. >> >> Signed-off-by: Cornelia Huck >> --- >> >> As discussed offlist. Some

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

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk With four new properties: - sriov_v{i,q}_flexible, - sriov_max_v{i,q}_per_vf, one can configure the number of available flexible resources, as well as the limits. The primary and secondary controller capability structures are initialized accordingly. Since the number of

[PATCH v3 01/15] mm/shmem: Introduce F_SEAL_INACCESSIBLE

2021-12-21 Thread Chao Peng
From: "Kirill A. Shutemov" Introduce a new seal F_SEAL_INACCESSIBLE indicating the content of the file is inaccessible from userspace in any possible ways like read(),write() or mmap() etc. It provides semantics required for KVM guest private memory support that a file descriptor with this seal

[PATCH v3 04/15] KVM: Extend the memslot to support fd-based private memory

2021-12-21 Thread Chao Peng
Extend the memslot definition to provide fd-based private memory support by adding two new fields(fd/ofs). The memslot then can maintain memory for both shared and private pages in a single memslot. Shared pages are provided in the existing way by using userspace_addr(hva) field and

[PATCH v3 05/15] KVM: Implement fd-based memory using MEMFD_OPS interfaces

2021-12-21 Thread Chao Peng
This patch adds the new memfd facility in KVM using MEMFD_OPS to provide guest memory from a file descriptor created in user space with memfd_create() instead of traditional userspace hva. It mainly provides two kind of functions: - Pair/unpair a fd-based memslot to a memory backend that owns

[PATCH v3 00/15] KVM: mm: fd-based approach for supporting KVM guest private memory

2021-12-21 Thread Chao Peng
This is the third version of this series which try to implement the fd-based KVM guest private memory. In general this patch series introduce fd-based memslot which provide guest memory through a memfd file descriptor fd[offset,size] instead of hva/size. The fd then can be created from a

[PATCH v3 10/15] KVM: Add kvm_map_gfn_range

2021-12-21 Thread Chao Peng
This new function establishes the mapping in KVM page tables for a given gfn range. It can be used in the memory fallocate callback for memfd based memory to establish the mapping for KVM secondary MMU when the pages are allocated in the memory backend. Signed-off-by: Yu Zhang Signed-off-by:

[PATCH v3 09/15] KVM: Implement fd-based memory invalidation

2021-12-21 Thread Chao Peng
KVM gets notified when userspace punches a hole in a fd which is used for guest memory. KVM should invalidate the mapping in the second MMU page tables. This is the same logic as MMU notifier invalidation except the fd related information is carried around to indicate the memory range. KVM hence

[PATCH 1/3] meson: reuse common_user_inc when building files specific to user-mode emulators

2021-12-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index f45ecf31bd..b0af02b805 100644 --- a/meson.build +++ b/meson.build @@ -2897,6 +2897,7 @@ foreach target : target_dirs else abi =

[PULL 00/31] tcg/loongarch64: New tcg backend

2021-12-21 Thread Richard Henderson
The following changes since commit 2bf40d0841b942e7ba12953d515e62a436f0af84: Merge tag 'pull-user-20211220' of https://gitlab.com/rth7680/qemu into staging (2021-12-20 13:20:07 -0800) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-loong-20211221

[PULL 02/31] MAINTAINERS: Add tcg/loongarch64 entry with myself as maintainer

2021-12-21 Thread Richard Henderson
From: WANG Xuerui I ported the initial code, so I should maintain it of course. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-3-...@xen0n.name> Signed-off-by: Richard Henderson --- MAINTAINERS | 5 + 1

[PULL 25/31] tcg/loongarch64: Implement exit_tb/goto_tb

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20211221054105.178795-26-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PULL 08/31] tcg/loongarch64: Implement the memory barrier op

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-9-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 32 1 file changed,

[PATCH v3 14/15] docs: Add documentation for SR-IOV and Virtualization Enhancements

2021-12-21 Thread Lukasz Maniak
Signed-off-by: Lukasz Maniak --- docs/system/devices/nvme.rst | 36 1 file changed, 36 insertions(+) diff --git a/docs/system/devices/nvme.rst b/docs/system/devices/nvme.rst index b5acb2a9c1..166a11abc6 100644 --- a/docs/system/devices/nvme.rst +++

[PATCH v3 03/15] mm/memfd: Introduce MEMFD_OPS

2021-12-21 Thread Chao Peng
From: "Kirill A. Shutemov" The patch introduces new MEMFD_OPS facility around file created by memfd_create() to allow a third kernel component to make use of memory bookmarked in a memfd and gets notifier when the memory in the file is allocated/invalidated. It will be used for KVM to use memfd

[PATCH v3 14/15] KVM: Use kvm_userspace_memory_region_ext

2021-12-21 Thread Chao Peng
Use the new extended memslot structure kvm_userspace_memory_region_ext which includes two additional fd/ofs fields comparing to the current kvm_userspace_memory_region. The fields fd/ofs will be copied from userspace only when KVM_MEM_PRIVATE is set. Internal the KVM we change all existing

Re: [PATCH] docker: include bison in debian-tricore-cross

2021-12-21 Thread Richard Henderson
On 12/21/21 3:16 AM, Paolo Bonzini wrote: Binutils sometimes fail to build if bison is not installed: /bin/sh ./ylwrap `test -f arparse.y || echo ./`arparse.y y.tab.c arparse.c y.tab.h arparse.h y.output arparse.output -- -d ./ylwrap: 109: ./ylwrap: -d: not found (the correct

[PATCH 3/3] meson: cleanup common-user/ build

2021-12-21 Thread Paolo Bonzini
Do not go through a static_library, which is only necessary in order to reuse some source files between emulators and tests. Instead just place common files for all user-mode emulators in common_ss, similar to what is already done for softmmu_ss in full system emulators. The only disadvantage is

[PULL 01/31] elf: Add machine type value for LoongArch

2021-12-21 Thread Richard Henderson
From: WANG Xuerui This is already officially allocated as recorded in GNU binutils repo [1], and the description is updated in [2]. Add to enable further work. [1]: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=4cf2ad720078a9f490dd5b5bc8893a926479196e [2]:

[PULL 07/31] tcg/loongarch64: Implement necessary relocation operations

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-8-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 66 1 file changed,

[PULL 04/31] tcg/loongarch64: Add generated instruction opcodes and encoding helpers

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Philippe Mathieu-Daudé Acked-by: Richard Henderson Message-Id: <20211221054105.178795-5-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-insn-defs.c.inc | 979 1 file changed, 979

[PULL 05/31] tcg/loongarch64: Add register names, allocation order and input/output sets

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20211221054105.178795-6-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 118 +++ 1 file changed, 118 insertions(+) create mode 100644

[PULL 03/31] tcg/loongarch64: Add the tcg-target.h file

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Support for all optional TCG ops are initially marked disabled; the bits are to be set in individual commits later. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-4-...@xen0n.name>

[PULL 06/31] tcg/loongarch64: Define the operand constraints

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-7-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-str.h | 28 +++

[PULL 14/31] tcg/loongarch64: Implement bswap{16,32,64} ops

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-15-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.h | 10 +- tcg/loongarch64/tcg-target.c.inc | 32

[PULL 09/31] tcg/loongarch64: Implement tcg_out_mov and tcg_out_movi

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-10-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 137 +++ 1 file changed,

[PULL 17/31] tcg/loongarch64: Implement add/sub ops

2021-12-21 Thread Richard Henderson
From: WANG Xuerui The neg_i{32,64} ops is fully expressible with sub, so omitted for simplicity. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-18-...@xen0n.name> Signed-off-by: Richard Henderson ---

[PULL 13/31] tcg/loongarch64: Implement deposit/extract ops

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-14-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.h | 8

[PULL 19/31] tcg/loongarch64: Implement br/brcond ops

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-20-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 53

[PULL 18/31] tcg/loongarch64: Implement mul/mulsh/muluh/div/divu/rem/remu ops

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-19-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.h | 16

[PULL 10/31] tcg/loongarch64: Implement goto_ptr

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-11-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 17 +

[PULL 28/31] common-user: Add safe syscall handling for loongarch64 hosts

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20211221054105.178795-29-...@xen0n.name> Signed-off-by: Richard Henderson --- .../host/loongarch64/safe-syscall.inc.S | 90 +++ 1 file changed, 90 insertions(+) create mode 100644

[PATCH v3 15/15] hw/nvme: Update the initalization place for the AER queue

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk This patch updates the initialization place for the AER queue, so it’s initialized once, at controller initialization, and not every time controller is enabled. While the original version works for a non-SR-IOV device, as it’s hard to interact with the controller if it’s not

[PATCH v3 13/15] hw/nvme: Add support for the Virtualization Management command

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk With the new command one can: - assign flexible resources (queues, interrupts) to primary and secondary controllers, - toggle the online/offline state of given controller. Signed-off-by: Łukasz Gieryk --- hw/nvme/ctrl.c | 253

[PATCH v3 06/15] KVM: Refactor hva based memory invalidation code

2021-12-21 Thread Chao Peng
The purpose of this patch is for fd-based memslot to reuse the same mmu_notifier based guest memory invalidation code for private pages. No functional changes except renaming 'hva' to more neutral 'useraddr' so that it can also cover 'offset' in a fd that private pages live in. Signed-off-by: Yu

[PATCH v3 08/15] KVM: Split out common memory invalidation code

2021-12-21 Thread Chao Peng
When fd-based memory is enabled, there will be two types of memory invalidation: - memory invalidation from native MMU through mmu_notifier callback for hva-based memory, and, - memory invalidation from memfd through memfd_notifier callback for fd-based memory. Some code can be shared

[PULL 12/31] tcg/loongarch64: Implement not/and/or/xor/nor/andc/orc ops

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-13-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 2 + tcg/loongarch64/tcg-target.h | 16

[PULL 15/31] tcg/loongarch64: Implement clz/ctz ops

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20211221054105.178795-16-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.h | 8 +++---

[PULL 27/31] tcg/loongarch64: Register the JIT

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20211221054105.178795-28-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 44 1 file changed, 44 insertions(+) diff --git

[PULL 21/31] tcg/loongarch64: Implement tcg_out_call

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20211221054105.178795-22-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 34 1 file changed, 34 insertions(+) diff --git

[PULL 24/31] tcg/loongarch64: Implement tcg_target_qemu_prologue

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20211221054105.178795-25-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 68 1 file changed, 68 insertions(+) diff --git

[PATCH v3 10/15] hw/nvme: Remove reg_size variable and update BAR0 size calculation

2021-12-21 Thread Lukasz Maniak
From: Łukasz Gieryk The n->reg_size parameter unnecessarily splits the BAR0 size calculation in two phases; removed to simplify the code. With all the calculations done in one place, it seems the pow2ceil, applied originally to reg_size, is unnecessary. The rounding should happen as the last

Re: [PATCH] acpi: validate hotplug selector on access

2021-12-21 Thread Philippe Mathieu-Daudé
On 12/21/21 15:48, Michael S. Tsirkin wrote: > When bus is looked up on a pci write, we didn't > validate that the lookup succeeded. > Fuzzers thus can trigger QEMU crash by dereferencing the NULL > bus pointer. > > Fixes: b32bd763a1 ("pci: introduce acpi-index property for PCI device") > Cc:

[PATCH v3 07/15] KVM: Special handling for fd-based memory invalidation

2021-12-21 Thread Chao Peng
For fd-based guest memory, the memory backend (e.g. the fd provider) should notify KVM to unmap/invalidate the privated memory from KVM second MMU when userspace punches hole on the fd (e.g. when userspace converts private memory to shared memory). To support fd-based memory invalidation,

[PATCH v3 12/15] KVM: Add KVM_EXIT_MEMORY_ERROR exit

2021-12-21 Thread Chao Peng
This new exit allows user space to handle memory-related errors. Currently it supports two types (KVM_EXIT_MEM_MAP_SHARED/PRIVATE) of errors which are used for shared memory <-> private memory conversion in memory encryption usage. After private memory is enabled, there are two places in KVM that

Re: [PATCH v3 00/15] KVM: mm: fd-based approach for supporting KVM guest private memory

2021-12-21 Thread Sean Christopherson
On Tue, Dec 21, 2021, Chao Peng wrote: > This is the third version of this series which try to implement the > fd-based KVM guest private memory. ... > Test > > This code has been tested with latest TDX code patches hosted at > (https://github.com/intel/tdx/tree/kvm-upstream) with minimal

[PATCH 2/3] user: move common-user includes to a subdirectory of {bsd, linux}-user/

2021-12-21 Thread Paolo Bonzini
Avoid polluting the compilation of common-user/ with local include files; making an include file available to common-user/ should be a deliberate decision in order to keep a clear interface that can be used by both bsd-user/ and linux-user/. Signed-off-by: Paolo Bonzini --- bsd-user/{ =>

Re: [PATCH] pci: Skip power-off reset when pending unplug

2021-12-21 Thread Alex Williamson
On Mon, 20 Dec 2021 18:03:56 -0500 "Michael S. Tsirkin" wrote: > On Mon, Dec 20, 2021 at 11:26:59AM -0700, Alex Williamson wrote: > > The below referenced commit introduced a change where devices under a > > root port slot are reset in response to removing power to the slot. > > This improves

Re: [PATCH] acpi: validate hotplug selector on access

2021-12-21 Thread Ani Sinha
On Tue, 21 Dec 2021, Michael S. Tsirkin wrote: > When bus is looked up on a pci write, we didn't > validate that the lookup succeeded. > Fuzzers thus can trigger QEMU crash by dereferencing the NULL > bus pointer. Good fix. Nice catch. > > Fixes: b32bd763a1 ("pci: introduce acpi-index

[PULL 16/31] tcg/loongarch64: Implement shl/shr/sar/rotl/rotr ops

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-17-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.h | 4

[PULL 22/31] tcg/loongarch64: Implement simple load/store ops

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-23-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 131

[PULL 20/31] tcg/loongarch64: Implement setcond ops

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20211221054105.178795-21-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 69 2 files

[PULL 26/31] tcg/loongarch64: Implement tcg_target_init

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20211221054105.178795-27-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 27 +++ 1 file changed, 27 insertions(+) diff --git

[PULL 11/31] tcg/loongarch64: Implement sign-/zero-extension ops

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-12-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.h | 24

[PULL 23/31] tcg/loongarch64: Add softmmu load/store helpers, implement qemu_ld/qemu_st ops

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Message-Id: <20211221054105.178795-24-...@xen0n.name> Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 2 + tcg/loongarch64/tcg-target.c.inc | 353 +++ 2 files

[PULL 30/31] configure, meson.build: Mark support for loongarch64 hosts

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Example output of `uname -a` on an initial Gentoo LA64 port, running the upstream submission version of Linux (with some very minor patches not influencing output here): > Linux 5.14.0-10342-g37a00851b145 #5 SMP PREEMPT Tue Aug 10 > 12:56:24 PM CST 2021 loongarch64 GNU/Linux

[PULL 29/31] linux-user: Implement CPU-specific signal handler for loongarch64 hosts

2021-12-21 Thread Richard Henderson
From: WANG Xuerui Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211221054105.178795-30-...@xen0n.name> Signed-off-by: Richard Henderson --- linux-user/host/loongarch64/host-signal.h | 87 +++ 1 file changed,

Re: [PATCH RFC] MAINTAINERS: split out s390x sections

2021-12-21 Thread Christian Borntraeger
Am 20.12.21 um 12:54 schrieb Cornelia Huck: Split out some more specialized devices etc., so that we can build smarter lists of people to be put on cc: in the future. Signed-off-by: Cornelia Huck Acked-by: Christian Borntraeger That should help to get additional maintainers (in add-on

[PATCH 1/8] configure: simplify creation of plugin symbol list

2021-12-21 Thread Paolo Bonzini
--dynamic-list is present on all supported ELF (not Windows or Darwin) platforms, since it dates back to 2006; -exported_symbols_list is likewise present on all supported versions of macOS. Do not bother doing a functional test in configure. Remove the file creation from configure as well: for

[PATCH 2/8] configure: do not set bsd_user/linux_user early

2021-12-21 Thread Paolo Bonzini
Similar to other optional features, leave the variables empty and compute the actual value later. Use the existence of include or source directories to detect whether an OS or CPU supports respectively bsd-user and linux-user. For now, BSD user-mode emulation is buildable even on TCI-only

[PATCH 0/8] Next round of configure/meson cleanups

2021-12-21 Thread Paolo Bonzini
Includes v2 of patches from the previous round, and new patches 3-8. Paolo Paolo Bonzini (8): configure: simplify creation of plugin symbol list configure: do not set bsd_user/linux_user early configure, makefile: remove traces of really old files configure: parse

[PATCH 4/8] configure: parse --enable/--disable-strip automatically, flip default

2021-12-21 Thread Paolo Bonzini
Always include the STRIP variable in config-host.mak (it's only used by the s390-ccw firmware build, and it adds a default if configure omitted it), and use meson-buildoptions.sh to turn --enable/--disable-strip into -Dstrip. The default is now not to strip the binaries like for almost every

  1   2   3   >