Re: [PATCH v5 2/6] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-05-01 Thread Greg Kurz
On Fri, 29 Apr 2022 17:20:26 +0200 Christian Schoenebeck wrote: > On Freitag, 29. April 2022 16:35:07 CEST Greg Kurz wrote: > > On Fri, 29 Apr 2022 15:50:35 +0200 > > > > Christian Schoenebeck wrote: > > > On Freitag, 29. April 2022 14:56:50 CEST Greg Kurz wrote: > > > > On Fri, 29 Apr 2022 12:

[PATCH] target/xtensa: implement cache test option opcodes

2022-05-01 Thread Max Filippov
We don't model caches, so for l*ct opcodes return tags with all bits (including Valid) set to 0. For all other opcodes don't do anything. Signed-off-by: Max Filippov --- target/xtensa/translate.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/target/x

[PATCH] net: fix multicast support with BSD (macOS) socket implementations

2022-05-01 Thread Vitaly Cheptsov
This patch fixes socket communication with QEMU -> host on macOS, which was originally impossible due to QEMU and host program having to bind to the same ip/port in a way not supported by BSD sockets. The change was tested on both Linux and macOS. As per BSD manual pages SO_REUSEPORT allows comple

Re: [PATCH v10] isa-applesmc: provide OSK forwarding on Apple hosts

2022-05-01 Thread Alexander Graf
> Am 29.04.2022 um 21:18 schrieb Vladislav Yaroshchuk > : > > On Apple hosts we can read AppleSMC OSK key directly from host's > SMC and forward this value to QEMU Guest. > > New 'hostosk' property is added: > * `-device isa-applesmc,hostosk=on` > The property is set to 'on' by default for m

[PATCH] hw/arm: virt: Add SBSA watchdog

2022-05-01 Thread Jan Kiszka
From: Jan Kiszka The virt machine lacks a watchdog so far while the sbsa-ref has a simple model that is also supported by Linux and even U-Boot. Let's take it to allow, e.g., system integration tests of A/B software update under watchdog monitoring. Signed-off-by: Jan Kiszka --- An alternative

Re: [PATCH v10] isa-applesmc: provide OSK forwarding on Apple hosts

2022-05-01 Thread Alexander Graf
On 01.05.22 19:06, Alexander Graf wrote: Hey Vladislav, On 29.04.22 21:18, Vladislav Yaroshchuk wrote: On Apple hosts we can read AppleSMC OSK key directly from host's SMC and forward this value to QEMU Guest. New 'hostosk' property is added: * `-device isa-applesmc,hostosk=on` The property

Re: [PATCH v10] isa-applesmc: provide OSK forwarding on Apple hosts

2022-05-01 Thread Alexander Graf
Hey Vladislav, On 29.04.22 21:18, Vladislav Yaroshchuk wrote: On Apple hosts we can read AppleSMC OSK key directly from host's SMC and forward this value to QEMU Guest. New 'hostosk' property is added: * `-device isa-applesmc,hostosk=on` The property is set to 'on' by default for machine versio

Re: [PULL v2 0/7] 9p queue 2022-05-01 (previous 2022-04-30)

2022-05-01 Thread Richard Henderson
https://github.com/cschoenebeck/qemu.git tags/pull-9p-20220501 for you to fetch changes up to 063c75db2e03938b2fadb052c4661adae36e352c: 9pfs: fix qemu_mknodat() to always return -1 on error on macOS host (2022-05-01 14:07:03 +0200) ---

Where to find QEMU release signing public key?

2022-05-01 Thread Stefan Hajnoczi
Hi Mike, CyperCare came on IRC and asked where to find the public key used to sign QEMU releases. The website links to the signature files but there is no public key file on https://download.qemu.org/ or the website that I could find. Is the public key already published somewhere or could you add

[PULL v2 7/7] 9pfs: fix qemu_mknodat() to always return -1 on error on macOS host

2022-05-01 Thread Christian Schoenebeck
qemu_mknodat() is expected to behave according to its POSIX API, and therefore should always return exactly -1 on any error, and errno should be set for the actual error code. Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz Reviewed-by: Akihiko Odaki Message-Id: --- hw/9pfs/9p-ut

[PULL v2 5/7] 9pfs: fix wrong errno being sent to Linux client on macOS host

2022-05-01 Thread Christian Schoenebeck
Linux and macOS only share some errno definitions with equal macro name and value. In fact most mappings for errno are completely different on the two systems. This patch converts some important errno values from macOS host to corresponding Linux errno values before eventually sending such error c

[PULL v2 4/7] 9pfs: fix wrong encoding of rdev field in Rgetattr on macOS

2022-05-01 Thread Christian Schoenebeck
The 'rdev' field in 9p reponse 'Rgetattr' is of type dev_t, which is actually a system dependant type and therefore both the size and encoding of dev_t differ between macOS and Linux. So far we have sent 'rdev' to guest in host's dev_t format as-is, which caused devices to appear with wrong device

[PULL v2 6/7] 9pfs: fix removing non-existent POSIX ACL xattr on macOS host

2022-05-01 Thread Christian Schoenebeck
When mapped POSIX ACL is used, we are ignoring errors when trying to remove a POSIX ACL xattr that does not exist. On Linux hosts we would get ENODATA in such cases, on macOS hosts however we get ENOATTR instead. As we can be sure that ENOATTR is defined as being identical on Linux hosts (at least

[PULL v2 0/7] 9p queue 2022-05-01 (previous 2022-04-30)

2022-05-01 Thread Christian Schoenebeck
gs/pull-9p-20220501 for you to fetch changes up to 063c75db2e03938b2fadb052c4661adae36e352c: 9pfs: fix qemu_mknodat() to always return -1 on error on macOS host (2022-05-01 14:07:03 +0200) 9pfs: various fixes * macOS: Fix recently (i

[PULL v2 2/7] 9pfs: fix qemu_mknodat(S_IFREG) on macOS

2022-05-01 Thread Christian Schoenebeck
mknod() on macOS does not support creating regular files, so divert to openat_file() if S_IFREG is passed with mode argument. Furthermore, 'man 2 mknodat' on Linux says: "Zero file type is equivalent to type S_IFREG". Link: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/ Signed-off

[PULL v2 3/7] 9pfs: fix qemu_mknodat(S_IFSOCK) on macOS

2022-05-01 Thread Christian Schoenebeck
mknod() on macOS does not support creating sockets, so divert to call sequence socket(), bind() and fchmodat() respectively if S_IFSOCK was passed with mode argument. Link: https://lore.kernel.org/qemu-devel/17933734.zYzKuhC07K@silver/ Signed-off-by: Christian Schoenebeck Reviewed-by: Greg Kurz

[PULL v2 1/7] 9pfs: fix inode sequencing in 'synth' driver

2022-05-01 Thread Christian Schoenebeck
The 'synth' driver's root node and the 'synth' driver's first subdirectory node falsely share the same inode number (zero), which makes it impossible for 9p clients (i.e. 9p test cases) to distinguish root node and first subdirectory from each other by comparing their QIDs (which are derived by 9p

[PATCH v3] Warn user if the vga flag is passed but no vga device is created

2022-05-01 Thread Gautam Agrawal
A global boolean variable "vga_interface_created"(declared in softmmu/globals.c) has been used to track the creation of vga interface. If the vga flag is passed in the command line "default_vga"(declared in softmmu/vl.c) variable is set to 0. To warn user, the condition checks if vga_interface_cre

Re: [PATCH] target/i386: do not consult nonexistent host leaves

2022-05-01 Thread Maxim Levitsky
On Fri, 2022-04-29 at 21:26 +0200, Paolo Bonzini wrote: > When cache_info_passthrough is requested, QEMU passes the host values > of the cache information CPUID leaves down to the guest. However, > it blindly assumes that the CPUID leaf exists on the host, and this > cannot be guaranteed: for exam

Re: [PATCH v4 06/45] target/arm: Avoid bare abort() or assert(0)

2022-05-01 Thread Peter Maydell
On Sun, 1 May 2022 at 06:52, Richard Henderson wrote: > > Standardize on g_assert_not_reached() for "should not happen". > Retain abort() when preceeded by fprintf or error_report. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

[PATCH v4 44/45] target/arm: Define cortex-a76

2022-05-01 Thread Richard Henderson
Enable the a76 for virt and sbsa board use. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- docs/system/arm/virt.rst | 1 + hw/arm/sbsa-ref.c| 1 + hw/arm/virt.c| 1 + target/arm/cpu64.c | 66 4 files changed,

[PATCH v4 42/45] target/arm: Enable FEAT_CSV3 for -cpu max

2022-05-01 Thread Richard Henderson
This extension concerns cache speculation, which TCG does not implement. Thus we can trivially enable this feature. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Update emulation.rst --- docs/system/arm/emulation.rst | 1 + target/arm/cpu64.c| 1 + target/arm/

Re: [PATCH 00/43] semihosting cleanup

2022-05-01 Thread Richard Henderson
On 4/30/22 06:28, Richard Henderson wrote: target/m68k: Do semihosting call as a normal helper target/nios2: Do semihosting call as a normal helper There's a reason not to do this: locking of the iothread mutex, and being back in the main loop, where the vm will be stopped while we may w

[PATCH v4 34/45] target/arm: Add minimal RAS registers

2022-05-01 Thread Richard Henderson
Add only the system registers required to implement zero error records. This means we need to save state for ERRSELR, but all values are out of range, so none of the indexed error record registers need be implemented. Add the EL2 registers required for injecting virtual SError. Signed-off-by: Ri

[PATCH v4 43/45] target/arm: Enable FEAT_DGH for -cpu max

2022-05-01 Thread Richard Henderson
This extension concerns not merging memory access, which TCG does not implement. Thus we can trivially enable this feature. Add a comment to handle_hint for the DGH instruction, but no code. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Update emulation.rst --- docs/syste

[PATCH v4 38/45] target/arm: Enable FEAT_RAS for -cpu max

2022-05-01 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Update emulation.rst --- docs/system/arm/emulation.rst | 1 + target/arm/cpu64.c| 1 + target/arm/cpu_tcg.c | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/system/arm/emulation.rst b/docs/system/a

[PATCH v4 41/45] target/arm: Enable FEAT_CSV2_2 for -cpu max

2022-05-01 Thread Richard Henderson
There is no branch prediction in TCG, therefore there is no need to actually include the context number into the predictor. Therefore all we need to do is add the state for SCXTNUM_ELx. Signed-off-by: Richard Henderson --- v2: Update emulation.rst; clear CSV2_FRAC; use decimal; tidy access_scxtnu

[PATCH v4 31/45] target/arm: Enable FEAT_Debugv8p2 for -cpu max

2022-05-01 Thread Richard Henderson
The only portion of FEAT_Debugv8p2 that is relevant to QEMU is CONTEXTIDR_EL2, which is also conditionally implemented with FEAT_VHE. The rest of the debug extension concerns the External debug interface, which is outside the scope of QEMU. Reviewed-by: Peter Maydell Signed-off-by: Richard Hende

[PATCH v4 40/45] target/arm: Enable FEAT_CSV2 for -cpu max

2022-05-01 Thread Richard Henderson
This extension concerns branch speculation, which TCG does not implement. Thus we can trivially enable this feature. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Update emulation.rst --- docs/system/arm/emulation.rst | 1 + target/arm/cpu64.c| 1 + target/arm

[PATCH v4 30/45] target/arm: Use field names for manipulating EL2 and EL3 modes

2022-05-01 Thread Richard Henderson
Use FIELD_DP{32,64} to manipulate id_pfr1 and id_aa64pfr0 during arm_cpu_realizefn. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c in