[RFC PATCH 3/3] spapr: implement nested-hv support for the TCG virtual hypervisor

2022-02-09 Thread Nicholas Piggin
This implements the nested-hv hcall API for spapr under TCG. It's still a bit rough around the edges, concept seems to work. Some HV exceptions can be raised now in the TCG spapr machine when running a nested guest. The main ones are the lev==1 syscall, the hdecr, hdsi and hisi, and h_virt externa

Re: [PATCH 3/3] isa/piix4: Resolve global variables

2022-02-09 Thread Michael S. Tsirkin
On Thu, Feb 10, 2022 at 12:16:34AM +0100, BB wrote: > Am 30. Januar 2022 23:53:42 MEZ schrieb "Philippe Mathieu-Daudé" > : > >On 14/1/22 14:36, Peter Maydell wrote: > >> On Wed, 12 Jan 2022 at 22:02, Bernhard Beschow wrote: > >>> > >>> Now that piix4_set_irq's opaque parameter references own PIIX

[RFC PATCH 0/3] spapr: nested-hv support for TCG

2022-02-09 Thread Nicholas Piggin
Here's a little thing I've been hacking on. I was pretty amazed I could even get it working, let alone being so small and not too horrible to look at. A few people thought it would be useful for prototyping and hacking and running kvm tests, etc. So, thoughts on the overall idea and code structure?

[RFC PATCH 1/3] target/ppc: raise HV interrupts for partition table entry problems

2022-02-09 Thread Nicholas Piggin
These are an HV exception. Not 100% sure what HDSISR bits to set in case of an empty table -- not sure what hardware does. not-yet-Signed-off-by: Nicholas Piggin --- target/ppc/mmu-radix64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/mmu-radix64.c b/target

[RFC PATCH 2/3] spapr: prevent hdec timer being set up under virtual hypervisor

2022-02-09 Thread Nicholas Piggin
The spapr virtual hypervisor does not require the hdecr timer. Remove it. not-yet-Signed-off-by: Nicholas Piggin --- hw/ppc/ppc.c| 2 +- hw/ppc/spapr_cpu_core.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index 462c87dba8..a7

[PATCH 0/4] OpenRISC Device Tree Support

2022-02-09 Thread Stafford Horne
This series adds device tree support for the OpenRISC SIM hardware. The simulator will generate an FDT and pass it to the kernel. For example: qemu-system-or1k -cpu or1200 -M or1k-sim \ -kernel /home/shorne/work/linux/vmlinux \ -initrd /home/shorne/work/linux/initramfs.cpio.gz \ -se

[PATCH 1/4] hw/openrisc/openrisc_sim: Create machine state for or1ksim

2022-02-09 Thread Stafford Horne
This will allow us to attach machine state attributes like the device tree fdt. Signed-off-by: Stafford Horne --- hw/openrisc/openrisc_sim.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.

[PATCH 2/4] hw/openrisc/openrisc_sim: Paramatarize initialization

2022-02-09 Thread Stafford Horne
Move magic numbers to variables and enums. These will be reused for upcoming fdt initialization. Signed-off-by: Stafford Horne --- hw/openrisc/openrisc_sim.c | 42 ++ 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/hw/openrisc/openrisc_sim.c b/h

[PATCH 3/4] hw/openrisc/openrisc_sim; Add support for loading a decice tree

2022-02-09 Thread Stafford Horne
Using the device tree means that qemu can now directly tell the kernel what hardware is configured rather than use having to maintain and update a separate device tree file. This patch adds device tree support for the OpenRISC simulator. A device tree is built up based on the state of the configur

[PATCH 4/4] hw/openrisc/openrisc_sim: Add support for initrd loading

2022-02-09 Thread Stafford Horne
The loaded initrd is loaded into memory. It's location and size is then added to the device tree so the kernel knows where to find it. Signed-off-by: Stafford Horne --- hw/openrisc/openrisc_sim.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git

[RFC PATCH v2 2/3] hw/intc: Support 32/64-bit mtimecmp and mtime accesses in RISC-V ACLINT

2022-02-09 Thread frank . chang
From: Frank Chang RISC-V privilege spec defines that: * In RV32, memory-mapped writes to mtimecmp modify only one 32-bit part of the register. * For RV64, naturally aligned 64-bit memory accesses to the mtime and mtimecmp registers are additionally supported and are atomic. It's possible to

[RFC PATCH v2 0/3] Support ACLINT 32/64-bit mtimecmp/mtime read/write accesses

2022-02-09 Thread frank . chang
From: Frank Chang This patchset makes ACLINT mtime to be writable as RISC-V privilege spec defines that mtime is exposed as a memory-mapped machine-mode read-write register. Also, mtimecmp and mtime should be 32/64-bit memory accessible registers. This patchset is the updated verion of: https://

[RFC PATCH v2 1/3] hw/intc: Add .impl.[min|max]_access_size declaration in RISC-V ACLINT

2022-02-09 Thread frank . chang
From: Frank Chang If device's MemoryRegion doesn't have .impl.[min|max]_access_size declaration, the default access_size_min would be 1 byte and access_size_max would be 4 bytes (see: softmmu/memory.c). This will cause a 64-bit memory access to ACLINT to be splitted into two 32-bit memory accesse

[RFC PATCH v2 3/3] hw/intc: Make RISC-V ACLINT mtime MMIO register writable

2022-02-09 Thread frank . chang
From: Frank Chang RISC-V privilege spec defines that mtime is exposed as a memory-mapped machine-mode read-write register. However, as QEMU uses host monotonic timer as timer source, this makes mtime to be read-only in RISC-V ACLINT. This patch makes mtime to be writable by recording the time de

Re: [PATCH v2 1/2] hw/misc: Supporting AST2600 HACE accumulative mode

2022-02-09 Thread Troy Lee
Hi Joel, On Tue, Feb 8, 2022 at 6:46 PM Joel Stanley wrote: > > Hello Troy, > > On Wed, 12 Jan 2022 at 08:10, Troy Lee wrote: > > > > Accumulative mode will supply a initial state and append padding bit at > > the end of hash stream. However, the crypto library will padding those > > bit automa

Re: [PATCH] hw/vhost-user-i2c: Add support for VIRTIO_I2C_F_ZERO_LENGTH_REQUEST

2022-02-09 Thread Viresh Kumar
On 11-01-22, 20:28, Viresh Kumar wrote: > VIRTIO_I2C_F_ZERO_LENGTH_REQUEST is a mandatory feature, that must be > implemented by everyone. Add its support. > > Signed-off-by: Viresh Kumar > --- > hw/virtio/vhost-user-i2c.c | 10 -- > include/hw/virtio/vhost-user-i2c.h | 3 +++ >

Re: [PATCH v10 1/3] target/ppc: fix indent of function parameters

2022-02-09 Thread David Gibson
On Tue, Feb 08, 2022 at 04:48:36PM -0300, Daniel Henrique Barboza wrote: > Fix indentation of powerpc_set_excp_state() and ppc_excp_apply_ail() > parameters. > > Signed-off-by: Daniel Henrique Barboza Reviewed-by: David Gibson > --- > target/ppc/excp_helper.c | 8 > 1 file changed, 4

[PATCH v2 14/15] target/arm: Validate tlbi TG matches translation granule in use

2022-02-09 Thread Richard Henderson
For FEAT_LPA2, we will need other ARMVAParameters, which themselves depend on the translation granule in use. We might as well validate that the given TG matches; the architecture "does not require that the instruction invalidates any entries" if this is not true. Signed-off-by: Richard Henderson

[PATCH v2 15/15] target/arm: Implement FEAT_LPA2

2022-02-09 Thread Richard Henderson
This feature widens physical addresses (and intermediate physical addresses for 2-stage translation) from 48 to 52 bits, when using 4k or 16k pages. This introduces the DS bit to TCR_ELx, which is RES0 unless the page size is enabled and supports LPA2, resulting in the effective value of DS for a

[PATCH v2 11/15] target/arm: Extend arm_fi_to_lfsc to level -1

2022-02-09 Thread Richard Henderson
With FEAT_LPA2, rather than introducing translation level 4, we introduce level -1, below the current level 0. Extend arm_fi_to_lfsc to handle these faults. Assert that this new translation level does not leak into faults types for which it is not defined, which allows some masking of fi->level t

[PATCH v2 06/15] target/arm: Use MAKE_64BIT_MASK to compute indexmask

2022-02-09 Thread Richard Henderson
The macro is a bit more readable than the inlined computation. Signed-off-by: Richard Henderson --- target/arm/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index cf38ebd816..94304804cb 100644 --- a/target/arm/helper.c

[PATCH v2 10/15] target/arm: Implement FEAT_LPA

2022-02-09 Thread Richard Henderson
This feature widens physical addresses (and intermediate physical addresses for 2-stage translation) from 48 to 52 bits, when using 64k pages. The only thing left at this point is to handle the extra bits in the TTBR and in the table descriptors. Note that PAR_EL1 and HPFAR_EL2 are nominally exte

[PATCH v2 07/15] target/arm: Honor TCR_ELx.{I}PS

2022-02-09 Thread Richard Henderson
This field controls the output (intermediate) physical address size of the translation process. V8 requires to raise an AddressSize fault if the page tables are programmed incorrectly, such that any intermediate descriptor address, or the final translated address, is out of range. Add a PS field

[PATCH v2 09/15] target/arm: Implement FEAT_LVA

2022-02-09 Thread Richard Henderson
This feature is relatively small, as it applies only to 64k pages and thus requires no additional changes to the table descriptor walking algorithm, only a change to the minimum TSZ (which is the inverse of the maximum virtual address space size). Note that this feature widens VBAR_ELx, but we alr

[PATCH v2 08/15] target/arm: Prepare DBGBVR and DBGWVR for FEAT_LVA

2022-02-09 Thread Richard Henderson
The original A.a revision of the AArch64 ARM required that we force-extend the addresses in these registers from 49 bits. This language has been loosened via a combination of IMPLEMENTATION DEFINED and CONSTRAINTED UNPREDICTABLE to allow consideration of the entire aligned address. This means that

[PATCH v2 13/15] target/arm: Fix TLBIRange.base for 16k and 64k pages

2022-02-09 Thread Richard Henderson
The shift of the BaseADDR field depends on the translation granule in use. Fixes: 84940ed8255 ("target/arm: Add support for FEAT_TLBIRANGE") Reported-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH v2 05/15] target/arm: Pass outputsize down to check_s2_mmu_setup

2022-02-09 Thread Richard Henderson
Pass down the width of the output address from translation. For now this is still just PAMax, but a subsequent patch will compute the correct value from TCR_ELx.{I}PS. Signed-off-by: Richard Henderson --- target/arm/helper.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deleti

[PATCH v2 03/15] target/arm: Fault on invalid TCR_ELx.TxSZ

2022-02-09 Thread Richard Henderson
Without FEAT_LVA, the behaviour of programming an invalid value is IMPLEMENTATION DEFINED. With FEAT_LVA, programming an invalid minimum value requires a Translation fault. It is most self-consistent to choose to generate the fault always. Signed-off-by: Richard Henderson --- v2: Continue to bo

[PATCH v2 12/15] target/arm: Introduce tlbi_aa64_get_range

2022-02-09 Thread Richard Henderson
Merge tlbi_aa64_range_get_length and tlbi_aa64_range_get_base, returning a structure containing both results. Pass in the ARMMMUIdx, rather than the digested two_ranges boolean. This is in preparation for FEAT_LPA2, where the interpretation of 'value' depends on the effective value of DS for the

[PATCH v2 04/15] target/arm: Move arm_pamax out of line

2022-02-09 Thread Richard Henderson
We will shortly share parts of this function with other portions of address translation. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/internals.h | 19 +-- target/arm/helper.c| 22 ++ 2 file

[PATCH v2 02/15] target/arm: Set TCR_EL1.TSZ for user-only

2022-02-09 Thread Richard Henderson
Set this as the kernel would, to 48 bits, to keep the computation of the address space correct for PAuth. Signed-off-by: Richard Henderson --- target/arm/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 5a9c02a256..92f19f919a 1

[PATCH v2 00/15] target/arm: Implement LVA, LPA, LPA2 features

2022-02-09 Thread Richard Henderson
Changes for v2: * Introduce FIELD_SEX64, instead of open-coding w/ sextract64. * Set TCR_EL1 more completely for user-only. * Continue to bound tsz within aa64_va_parameters; provide an out-of-bound indicator for raising AddressSize fault. * Split IPS patch. * Fix debug registers for

[PATCH v2 01/15] hw/registerfields: Add FIELD_SEX and FIELD_SDP

2022-02-09 Thread Richard Henderson
Add new macros to manipulate signed fields within the register. Suggested-by: Peter Maydell Signed-off-by: Richard Henderson --- include/hw/registerfields.h | 48 - 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/include/hw/registerfields.h b/in

Re: [PATCH] docs/system: riscv: Update description of CPU

2022-02-09 Thread Alistair Francis
On Wed, Feb 9, 2022 at 1:49 AM Yu Li wrote: > > Since the hypervisor extension been non experimental and enabled for > default CPU, the previous command is no longer available and the > option `x-h=true` or `h=true` is also no longer required. > > Signed-off-by: Yu Li Thanks! Applied to riscv-t

Re: [PATCH v9 0/5] support subsets of virtual memory extension

2022-02-09 Thread Alistair Francis
On Fri, Feb 4, 2022 at 12:32 PM Weiwei Li wrote: > > This patchset implements virtual memory related RISC-V extensions: Svnapot > version 1.0, Svinval vesion 1.0, Svpbmt version 1.0. > > Specification: > https://github.com/riscv/virtual-memory/tree/main/specs > > The port is available here: > htt

Re: [PATCH 6/6] target/arm: Implement FEAT_LPA2

2022-02-09 Thread Richard Henderson
On 1/8/22 01:39, Peter Maydell wrote: (1) The handling of the BaseADDR field for TLB range invalidates needs updating (there's a TODO to this effect in tlbi_aa64_range_get_base()). Side note: in that function, we shift the field by TARGET_PAGE_BITS, but the docs say that the shift should depend

[PATCH v2 06/12] Hexagon (tests/tcg/hexagon) test instructions that might set bits in USR

2022-02-09 Thread Taylor Simpson
Hexagon has ~200 instructions that set the saturate bit in USR, these were broken into groups of similar instructions and one instruction from each group is tested with at least one input that does not saturate and at least one input that does saturate. Signed-off-by: Taylor Simpson --- tests/tc

[PATCH v2 01/12] Hexagon (target/hexagon) fix bug in circular addressing

2022-02-09 Thread Taylor Simpson
From: Michael Lambert Versions V3 and earlier should treat the "K_const" and "length" values as unsigned. Modified circ_test_v3() in tests/tcg/hexagon/circ.c to reproduce the bug Signed-off-by: Michael Lambert Signed-off-by: Taylor Simpson --- target/hexagon/op_helper.c | 6 +++--- tests/tcg

[PATCH v2 09/12] Hexagon (tests/tcg/hexagon) fix inline asm in preg_alias.c

2022-02-09 Thread Taylor Simpson
Replace consecutive inline asm blocks with a single one with proper outputs/inputs/clobbers rather than making assumptions about register values being carried between separate blocks. Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/preg_alias.c | 46 ++

[PATCH v2 08/12] Hexagon (tests/tcg/hexagon) update overflow test

2022-02-09 Thread Taylor Simpson
Add a test that sets USR multiple times in a packet Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/overflow.c | 61 +++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/tests/tcg/hexagon/overflow.c b/tests/tcg/hexagon/overflow.c index 196fcf7f3a

[PATCH v2 12/12] Hexagon (target/hexagon) assignment to c4 should wait until packet commit

2022-02-09 Thread Taylor Simpson
On Hexagon, c4 is an alias for predicate registers P3:0. If we assign to c4 inside a packet with reads from predicate registers, the predicate reads should get the old values. Test case added to tests/tcg/hexagon/preg_alias.c Co-authored-by: Michael Lambert Signed-off-by: Taylor Simpson --- t

[PATCH v2 05/12] Hexagon (target/hexagon) properly handle denorm in arch_sf_recip_common

2022-02-09 Thread Taylor Simpson
The arch_sf_recip_common function was calling float32_getexp which adjusts for denorm, but the we actually need the raw exponent bits. This function is called from 3 instructions sfrecipa sffixupn sffixupd Test cases added to tests/tcg/hexagon/fpstuff.c Signed-off-by: Taylor Simpson

[PATCH v2 04/12] Hexagon (target/hexagon) properly handle SNaN in dfmin/dfmax/sfmin/sfmax

2022-02-09 Thread Taylor Simpson
The float??_minnum implementation differs from Hexagon for SNaN, it returns NaN, but Hexagon returns the other input. So, we add checks for NaN before calling it. test cases added in a subsequent patch to more extensively test USR bits Signed-off-by: Taylor Simpson --- target/hexagon/op_helper

[PATCH v2 07/12] Hexagon (tests/tcg/hexagon) add floating point instructions to usr.c

2022-02-09 Thread Taylor Simpson
Tests to confirm floating point instructions are properly setting exception bits in USR Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/usr.c | 339 1 file changed, 339 insertions(+) diff --git a/tests/tcg/hexagon/usr.c b/tests/tcg/hexagon/usr.c inde

[PATCH v2 11/12] Hexagon (target/hexagon) make VyV operands use a unique temp

2022-02-09 Thread Taylor Simpson
VyV operand is only used in the vshuff and vdeal instructions. These instructions write to both VyV and VxV operands. In the case where both operands are the same register, we need a separate location for VyV. We use the existing vtmp field in CPUHexagonState. Test case added in tests/tcg/hexag

[PATCH v2 03/12] Hexagon (target/hexagon) properly set FPINVF bit in sfcmp.uo and dfcmp.uo

2022-02-09 Thread Taylor Simpson
Instead of checking for nan arguments, use float??_unordered_quiet test cases added in a subsequent patch to more extensively test USR bits Signed-off-by: Taylor Simpson --- target/hexagon/op_helper.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/hexagon/op_he

[PATCH v2 00/12] Hexagon bug fixes and additional tests

2022-02-09 Thread Taylor Simpson
Fix bugs reported from Hexagon users There is a pattern of issues setting bits in user status register (USR), so I created new tests dedicated to instructions that might set USR. Changes in v2 Make the _chop versions of float-to-int conversions use :chop insns in usr.c Additiona

[PATCH v2 10/12] Hexagon (target/hexagon) fix bug in conv_df2uw_chop

2022-02-09 Thread Taylor Simpson
Fix typo that checked for 32 bit nan instead of 64 bit Test case added in tests/tcg/hexagon/usr.c Signed-off-by: Taylor Simpson --- target/hexagon/op_helper.c | 2 +- tests/tcg/hexagon/usr.c| 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/target/hexagon/op_helper.c b/

[PATCH v2 02/12] Hexagon HVX (target/hexagon) fix bug in HVX saturate instructions

2022-02-09 Thread Taylor Simpson
Two tests added to tests/tcg/hexagon/hvx_misc.c v21.uw = vadd(v11.uw, v10.uw):sat v25:24.uw = vsub(v17:16.uw, v27:26.uw):sat Signed-off-by: Taylor Simpson --- target/hexagon/macros.h | 4 +- tests/tcg/hexagon/hvx_misc.c | 71 +++- 2 files changed, 72

Re: [PATCH] docs/system: riscv: Update description of CPU

2022-02-09 Thread Alistair Francis
On Wed, Feb 9, 2022 at 1:49 AM Yu Li wrote: > > Since the hypervisor extension been non experimental and enabled for > default CPU, the previous command is no longer available and the > option `x-h=true` or `h=true` is also no longer required. > > Signed-off-by: Yu Li Reviewed-by: Alistair Franc

Re: [PATCH v5 0/2] Enable legacy LBR support for guest

2022-02-09 Thread Yang, Weijiang
On 2/9/2022 5:14 PM, Like Xu wrote: Hi Weijiang, On 23/1/2022 12:11 am, Yang Weijiang wrote: KVM legacy LBR patches have been merged in kernel 5.12, this patchset is to expose the feature to guest from the perf capability MSR. Qemu can add LBR format in cpu option to achieve it, e.g., -cpu ho

Re: [PATCH 4/6] target/arm: Implement FEAT_LVA

2022-02-09 Thread Richard Henderson
On 1/7/22 07:23, Peter Maydell wrote: On Wed, 8 Dec 2021 at 23:16, Richard Henderson wrote: This feature is relatively small, as it applies only to 64k pages and thus requires no additional changes to the table descriptor walking algorithm, only a change to the minimum TSZ (which is the invers

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-09 Thread Jag Raman
> On Feb 2, 2022, at 12:34 AM, Alex Williamson > wrote: > > On Wed, 2 Feb 2022 01:13:22 + > Jag Raman wrote: > >>> On Feb 1, 2022, at 5:47 PM, Alex Williamson >>> wrote: >>> >>> On Tue, 1 Feb 2022 21:24:08 + >>> Jag Raman wrote: >>> > On Feb 1, 2022, at 10:24 AM, Alex Willia

Re: [RFC PATCH 12/15] hw/m68k: Restrict M68kCPU type to target/ code

2022-02-09 Thread Richard Henderson
On 2/10/22 10:09, Philippe Mathieu-Daudé wrote: On 9/2/22 23:50, Richard Henderson wrote: On 2/10/22 08:54, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé ---   include/hw/m68k/mcf.h | 3 +--   target/m68k/cpu-qom.h | 2 --   target/m68k/cpu.h | 4 ++--   3 files changed,

Re: [PATCH 3/3] isa/piix4: Resolve global variables

2022-02-09 Thread BB
Am 30. Januar 2022 23:53:42 MEZ schrieb "Philippe Mathieu-Daudé" : >On 14/1/22 14:36, Peter Maydell wrote: >> On Wed, 12 Jan 2022 at 22:02, Bernhard Beschow wrote: >>> >>> Now that piix4_set_irq's opaque parameter references own PIIX4State, >>> piix4_dev becomes redundant and pci_irq_levels can b

[PATCH 6/9] exec: Define MMUAccessType in 'exec/cpu-tlb.h' header

2022-02-09 Thread Philippe Mathieu-Daudé via
To reduce the inclusion of "hw/core/cpu.h", extract MMUAccessType to its own "exec/cpu-tlb.h" header. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-defs.h | 1 + include/exec/cpu-tlb.h| 16 include/exec/cpu_ldst.h | 1 + include/exec/exec-all.h

Re: [PATCH v5 09/11] 9p: darwin: Implement compatibility for mknodat

2022-02-09 Thread Akihiko Odaki
On Thu, Feb 10, 2022 at 3:20 AM Will Cohen wrote: > > On Wed, Feb 9, 2022 at 9:08 AM Christian Schoenebeck > wrote: >> >> On Mittwoch, 9. Februar 2022 14:33:25 CET Akihiko Odaki wrote: >> > > I like the idea of switching it to __attribute__((weak)). I should note >> > > that I'm not sure that I

[PATCH 8/9] user: Declare target-agnostic prototypes in 'user/cpu-common.h'

2022-02-09 Thread Philippe Mathieu-Daudé via
Move user-mode common prototypes from "exec/exec-all.h" to "user/cpu-common.h". Signed-off-by: Philippe Mathieu-Daudé --- bsd-user/qemu.h | 2 -- include/exec/cpu-all.h | 3 +-- include/exec/exec-all.h | 10 -- include/user/cpu-common.h | 36 +

[PATCH 5/9] linux-user/cpu_loop: Add missing 'exec/cpu-all.h' header

2022-02-09 Thread Philippe Mathieu-Daudé via
env_cpu() is declared in "exec/cpu-all.h". Signed-off-by: Philippe Mathieu-Daudé --- linux-user/cpu_loop-common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/cpu_loop-common.h b/linux-user/cpu_loop-common.h index dc0042e4de..b0fd1ea3b1 100644 --- a/linux-user/cpu_loop-common.h

Re: [RFC PATCH 12/15] hw/m68k: Restrict M68kCPU type to target/ code

2022-02-09 Thread Philippe Mathieu-Daudé via
On 9/2/22 23:50, Richard Henderson wrote: On 2/10/22 08:54, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé ---   include/hw/m68k/mcf.h | 3 +--   target/m68k/cpu-qom.h | 2 --   target/m68k/cpu.h | 4 ++--   3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/in

[PATCH 7/9] user: Declare target-specific prototypes in 'user/cpu-target.h'

2022-02-09 Thread Philippe Mathieu-Daudé via
Move user-mode specific prototypes from "exec/exec-all.h" to "user/cpu-target.h". Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/user-exec.c| 1 + bsd-user/elfload.c | 1 + bsd-user/main.c | 1 + bsd-user/signal.c| 1 + include/

[PATCH 9/9] user: Share preexit_cleanup() with linux and bsd implementations

2022-02-09 Thread Philippe Mathieu-Daudé via
preexit_cleanup() is not Linux specific, move it to common-user/. Signed-off-by: Philippe Mathieu-Daudé --- {linux-user => common-user}/exit.c | 0 common-user/meson.build| 1 + linux-user/meson.build | 1 - 3 files changed, 1 insertion(+), 1 deletion(-) rename {linux-us

[PATCH 2/9] coverity-scan: Cover common-user/

2022-02-09 Thread Philippe Mathieu-Daudé via
common-user/ has been added in commit bbf15aaf7c ("common-user: Move safe-syscall.* from linux-user"). Signed-off-by: Philippe Mathieu-Daudé --- scripts/coverity-scan/COMPONENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/coverity-scan/COMPONENTS.md b/scripts/

[PATCH 4/9] linux-user/exit: Add missing 'qemu/plugin.h' header

2022-02-09 Thread Philippe Mathieu-Daudé via
qemu_plugin_user_exit() is declared in "qemu/plugin.h". Signed-off-by: Philippe Mathieu-Daudé --- linux-user/exit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/exit.c b/linux-user/exit.c index fa6ef0b9b4..10989f17f8 100644 --- a/linux-user/exit.c +++ b/linux-user/exit.c @@ -17

[PATCH 3/9] include: Move exec/user/ to user/

2022-02-09 Thread Philippe Mathieu-Daudé via
Avoid spreading the headers in multiple directories, unify exec/user/ and user/. Signed-off-by: Philippe Mathieu-Daudé --- bsd-user/qemu.h | 4 ++-- include/exec/cpu-all.h | 2 +- include/{exec => }/user/abitypes.h | 0 include/user/safe-syscall.h | 6 ++

[PATCH 1/9] accel/tcg: Add missing 'tcg/tcg.h' header

2022-02-09 Thread Philippe Mathieu-Daudé via
Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops-icount.c | 1 + accel/tcg/tcg-accel-ops-mttcg.c | 1 + accel/tcg/tcg-accel-ops-rr.c | 1 + accel/tcg/tcg-accel-ops.c| 1 + 4 files changed, 4 insertions(+) diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/tcg

[PATCH 0/9] exec: Split some user-mode specific declarations from 'exec/exec-all.h'

2022-02-09 Thread Philippe Mathieu-Daudé via
- Add missing headers - Merge exec/user/ to user/ - Extract MMUAccessType from QOM "hw/core/cpu.h" to "exec/cpu-tlb.h" - Extract user-specific declarations to "user/cpu-{common,target}.h" - Share preexit_cleanup() from Linux with BSD More to come, but flushing for early feedback. Based-on: <20220

Re: [RFC PATCH 12/15] hw/m68k: Restrict M68kCPU type to target/ code

2022-02-09 Thread Richard Henderson
On 2/10/22 08:54, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- include/hw/m68k/mcf.h | 3 +-- target/m68k/cpu-qom.h | 2 -- target/m68k/cpu.h | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/hw/m68k/mcf.h b/include/hw/m68k/mcf.h

Re: [PATCH 11/15] target: Use ArchCPU as interface to target CPU

2022-02-09 Thread Richard Henderson
On 2/10/22 09:33, Philippe Mathieu-Daudé wrote: -struct ArchCPU { +typedef struct ArchCPU { /*< private >*/ CPUState parent_obj; /*< public >*/ @@ -188,7 +188,7 @@ struct ArchCPU { uint32_t reset_addr; uint32_t exception_addr; uint32_t fast_tlb_miss_addr; -}; +

Re: [PATCH 11/15] target: Use ArchCPU as interface to target CPU

2022-02-09 Thread Richard Henderson
On 2/10/22 08:54, Philippe Mathieu-Daudé wrote: diff --git a/target/hexagon/cpu.h b/target/hexagon/cpu.h index 25c67e43a2..4dce40a360 100644 --- a/target/hexagon/cpu.h +++ b/target/hexagon/cpu.h @@ -143,7 +143,7 @@ typedef struct HexagonCPUClass { DeviceReset parent_reset; } HexagonCPUCla

Re: [PATCH 11/15] target: Use ArchCPU as interface to target CPU

2022-02-09 Thread Philippe Mathieu-Daudé via
On 9/2/22 22:54, Philippe Mathieu-Daudé wrote: ArchCPU is our interface with target-specific code. Use it as a forward-declared opaque pointer (abstract type), having its structure defined by each target. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/typedefs.h | 1 + target/al

[PATCH 10/15] target: Use CPUArchState as interface to target-specific CPU state

2022-02-09 Thread Philippe Mathieu-Daudé via
While CPUState is our interface with generic code, CPUArchState is our interface with target-specific code. Use CPUArchState as an abstract type, defined by each target. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/exec/poison.h | 2 -- include/hw/core/cpu.

Re: [PATCH 02/15] hw/m68k/mcf: Add missing 'exec/hwaddr.h' header

2022-02-09 Thread Richard Henderson
On 2/10/22 08:54, Philippe Mathieu-Daudé wrote: hwaddr type is defined in "exec/hwaddr.h". Signed-off-by: Philippe Mathieu-Daudé --- include/hw/m68k/mcf.h | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson r~

Re: [PATCH 03/15] hw/tricore: Remove unused and incorrect header

2022-02-09 Thread Richard Henderson
On 2/10/22 08:54, Philippe Mathieu-Daudé wrote: TriCore boards certainly don't need the ARM loader API :) Signed-off-by: Philippe Mathieu-Daudé --- include/hw/tricore/triboard.h | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH] hw/block/fdc-isa: Respect QOM properties when building AML

2022-02-09 Thread Philippe Mathieu-Daudé via
On 9/2/22 20:15, Bernhard Beschow wrote: Other ISA devices such as serial-isa use the properties in their build_aml functions. fdc-isa not using them is probably an oversight. Signed-off-by: Bernhard Beschow --- hw/block/fdc-isa.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletion

[PATCH 07/15] target/i386/tcg/sysemu: Include missing 'exec/exec-all.h' header

2022-02-09 Thread Philippe Mathieu-Daudé via
excp_helper.c requires "exec/exec-all.h" for tlb_set_page_with_attrs() and misc_helper.c for tlb_flush(). Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/tcg/sysemu/excp_helper.c | 1 + target/i386/tcg/sysemu/misc_helper.c | 1 + 2 files changed, 2 insertion

[RFC PATCH 15/15] hw/sh4: Restrict SuperHCPU type to target/ code

2022-02-09 Thread Philippe Mathieu-Daudé via
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sh4/sh.h | 3 +-- target/sh4/cpu-qom.h | 2 -- target/sh4/cpu.h | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/hw/sh4/sh.h b/include/hw/sh4/sh.h index ec716cdd45..a4245399d5 100644 --- a/include/hw/sh4/sh.

[RFC PATCH 13/15] hw/mips: Restrict MIPSCPU type to target/ code

2022-02-09 Thread Philippe Mathieu-Daudé via
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/mips/cpudevs.h | 6 ++ target/mips/cpu-qom.h | 2 -- target/mips/cpu.h | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/hw/mips/cpudevs.h b/include/hw/mips/cpudevs.h index f7c9728fa9..6065932b0e 1

[PATCH 06/15] target/i386/cpu: Ensure accelerators set CPU addressble physical bits

2022-02-09 Thread Philippe Mathieu-Daudé via
The only accelerator allowed to use zero as default value is TCG. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/i386/cpu.c b/target/i386/cpu.c index aa9e636800..16523a78d9 100644 --- a/target

Re: [RFC PATCH] linux-user: trap internal SIGABRT's

2022-02-09 Thread Richard Henderson
On 2/9/22 22:22, Alex Bennée wrote: linux-user wants to trap all signals in case they are related to the guest. This however results in less than helpful core dumps when the error is internal to QEMU. We can detect when an assert failure is in progress by examining __glib_assert_msg and fall thro

[PATCH 08/15] target: Include missing 'cpu.h'

2022-02-09 Thread Philippe Mathieu-Daudé via
These target-specific files use the target-specific CPU state but lack to include "cpu.h"; i.e.: ../target/riscv/pmp.h:61:23: error: unknown type name 'CPURISCVState' void pmpcfg_csr_write(CPURISCVState *env, uint32_t reg_index, ^ ../target/nios2/mmu.h:43:18:

[PATCH 05/15] cpu: Add missing 'exec/exec-all.h' and 'qemu/accel.h' headers

2022-02-09 Thread Philippe Mathieu-Daudé via
cpu.c requires "exec/exec-all.h" to call tlb_flush() and "qemu/accel.h" to call accel_cpu_realizefn(). Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpu.c b/cpu.c index 97d42b6b2a..6b4aa53775 100644 --- a/cpu

[PATCH 11/15] target: Use ArchCPU as interface to target CPU

2022-02-09 Thread Philippe Mathieu-Daudé via
ArchCPU is our interface with target-specific code. Use it as a forward-declared opaque pointer (abstract type), having its structure defined by each target. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/typedefs.h | 1 + target/alpha/cpu-qom.h | 4 +++- target/alpha/cpu.h

[PATCH 09/15] target: Use forward declared type instead of structure type

2022-02-09 Thread Philippe Mathieu-Daudé via
The CPU / CPU state are forward declared. $ git grep -E 'struct [A-Za-z]+CPU\ \*' target/arm/hvf_arm.h:16:void hvf_arm_set_cpu_features_from_host(struct ARMCPU *cpu); target/openrisc/cpu.h:234:int (*cpu_openrisc_map_address_code)(struct OpenRISCCPU *cpu, target/openrisc/cpu.h:238:

[RFC PATCH 14/15] hw/sparc: Restrict SPARCCPU type to target/ code

2022-02-09 Thread Philippe Mathieu-Daudé via
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sparc/sparc64.h | 4 +--- target/sparc/cpu-qom.h | 2 -- target/sparc/cpu.h | 4 ++-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/hw/sparc/sparc64.h b/include/hw/sparc/sparc64.h index 4ced36fb5a..605ae4448

[PATCH 02/15] hw/m68k/mcf: Add missing 'exec/hwaddr.h' header

2022-02-09 Thread Philippe Mathieu-Daudé via
hwaddr type is defined in "exec/hwaddr.h". Signed-off-by: Philippe Mathieu-Daudé --- include/hw/m68k/mcf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/m68k/mcf.h b/include/hw/m68k/mcf.h index decf17ce42..8cbd587bbf 100644 --- a/include/hw/m68k/mcf.h +++ b/include/hw/m68k/mcf.h

[PATCH 03/15] hw/tricore: Remove unused and incorrect header

2022-02-09 Thread Philippe Mathieu-Daudé via
TriCore boards certainly don't need the ARM loader API :) Signed-off-by: Philippe Mathieu-Daudé --- include/hw/tricore/triboard.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/tricore/triboard.h b/include/hw/tricore/triboard.h index f3844be447..094c8bd563 100644 --- a/include/hw/

[RFC PATCH 12/15] hw/m68k: Restrict M68kCPU type to target/ code

2022-02-09 Thread Philippe Mathieu-Daudé via
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/m68k/mcf.h | 3 +-- target/m68k/cpu-qom.h | 2 -- target/m68k/cpu.h | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/hw/m68k/mcf.h b/include/hw/m68k/mcf.h index 8cbd587bbf..e84fcfb4ca 100644 --- a/include/hw/

[PATCH 04/15] exec/cpu_ldst: Include 'cpu.h' to get target_ulong definition

2022-02-09 Thread Philippe Mathieu-Daudé via
Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu_ldst.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index a878fd0105..5c66de 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @

[PATCH 01/15] meson: Display libfdt as disabled when system emulation is disabled

2022-02-09 Thread Philippe Mathieu-Daudé via
When configuring QEMU with --disable-system, meson keeps showing libfdt as "auto". Mark it as disabled instead. Acked-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 57

[PATCH 00/15] target: Use ArchCPU & CPUArchState as abstract interface to target CPU

2022-02-09 Thread Philippe Mathieu-Daudé via
Hi Richard, Kind of respin of the "exec: Move translation declarations to 'translate-all.h'" series, but without modifying translate-all.h :) (same same but different). Last patches are RFC, not sure worthwhile (at least for now). Based-on: <20220207082756.82600-1-f4...@amsat.org> "exec: Remove

Re: [PATCH 13/13] exec: Move translation declarations to 'translate-all.h'

2022-02-09 Thread Philippe Mathieu-Daudé via
On 9/2/22 00:00, Richard Henderson wrote: On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: Translation declarations are only useful to TCG accelerator. Signed-off-by: Philippe Mathieu-Daudé Ug. So, like, what's you vision of exec-all.h vs translate-all.h? Certainly there's not much in transl

Re: [PATCH 10/13] target: Use CPUArchState as interface to target-specific CPU state

2022-02-09 Thread Philippe Mathieu-Daudé via
On 8/2/22 23:40, Richard Henderson wrote: On 2/9/22 02:22, Philippe Mathieu-Daudé wrote: While CPUState is our interface with generic code, CPUArchState is our interface with target-specific code. Use CPUArchState as an abstract type, defined by each target. Signed-off-by: Philippe Mathieu-Daud

Re: [PATCH] Deprecate C virtiofsd

2022-02-09 Thread Peter Maydell
On Wed, 9 Feb 2022 at 16:57, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > There's a nice new Rust implementation out there; recommend people > do new work on that. > > Signed-off-by: Dr. David Alan Gilbert > --- > docs/about/deprecated.rst | 14 ++ > 1

Re: [PATCH 1/1] virtio: fix feature negotiation for ACCESS_PLATFORM

2022-02-09 Thread Halil Pasic
On Wed, 09 Feb 2022 18:24:56 +0100 Cornelia Huck wrote: > On Wed, Feb 09 2022, Halil Pasic wrote: > > > Unlike most virtio features ACCESS_PLATFORM is considered mandatory by > > QEMU, i.e. the driver must accept it if offered by the device. The > > virtio specification says that the driver SHO

[PATCH] hw/block/fdc-isa: Respect QOM properties when building AML

2022-02-09 Thread Bernhard Beschow
Other ISA devices such as serial-isa use the properties in their build_aml functions. fdc-isa not using them is probably an oversight. Signed-off-by: Bernhard Beschow --- hw/block/fdc-isa.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/block/fdc-isa.c b/hw/bl

Re: [PATCH] Deprecate C virtiofsd

2022-02-09 Thread Vivek Goyal
On Wed, Feb 09, 2022 at 04:50:40PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > There's a nice new Rust implementation out there; recommend people > do new work on that. > > Signed-off-by: Dr. David Alan Gilbert Acked-by: Vivek Goyal Vivek > --- > docs/ab

Re: [PATCH v2 0/2] Python: setuptools v60+ workaround

2022-02-09 Thread John Snow
On Fri, Feb 4, 2022 at 5:18 PM John Snow wrote: > > Long story short: Python 3.7/3.8 on Fedora with setuptools v60.0.0+ > together create a bug that ultimately causes pylint to fail. See the > first commit message for more detail. > > I sent out a hotfix two weeks ago to fix this behavior on our C

Re: [PATCH v4 23/42] tests/acpi: allow CEDT table addition

2022-02-09 Thread Michael S. Tsirkin
On Wed, Feb 09, 2022 at 06:18:01PM +, Jonathan Cameron wrote: > On Mon, 24 Jan 2022 17:16:46 + > Jonathan Cameron wrote: > > > From: Ben Widawsky > > > > Following patches will add a new ACPI table, the > > CXL Early Discovery Table (CEDT). > > > > Signed-off-by: Ben Widawsky > > Sign

Re: [PATCH] MAINTAINERS: python - remove ehabkost and add bleal

2022-02-09 Thread John Snow
On Wed, Feb 9, 2022 at 10:29 AM Eduardo Habkost wrote: > > On Mon, 7 Feb 2022 at 19:05, John Snow wrote: > > > > Eduardo Habkost has left Red Hat and has other daily responsibilities to > > attend to. In order to stop spamming him on every series, remove him as > > "Reviewer" for the python/ libr

  1   2   3   >