Re: [RFC PATCH] docs/about/build-platforms: Refine the distro support policy

2023-02-17 Thread Markus Armbruster
Thomas Huth writes: > Our distro support policy has been written with a best-effort > estimation of what users and developers need. However, as we now > know, the support for older long-term distributions can get really > troublesome for upstream development, since it is for example close > to im

Re: [RFC PATCH] docs/about/build-platforms: Refine the distro support policy

2023-02-17 Thread Daniel P . Berrangé
On Fri, Feb 17, 2023 at 04:55:49PM +0100, Markus Armbruster wrote: > Thomas Huth writes: > > > Our distro support policy has been written with a best-effort > > estimation of what users and developers need. However, as we now > > know, the support for older long-term distributions can get really

Re: Runnig solaris binary(32 bit) on linux(64 bit)

2023-02-17 Thread Warner Losh
On Thu, Feb 16, 2023 at 12:40 PM David Woodhouse wrote: > On Thu, 2023-02-16 at 09:29 -1000, Richard Henderson wrote: > > On 2/16/23 09:02, David Woodhouse wrote: > > > It wouldn't be beyond the wit of man to extend qemu-user to support the > > > similar personality variations for SCO/Solaris/etc

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-17 Thread Reinoud Zandijk
On Fri, Feb 17, 2023 at 11:36:41AM +0100, Markus Armbruster wrote: > I feel the discussion petered out without a conclusion. > > I don't think letting the status quo win by inertia is a good outcome > here. > > Which 32-bit hosts are still useful, and why? NetBSD runs on a bunch of 32 bit-only h

[PATCH] [PATCH] disas/riscv Fix ctzw disassemble

2023-02-17 Thread Ivan Klokov
Due to typo in opcode list, ctzw is disassembled as clzw instruction. Fixes: 02c1b569a15b ("disas/riscv: Add Zb[abcs] instructions") Signed-off-by: Ivan Klokov --- v2: - added fixes line --- disas/riscv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disas/riscv.c b/disa

Re: [PATCH 2/2] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2023-02-17 Thread Jonathan Cameron via
On Tue, 31 Jan 2023 16:38:47 + Jonathan Cameron via wrote: > From: Gregory Price > > This commit enables each CXL Type-3 device to contain one volatile > memory region and one persistent region. > > Two new properties have been added to cxl-type3 device initialization: > [volatile-memd

Re: Call for GSoC and Outreachy project ideas for summer 2023

2023-02-17 Thread Stefano Garzarella
Hi Stefan, On Fri, Jan 27, 2023 at 10:17:40AM -0500, Stefan Hajnoczi wrote: Dear QEMU, KVM, and rust-vmm communities, QEMU will apply for Google Summer of Code 2023 (https://summerofcode.withgoogle.com/) and has been accepted into Outreachy May 2023 (https://www.outreachy.org/). You can now subm

[PATCH v1 3/4] linux-user: add target to host netlink conversions

2023-02-17 Thread Mathis Marion
From: Mathis Marion Added conversions for: - IFLA_MTU - IFLA_TXQLEN - IFLA_AF_SPEC AF_INET6 IFLA_INET6_ADDR_GEN_MODE These relate to the libnl functions rtnl_link_set_mtu, rtnl_link_set_txqlen, and rtnl_link_inet6_set_addr_gen_mode. Signed-off-by: Mathis Marion --- linux-user/fd-trans.c | 64 +

[PATCH v1 2/4] linux-user: fix sockaddr_in6 endianness

2023-02-17 Thread Mathis Marion
From: Mathis Marion Fields sin6_flowinfo and sin6_scope_id use the host byte order, so there is a conversion to be made when host and target endianness differ. Signed-off-by: Mathis Marion --- linux-user/syscall.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/linux-user/syscall.c b

[PATCH v1 1/4] linux-user: fix timerfd read endianness conversion

2023-02-17 Thread Mathis Marion
From: Mathis Marion When reading the expiration count from a timerfd, the endianness of the 64bit value read is the one of the host, just as for eventfds. Signed-off-by: Mathis Marion --- linux-user/fd-trans.c | 10 +++--- linux-user/fd-trans.h | 1 + linux-user/syscall.c | 8 ++--

[PATCH v1 4/4] linux-user: handle netlink flag NLA_F_NESTED

2023-02-17 Thread Mathis Marion
From: Mathis Marion Newer kernel versions require this flag to be present contrary to older ones. Depending on the libnl version it is added or not. Typically when using rtnl_link_inet6_set_addr_gen_mode, the netlink packet generated may contain the following attribute: with libnl 3.4 {nla_l

Re: [PATCH 07/12] testing: update ubuntu2004 to ubuntu2204

2023-02-17 Thread John Snow
On Thu, Feb 16, 2023, 2:44 PM Daniel P. Berrangé wrote: > On Thu, Feb 16, 2023 at 01:15:30PM -0500, John Snow wrote: > > On Wed, Feb 15, 2023 at 2:25 PM Alex Bennée > wrote: > > > > > > The 22.04 LTS release has been out for almost a year now so its time > > > to update all the remaining images

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-17 Thread Paolo Bonzini
On 2/17/23 11:47, Daniel P. Berrangé wrote: On Fri, Feb 17, 2023 at 11:36:41AM +0100, Markus Armbruster wrote: I feel the discussion petered out without a conclusion. I don't think letting the status quo win by inertia is a good outcome here. Which 32-bit hosts are still useful, and why? Whi

[PATCH v1 0/4] Missing endianness conversions in user mode

2023-02-17 Thread Mathis Marion
From: Mathis Marion For a bit of context, I was trying to test a network border router [1] daemon using the MIPS architecture (see [2]). I didn't have access to real MIPS hardware so I figured I would emulate it using QEMU user mode. I ran into a couple of problems all related to endianness conve

Re: Call for GSoC and Outreachy project ideas for summer 2023

2023-02-17 Thread German Maglione
Hi Stefan, Sorry for being so late, if it is still possible I would like to propose the following project: === A sandboxing tool for virtiofsd === ''Summary:''' Create a tool that runs virtiofsd in a sandboxed environment Virtiofs is a shared file system that lets virtual machines access a dire

Re: Call for GSoC and Outreachy project ideas for summer 2023

2023-02-17 Thread Stefan Hajnoczi
On Fri, 17 Feb 2023 at 11:23, Stefano Garzarella wrote: > > Hi Stefan, > > On Fri, Jan 27, 2023 at 10:17:40AM -0500, Stefan Hajnoczi wrote: > >Dear QEMU, KVM, and rust-vmm communities, > >QEMU will apply for Google Summer of Code 2023 > >(https://summerofcode.withgoogle.com/) and has been accepted

Re: [PATCH v1 2/2] hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG

2023-02-17 Thread Strahinja Jankovic
Hi, I tried running Avocado tests for cubieboard with following command: ARMBIAN_ARTIFACTS_CACHED=yes AVOCADO_ALLOW_LARGE_STORAGE=yes avocado --show=app,console run-t machine:cubieboard tests/avocado/boot_linux_console.py Without this patch all tests pass: RESULTS: PASS 3 | ERROR 0 | FA

Re: Call for GSoC and Outreachy project ideas for summer 2023

2023-02-17 Thread Stefan Hajnoczi
On Fri, 17 Feb 2023 at 11:43, German Maglione wrote: > > Hi Stefan, > > Sorry for being so late, if it is still possible I would like to propose the > following project: Added, thanks! https://wiki.qemu.org/Internships/ProjectIdeas/VirtiofsdSandboxingTool Stefan > > === A sandboxing tool for vi

Re: Call for GSoC and Outreachy project ideas for summer 2023

2023-02-17 Thread Stefano Garzarella
On Fri, Feb 17, 2023 at 11:53:03AM -0500, Stefan Hajnoczi wrote: On Fri, 17 Feb 2023 at 11:23, Stefano Garzarella wrote: Hi Stefan, On Fri, Jan 27, 2023 at 10:17:40AM -0500, Stefan Hajnoczi wrote: >Dear QEMU, KVM, and rust-vmm communities, >QEMU will apply for Google Summer of Code 2023 >(htt

Re: Call for GSoC and Outreachy project ideas for summer 2023

2023-02-17 Thread Stefan Hajnoczi
On Fri, 27 Jan 2023 at 10:17, Stefan Hajnoczi wrote: > Please reply to this email by February 6th with your project ideas. The call for project ideas is now closed. We have enough project ideas for this internship cycle and I wouldn't want people to spend time on additional ideas that we're unlik

[PATCH v3 0/1] virtio-fs: implement option for stateless migration.

2023-02-17 Thread Anton Kuchin
v3: - Remove migration_type from migration stream - Use enum type for migration_type - Get rid of useless cast - Fix typos - Reword commit message v2: - Use device property instead of migration capability Anton Kuchin (1): vhost-user-fs: add migration type property hw/core/qdev-properti

[PATCH v3 1/1] vhost-user-fs: add migration type property

2023-02-17 Thread Anton Kuchin
Migration of vhost-user-fs device requires transfer of FUSE internal state from backend. There is no standard way to do it now so by default migration must be blocked. But if this state can be externally transferred by orchestrator give it an option to explicitly allow migration. Signed-off-by: An

[PATCH v4] audio/pwaudio.c: Add Pipewire audio backend for QEMU

2023-02-17 Thread Dorinda Bassey
This commit adds a new audiodev backend to allow QEMU to use Pipewire as both an audio sink and source. This backend is available on most systems Add Pipewire entry points for QEMU Pipewire audio backend Add wrappers for QEMU Pipewire audio backend in qpw_pcm_ops() qpw_write function returns the c

Re: [PATCH 07/12] testing: update ubuntu2004 to ubuntu2204

2023-02-17 Thread Daniel P . Berrangé
On Fri, Feb 17, 2023 at 11:35:44AM -0500, John Snow wrote: > On Thu, Feb 16, 2023, 2:44 PM Daniel P. Berrangé > wrote: > > > On Thu, Feb 16, 2023 at 01:15:30PM -0500, John Snow wrote: > > > On Wed, Feb 15, 2023 at 2:25 PM Alex Bennée > > wrote: > > > > > > > > The 22.04 LTS release has been out

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-17 Thread Daniel P . Berrangé
On Fri, Feb 17, 2023 at 05:06:42PM +0100, Reinoud Zandijk wrote: > On Fri, Feb 17, 2023 at 11:36:41AM +0100, Markus Armbruster wrote: > > I feel the discussion petered out without a conclusion. > > > > I don't think letting the status quo win by inertia is a good outcome > > here. > > > > Which 3

Re: [PATCH 07/12] testing: update ubuntu2004 to ubuntu2204

2023-02-17 Thread John Snow
On Fri, Feb 17, 2023, 12:14 PM Daniel P. Berrangé wrote: > On Fri, Feb 17, 2023 at 11:35:44AM -0500, John Snow wrote: > > On Thu, Feb 16, 2023, 2:44 PM Daniel P. Berrangé > > wrote: > > > > > On Thu, Feb 16, 2023 at 01:15:30PM -0500, John Snow wrote: > > > > On Wed, Feb 15, 2023 at 2:25 PM Alex

Re: [PATCH v2 4/4] target/ppc: fix warning with clang-15

2023-02-17 Thread Philippe Mathieu-Daudé
On 16/2/23 14:49, Pierrick Bouvier wrote: When compiling for windows-arm64 using clang-15, it reports a sometimes uninitialized variable. This seems to be a false positive, as a default case guards switch expressions, preventing to return an uninitialized value, but clang seems unhappy with asser

Re: [PATCH 18/18] target/riscv: Move configuration check to envcfg CSRs predicate()

2023-02-17 Thread Palmer Dabbelt
On Thu, 16 Feb 2023 17:59:42 PST (-0800), Bin Meng wrote: Hi Palmer, On Fri, Feb 17, 2023 at 12:40 AM Palmer Dabbelt wrote: On Tue, 14 Feb 2023 18:22:21 PST (-0800), Bin Meng wrote: > On Tue, Feb 14, 2023 at 10:59 PM weiwei wrote: >> >> >> On 2023/2/14 22:27, Bin Meng wrote: >> > At present

[PATCH v4 0/8] hw/cxl: RAS error emulation and injection

2023-02-17 Thread Jonathan Cameron via
v4: (no functional changes) In response to similar feedback on poison injection series (Markus Armbruster). - More detailed documentation in cxl.json - Based on tag in format suggested by Markus. Based on series "[PATCH v4 00/10] hw/cxl: CXL emulation cleanups and minor fixes for upstream" Bas

[PATCH v4 1/8] hw/pci/aer: Implement PCI_ERR_UNCOR_MASK register

2023-02-17 Thread Jonathan Cameron via
This register in AER should be both writeable and should have a default value with a couple of the errors masked including the Uncorrectable Internal Error used by CXL for it's error reporting. Signed-off-by: Jonathan Cameron --- hw/pci/pcie_aer.c | 4 include/hw/pci/pcie_regs.h |

[PATCH v4 2/8] hw/pci/aer: Add missing routing for AER errors

2023-02-17 Thread Jonathan Cameron via
PCIe r6.0 Figure 6-3 "Pseudo Logic Diagram for Selected Error Message Control and Status Bits" includes a right hand branch under "All PCI Express devices" that allows for messages to be generated or sent onwards without SERR# being set as long as the appropriate per error class bit in the PCIe Dev

[PATCH v4 3/8] hw/pci-bridge/cxl_root_port: Wire up AER

2023-02-17 Thread Jonathan Cameron via
We are missing necessary config write handling for AER emulation in the CXL root port. Add it based on pcie_root_port.c Signed-off-by: Jonathan Cameron --- hw/pci-bridge/cxl_root_port.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/pci-bridge/cxl_root_port.c b/hw/pci-bridge/cxl_root_

[PATCH v4 4/8] hw/pci-bridge/cxl_root_port: Wire up MSI

2023-02-17 Thread Jonathan Cameron via
Done to avoid fixing ACPI route description of traditional PCI interrupts on q35 and because we should probably move with the times anyway. Signed-off-by: Jonathan Cameron --- hw/pci-bridge/cxl_root_port.c | 61 +++ 1 file changed, 61 insertions(+) diff --git a/h

[PATCH v4 5/8] hw/mem/cxl-type3: Add AER extended capability

2023-02-17 Thread Jonathan Cameron via
This enables AER error injection to function as expected. It is intended as a building block in enabling CXL RAS error injection in the following patches. Signed-off-by: Jonathan Cameron --- hw/mem/cxl_type3.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/mem/cxl_type3.c

[PATCH v4 6/8] hw/cxl: Fix endian issues in CXL RAS capability defaults / masks

2023-02-17 Thread Jonathan Cameron via
As these are about to be modified, fix the endian handle for this set of registers rather than making it worse. Note that CXL is currently only supported in QEMU on x86 (arm64 patches out of tree) so we aren't going to yet hit an problems with big endian. However it is good to avoid making things

[PATCH v4 7/8] hw/pci/aer: Make PCIE AER error injection facility available for other emulation to use.

2023-02-17 Thread Jonathan Cameron via
This infrastructure will be reused for CXL RAS error injection in patches that follow. Signed-off-by: Jonathan Cameron --- hw/pci/pci-internal.h | 1 - include/hw/pci/pcie_aer.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pci-internal.h b/hw/pci/pci-internal.h

[PATCH v4 8/8] hw/mem/cxl_type3: Add CXL RAS Error Injection Support.

2023-02-17 Thread Jonathan Cameron via
CXL uses PCI AER Internal errors to signal to the host that an error has occurred. The host can then read more detailed status from the CXL RAS capability. For uncorrectable errors: support multiple injection in one operation as this is needed to reliably test multiple header logging support in an

Re: [PATCH v3 04/11] bsd-user: various helper routines for sysctl

2023-02-17 Thread Richard Henderson
On 2/16/23 13:33, Warner Losh wrote: cap_memory - Caps the memory to just below MAXINT scale_to_guest_pages - Account for difference in host / guest page size h2g_long_sat - converts a int64_t to a int32_t, saturating at max / min values h2g_ulong_sat - converts a uint64_t to a uint32_t, saturati

Re: [PATCH v3 06/11] bsd-user: Helper routines h2g_old_sysctl

2023-02-17 Thread Richard Henderson
On 2/16/23 13:33, Warner Losh wrote: h2g_old_sysctl does the byte swapping in the data to return it to the target for the 'well known' types. For most of the types, either the data is returned verbatim (strings, byte size, opaque we don't know about) or it's returned with byte swapping (for all t

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-17 Thread Philippe Mathieu-Daudé
(Cc'ing Huacai & Jiaxun). On 17/2/23 17:38, Paolo Bonzini wrote: On 2/17/23 11:47, Daniel P. Berrangé wrote: On Fri, Feb 17, 2023 at 11:36:41AM +0100, Markus Armbruster wrote: I feel the discussion petered out without a conclusion. I don't think letting the status quo win by inertia is a good

Re: [PATCH] [PATCH] disas/riscv Fix ctzw disassemble

2023-02-17 Thread Daniel Henrique Barboza
On 2/17/23 13:10, Ivan Klokov wrote: Due to typo in opcode list, ctzw is disassembled as clzw instruction. Fixes: 02c1b569a15b ("disas/riscv: Add Zb[abcs] instructions") Signed-off-by: Ivan Klokov --- Reviewed-by: Daniel Henrique Barboza v2: - added fixes line --- disas/riscv.c |

[PULL 7/9] target/riscv: Smepmp: Skip applying default rules when address matches

2023-02-17 Thread Palmer Dabbelt
From: Himanshu Chauhan When MSECCFG.MML is set, after checking the address range in PMP if the asked permissions are not same as programmed in PMP, the default permissions are applied. This should only be the case when there is no matching address is found. This patch skips applying default rule

[PULL 3/9] hw/riscv/boot.c: make riscv_load_initrd() static

2023-02-17 Thread Palmer Dabbelt
From: Daniel Henrique Barboza The only remaining caller is riscv_load_kernel_and_initrd() which belongs to the same file. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Reviewed-by: Alistair Francis Message-Id: <20230206140022.2748401-4-dbarb

[PULL 6/9] MAINTAINERS: Add some RISC-V reviewers

2023-02-17 Thread Palmer Dabbelt
From: Alistair Francis This patch adds some active RISC-V members as reviewers to the MAINTAINERS file. Signed-off-by: Alistair Francis Acked-by: LIU Zhiwei Acked-by: Weiwei Li Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Reviewed-by: Daniel Henrique Barboza Reviewed-by: Frank

[PULL 2/9] hw/riscv/boot.c: consolidate all kernel init in riscv_load_kernel()

2023-02-17 Thread Palmer Dabbelt
From: Daniel Henrique Barboza The microchip_icicle_kit, sifive_u, spike and virt boards are now doing the same steps when '-kernel' is used: - execute load_kernel() - load init_rd() - write kernel_cmdline Let's fold everything inside riscv_load_kernel() to avoid code repetition. To not change t

[PULL 8/9] target/riscv: avoid env_archcpu() in cpu_get_tb_cpu_state()

2023-02-17 Thread Palmer Dabbelt
From: Daniel Henrique Barboza We have a RISCVCPU *cpu pointer available at the start of the function. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Weiwei Li Message-ID: <20230210123836.506286-1-dbarb...@ventanamicro.com> Signed-off-by: Palmer Dabbelt

[PULL 5/9] target/riscv: Remove privileged spec version restriction for RVV

2023-02-17 Thread Palmer Dabbelt
From: Frank Chang The RVV specification does not require that the core needs to support the privileged specification v1.12.0 to support RVV, and there is no dependency from ISA level. This commit removes the restriction from both RVV CSRs and extension CPU ISA string. Signed-off-by: Frank Chang

[PULL 0/9] Fourth RISC-V PR for QEMU 8.0

2023-02-17 Thread Palmer Dabbelt
The following changes since commit 417296c8d8588f782018d01a317f88957e9786d6: tests/qtest/netdev-socket: Raise connection timeout to 60 seconds (2023-02-09 11:23:53 +) are available in the Git repository at: https://github.com/palmer-dabbelt/qemu.git tags/pull-riscv-to-apply-20230217

[PULL 9/9] target/riscv: Fix vslide1up.vf and vslide1down.vf

2023-02-17 Thread Palmer Dabbelt
From: LIU Zhiwei vslide1up_##BITWIDTH is used by the vslide1up.vx and vslide1up.vf. So its scalar input should be uint64_t to hold the 64 bits float register.And the same for vslide1down_##BITWIDTH. This bug is caught when run these instructions on qemu-riscv32. Signed-off-by: LIU Zhiwei Revie

[PULL 1/9] hw/riscv: handle 32 bit CPUs kernel_entry in riscv_load_kernel()

2023-02-17 Thread Palmer Dabbelt
From: Daniel Henrique Barboza Next patch will move all calls to riscv_load_initrd() to riscv_load_kernel(). Machines that want to load initrd will be able to do via an extra flag to riscv_load_kernel(). This change will expose a sign-extend behavior that is happening in load_elf_ram_sym() when r

Re: [PATCH 1/2] qemu/typedefs: Sort in case-insensitive alphabetical order (again)

2023-02-17 Thread Richard Henderson
On 2/17/23 04:18, Philippe Mathieu-Daudé wrote: Following the recommendation added in commit a98c370c46 ("typedefs: (Re-)sort entries alphabetically"), and similarly to commit 64baadc272 ("Sort include/qemu/typedefs.h"), sort again the type definitions (in case-insensitive alphabetical order, usi

[PATCH v2 1/2] tests/qtest/cxl-test: whitespace, line ending cleanup

2023-02-17 Thread Jonathan Cameron via
From: Gregory Price Defines are starting to exceed line length limits, align them for cleanliness before making modifications. Signed-off-by: Gregory Price Signed-off-by: Jonathan Cameron --- tests/qtest/cxl-test.c | 84 +++--- 1 file changed, 46 insertions

[PATCH v2 0/2] hw/mem: CXL Type-3 Volatile Memory Support

2023-02-17 Thread Jonathan Cameron via
v2: - Fix an off by one in address space matching when both volatile and persistent memory is in present (meant 1st byte of persistent memory not readale) - Picked up tags (thanks to all who tested!) Based on following series (in order) 1. [PATCH v4 00/10] hw/cxl: CXL emulation cleanups and mi

[PATCH v2 2/2] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2023-02-17 Thread Jonathan Cameron via
From: Gregory Price This commit enables each CXL Type-3 device to contain one volatile memory region and one persistent region. Two new properties have been added to cxl-type3 device initialization: [volatile-memdev] and [persistent-memdev] The existing [memdev] property has been deprecated

Re: [PATCH 2/2] hw/timer: Reduce 'hw/ptimer.h' inclusion

2023-02-17 Thread Richard Henderson
On 2/17/23 04:18, Philippe Mathieu-Daudé wrote: "hw/ptimer.h" API is mostly used by timer / watchdog device models. Since the SoC / machines only access the ptimer via reference, they don't need its definition: the declartion is enough. On order to reduce the inclusion on the source files, forwa

Re: [PATCH v2 5/5] hw/nvme: flexible data placement emulation

2023-02-17 Thread Keith Busch
On Fri, Feb 17, 2023 at 01:07:43PM +0100, Jesper Devantier wrote: > +static void nvme_do_write_fdp(NvmeCtrl *n, NvmeRequest *req, uint64_t slba, > + uint32_t nlb) > +{ > +NvmeNamespace *ns = req->ns; > +NvmeRwCmd *rw = (NvmeRwCmd *)&req->cmd; > +uint64_t dat

[PATCH 0/6] hw/cxl: Poison get, inject, clear

2023-02-17 Thread Jonathan Cameron via
Note Alison has stated the kernel series will be post 6.3 material so this one isn't quite as urgent as the patches it is based on. However I think this series in a good state (plus I have lots more queued behind it) hence promoting it from RFC. Changes since RFC v2: Thanks to Markus for review.

[PATCH 1/6] hw/cxl: Move enum ret_code definition to cxl_device.h

2023-02-17 Thread Jonathan Cameron via
Needs tidy up and rename to something more generic now it is in a header. Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-mailbox-utils.c | 28 include/hw/cxl/cxl_device.h | 28 2 files changed, 28 insertions(+), 28 deletions(-) diff --g

[PATCH 2/6] hw/cxl: rename mailbox return code type from ret_code to CXLRetCode

2023-02-17 Thread Jonathan Cameron via
This enum typedef used to be local to one file, so having a generic name wasn't a big problem even if it wasn't compliant with QEMU naming conventions. Now it is in cxl_device.h to support use outside of cxl-mailbox-utils.c rename it. Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-mailbox-utils

[PATCH 3/6] hw/cxl: Introduce cxl_device_get_timestamp() utility function

2023-02-17 Thread Jonathan Cameron via
From: Ira Weiny There are new users of this functionality coming shortly so factor it out from the GET_TIMESTAMP mailbox command handling. Signed-off-by: Ira Weiny Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-device-utils.c | 15 +++ hw/cxl/cxl-mailbox-utils.c | 11 +-

[PATCH 4/6] hw/cxl: QMP based poison injection support

2023-02-17 Thread Jonathan Cameron via
Inject poison using qmp command cxl-inject-poison to add an entry to the poison list. For now, the poison is not returned CXL.mem reads, but only via the mailbox command Get Poison List. See CXL rev 3.0, sec 8.2.9.8.4.1 Get Poison list (Opcode 4300h) Kernel patches to use this interface here: ht

Re: [PATCH v1 2/4] linux-user: fix sockaddr_in6 endianness

2023-02-17 Thread Philippe Mathieu-Daudé
On 17/2/23 17:35, Mathis Marion wrote: From: Mathis Marion Fields sin6_flowinfo and sin6_scope_id use the host byte order, so there is a conversion to be made when host and target endianness differ. Signed-off-by: Mathis Marion --- linux-user/syscall.c | 6 ++ 1 file changed, 6 inserti

[PATCH 5/6] hw/cxl: Add poison injection via the mailbox.

2023-02-17 Thread Jonathan Cameron via
Very simple implementation to allow testing of corresponding kernel code. Note that for now we track each 64 byte section independently. Whilst a valid implementation choice, it may make sense to fuse entries so as to prove out more complex corners of the kernel code. Signed-off-by: Jonathan Came

[PATCH 6/6] hw/cxl: Add clear poison mailbox command support.

2023-02-17 Thread Jonathan Cameron via
Current implementation is very simple so many of the corner cases do not exist (e.g. fragmenting larger poison list entries) Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-mailbox-utils.c | 77 + hw/mem/cxl_type3.c | 36 + include/hw/

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-17 Thread Richard Henderson
On 2/17/23 06:06, Reinoud Zandijk wrote: On Fri, Feb 17, 2023 at 11:36:41AM +0100, Markus Armbruster wrote: I feel the discussion petered out without a conclusion. I don't think letting the status quo win by inertia is a good outcome here. Which 32-bit hosts are still useful, and why? NetBSD

Re: [RFC PATCH] docs/about/build-platforms: Refine the distro support policy

2023-02-17 Thread Thomas Huth
On 17/02/2023 16.06, Daniel P. Berrangé wrote: On Fri, Feb 17, 2023 at 02:26:31PM +0100, Thomas Huth wrote: ... I'm also not so comfortable dropping the only version of SLES that we explicitly target, when we don't know when their new major release will arrive. Let's hope that the next major

Re: [RFC PATCH] docs/about/build-platforms: Refine the distro support policy

2023-02-17 Thread Thomas Huth
On 17/02/2023 16.59, Daniel P. Berrangé wrote: On Fri, Feb 17, 2023 at 04:55:49PM +0100, Markus Armbruster wrote: The cost/benefit tradeoff of dropping the platforms entirely is not obviously favourable when we don't have clear demand to bump the min versions of native packages, and the co

Re: [PATCH 2/2] hw/timer: Reduce 'hw/ptimer.h' inclusion

2023-02-17 Thread Thomas Huth
On 17/02/2023 15.18, Philippe Mathieu-Daudé wrote: "hw/ptimer.h" API is mostly used by timer / watchdog device models. Since the SoC / machines only access the ptimer via reference, they don't need its definition: the declartion is enough. On order to reduce the inclusion on the source files, fo

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-17 Thread Thomas Huth
On 17/02/2023 18.43, Philippe Mathieu-Daudé wrote: (Cc'ing Huacai & Jiaxun). On 17/2/23 17:38, Paolo Bonzini wrote: On 2/17/23 11:47, Daniel P. Berrangé wrote: On Fri, Feb 17, 2023 at 11:36:41AM +0100, Markus Armbruster wrote: I feel the discussion petered out without a conclusion. I don't t

Re: CXL 2.0 memory pooling emulation

2023-02-17 Thread Gregory Price
On Fri, Feb 17, 2023 at 11:14:18AM +, Jonathan Cameron wrote: > On Thu, 16 Feb 2023 15:52:31 -0500 > Gregory Price wrote: > > > > > I agree, it's certainly "not pretty". > > > > I'd go so far as to call the baby ugly :]. Like i said: "The Hackiest way" > > > > My understanding from lookin

Re: [PATCH 2/2] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2023-02-17 Thread Gregory Price
On Fri, Feb 17, 2023 at 04:16:17PM +, Jonathan Cameron via wrote: > On Tue, 31 Jan 2023 16:38:47 + > Jonathan Cameron via wrote: > > > From: Gregory Price > > > > This commit enables each CXL Type-3 device to contain one volatile > > memory region and one persistent region. > > > > Two

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-17 Thread Thomas Huth
On 17/02/2023 17.38, Paolo Bonzini wrote: On 2/17/23 11:47, Daniel P. Berrangé wrote: On Fri, Feb 17, 2023 at 11:36:41AM +0100, Markus Armbruster wrote: I feel the discussion petered out without a conclusion. I don't think letting the status quo win by inertia is a good outcome here. Which 32

Re: [PATCH] hw/ide/ahci: trace ncq write command as write instead of read

2023-02-17 Thread John Snow
On Fri, Feb 17, 2023 at 7:27 AM Philippe Mathieu-Daudé wrote: > > On 17/2/23 11:31, Fiona Ebner wrote: > > Fixes: e4baa9f00b ("AHCI: Replace DPRINTF with trace-events") > > Oops Seconding the whoops. > > > Signed-off-by: Fiona Ebner > > --- > > > > Or should it be sorted alphabetically below ex

[PATCH v6 02/29] target/arm: wrap psci call with tcg_enabled

2023-02-17 Thread Fabiano Rosas
From: Claudio Fontana for "all" builds (tcg + kvm), we want to avoid doing the psci check if tcg is built-in, but not enabled. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Signed-off-by: Fabiano Rosas Tested-by: Philippe Mathieu-Daudé --- target/arm/helper.c | 3 ++- 1 file

[PATCH v6 04/29] target/arm: Move PC alignment check

2023-02-17 Thread Fabiano Rosas
Move this earlier to make the next patch diff cleaner. While here update the comment slightly to not give the impression that the misalignment affects only TCG. Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas Tested-by: Philippe Mathieu-Daudé ---

[PATCH v6 03/29] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled()

2023-02-17 Thread Fabiano Rosas
From: Claudio Fontana Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Signed-off-by: Fabiano Rosas Tested-by: Philippe Mathieu-Daudé --- target/arm/helper.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.

[PATCH v6 06/29] target/arm: Wrap breakpoint/watchpoint updates with tcg_enabled

2023-02-17 Thread Fabiano Rosas
This is in preparation for restricting compilation of some parts of debug_helper.c to TCG only. Signed-off-by: Fabiano Rosas --- Dropped r-bs because I added a few more ifs in debug_helper.c --- target/arm/cpu.c | 6 -- target/arm/debug_helper.c | 16 target/arm/ma

[PATCH v6 13/29] target/arm: Move regime_using_lpae_format into internal.h

2023-02-17 Thread Fabiano Rosas
This function is needed by common code (ptw.c), so move it along with the other regime_* functions in internal.h. When we enable the build without TCG, the tlb_helper.c file will not be present. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- t

[PATCH v6 08/29] target/arm: move translate modules to tcg/

2023-02-17 Thread Fabiano Rosas
Introduce the target/arm/tcg directory. Its purpose is to hold the TCG code that is selected by CONFIG_TCG. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé

[PATCH v6 18/29] tests/avocado: Tag TCG tests with accel:tcg

2023-02-17 Thread Fabiano Rosas
This allows the test to be skipped when TCG is not present in the QEMU binary. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- tests/avocado/boot_linux_console.py | 1 + tests/avocado/reverse_debugging.py | 8 2 files changed, 9 inser

[PATCH v6 07/29] target/arm: Wrap TCG-only code in debug_helper.c

2023-02-17 Thread Fabiano Rosas
The next few patches will move helpers under CONFIG_TCG. We'd prefer to keep the debug helpers and debug registers close together, so rearrange the file a bit to be able to wrap the helpers with a TCG ifdef. Signed-off-by: Fabiano Rosas --- target/arm/debug_helper.c | 476 +++

[PATCH v6 16/29] target/arm: Move cortex sysregs into cpu64.c

2023-02-17 Thread Fabiano Rosas
The file cpu_tcg.c is about to be moved into the tcg/ directory, so move the register definitions into cpu64.c along with the cortex cpus definition. This code defines registers for 64-bit cpus but it is shared by the 32 bit "max" CPU, so use an ifdef instead of meson to keep the rest of the file

[PATCH v6 20/29] target/arm: move cpu_tcg to tcg/cpu32.c

2023-02-17 Thread Fabiano Rosas
From: Claudio Fontana move the module containing cpu models definitions for 32bit TCG-only CPUs to tcg/ and rename it for clarity. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson --- hw/arm/virt.c | 2 +- target/arm/meson.bu

[PATCH v6 00/29] target/arm: Allow CONFIG_TCG=n builds

2023-02-17 Thread Fabiano Rosas
Addressed Peter's comments and dropped the cpregs change which is not related to fixing the --disable-tcg build. This unblocks the xenpvh series and I can tackle the regs split without holding up the build work. changes: - debug regs: I left debug_helper.c out of the movement to tcg/ along with

[PATCH v6 01/29] target/arm: rename handle_semihosting to tcg_handle_semihosting

2023-02-17 Thread Fabiano Rosas
From: Claudio Fontana make it clearer from the name that this is a tcg-only function. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- target/arm/helper.c | 4 ++-- 1 file ch

[PATCH v6 05/29] target/arm: Move cpregs code out of cpu.h

2023-02-17 Thread Fabiano Rosas
Since commit cf7c6d1004 ("target/arm: Split out cpregs.h") we now have a cpregs.h header which is more suitable for this code. Code moved verbatim. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- target/arm

[PATCH v6 15/29] cpu-defs.h: Expose CPUTLBEntryFull to non-TCG code

2023-02-17 Thread Fabiano Rosas
This struct has no dependencies on TCG code and it is being used in target/arm/ptw.c to simplify the passing around of page table walk results. Those routines can be reached by KVM code via the gdbstub breakpoint code, so take the structure out of CONFIG_TCG to make it visible when building with --

[PATCH v6 11/29] target/arm: Wrap arm_rebuild_hflags calls with tcg_enabled

2023-02-17 Thread Fabiano Rosas
This is in preparation to moving the hflags code into its own file under the tcg/ directory. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- hw/arm/boot.c | 6 +- hw/intc/armv7m_nvic.c | 20 +--- target/arm/

[PATCH v6 09/29] target/arm: move helpers to tcg/

2023-02-17 Thread Fabiano Rosas
From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- target/arm/meson.build | 15 ++- target/arm/tcg-stubs.c | 23 +++

[PATCH v6 22/29] tests/qtest: arm-cpu-features: Match tests to required accelerators

2023-02-17 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Acked-by: Thomas Huth --- tests/qtest/arm-cpu-features.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 4ff2014bea..1555

[PATCH v6 28/29] gitlab-ci: Check building KVM-only aarch64 target

2023-02-17 Thread Fabiano Rosas
From: Philippe Mathieu-Daudé Add a manual new job to cross-build the aarch64 target with only the KVM accelerator enabled (in particular, no TCG). Re-enable running the similar job on the project Aarch64 custom runner. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas Reviewe

[PATCH v6 29/29] tests/qtest: Fix tests when no KVM or TCG are present

2023-02-17 Thread Fabiano Rosas
It is possible to have a build with both TCG and KVM disabled due to Xen requiring the i386 and x86_64 binaries to be present in an aarch64 host. If we build with --disable-tcg on the aarch64 host, we will end-up with a QEMU binary (x86) that does not support TCG nor KVM. Fix tests that crash or

[PATCH v6 10/29] target/arm: Move psci.c into the tcg directory

2023-02-17 Thread Fabiano Rosas
From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé --- target/arm/meson.build | 1 - target/arm/tcg/meson.build | 4 target/arm/{ => tcg}/psci.c | 0 3 files c

[PATCH v6 25/29] tests/avocado: add machine:none tag to version.py

2023-02-17 Thread Fabiano Rosas
This test currently fails when run on a host for which the QEMU target has no default machine set: ERROR| Output: qemu-system-aarch64: No machine specified, and there is no default Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas --- tests/avocado/version.py | 1 + 1 file chang

[PATCH v6 23/29] tests/qtest: Restrict tpm-tis-devices-{swtpm}-test to CONFIG_TCG

2023-02-17 Thread Fabiano Rosas
These tests set -accel tcg, so restrict them to when TCG is present. Signed-off-by: Fabiano Rosas Acked-by: Richard Henderson Reviewed-by: Thomas Huth --- Removed unneeded hunk restricting dependencies Use config_all instead of config_devices_all to check for TCG --- tests/qtest/meson.build |

[PATCH v6 27/29] arm/Kconfig: Do not build TCG-only boards on a KVM-only build

2023-02-17 Thread Fabiano Rosas
Move all the CONFIG_FOO=y from default.mak into "default y if TCG" statements in Kconfig. That way they won't be selected when CONFIG_TCG=n. I'm leaving CONFIG_ARM_VIRT in default.mak because it allows us to keep the two default.mak files not empty and keep aarch64-default.mak including arm-defaul

[PATCH v6 26/29] arm/Kconfig: Always select SEMIHOSTING when TCG is present

2023-02-17 Thread Fabiano Rosas
We are about to enable the build without TCG, so CONFIG_SEMIHOSTING and CONFIG_ARM_COMPATIBLE_SEMIHOSTING cannot be unconditionally set in default.mak anymore. So reflect the change in a Kconfig. Instead of using semihosting/Kconfig, use a target-specific file, so that the change doesn't affect ot

[PATCH v6 21/29] target/arm: Use "max" as default cpu for the virt machine with KVM

2023-02-17 Thread Fabiano Rosas
Now that the cortex-a15 is under CONFIG_TCG, use as default CPU for a KVM-only build the 'max' cpu. Note that we cannot use 'host' here because the qtests can run without any other accelerator (than qtest) and 'host' depends on KVM being enabled. Signed-off-by: Fabiano Rosas Acked-by: Richard He

[PATCH v6 17/29] tests/avocado: Skip tests that require a missing accelerator

2023-02-17 Thread Fabiano Rosas
If a test was tagged with the "accel" tag and the specified accelerator it not present in the qemu binary, cancel the test. We can now write tests without explicit calls to require_accelerator, just the tag is enough. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philip

[PATCH v6 12/29] target/arm: Move hflags code into the tcg directory

2023-02-17 Thread Fabiano Rosas
The hflags are used only for TCG code, so introduce a new file hflags.c to keep that code. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- target/arm/helper.c| 393 +--- target/arm/internals.h | 2 +

<    1   2   3   >