Re: does drive_get_next(IF_NONE) make sense?

2021-11-14 Thread Alistair Francis
On Mon, Nov 15, 2021 at 3:32 PM Markus Armbruster wrote: > > Peter Maydell writes: > > > On Fri, 12 Nov 2021 at 13:34, Markus Armbruster wrote: > >> > >> Thomas Huth writes: > >> > >> > On 03/11/2021 09.41, Markus Armbruster wrote: > >> >> Peter Maydell writes: > >> >> > >> >>> Does it make

Re: does drive_get_next(IF_NONE) make sense?

2021-11-14 Thread Markus Armbruster
Peter Maydell writes: > On Fri, 12 Nov 2021 at 13:34, Markus Armbruster wrote: >> >> Thomas Huth writes: >> >> > On 03/11/2021 09.41, Markus Armbruster wrote: >> >> Peter Maydell writes: >> >> >> >>> Does it make sense for a device/board to do drive_get_next(IF_NONE) ? >> >> Short answer:

[PATCH 0/2] support BLKSECDISCARD

2021-11-14 Thread yadong . qi
From: Yadong Qi Support BLKSECDISCARD passthrough for raw host_device backend. For virtio-blk device: Add new virtio feature: VIRTIO_BLK_F_SECDISCARD. Add new virtio command: VIRTIO_BLK_T_SECDISCARD. Usage: qemu-system-x86_64 \ ... \ -drive

[PATCH 2/2] virtio-blk: support BLKSECDISCARD

2021-11-14 Thread yadong . qi
From: Yadong Qi Add new virtio feature: VIRTIO_BLK_F_SECDISCARD. Add new virtio command: VIRTIO_BLK_T_SECDISCARD. This feature is disabled by default, it will check the backend bs->open_flags & BDRV_O_SECDISCARD, enable it if BDRV_O_SECDISCARD is supported. Signed-off-by: Yadong Qi ---

[PATCH 1/2] block:hdev: support BLKSECDISCARD

2021-11-14 Thread yadong . qi
From: Yadong Qi Add a new option "secdiscard" for block drive. Parse it and record it in bs->open_flags as bit(BDRV_O_SECDISCARD). Add a new BDRV_REQ_SECDISCARD bit for secure discard request from virtual device. For host_device backend: implement by ioctl(BLKSECDISCARD) on real host block

Re: [PATCH v5 0/6] Add vmnet.framework based network backend

2021-11-14 Thread Jason Wang
On Fri, Nov 12, 2021 at 5:14 PM Vladislav Yaroshchuk wrote: > > macOS provides networking API for VMs called 'vmnet.framework': > https://developer.apple.com/documentation/vmnet > > We can provide its support as the new QEMU network backends which > represent three different vmnet.framework

Re: [PATCH v4 03/20] target/riscv: Ignore the pc bits above XLEN

2021-11-14 Thread Alistair Francis
On Fri, Nov 12, 2021 at 1:54 AM LIU Zhiwei wrote: > > The read from PC for translation is in cpu_get_tb_cpu_state, before > translation. > > Signed-off-by: LIU Zhiwei > Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/cpu_helper.c | 5 +++-- > 1

Re: [PATCH v4 02/20] target/riscv: Sign extend pc for different XLEN

2021-11-14 Thread Alistair Francis
On Fri, Nov 12, 2021 at 1:56 AM LIU Zhiwei wrote: > > When pc is written, it is sign-extended to fill the widest supported XLEN. > > Signed-off-by: LIU Zhiwei > Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/translate.c | 16 > 1

Re: [PATCH v4 01/20] target/riscv: Don't save pc when exception return

2021-11-14 Thread Alistair Francis
On Fri, Nov 12, 2021 at 1:54 AM LIU Zhiwei wrote: > > As pc will be written by the xepc in exception return, just ignore > pc in translation. > > Signed-off-by: LIU Zhiwei > Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Alistair > --- > target/riscv/helper.h

Re: [PATCH 2/2] vdpa: Check for existence of opts.vhostdev

2021-11-14 Thread Jason Wang
On Sat, Nov 13, 2021 at 3:35 AM Eugenio Pérez wrote: > > Since net_init_vhost_vdpa is trying to open it. Not specifying it in the > command line crash qemu. > > Fixes: 7327813d17 ("vhost-vdpa: open device fd in net_init_vhost_vdpa()") > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang > ---

Re: [PATCH 1/2] hw/core/loader: return image sizes as ssize_t

2021-11-14 Thread Alistair Francis
On Fri, Nov 12, 2021 at 12:12 AM Jamie Iles wrote: > > Various loader functions return an int which limits images to 2GB which > is fine for things like a BIOS/kernel image, but if we want to be able > to load memory images or large ramdisks then any file over 2GB would > silently fail to load. >

Re: [PATCH 1/2] vdpa: Replace qemu_open_old by qemu_open at

2021-11-14 Thread Jason Wang
On Sat, Nov 13, 2021 at 3:34 AM Eugenio Pérez wrote: > > There is no reason to keep using the old one, since we neither use the > variadics arguments nor open it with O_DIRECT. > > Also, net_client_init1, the caller of net_init_vhost_vdpa, wants all > net_client_init_fun to use Error API, so it's

Re: [PATCH 1/2] virtio: use virtio accessor to access packed descriptor flags

2021-11-14 Thread Jason Wang
On Fri, Nov 12, 2021 at 6:04 PM Michael S. Tsirkin wrote: > > On Fri, Nov 12, 2021 at 10:23:12AM +0800, Jason Wang wrote: > > On Thu, Nov 11, 2021 at 4:27 PM Michael S. Tsirkin wrote: > > > > > > On Thu, Nov 11, 2021 at 02:38:53PM +0800, Jason Wang wrote: > > > > We used to access packed

Re: [PATCH v10 04/26] target/loongarch: Add fixed point arithmetic instruction translation

2021-11-14 Thread gaosong
Hi Richard, On 2021/11/12 下午10:05, Richard Henderson wrote: On 11/12/21 7:53 AM, Song Gao wrote: +# +# Fields +# +%rd  0:5 +%rj  5:5 +%rk  10:5 +%sa2 15:2 +%si12    10:s12 +%ui12    10:12 +%si16    10:s16 +%si20    5:s20 You should only create separate field definitions like

Re: [RFC PATCH v2 01/30] target/loongarch: Update README

2021-11-14 Thread yangxiaojuan
On 11/11/2021 07:50 PM, chen huacai wrote: > Hi, Xiaojuan, > > On Thu, Nov 11, 2021 at 9:41 AM Xiaojuan Yang > wrote: >> >> Mainly introduce how to run the softmmu >> >> Signed-off-by: Xiaojuan Yang >> Signed-off-by: Song Gao >> --- >> target/loongarch/README | 20 >>

[PATCH] Add service recovery options for QGA on windows

2021-11-14 Thread yshxxsjt715
From: shenjiatong Add default recovery options for QGA on windows. Previously, QGA on windows will not try to restart service if it is down. This PS add some default options for the first, second and other failures, with an interval of 1min. Failure counter will reset after 1 day.

Re: [PATCH] arm: Don't remove EL3 exposure for SMC conduit

2021-11-14 Thread Alexander Graf
On 14.11.21 18:41, Alexander Graf wrote: Am 14.11.2021 um 18:20 schrieb Peter Maydell : On Sun, 14 Nov 2021 at 10:56, Alexander Graf wrote: When we expose an SMC conduit, we're implicitly telling the guest that there is EL3 available because it needs to call it. While that EL3 then is

Re: [PATCH v2 4/4] linux-user: Rewrite do_getdents, do_getdents64

2021-11-14 Thread Philippe Mathieu-Daudé
On 11/14/21 11:35, Richard Henderson wrote: > Always allocate host storage; this ensures that the struct > is sufficiently aligned for the host. Merge the three host > implementations of getdents via a few ifdefs. Utilize the > same method for do_getdents64. > > Resolves:

Re: [PATCH v2 2/4] linux-user: Always use flexible arrays for dirent d_name

2021-11-14 Thread Philippe Mathieu-Daudé
On 11/14/21 11:35, Richard Henderson wrote: > We currently use a flexible array member for target_dirent, > but use incorrectly fixed length arrays for target_dirent64, > linux_dirent and linux_dirent64. > > This requires that we adjust the definition of the VFAT READDIR > ioctls which hard-code

Re: [PATCH v2 1/4] linux-user: Split out do_getdents, do_getdents64

2021-11-14 Thread Philippe Mathieu-Daudé
On 11/14/21 11:35, Richard Henderson wrote: > Retain all 3 implementations of getdents for now. > > Signed-off-by: Richard Henderson > --- > linux-user/syscall.c | 325 +++ > 1 file changed, 172 insertions(+), 153 deletions(-) Same as v1: Reviewed-by:

Re: [PATCH v2 3/4] linux-user: Fix member types of target_dirent64

2021-11-14 Thread Philippe Mathieu-Daudé
On 11/14/21 11:35, Richard Henderson wrote: > The host uint64_t (etc) does not have the correct > alignment constraint as the guest: use abi_* types. > > Signed-off-by: Richard Henderson > --- > linux-user/syscall_defs.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [PATCH v3 0/6] SEV: add kernel-hashes=on for measured -kernel launch

2021-11-14 Thread Dov Murik
Paolo, Can you please add this series (already reviewed) to the fixes in 6.2? Thanks, -Dov On 11/11/2021 12:00, Dov Murik wrote: > Tom Lendacky and Brijesh Singh reported two issues with launching SEV > guests with the -kernel QEMU option when an old [1] or wrongly configured [2] > OVMF images

Re: [PATCH] arm: Don't remove EL3 exposure for SMC conduit

2021-11-14 Thread Alexander Graf
> Am 14.11.2021 um 18:20 schrieb Peter Maydell : > > On Sun, 14 Nov 2021 at 10:56, Alexander Graf wrote: >> >> When we expose an SMC conduit, we're implicitly telling the guest that >> there is EL3 available because it needs to call it. While that EL3 then >> is not backed by the emulated

Re: [PATCH] arm: Don't remove EL3 exposure for SMC conduit

2021-11-14 Thread Peter Maydell
On Sun, 14 Nov 2021 at 10:56, Alexander Graf wrote: > > When we expose an SMC conduit, we're implicitly telling the guest that > there is EL3 available because it needs to call it. While that EL3 then > is not backed by the emulated CPU, from the guest's EL2 point of view, > it still means there

Re: does drive_get_next(IF_NONE) make sense?

2021-11-14 Thread Peter Maydell
On Fri, 12 Nov 2021 at 13:34, Markus Armbruster wrote: > > Thomas Huth writes: > > > On 03/11/2021 09.41, Markus Armbruster wrote: > >> Peter Maydell writes: > >> > >>> Does it make sense for a device/board to do drive_get_next(IF_NONE) ? > >> Short answer: hell, no! ;) > > > > Would it make

Re: [PATCH] audio: Add sndio backend

2021-11-14 Thread Christian Schoenebeck
On Samstag, 13. November 2021 21:40:39 CET Brad Smith wrote: > On 11/8/2021 8:03 AM, Christian Schoenebeck wrote: > > On Sonntag, 7. November 2021 06:19:26 CET Brad Smith wrote: > >> audio: Add sndio backend > >> > >> Add a sndio backend. > > > > Hi Brad! > > > >> sndio is the native API used

Re: [PATCH v5 01/18] exec/memop: Adding signedness to quad definitions

2021-11-14 Thread Richard Henderson
On 11/12/21 3:58 PM, Frédéric Pétrot wrote: Renaming defines for quad in their various forms so that their signedness is now explicit. Done using git grep as suggested by Philippe, with a bit of hand edition to keep assignments aligned. Signed-off-by: Frédéric Pétrot Reviewed-by: Philippe

[PATCH] arm: Don't remove EL3 exposure for SMC conduit

2021-11-14 Thread Alexander Graf
When we expose an SMC conduit, we're implicitly telling the guest that there is EL3 available because it needs to call it. While that EL3 then is not backed by the emulated CPU, from the guest's EL2 point of view, it still means there is an EL3 to call into. This is a problem for VMware ESXi,

[PATCH v2 2/4] linux-user: Always use flexible arrays for dirent d_name

2021-11-14 Thread Richard Henderson
We currently use a flexible array member for target_dirent, but use incorrectly fixed length arrays for target_dirent64, linux_dirent and linux_dirent64. This requires that we adjust the definition of the VFAT READDIR ioctls which hard-code the 256 namelen size into the ioctl constant.

[PATCH v2 4/4] linux-user: Rewrite do_getdents, do_getdents64

2021-11-14 Thread Richard Henderson
Always allocate host storage; this ensures that the struct is sufficiently aligned for the host. Merge the three host implementations of getdents via a few ifdefs. Utilize the same method for do_getdents64. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/704 Signed-off-by: Richard

[PATCH v2 1/4] linux-user: Split out do_getdents, do_getdents64

2021-11-14 Thread Richard Henderson
Retain all 3 implementations of getdents for now. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 325 +++ 1 file changed, 172 insertions(+), 153 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index

[PATCH v2 3/4] linux-user: Fix member types of target_dirent64

2021-11-14 Thread Richard Henderson
The host uint64_t (etc) does not have the correct alignment constraint as the guest: use abi_* types. Signed-off-by: Richard Henderson --- linux-user/syscall_defs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h

[PATCH v2 0/4] linux-user: Fix getdents alignment issues (#704)

2021-11-14 Thread Richard Henderson
There are a number of alignement issues flagged up by clang, this attempts to fix only one of them: getdents. Changes for v2: * Do not QEMU_BUILD_BUG_ON for size mismatch, as this triggers for i386 host. r~ Richard Henderson (4): linux-user: Split out do_getdents, do_getdents64

Re: [RFC PATCH v2 10/30] target/loongarch: Add other core instructions support

2021-11-14 Thread Richard Henderson
On 11/11/21 2:35 AM, Xiaojuan Yang wrote: +if (qemu_loglevel_mask(CPU_LOG_INT)) { +qemu_log("%s: TLBRERA 0x%lx\n", __func__, env->CSR_TLBRERA); +} This is qemu_log_mask, two instances. With that, Reviewed-by: Richard Henderson +void

Re: ppc/fpu_helper.c

2021-11-14 Thread Yonggang Luo
On Sun, Nov 14, 2021 at 5:07 PM Richard Henderson < richard.hender...@linaro.org> wrote: > > On 11/13/21 11:07 AM, 罗勇刚(Yonggang Luo) wrote: > > I've seen nothing in fpu_helper.c to update > > the fpscr to FP_FR, > > that is there is no code with `fpscr |= FP_FR`, > > is that valid for PowerPC? or

Re: [RFC v3 4/5] common-user: Adjust system call return on FreeBSD

2021-11-14 Thread Richard Henderson
On 11/13/21 5:56 AM, Warner Losh wrote: All the *-users generally use the negative errno return codes to signal errno for a system call. FreeBSD's system calls, on the other hand, returns errno, not -errno. Add ifdefs for FreeBSD to make the adjustment on the 4 hosts that we have support for.

Re: ppc/fpu_helper.c

2021-11-14 Thread Richard Henderson
On 11/13/21 11:07 AM, 罗勇刚(Yonggang Luo) wrote: I've seen nothing in fpu_helper.c to update the fpscr to FP_FR, that is there is no code with `fpscr |= FP_FR`, is that valid for PowerPC? or it's just because this is hard to implement and then the FP_FR  are always not set  for  fpscr It is