[PULL 09/10] hw/arm: introduce xenpvh machine

2023-02-10 Thread Stefano Stabellini
From: Vikram Garhwal Add a new machine xenpvh which creates a IOREQ server to register/connect with Xen Hypervisor. Optional: When CONFIG_TPM is enabled, it also creates a tpm-tis-device, adds a TPM emulator and connects to swtpm running on host machine via chardev socket and support TPM functio

[PULL 04/10] xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common

2023-02-10 Thread Stefano Stabellini
From: Stefano Stabellini This patch does following: 1. creates arch_handle_ioreq() and arch_xen_set_memory(). This is done in preparation for moving most of xen-hvm code to an arch-neutral location, move the x86-specific portion of xen_set_memory to arch_xen_set_memory. Also, move han

[PATCH 9/9] bsd-user: Add -strict

2023-02-10 Thread Warner Losh
Most of the time, it's useful to make our best effort, but sometimes we want to know right away when we don't implement something. First place we use it is for unknown syscalls. Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 4 bsd-user/main.c | 5 - bsd-us

[PATCH 0/9] 2023 Q1 bsd-user upstreaming: bugfixes and sysctl

2023-02-10 Thread Warner Losh
This group of patches gets the basic framework for sysctl upstreamed. There's a lot more to translate far too many binary blobs the kernel publishes via sysctls, but I'm leaving those out in the name of simplicity. There's also a bug fix from Doug Rabson that fixes a long int confusion leading to

[PATCH 4/9] bsd-user: Two helper routines oidfmt and sysctl_oldcvt

2023-02-10 Thread Warner Losh
From: Stacey Son oidfmt uses undocumented system call to get the type of the sysctl. sysctl_oldcvt does the byte swapping in the data to return it to the target. Co-Authored-by: Sean Bruno Signed-off-by: Sean Bruno Co-Authored-by: Juergen Lock Signed-off-by: Juergen Lock Co-Authored-by: Raph

[PATCH 6/9] bsd-user: common routine do_freebsd_sysctl_oid for all sysctl variants

2023-02-10 Thread Warner Losh
From: Juergen Lock do_freebsd_sysctl_oid filters out some of the binary and special sysctls where host != target. This commit focuses on the simple sysctls that can be done in a few lines. Signed-off-by: Juergen Lock Co-Authored-by: Stacey Son Signed-off-by: Stacey Son Signed-off-by: Warner L

[PATCH 7/9] bsd-user: do_freebsd_sysctl helper for sysctl(2)

2023-02-10 Thread Warner Losh
From: Kyle Evans Implement the wrapper function for sysctl(2). This puts the oid arguments into a standard form and calls the common do_freebsd_sysctl_oid. Signed-off-by: Kyle Evans Co-Authored-by: Juergen Lock Signed-off-by: Juergen Lock Co-Authored-by: Stacey Son Signed-off-by: Stacey Son

[PATCH 8/9] bsd-user: implement sysctlbyname(2)

2023-02-10 Thread Warner Losh
From: Kyle Evans do_freebsd_sysctlbyname needs to translate the 'name' back down to a OID so we can intercept the special ones. Do that and call the common wrapper do_freebsd_sysctl_oid. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 58 ++

[PATCH 3/9] bsd-user: Add sysarch syscall

2023-02-10 Thread Warner Losh
From: Stacey Son Connect up the sysarch system call. Signed-off-by: Juergen Lock Co-authored-by: Juergen Lock Signed-off-by: Stacey Son Reviewed-by: Warner Losh Signed-off-by: Warner Losh --- bsd-user/freebsd/os-syscall.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/bsd-user/

[PATCH 1/9] bsd-user: Don't truncate the return value from freebsd_syscall

2023-02-10 Thread Warner Losh
From: Doug Rabson System call return values on FreeBSD are in a register (which is spelled api_long in qemu). This was being assigned into an int variable which causes problems for 64bit targets. Resolves: https://github.com/qemu-bsd-user/qemu-bsd-user/issues/40 Signed-off-by: Doug Rabson Revie

[PATCH 2/9] build: Don't specify -no-pie for --static user-mode programs

2023-02-10 Thread Warner Losh
When building with clang, -no-pie gives a warning on every single build, so remove it. Signed-off-by: Warner Losh --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 64960c6000f..eb284ccf308 100755 --- a/configure +++ b/configure @@ -1313

[PATCH 5/9] bsd-user: sysctl helper funtions: sysctl_name2oid and sysctl_oidfmt

2023-02-10 Thread Warner Losh
From: Juergen Lock Helper functions for sysctl implementations. sysctl_name2oid and sysctl_oidfmt convert oids between host and targets Signed-off-by: Juergen Lock Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/

Re: [PATCH] xen/pt: fix igd passthrough for pc machine with xen accelerator

2023-02-10 Thread Stefano Stabellini
On Tue, 7 Feb 2023, Chuck Zmudzinski wrote: > Commit 998250e97661 ("xen, gfx passthrough: register host bridge specific > to passthrough") uses the igd-passthrough-i440FX pci host device with > the xenfv machine type and igd-passthru=on, but using it for the pc > machine type, xen accelerator, and

[PATCH 0/3] hw/rtc: Rename RTCState -> MC146818RtcState and adapt API

2023-02-10 Thread Philippe Mathieu-Daudé
rtc_get_memory() and rtc_set_memory() helpers only work with MC146818 RTC devices, not any ISA device. Rename accordingly including 'MC146818' in the method names. Philippe Mathieu-Daudé (3): hw/rtc/mc146818rtc: Rename RTCState -> MC146818RtcState hw/rtc/mc146818rtc: Pass MC146818RtcState inst

[PATCH 2/3] hw/rtc/mc146818rtc: Pass MC146818RtcState instead of ISADevice argument

2023-02-10 Thread Philippe Mathieu-Daudé
rtc_get_memory() and rtc_set_memory() methods can not take any TYPE_ISA_DEVICE object. They expect a TYPE_MC146818_RTC one. Simplify the API by passing a MC146818RtcState. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/microvm.c| 6 ++ hw/i386/pc.c | 16 +

[PATCH 3/3] hw/rtc: Rename rtc_[get|set]_memory -> mc146818rtc_[get|set]_cmos_data

2023-02-10 Thread Philippe Mathieu-Daudé
rtc_get_memory() and rtc_set_memory() helpers only work with TYPE_MC146818_RTC devices. 'memory' in their name refer to the CMOS region. Rename them as mc146818rtc_get_cmos_data() and mc146818rtc_set_cmos_data() to be explicit about what they are doing. Mechanical change doing: $ sed -i -e 's/r

[PATCH 1/3] hw/rtc/mc146818rtc: Rename RTCState -> MC146818RtcState

2023-02-10 Thread Philippe Mathieu-Daudé
RTCState only represents a Motorola MC146818 model, not any RTC chipset. Rename the structure as MC146818RtcState using: $ sed -i -e s/RTCState/MC146818RtcState/g $(git grep -wl RTCState) Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/piix4.c | 2 +- hw/isa/vt82c686.c

Re: [PATCH 01/11] target/riscv: do not mask unsupported QEMU extensions in write_misa()

2023-02-10 Thread weiwei
On 2023/2/10 21:36, Daniel Henrique Barboza wrote: The masking done using env->misa_ext_mask already filters any extension that QEMU doesn't support. If the hart supports the extension then QEMU supports it as well. If the masking done by env->misa_ext_mask is somehow letting unsupported QEMU

Re: [PATCH 02/11] target/riscv: allow users to actually write the MISA CSR

2023-02-10 Thread weiwei
On 2023/2/10 21:36, Daniel Henrique Barboza wrote: At this moment, and apparently since ever, we have no way of enabling RISCV_FEATURE_MISA. This means that all the code from write_misa(), all the nuts and bolts that handles how to properly write this CSR, has always been a no-op as well becaus

Re: [PATCH] target/riscv: avoid env_archcpu() in cpu_get_tb_cpu_state()

2023-02-10 Thread weiwei
On 2023/2/10 20:38, Daniel Henrique Barboza wrote: We have a RISCVCPU *cpu pointer available at the start of the function. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Weiwei Li Regards, Weiwei Li --- target/riscv/cpu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(

Re: [PATCH v1 RFC Zisslpcfi 1/9] target/riscv: adding zimops and zisslpcfi extension to RISCV cpu config

2023-02-10 Thread weiwei
On 2023/2/9 14:23, Deepak Gupta wrote: Introducing riscv `zisslpcfi` extension to riscv target. `zisslpcfi` extension provides hardware assistance to riscv hart to enable control flow integrity (CFI) for software. `zisslpcfi` extension expects hart to implement `zimops`. `zimops` stands for "u

Re: [PATCH v1 RFC Zisslpcfi 2/9] target/riscv: zisslpcfi CSR, bit positions and other definitions

2023-02-10 Thread weiwei
On 2023/2/9 14:23, Deepak Gupta wrote: `zisslpcfi` extension adds two new CSRs. CSR_SSP and CSR_LPLR. - CSR_SSP: This CSR holds shadow stack pointer for current privilege mode CSR_SSP is accessible in all modes. Each mode must establish it's own CSR_SSP. - CSR_LPLR: Thi

[PATCH v2] [PING^3] target/i386/gdbstub: Fix a bug about order of FPU stack in 'g' packets.

2023-02-10 Thread TaiseiIto
This is a ping to the patch below. https://patchew.org/QEMU/ty0pr0101mb4285923fbe9ad97ce832d95ba4...@ty0pr0101mb4285.apcprd01.prod.exchangelabs.com/ Before this commit, when GDB attached an OS working on QEMU, order of FPU stack registers printed by GDB command 'info float' was wrong. There was a

Re: [PATCH v3 6/7] qapi: remove _JSONObject

2023-02-10 Thread Markus Armbruster
John Snow writes: > We can remove this alias as it only has two usages now, and no longer > pays for the confusion of "yet another type". > > Signed-off-by: John Snow Reviewed-by: Markus Armbruster

Re: [PATCH v3 7/7] qapi: remove JSON value FIXME

2023-02-10 Thread Markus Armbruster
John Snow writes: > With the two major JSON-ish type hierarchies clarified for distinct > purposes; QAPIExpression for parsed expressions and JSONValue for The comment you remove talks about _ExprValue, not QAPIExpression. > introspection data, remove this FIXME as no longer an action item. > >

Re: [PATCH v3 5/7] qapi/parser: add QAPIExpression type

2023-02-10 Thread Markus Armbruster
John Snow writes: > This patch creates a new type, QAPIExpression, which represents a parsed > expression complete with QAPIDoc and QAPISourceInfo. > > This patch turns parser.exprs into a list of QAPIExpression instead, > and adjusts expr.py to match. > > This allows the types we specify in pars

<    1   2   3