[PULL v2 00/50] MIPS patches for 2022-06-11

2022-06-11 Thread Philippe Mathieu-Daudé
://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2022-06-10 18:15:34 -0700) are available in the Git repository at: https://github.com/philmd/qemu.git tags/mips-20220611 for you to fetch changes up to 6e0c18598814bffb67204a90890fb7b34cad288a: docs/devel: Fix link to developer mailing

Re: [PULL 00/49] MIPS patches for 2022-06-11

2022-06-11 Thread Philippe Mathieu-Daudé via
ailable in the Git repository at: > > https://github.com/philmd/qemu.git tags/mips-20220611 > > for you to fetch changes up to 37da3bcf01ccd19336fd8f43bedcd0841d71bb6a: > > docs/devel: Fix link to developer mail

[PULL v2 47/50] hw/mips/boston: Initialize g_autofree pointers

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Fixes compilation due to false positives with -Werror: In file included from /usr/include/glib-2.0/glib.h:114, from qemu/src/include/glib-compat.h:32, from qemu/src/include/qemu/osdep.h:144, from

Re: [PULL 00/17] Kraxel 20220610 patches

2022-06-11 Thread Akihiko Odaki
On 2022/06/12 1:34, Volker Rümelin wrote: Am 10.06.22 um 22:16 schrieb Richard Henderson: On 6/10/22 02:20, Gerd Hoffmann wrote: The following changes since commit 9cc1bf1ebca550f8d90f967ccd2b6d2e00e81387:    Merge tag 'pull-xen-20220609' of

Re: [PULL 0/6] Bsd user preen 2022q2 patches

2022-06-11 Thread Richard Henderson
On 6/11/22 06:55, Warner Losh wrote: The following changes since commit 2663c41cfa2c3be34c62de97902a375b81027efd: Merge tag 'pull-target-arm-20220610' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022-06-10 13:16:48 -0700) are available in the Git repository at:

Re: [PATCH] dbus-display: fix test race when initializing p2p connection

2022-06-11 Thread Cole Robinson
On 6/9/22 11:26 AM, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The D-Bus connection starts processing messages before QEMU has the time > to set the object manager server. This is causing dbus-display-test to > fail randomly with: > >

Re: [PULL 00/49] MIPS patches for 2022-06-11

2022-06-11 Thread Richard Henderson
in the Git repository at: https://github.com/philmd/qemu.git tags/mips-20220611 for you to fetch changes up to 37da3bcf01ccd19336fd8f43bedcd0841d71bb6a: docs/devel: Fix link to developer mailing lists (2022-06-11 11:44:50 +0200

Re: [PATCH] hw/mips/boston: Initialize g_autofree pointers

2022-06-11 Thread Philippe Mathieu-Daudé via
On Sat, Jun 11, 2022 at 5:27 PM Bernhard Beschow wrote: > On Fri, Jun 10, 2022 at 4:04 PM Philippe Mathieu-Daudé > wrote: >> On 5/6/22 17:19, Bernhard Beschow wrote: >> > Fixes compilation due to false positives with -Werror: >> > >> >In file included from /usr/include/glib-2.0/glib.h:114,

[PATCH] hw/nvme: Add options to override hardcoded values

2022-06-11 Thread Mauricio Sandt
This small patch is the result of some recent malware research I did in a QEMU VM. The malware used multiple ways of querying info from the VM disk and I needed a clean way to change those values from the hypervisor. I believe this functionality could be useful to more people from multiple

[PATCH v6 2/4] target/riscv: Add dummy mcountinhibit CSR for priv spec v1.11 or higher

2022-06-11 Thread Anup Patel
The mcountinhibit CSR is mandatory for priv spec v1.11 or higher. For implementation that don't want to implement can simply have a dummy mcountinhibit which is always zero. Fixes: a4b2fa433125 ("target/riscv: Introduce privilege version field in the CSR ops.") Signed-off-by: Anup Patel

[PATCH v6 0/4] QEMU RISC-V nested virtualization fixes

2022-06-11 Thread Anup Patel
This series does fixes and improvements to have nested virtualization on QEMU RISC-V. These patches can also be found in riscv_nested_fixes_v6 branch at: https://github.com/avpatel/qemu.git The RISC-V nested virtualization was tested on QEMU RISC-V using Xvisor RISC-V which has required

Re: [PATCH 00/50] PS2 device QOMification - part 1

2022-06-11 Thread Philippe Mathieu-Daudé via
On Fri, Jun 10, 2022 at 5:43 PM Mark Cave-Ayland wrote: > > On 10/06/2022 16:35, Philippe Mathieu-Daudé wrote: > > > On 7/6/22 17:54, Mark Cave-Ayland wrote: > >> On 22/05/2022 19:17, Mark Cave-Ayland wrote: > >> > >>> This series came about when looking at improving the LASI PS2 device for > >>>

Re: [PATCH v2 00/11] hw/acpi/piix4: remove legacy piix4_pm_init() function

2022-06-11 Thread Philippe Mathieu-Daudé via
On 6/6/22 12:56, Mark Cave-Ayland wrote: On 30/05/2022 12:27, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé This series moves the outstanding logic from piix4_pm_init() into the relevant instance init() and realize() functions, changes the IRQs to use qdev gpios, and then

Re: [PATCH v4 00/11] QOM'ify PIIX southbridge creation

2022-06-11 Thread Philippe Mathieu-Daudé via
On 3/6/22 20:50, Bernhard Beschow wrote: Bernhard Beschow (11): hw/southbridge/piix: Aggregate all PIIX southbridge type names hw/isa/piix4: Use object_initialize_child() for embedded struct hw/isa/piix4: Move pci_map_irq_fn' near pci_set_irq_fn hw/isa/piix4: QOM'ify PCI device

[PULL 00/49] MIPS patches for 2022-06-11

2022-06-11 Thread Philippe Mathieu-Daudé
/qemu.git tags/mips-20220611 for you to fetch changes up to 37da3bcf01ccd19336fd8f43bedcd0841d71bb6a: docs/devel: Fix link to developer mailing lists (2022-06-11 11:44:50 +0200) MIPS patches queue - Various TCG fixes (Marcin

[PULL 01/49] target/mips: Fix WatchHi.M handling

2022-06-11 Thread Philippe Mathieu-Daudé
From: Marcin Nowakowski bit 31 (M) of WatchHiN register is a read-only register indicating whether the next WatchHi register is present. It must not be reset during user writes to the register. Signed-off-by: Marcin Nowakowski Reviewed-by: David Daney Signed-off-by: Philippe Mathieu-Daudé

[PULL 02/49] target/mips: Fix SAT_S trans helper

2022-06-11 Thread Philippe Mathieu-Daudé
From: Ni Hui Fix the SAT_S and SAT_U trans helper confusion. Fixes: 4701d23aef ("target/mips: Convert MSA BIT instruction format to decodetree") Signed-off-by: Ni Hui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 10/49] target/mips: Fix emulation of nanoMIPS BPOSGE32C instruction

2022-06-11 Thread Philippe Mathieu-Daudé
From: Dragan Mladjenovic There are currently two problems related to the emulation of the instruction BPOSGE32C. The nanoMIPS instruction BPOSGE32C belongs to DSP R3 instructions (actually, as of now, it is the only instruction of DSP R3). The presence of DSP R3 instructions in QEMU is

[PULL 06/49] target/mips: Fix store adress of high 64bit in helper_msa_st_b()

2022-06-11 Thread Philippe Mathieu-Daudé
From: Ni Hui This patch fix the issue that helper_msa_st_b() write high 64bit data to where the low 64bit resides, leaving high 64bit undefined. Fixes: 68ad9260e0 ("target/mips: Use 8-byte memory ops for msa load/store") Signed-off-by: Ni Hui Reviewed-by: Richard Henderson Reviewed-by:

[PULL 09/49] target/mips: Fix emulation of nanoMIPS EXTRV_S.H instruction

2022-06-11 Thread Philippe Mathieu-Daudé
From: Dragan Mladjenovic The field rs in the instruction EXTRV_S.H rt, ac, rs is specified in nanoMIPS documentation as opcode[20..16]. It is, however, erroneously considered as opcode[25..21] in the current QEMU implementation. In function gen_pool32axf_2_nanomips_insn(), the variable v0_t

[PULL 05/49] target/mips: Do not treat msa INSERT as NOP when wd is zero

2022-06-11 Thread Philippe Mathieu-Daudé
From: Ni Hui Only for msa COPY_U/COPY_S with wd zero, we treat it as NOP. Move this special rule into COPY_U and COPY_S trans function. Fixes: 97fe675519 ("target/mips: Convert MSA COPY_S and INSERT opcodes to decodetree") Signed-off-by: Ni Hui Reviewed-by: Philippe Mathieu-Daudé

[PULL 16/49] hw/acpi/piix4: move xen_enabled() logic from piix4_pm_init() to piix4_pm_realize()

2022-06-11 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland This logic can be included as part of piix4_pm_realize() and does not need to be handled externally. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ani Sinha Message-Id: <20220528091934.15520-2-mark.cave-ayl...@ilande.co.uk>

[PULL 13/49] target/mips: Add missing default cases for some nanoMIPS pools

2022-06-11 Thread Philippe Mathieu-Daudé
From: Stefan Pejic Switch statements for the code segments that handle nanoMIPS instruction pools P.LL, P.SC, P.SHIFT, P.LS.S1, P.LS.E0, PP.LSXS do not have proper default case, resulting in not generating reserved instruction exception for certain illegal opcodes. Fix this by adding default

[PULL 17/49] hw/acpi/piix4: change smm_enabled from int to bool

2022-06-11 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland This is in preparation for conversion to a qdev property. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ani Sinha Message-Id: <20220528091934.15520-3-mark.cave-ayl...@ilande.co.uk> [PMD: Change simm_enabled from int to bool, suggested

[PULL 19/49] hw/acpi/piix4: move PIIX4PMState into separate piix4.h header

2022-06-11 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland This allows the QOM types in hw/acpi/piix4.c to be used elsewhere by simply including hw/acpi/piix4.h. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220528091934.15520-5-mark.cave-ayl...@ilande.co.uk> Reviewed-by: Bernhard Beschow

[PULL 20/49] hw/acpi/piix4: alter piix4_pm_init() to return PIIX4PMState

2022-06-11 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland This exposes the PIIX4_PM device to the caller to allow any qdev gpios to be mapped outside of piix4_pm_init(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220528091934.15520-6-mark.cave-ayl...@ilande.co.uk> Reviewed-by: Bernhard

[PULL 18/49] hw/acpi/piix4: convert smm_enabled bool to qdev property

2022-06-11 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland This allows the smm_enabled value to be set using a standard qdev property instead of being referenced directly in piix4_pm_init(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Ani Sinha Message-Id:

[PULL 21/49] hw/acpi/piix4: rename piix4_pm_init() to piix4_pm_initfn()

2022-06-11 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland When QOMifying a device it is typical to use _init() as the suffix for an instance_init function, however this name is already in use by the legacy piix4_pm_init() wrapper function. Eventually the wrapper function will be removed, but for now rename it to piix4_pm_initfn()

[PULL 27/49] hw/southbridge/piix: Aggregate all PIIX southbridge type names

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow TYPE_PIIX3_PCI_DEVICE resides there as already, so add the remaining ones, too. Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220603185045.143789-2-shen...@gmail.com> Signed-off-by: Philippe

[PULL 33/49] hw/isa/piix4: Inline and remove piix4_create()

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow During the previous changesets piix4_create() became a trivial wrapper around more generic functions. Modernize the code. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id:

[PULL 25/49] hw/isa/piix4.c: create PIIX4_PM device directly instead of using piix4_pm_initfn()

2022-06-11 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland Now that all external logic has been removed from piix4_pm_initfn() the PIIX4_PM device can be instantiated directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220528091934.15520-12-mark.cave-ayl...@ilande.co.uk> Reviewed-by:

[PULL 24/49] hw/i386/pc_piix: create PIIX4_PM device directly instead of using piix4_pm_initfn()

2022-06-11 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland Now that all external logic has been removed from piix4_pm_initfn() the PIIX4_PM device can be instantiated directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220528091934.15520-11-mark.cave-ayl...@ilande.co.uk> Reviewed-by:

[PULL 41/49] hw: Reuse TYPE_I8042 define

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow TYPE_I8042 is exported, so reuse it for consistency. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Message-Id: <20220520180109.8224-2-shen...@gmail.com> Signed-off-by: Philippe

[PULL 28/49] hw/isa/piix4: Use object_initialize_child() for embedded struct

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Reported-by: Peter Maydell Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id: <20220603185045.143789-3-shen...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/piix4.c | 2 +- 1 file changed, 1

[PULL 36/49] hw/isa/piix3: Factor out ISABus retrieval from piix3_create()

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Modernizes the code. Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Message-Id: <20220603185045.143789-11-shen...@gmail.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 3 ++-

[PULL 29/49] hw/isa/piix4: Move pci_map_irq_fn' near pci_set_irq_fn

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow The pci_map_irq_fn was implemented below type_init() which made it inaccessible to QOM functions. So move it up. Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220603185045.143789-4-shen...@gmail.com>

[PULL 32/49] hw/isa/piix4: QOM'ify PIIX4 PM creation

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Just like the real hardware, create the PIIX4 ACPI controller as part of the PIIX4 southbridge. This also mirrors how the IDE and USB functions are already created. Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Message-Id:

[PULL 49/49] docs/devel: Fix link to developer mailing lists

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Ammends commit 9f73de8df0335c9387f4ee39e207a65a1615676f 'docs: rSTify the "SubmitAPatch" wiki'. Cc: qemu-sta...@nongnu.org Signed-off-by: Bernhard Beschow Acked-by: Mark Cave-Ayland Message-Id: <20220520180109.8224-11-shen...@gmail.com> Signed-off-by: Philippe

[PULL 34/49] hw/isa/piix3: Move pci_map_irq_fn near pci_set_irq_fn

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow The pci_map_irq_fn was implemented below type_init() which made it inaccessible to QOM functions. So move it up. Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220603185045.143789-9-shen...@gmail.com>

[PULL 39/49] hw/i386/microvm-dt: Determine mc146818rtc's IRQ number from QOM property

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Since commit 3b004a16540aa41f2aa6a1ceb0bf306716766914 'hw/rtc/ mc146818rtc: QOM'ify IRQ number' mc146818rtc's IRQ number is configurable. Fix microvm-dt to respect its value. Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe

[PULL 40/49] hw/rtc/mc146818rtc: QOM'ify io_base offset

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Exposing the io_base offset as a QOM property not only allows it to be configurable but also to be displayed in HMP: Before: (qemu) info qtree ... dev: mc146818rtc, id "" gpio-out "" 1 base_year = 0 (0x0) irq = 8 (0x8)

[PULL 46/49] hw/net/fsl_etsec/etsec: Remove obsolete and unused etsec_create()

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow etsec_create() wraps qdev API which is outdated. It is also unused, so remove it. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Acked-by: Mark Cave-Ayland Message-Id: <20220520180109.8224-8-shen...@gmail.com>

[PULL 43/49] hw/i386/pc: Unexport PC_CPU_MODEL_IDS macro

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow The macro seems to be used only internally, so remove it. Signed-off-by: Bernhard Beschow Acked-by: Michael S. Tsirkin Acked-by: Mark Cave-Ayland Message-Id: <20220520180109.8224-4-shen...@gmail.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe

[PULL 38/49] hw/i386/microvm-dt: Force explicit failure if retrieving QOM property fails

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow New code will be added where this is best practice. So update existing code as well. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220529184006.10712-2-shen...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé ---

[PULL 42/49] hw/audio/cs4231a: Const'ify global tables

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow The tables contain spcifically crafted constants for algorithms, so make them immutable. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Acked-by: Mark Cave-Ayland Message-Id: <20220520180109.8224-3-shen...@gmail.com> Signed-off-by: Philippe

[PULL 44/49] hw/i386/pc: Unexport functions used only internally

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Acked-by: Michael S. Tsirkin Acked-by: Mark Cave-Ayland Message-Id: <20220520180109.8224-5-shen...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 4 ++--

[PULL 47/49] accel/tcg/cpu-exec: Unexport dump_drift_info()

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Commit 3a841ab53f165910224dc4bebabf1a8f1d04200c 'qapi: introduce x-query-jit QMP command' basically moved the only function using dump_drift_info() to cpu-exec.c. Therefore, dump_drift_info() doesn't need to be exported any longer. Signed-off-by: Bernhard Beschow

[PULL 48/49] accel/tcg: Inline dump_opcount_info() and remove it

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow dump_opcount_info() is a one-line wrapper around tcg_dump_op_count() which is also exported. So use the latter directly. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Acked-by: Mark Cave-Ayland Message-Id:

[PATCH v6 1/4] target/riscv: Don't force update priv spec version to latest

2022-06-11 Thread Anup Patel
The riscv_cpu_realize() sets priv spec version to v1.12 when it is when "env->priv_ver == 0" (i.e. default v1.10) because the enum value of priv spec v1.10 is zero. Due to above issue, the sifive_u machine will see priv spec v1.12 instead of priv spec v1.10. To fix this issue, we set latest priv

[PULL 03/49] target/mips: Fix df_extract_val() and df_extract_df() dfe lookup

2022-06-11 Thread Philippe Mathieu-Daudé
From: Ni Hui Actually look into dfe structure data so that df_extract_val() and df_extract_df() can return immediate and datafield other than BYTE. Fixes: 4701d23aef ("target/mips: Convert MSA BIT instruction format to decodetree") Signed-off-by: Ni Hui Reviewed-by: Richard Henderson

[PULL 07/49] target/mips: Fix FTRUNC_S and FTRUNC_U trans helper

2022-06-11 Thread Philippe Mathieu-Daudé
From: Ni Hui Fix the FTRUNC_S and FTRUNC_U trans helper problem. Fixes: 5c5b64000c ("target/mips: Convert MSA 2RF instruction format to decodetree") Signed-off-by: nihui Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 04/49] target/mips: Fix msa checking condition in trans_msa_elm_fn()

2022-06-11 Thread Philippe Mathieu-Daudé
From: Ni Hui Fix issue that condition of check_msa_enabled(ctx) is reversed that causes segfault when msa elm_fn op encountered. Fixes: 2f2745c81a ("target/mips: Convert MSA COPY_U opcode to decodetree") Fixes: 97fe675519 ("target/mips: Convert MSA COPY_S and INSERT opcodes to decodetree")

[PULL 11/49] target/mips: Fix emulation of nanoMIPS BNEC[32] instruction

2022-06-11 Thread Philippe Mathieu-Daudé
From: Dragan Mladjenovic If both rs and rt are the same register, the nanoMIPS instruction BNEC[32] rs, rt, address is equivalent to NOP (branch is not taken and there is no delay slot). This commit provides such behavior. Without this commit, this scenario results in an incorrect behavior.

[PULL 14/49] target/mips: Undeprecate nanoMIPS ISA support in QEMU

2022-06-11 Thread Philippe Mathieu-Daudé
From: Stefan Pejic nanoMIPS ISA support in QEMU is actively used by MediaTek and is planned to be maintained and potentially extended by MediaTek in future. Un-orphan nanoMIPS ISA support in QEMU by setting a maintainer from MediaTek and remove deprecation notes from documentation as well.

[PULL 08/49] target/mips: Fix emulation of nanoMIPS MTHLIP instruction

2022-06-11 Thread Philippe Mathieu-Daudé
From: Stefan Pejic The field ac in nanoMIPS instruction MTHLIP rs, ac is specified in nanoMIPS documentation as opcode[15..14] (2 bits). However, in the current QEMU code, the corresponding argument passed to the helper gen_helper_mthlip() has the value of opcode[15..11] (5 bits). Right shift

[PULL 12/49] target/mips: Fix handling of unaligned memory access for nanoMIPS ISA

2022-06-11 Thread Philippe Mathieu-Daudé
From: Dragan Mladjenovic nanoMIPS ISA does not support unaligned memory access. Adjust DisasContext's default_tcg_memop_mask to reflect this. Signed-off-by: Dragan Mladjenovic Signed-off-by: Stefan Pejic Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 23/49] hw/acpi/piix4: use qdev gpio to wire up smi_irq

2022-06-11 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland Initialize the SMI IRQ in piix4_pm_init(). The smi_irq can now be wired up directly using a qdev gpio instead of having to set the IRQ externally in piix4_pm_initfn(). Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 15/49] hw/block/fdc-sysbus: Always mark sysbus floppy controllers as not having DMA

2022-06-11 Thread Philippe Mathieu-Daudé
From: Peter Maydell The sysbus floppy controllers (devices sysbus-fdc and sun-fdtwo) don't support DMA. The core floppy controller code expects this to be indicated by setting FDCtrl::dma_chann to -1. This used to be done in the device instance_init functions sysbus_fdc_initfn() and

[PULL 26/49] hw/acpi/piix4: remove unused piix4_pm_initfn() function

2022-06-11 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland This function is now unused and so can be completely removed. Signed-off-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220528091934.15520-13-mark.cave-ayl...@ilande.co.uk> Reviewed-by: Bernhard Beschow Signed-off-by: Philippe Mathieu-Daudé

[PULL 30/49] hw/isa/piix4: QOM'ify PCI device creation and wiring

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow PCI interrupt wiring and device creation were performed in create() functions which are obsolete. Move these tasks into QOM functions to modernize the code. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id:

[PULL 22/49] hw/acpi/piix4: use qdev gpio to wire up sci_irq

2022-06-11 Thread Philippe Mathieu-Daudé
From: Mark Cave-Ayland Introduce piix4_pm_init() instance init function and use it to initialise the separate qdev gpio for the SCI IRQ. The sci_irq can now be wired up directly using a qdev gpio instead of having to set the IRQ externally in piix4_pm_initfn(). Signed-off-by: Mark Cave-Ayland

[PULL 31/49] hw/isa/piix4: Factor out ISABus retrieval from piix4_create()

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Modernizes the code. Signed-off-by: Bernhard Beschow Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220603185045.143789-6-shen...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/piix4.c| 6 +-

[PULL 35/49] hw/isa/piix3: QOM'ify PCI device creation and wiring

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow PCI interrupt wiring was performed in create() functions which are obsolete. Move these tasks into QOM functions to modernize the code. In order to avoid duplicate checking for xen_enabled() the realize methods are now split. Signed-off-by: Bernhard Beschow Reviewed-by:

[PULL 45/49] hw/i386/pc: Remove orphan declarations

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow Signed-off-by: Bernhard Beschow Acked-by: Michael S. Tsirkin Acked-by: Mark Cave-Ayland Message-Id: <20220520180109.8224-6-shen...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 3 --- 1 file changed, 3 deletions(-) diff --git

[PULL 37/49] hw/isa/piix3: Inline and remove piix3_create()

2022-06-11 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow During the previous changesets piix3_create() became a trivial wrapper around more generic functions. Modernize the code. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id:

[PATCH v6 3/4] target/riscv: Update [m|h]tinst CSR in riscv_cpu_do_interrupt()

2022-06-11 Thread Anup Patel
We should write transformed instruction encoding of the trapped instruction in [m|h]tinst CSR at time of taking trap as defined by the RISC-V privileged specification v1.12. Signed-off-by: Anup Patel --- target/riscv/cpu.h| 3 + target/riscv/cpu_helper.c | 214

Re: [PULL 54/54] crypto: Introduce RSA algorithm

2022-06-11 Thread Richard Henderson
On 6/10/22 17:35, Michael S. Tsirkin wrote: On Fri, Jun 10, 2022 at 11:05:13AM -0700, Richard Henderson wrote: Build failure: ../backends/cryptodev-builtin.c:187:27: error: result of comparison of unsigned enum expression < 0 is always false [-Werror,-Wtautological-unsigned-enum-zero-compare]

[PATCH v10 0/1] Introduce akcipher service for virtio-crypto

2022-06-11 Thread zhenwei pi
v9 - v10: - Minor fix of coding style by v9. v8 - v9: - Fix compiling error reported by clang-13/14: opt->hash_alg = cryptodev_builtin_get_rsa_hash_algo(); this leads implicit convertion from 'int' to 'uint32'. 'if (opt->hash_alg < 0)' is always false. Thanks to Philippe Mathieu-Daudé. v7

[PATCH v10 1/1] crypto: Introduce RSA algorithm

2022-06-11 Thread zhenwei pi
There are two parts in this patch: 1, support akcipher service by cryptodev-builtin driver 2, virtio-crypto driver supports akcipher service In principle, we should separate this into two patches, to avoid compiling error, merge them into one. Then virtio-crypto gets request from guest side, and

Re: [RFC PATCH] target/arm: de-duplicate our register XML definitions

2022-06-11 Thread Alex Bennée
Peter Maydell writes: > On Fri, 10 Jun 2022 at 16:40, Alex Bennée wrote: >> >> We generate the XML for each vCPU we create which for heavily threaded >> linux-user runs can add up to a lot of memory. Unfortunately we can't >> only do it once as we may have vCPUs with different capabilities in

[PATCH v6 4/4] target/riscv: Force disable extensions if priv spec version does not match

2022-06-11 Thread Anup Patel
We should disable extensions in riscv_cpu_realize() if minimum required priv spec version is not satisfied. This also ensures that machines with priv spec v1.11 (or lower) cannot enable H, V, and various multi-letter extensions. Fixes: a775398be2e9 ("target/riscv: Add isa extenstion strings to

Re: [PATCH] hw/mips/boston: Initialize g_autofree pointers

2022-06-11 Thread Bernhard Beschow
On Fri, Jun 10, 2022 at 4:04 PM Philippe Mathieu-Daudé wrote: > On 5/6/22 17:19, Bernhard Beschow wrote: > > Fixes compilation due to false positives with -Werror: > > > >In file included from /usr/include/glib-2.0/glib.h:114, > > from qemu/src/include/glib-compat.h:32, >

Re: [PATCH 45/50] lasips2: use qdev gpio for output IRQ

2022-06-11 Thread Mark Cave-Ayland
On 10/06/2022 08:17, Mark Cave-Ayland wrote: On 09/06/2022 12:18, Peter Maydell wrote: On Sun, 22 May 2022 at 19:20, Mark Cave-Ayland wrote: This enables the IRQ to be wired up using qdev_connect_gpio_out() in lasips2_initfn(). Signed-off-by: Mark Cave-Ayland ---   hw/input/lasips2.c 

Re: [PATCH v4 03/11] target/mips: Create report_fault for semihosting

2022-06-11 Thread Richard Henderson
On 6/10/22 08:05, Philippe Mathieu-Daudé wrote: +static void report_fault(CPUMIPSState *env) +{ +    int op = env->active_tc.gpr[25]; +    error_report("Fault during UHI operation %d", op); +    abort(); This is a guest error, no need to debug QEMU internals... Can we simply exit(1) instead?

Re: [PATCH v15 8/9] target/loongarch: Adjust functions and structure to support user-mode

2022-06-11 Thread Richard Henderson
On 6/10/22 20:10, gaosong wrote: pc 0x12638 0x12638 badvaddr   0x12638 0x12638 ... So badvaddr is the PC, Yes. void helper_asrtle_d(CPULoongArchState *env,  target_ulong rj, target_ulong  rk) { if (rj > rk) {         env->badvaddr =

Re: [PULL 00/17] Kraxel 20220610 patches

2022-06-11 Thread Volker Rümelin
Am 10.06.22 um 22:16 schrieb Richard Henderson: On 6/10/22 02:20, Gerd Hoffmann wrote: The following changes since commit 9cc1bf1ebca550f8d90f967ccd2b6d2e00e81387:    Merge tag 'pull-xen-20220609' of https://xenbits.xen.org/git-http/people/aperard/qemu-dm into staging (2022-06-09 08:25:17

[PATCH v2] xen/pass-through: merge emulated bits correctly

2022-06-11 Thread Chuck Zmudzinski
In xen_pt_config_reg_init(), there is an error in the merging of the emulated data with the host value. With the current Qemu, instead of merging the emulated bits with the host bits as defined by emu_mask, the emulated bits are merged with the host bits as defined by the inverse of emu_mask. In

[PULL 0/6] Bsd user preen 2022q2 patches

2022-06-11 Thread Warner Losh
The following changes since commit 2663c41cfa2c3be34c62de97902a375b81027efd: Merge tag 'pull-target-arm-20220610' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2022-06-10 13:16:48 -0700) are available in the Git repository at:

[PULL 5/6] bsd-user/bsd-file.h: Meat of the write system calls

2022-06-11 Thread Warner Losh
Implement write, writev, pwrite and pwritev and connect them to the system call dispatch routine. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-file.h | 84 +++

[PULL 6/6] bsd-user/freebsd/os-syscall.c: Implement exit

2022-06-11 Thread Warner Losh
Implement the exit system call. Bring in bsd-proc.h to contain all the process system call implementation and helper routines. Signed-off-by: Stacey Son Signed-off-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Kyle Evans --- bsd-user/bsd-proc.h | 42

[PULL 2/6] bsd-user/freebsd/os-syscall.c: unlock_iovec

2022-06-11 Thread Warner Losh
Releases the references to the iovec created by lock_iovec. Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/freebsd/os-syscall.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/bsd-user/freebsd/os-syscall.c b/bsd-user/freebsd/os-syscall.c index

[PULL 3/6] bsd-user/freebsd/os-syscall.c: Tracing and error boilerplate

2022-06-11 Thread Warner Losh
Add in the tracing and this system call not implemented boilerplate. Do this by moving the guts of do_freebsd_syscall to freebsd_syscall. Put the tracing in the wrapper function. Since freebsd_syscall is a singleton static function, it will almost certainly be inlined. Fix comments that referred

[PULL 1/6] bsd-user/freebsd/os-syscall.c: lock_iovec

2022-06-11 Thread Warner Losh
lock_iovec will lock an I/O vec and the memory to which it refers and create a iovec in the host space that refers to it, with full error unwinding. Add helper_iovec_unlock to unlock the partially locked iovec in case there's an error. The code will be used in iovec_unlock when that is committed.

[PULL 4/6] bsd-user/bsd-file.h: Add implementations for read, pread, readv and preadv

2022-06-11 Thread Warner Losh
Implement do_bsd_{read,pread,readv,preadv}. Connect them to the system call table. Signed-off-by: Stacey Son Signed-off-by: Kyle Evans Signed-off-by: Warner Losh Reviewed-by: Richard Henderson --- bsd-user/bsd-file.h | 79 +++