Re: [PATCH] softmmu/memory: Validate {read, write}_with_attrs before calling

2021-09-05 Thread Bin Meng
On Mon, Sep 6, 2021 at 12:29 AM Peter Maydell wrote: > > On Sun, 5 Sept 2021 at 16:40, Bin Meng wrote: > > > > {read,write}_with_attrs might be missing, and the codes currently do > > not validate them before calling, which will cause segment fault. > > > > Fixes: 62a0db942dec ("memory: Remove

Re: [PATCH v3 34/43] bsd-user: update debugging in mmap.c

2021-09-05 Thread Kyle Evans
On Thu, Sep 2, 2021 at 6:54 PM wrote: > > From: Warner Losh > > Update the debugging code for new features and different targets. > > Signed-off-by: Mikaël Urankar > Signed-off-by: Sean Bruno > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > Acked-by: Richard Henderson > --- >

Re: [PATCH v3 18/43] bsd-user: save the path to the qemu emulator

2021-09-05 Thread Kyle Evans
On Thu, Sep 2, 2021 at 6:53 PM wrote: > > From: Warner Losh > > Save the path to the qemu emulator. This will be used later when we have > a more complete implementation of exec. > > Signed-off-by: Stacey Son > Signed-off-by: Warner Losh > Acked-by: Richard Henderson > --- > bsd-user/main.c

Re: [PATCH v3 26/43] bsd-user: *BSD specific siginfo defintions

2021-09-05 Thread Kyle Evans
On Thu, Sep 2, 2021 at 6:55 PM wrote: > > From: Warner Losh > > Add FreeBSD, NetBSD and OpenBSD values for the various signal info types > and defines to decode different signals to discover more information > about the specific signal types. > > Signed-off-by: Stacey Son > Signed-off-by:

Re: How does qemu detect the completion of interrupt execution?

2021-09-05 Thread Duo jia
Thank you for your explanation. And finishing the execution of the interrupt routine will automatically > allow a pending second interrupt to be taken immediately > I think this is a hardware feature. But how to achieve it with qemu Peter Maydell 于2021年9月3日周五 下午7:20写道: > On Fri, 3 Sept 2021

Re: [PATCH] softmmu/memory: Validate {read, write}_with_attrs before calling

2021-09-05 Thread Philippe Mathieu-Daudé
Cc'ing PJP for https://www.mail-archive.com/qemu-devel@nongnu.org/msg730311.html On Sun, Sep 5, 2021 at 5:41 PM Bin Meng wrote: > > {read,write}_with_attrs might be missing, and the codes currently do > not validate them before calling, which will cause segment fault. > > Fixes: 62a0db942dec

Re: [PATCH] softmmu/memory: Validate {read, write}_with_attrs before calling

2021-09-05 Thread Peter Maydell
On Sun, 5 Sept 2021 at 17:49, Bin Meng wrote: > > On Mon, Sep 6, 2021 at 12:29 AM Peter Maydell > wrote: > > > > On Sun, 5 Sept 2021 at 16:40, Bin Meng wrote: > > > > > > {read,write}_with_attrs might be missing, and the codes currently do > > > not validate them before calling, which will

Re: [PATCH v3 30/43] bsd-user: elf cleanup

2021-09-05 Thread Kyle Evans
On Thu, Sep 2, 2021 at 6:56 PM wrote: > > From: Warner Losh > > Move OS-dependent defines into target_os_elf.h. Move the architectural > dependent stuff into target_arch_elf.h. Adjust elfload.c to use > target_create_elf_tables instead of create_elf_tables. > > Signed-off-by: Warner Losh >

Re: Virtualizing HP PA-RISC unix station other than B160L

2021-09-05 Thread Warner Losh
Hey Thierry, I'm answering the following as with my 'Unix history buff' hat on, not due to direct knowledge of HP PA and porting to it. I used an HP/Snake workstation for about 9 months back in the day is as close as I got.. On Sun, Sep 5, 2021 at 6:57 PM wrote: > Hi everyone, > > > > Thank

Re: [PULL 00/13] QAPI patches patches for 2021-09-03

2021-09-05 Thread Peter Maydell
On Fri, 3 Sept 2021 at 20:32, Markus Armbruster wrote: > > The following changes since commit 8880cc4362fde4ecdac0b2092318893118206fcf: > > Merge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20210902' > into staging (2021-09-03 08:27:38 +0100) > > are available in the Git

[PATCH] softmmu/memory: Validate {read, write}_with_attrs before calling

2021-09-05 Thread Bin Meng
{read,write}_with_attrs might be missing, and the codes currently do not validate them before calling, which will cause segment fault. Fixes: 62a0db942dec ("memory: Remove old_mmio accessors") Signed-off-by: Bin Meng --- softmmu/memory.c | 8 ++-- 1 file changed, 6 insertions(+), 2

Re: [PATCH V2 17/21] vhost-net: control virtqueue support

2021-09-05 Thread Jason Wang
On Sun, Sep 5, 2021 at 4:40 AM Michael S. Tsirkin wrote: > > On Fri, Sep 03, 2021 at 05:10:27PM +0800, Jason Wang wrote: > > We assume there's no cvq in the past, this is not true when we need > > control virtqueue support for vhost-user backends. So this patch > > implements the control

Re: [PULL 00/14] aspeed queue

2021-09-05 Thread Cédric Le Goater
On 9/5/21 4:34 PM, Peter Delevoryas wrote: > > >> On Sep 5, 2021, at 1:51 AM, Cédric Le Goater wrote: >> >> On 9/5/21 1:03 AM, Philippe Mathieu-Daudé wrote: On 9/4/21 7:33 AM, Cédric Le Goater wrote: On 9/3/21 10:41 PM, Philippe Mathieu-Daudé wrote: > Hi Peter, > > On

Re: arm: Launching EFI-enabled arm32 Linux

2021-09-05 Thread Peter Maydell
On Sat, 4 Sept 2021 at 20:26, Adam Lackorzynski wrote: > while trying to launch an EFI-enabled arm32 Linux binary (zImage) I > noticed I get an undefined instruction exception on the first > instruction. Now this is a bit special because Linux uses a nop > instruction there that also is a PE file

Re: [PATCH] softmmu/memory: Validate {read, write}_with_attrs before calling

2021-09-05 Thread Peter Maydell
On Sun, 5 Sept 2021 at 16:40, Bin Meng wrote: > > {read,write}_with_attrs might be missing, and the codes currently do > not validate them before calling, which will cause segment fault. > > Fixes: 62a0db942dec ("memory: Remove old_mmio accessors") > Signed-off-by: Bin Meng This 'fixes' tag

Re: [PATCH v3 43/43] bsd-user: Update mapping to handle reserved and starting conditions

2021-09-05 Thread Kyle Evans
On Thu, Sep 2, 2021 at 6:56 PM wrote: > > From: Warner Losh > > Update the reserved base based on what platform we're on, as well as the > start of the mmap range. Update routines that find va ranges to interact > with the reserved ranges as well as properly align the mapping (this is >

Re: [PATCH v3 32/43] bsd-user: Rewrite target system call definintion glue

2021-09-05 Thread Kyle Evans
On Thu, Sep 2, 2021 at 6:54 PM wrote: > > From: Warner Losh > > Rewrite target definnitions to interface with the FreeBSD system calls. > This covers basic types (time_t, iovec, umtx_time, timespec, timeval, > rusage, rwusage) and basic defines (mmap, rusage). Also included are > FreeBSD

Re: [PATCH v3 39/43] bsd-user: Refactor load_elf_sections and is_target_elf_binary

2021-09-05 Thread Kyle Evans
On Thu, Sep 2, 2021 at 6:56 PM wrote: > > From: Warner Losh > > Factor out load_elf_sections and is_target_elf_binary out of > load_elf_interp. > > Signed-off-by: Mikaël Urankar > Signed-off-by: Stacey Son > Signed-off-by: Warner Losh > --- > bsd-user/elfload.c | 344

Re: [PATCH V2 18/21] virito-net: use "qps" instead of "queues" when possible

2021-09-05 Thread Jason Wang
On Sun, Sep 5, 2021 at 4:42 AM Michael S. Tsirkin wrote: > > On Fri, Sep 03, 2021 at 05:10:28PM +0800, Jason Wang wrote: > > Most of the time, "queues" really means queue pairs. So this patch > > switch to use "qps" to avoid confusion. > > > > Signed-off-by: Jason Wang > > This is far from a

Re: [PATCH v2 18/24] target/riscv: Restrict cpu_exec_interrupt() handler to sysemu

2021-09-05 Thread Bin Meng
On Sun, Sep 5, 2021 at 8:06 AM Philippe Mathieu-Daudé wrote: > > Restrict cpu_exec_interrupt() and its callees to sysemu. > > Reviewed-by: Warner Losh > Reviewed-by: Richard Henderson > Signed-off-by: Philippe Mathieu-Daudé > --- > target/riscv/cpu.h| 2 +- > target/riscv/cpu.c

Re: [RFC PATCH v2 04/12] i386/sev: initialize SNP context

2021-09-05 Thread Dov Murik
On 05/09/2021 16:58, Brijesh Singh wrote: > Hi Dov, > > On 9/5/21 2:07 AM, Dov Murik wrote: > ... >> >>> >>> uint64_t >>> @@ -1074,6 +1083,7 @@ int sev_kvm_init(ConfidentialGuestSupport *cgs, Error >>> **errp) >>> uint32_t ebx; >>> uint32_t host_cbitpos; >>> struct

Re: [PATCH] softmmu/memory: Validate {read, write}_with_attrs before calling

2021-09-05 Thread Peter Maydell
On Sun, 5 Sept 2021 at 18:07, Bin Meng wrote: > > On Mon, Sep 6, 2021 at 12:54 AM Peter Maydell > wrote: > > I mean that before commit 62a0db942dec leaving the pointers all > > NULL was not allowed, and after that commit leaving the pointers all > > NULL was still not allowed. It's been a

Re: [PATCH v3] hw/arm/aspeed: Add Fuji machine type

2021-09-05 Thread Cédric Le Goater
On 9/5/21 8:55 PM, p...@fb.com wrote: > From: Peter Delevoryas > > This adds a new machine type "fuji-bmc" based on the following device tree: > > https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/aspeed-bmc-facebook-fuji.dts > > Most of the i2c devices are not there, they're

Re: Virtualizing HP PA-RISC unix station other than B160L

2021-09-05 Thread Helge Deller
Hi Thierry, On 9/5/21 3:24 PM, Richard Henderson wrote: On Sun, 5 Sep 2021, 10:30 , mailto:thierry.br...@gmail.com>> wrote: For my company (Nexter Systems, France), I am using qemu-system-hppa for virtualizing HP PA-RISC workstations. That works well. You have made a very good job ! Thanks.

Re: [PATCH] target/riscv: Fix satp write

2021-09-05 Thread LIU Zhiwei
On 2021/9/2 上午10:47, Bin Meng wrote: On Thu, Sep 2, 2021 at 10:44 AM LIU Zhiwei wrote: On 2021/9/2 上午9:59, Bin Meng wrote: On Thu, Sep 2, 2021 at 9:02 AM LIU Zhiwei wrote: On 2021/9/1 下午9:05, Bin Meng wrote: On Wed, Sep 1, 2021 at 8:51 PM LIU Zhiwei wrote: These variables should be

Re: [PATCH v2 0/5] hw/virtio: Minor housekeeping patches

2021-09-05 Thread Michael S. Tsirkin
On Thu, Sep 02, 2021 at 06:50:34PM +0200, Philippe Mathieu-Daudé wrote: > Hi, > > This series contains few patches I gathered while tooking notes > trying to understand issues #300-#302. v1 was includes in my pull request already, pls send incremental patches on top. Thanks! > Since v1: > -

[PATCH v3] hw/arm/aspeed: Add Fuji machine type

2021-09-05 Thread pdel
From: Peter Delevoryas This adds a new machine type "fuji-bmc" based on the following device tree: https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/aspeed-bmc-facebook-fuji.dts Most of the i2c devices are not there, they're added here:

Re: [PATCH v3 36/43] bsd-user: Add target_os_user.h to capture the user/kernel structures

2021-09-05 Thread Kyle Evans
On Thu, Sep 2, 2021 at 6:55 PM wrote: > > From: Warner Losh > > This file evolved over the years to capture the user/kernel interfaces, > including those that changed over time. > > Signed-off-by: Stacey Son > Signed-off-by: Michal Meloun > Signed-off-by: Warner Losh > Acked-by: Richard

Re: [PATCH v3 33/43] bsd-user: Make cpu_model and cpu_type visible to all of main.c

2021-09-05 Thread Kyle Evans
On Thu, Sep 2, 2021 at 6:53 PM wrote: > > From: Warner Losh > > cpu_model and cpu_type will be used future commits, so move them from > main() scoped to file scoped. > > Signed-off-by: Warner Losh > Acked-by: Richard Henderson > --- > bsd-user/main.c | 4 ++-- > 1 file changed, 2

Re: [PATCH V2] block/rbd: implement bdrv_co_block_status

2021-09-05 Thread Ilya Dryomov
On Thu, Sep 2, 2021 at 4:12 PM Peter Lieven wrote: > > Am 24.08.21 um 22:39 schrieb Ilya Dryomov: > > On Mon, Aug 23, 2021 at 11:38 AM Peter Lieven wrote: > >> Am 22.08.21 um 23:02 schrieb Ilya Dryomov: > >>> On Tue, Aug 10, 2021 at 3:41 PM Peter Lieven wrote: > the qemu rbd driver

Re: [PATCH v2 01/20] docs/system: ppc: Update the URL for OpenPOWER firmware images

2021-09-05 Thread David Gibson
On Thu, Sep 02, 2021 at 03:09:09PM +0200, Cédric Le Goater wrote: > This also fixes a small skiboot/skiroot typo and removes the links to > the specific POWER8 and POWER9 images since the firmware images can be > used to run all machines. > > Signed-off-by: Cédric Le Goater Applied to

Re: [PATCH V2 0/3] virtio: Add vhost-user-i2c device's support

2021-09-05 Thread Viresh Kumar
On 04-09-21, 15:44, Michael S. Tsirkin wrote: > So I'm not sure whether it's appropriate to merge this right now. This is already merged. > There are several spec change proposals before the virtio TC > and I did not investigate whether this code reflects the > spec before or after these

Re: [PATCH] user: Mark cpu_loop() with noreturn attribute

2021-09-05 Thread Bin Meng
On Sun, Sep 5, 2021 at 8:18 AM Philippe Mathieu-Daudé wrote: > > cpu_loop() never exits, so mark it with QEMU_NORETURN. > > Signed-off-by: Philippe Mathieu-Daudé > --- > bsd-user/qemu.h | 2 +- > linux-user/qemu.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > Reviewed-by: Bin

Re: [RFC PATCH v2 04/12] i386/sev: initialize SNP context

2021-09-05 Thread Dov Murik
On 05/09/2021 17:05, Brijesh Singh wrote: > > On 9/5/21 4:19 AM, Dov Murik wrote: >> >> On 27/08/2021 1:26, Michael Roth wrote: >>> From: Brijesh Singh >>> >>> When SEV-SNP is enabled, the KVM_SNP_INIT command is used to initialize >>> the platform. The command checks whether SNP is enabled

Re: [PATCH v3 40/43] bsd-user: move qemu_log to later in the file

2021-09-05 Thread Kyle Evans
On Thu, Sep 2, 2021 at 6:56 PM wrote: > > From: Warner Losh > > Signed-off-by: Warner Losh > Acked-by: Richard Henderson > --- > bsd-user/main.c | 17 + > 1 file changed, 9 insertions(+), 8 deletions(-) > Subject nit: s/qemu_log/gemu_log/ Reviewed-by: Kyle Evans

Re: [PATCH v3 33/43] bsd-user: Make cpu_model and cpu_type visible to all of main.c

2021-09-05 Thread Warner Losh
On Sun, Sep 5, 2021 at 12:57 PM Kyle Evans wrote: > On Thu, Sep 2, 2021 at 6:53 PM wrote: > > > > From: Warner Losh > > > > cpu_model and cpu_type will be used future commits, so move them from > > main() scoped to file scoped. > > > > Signed-off-by: Warner Losh > > Acked-by: Richard

Re: [PATCH] softmmu/memory: Validate {read, write}_with_attrs before calling

2021-09-05 Thread Bin Meng
On Mon, Sep 6, 2021 at 12:54 AM Peter Maydell wrote: > > On Sun, 5 Sept 2021 at 17:49, Bin Meng wrote: > > > > On Mon, Sep 6, 2021 at 12:29 AM Peter Maydell > > wrote: > > > > > > On Sun, 5 Sept 2021 at 16:40, Bin Meng wrote: > > > > > > > > {read,write}_with_attrs might be missing, and the

Re: Re: [PATCH v4] virtio/vsock: add two more queues for datagram types

2021-09-05 Thread Jiang Wang .
On Mon, Aug 9, 2021 at 3:58 AM Stefano Garzarella wrote: > > On Thu, Aug 05, 2021 at 12:07:02PM -0700, Jiang Wang . wrote: > >On Wed, Aug 4, 2021 at 1:13 AM Stefano Garzarella > >wrote: > >> > >> On Tue, Aug 03, 2021 at 11:41:32PM +, Jiang Wang wrote: > >> >Datagram sockets are

Re: [PATCH v3 21/43] bsd-user: pull in target_arch_thread.h update target_arch_elf.h

2021-09-05 Thread Kyle Evans
On Thu, Sep 2, 2021 at 6:55 PM wrote: > > From: Warner Losh > > Update target_arch_elf.h to remove thread_init. Move its contents to > target_arch_thread.h and rename to target_thread_init(). Update > elfload.c to call it. Create thread_os_thread.h to hold the os specific > parts of the thread

RE: Virtualizing HP PA-RISC unix station other than B160L

2021-09-05 Thread thierry.briot
Hi everyone, Thank you for your answers. First of all, I made a mistake : the HP-UX 10.20 kernel (vmunix) is in the /stand (not /boot) filesystem. I tried replacing /stand of the physical machine iso image with the /stand filesytem of the emulated B160L because I supposed that drivers are

Re: [PATCH] target/ppc: fix setting of CR flags in bcdcfsq

2021-09-05 Thread David Gibson
On Mon, Aug 23, 2021 at 12:02:35PM -0300, Luis Pires wrote: > According to the ISA, CR should be set based on the source value, and > not on the packed decimal result. > The way this was implemented would cause GT, LT and EQ to be set > incorrectly when the source value was too large and the 31

Re: [PATCH v2 02/20] ppc/pnv: Add an assert when calculating the RAM distribution on chips

2021-09-05 Thread David Gibson
On Thu, Sep 02, 2021 at 03:09:10PM +0200, Cédric Le Goater wrote: > Signed-off-by: Cédric Le Goater Applied to ppc-for-6.2, thanks. > --- > > v2: fixed assert value ... > > hw/ppc/pnv.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c > index

Re: [PATCH] target/riscv: Fix satp write

2021-09-05 Thread Bin Meng
On Mon, Sep 6, 2021 at 11:23 AM LIU Zhiwei wrote: > > > On 2021/9/2 上午10:47, Bin Meng wrote: > > On Thu, Sep 2, 2021 at 10:44 AM LIU Zhiwei wrote: > >> > >> On 2021/9/2 上午9:59, Bin Meng wrote: > >>> On Thu, Sep 2, 2021 at 9:02 AM LIU Zhiwei wrote: > On 2021/9/1 下午9:05, Bin Meng wrote: >

Re: [PATCH v2 06/22] target/riscv: Add AIA cpu feature

2021-09-05 Thread Alistair Francis
On Thu, Sep 2, 2021 at 9:52 PM Anup Patel wrote: > > We define a CPU feature for AIA CSR support in RISC-V CPUs which > can be set by machine/device emulation. The RISC-V CSR emulation > will also check this feature for emulating AIA CSRs. > > Signed-off-by: Anup Patel Reviewed-by: Alistair

Re: [PATCH V2 18/21] virito-net: use "qps" instead of "queues" when possible

2021-09-05 Thread Michael S. Tsirkin
On Mon, Sep 06, 2021 at 11:42:41AM +0800, Jason Wang wrote: > On Sun, Sep 5, 2021 at 4:42 AM Michael S. Tsirkin wrote: > > > > On Fri, Sep 03, 2021 at 05:10:28PM +0800, Jason Wang wrote: > > > Most of the time, "queues" really means queue pairs. So this patch > > > switch to use "qps" to avoid

[PATCH] usb-storage: tag usb_msd_csw as packed struct

2021-09-05 Thread Gerd Hoffmann
Without this the struct has the wrong size: sizeof() evaluates to 16 instead of 13. In most cases the bug is hidden by the fact that guests submits a buffer which is exactly 13 bytes long, so the padding added by the compiler is simply ignored. But sometimes guests submit a larger buffer and

Re: [PATCH] target/riscv: Fix satp write

2021-09-05 Thread LIU Zhiwei
On 2021/9/6 上午11:26, Bin Meng wrote: On Mon, Sep 6, 2021 at 11:23 AM LIU Zhiwei wrote: On 2021/9/2 上午10:47, Bin Meng wrote: On Thu, Sep 2, 2021 at 10:44 AM LIU Zhiwei wrote: On 2021/9/2 上午9:59, Bin Meng wrote: On Thu, Sep 2, 2021 at 9:02 AM LIU Zhiwei wrote: On 2021/9/1 下午9:05, Bin

Re: [PATCH] target/riscv: Fix satp write

2021-09-05 Thread Alistair Francis
On Wed, Sep 1, 2021 at 10:51 PM LIU Zhiwei wrote: > > These variables should be target_ulong. If truncated to int, > the bool conditions they indicate will be wrong. > > As satp is very important for Linux, this bug almost fails every boot. > > Signed-off-by: LIU Zhiwei Thanks! Applied to

Re: [PATCH v10 01/16] target/riscv: Introduce temporary in gen_add_uw()

2021-09-05 Thread Alistair Francis
On Sun, Sep 5, 2021 at 6:40 AM Philipp Tomsich wrote: > > Following the recent changes in translate.c, gen_add_uw() causes > failures on CF3 and SPEC2017 due to the reuse of arg1. Fix these > regressions by introducing a temporary. > > Signed-off-by: Philipp Tomsich Reviewed-by: Alistair

Re: [PATCH v10 02/16] target/riscv: fix clzw implementation to operate on arg1

2021-09-05 Thread Alistair Francis
On Sun, Sep 5, 2021 at 6:36 AM Philipp Tomsich wrote: > > The refactored gen_clzw() uses ret as its argument, instead of arg1. > Fix it. > > Signed-off-by: Philipp Tomsich Reviewed-by: Alistair Francis Alistair > --- > > Changes in v10: > - New patch, fixing regressions discovered with

Re: [PATCH v2 05/22] target/riscv: Allow setting CPU feature from machine/device emulation

2021-09-05 Thread Alistair Francis
On Thu, Sep 2, 2021 at 9:42 PM Anup Patel wrote: > > The machine or device emulation should be able to force set certain > CPU features because: > 1) We can have certain CPU features which are in-general optional >but implemented by RISC-V CPUs on machine. > 2) We can have devices which

virtio "transitional devices"?

2021-09-05 Thread Alexander von Gluck IV
Could someone explain to me what virtio "transitional devices" are? https://docs.oasis-open.org/virtio/virtio/v1.1/cs01/virtio-v1.1-cs01.html#x1-1020002 Are "Transitional devices" pre-1.0 specification? Haiku's virtio driver (PCI) is looking for PCIID Devices 0x1000-0x103F I've noticed

Re: [RFC PATCH v2 04/12] i386/sev: initialize SNP context

2021-09-05 Thread Brijesh Singh
On 9/5/21 4:19 AM, Dov Murik wrote: > > On 27/08/2021 1:26, Michael Roth wrote: >> From: Brijesh Singh >> >> When SEV-SNP is enabled, the KVM_SNP_INIT command is used to initialize >> the platform. The command checks whether SNP is enabled in the KVM, if >> enabled then it allocates a new ASID

Re: [RFC PATCH v2 04/12] i386/sev: initialize SNP context

2021-09-05 Thread Brijesh Singh
Hi Dov, On 9/5/21 2:07 AM, Dov Murik wrote: ... > >> >> uint64_t >> @@ -1074,6 +1083,7 @@ int sev_kvm_init(ConfidentialGuestSupport *cgs, Error >> **errp) >> uint32_t ebx; >> uint32_t host_cbitpos; >> struct sev_user_data_status status = {}; >> +void *init_args = NULL; >>

[PATCH 1/1] plugins/: Add missing functions to symbol list

2021-09-05 Thread Lukas Jünger
Some functions of the plugin API were missing in the symbol list. However, they are all used by the contributed example plugins. QEMU fails to load the plugin if the function symbol is not exported. Signed-off-by: Lukas Jünger --- plugins/qemu-plugins.symbols | 3 +++ 1 file changed, 3

[PATCH 0/1] Add missing function names to symbol list

2021-09-05 Thread Lukas Jünger
Hi all, I have been trying to use the hwprofile and cache plugin on qemu-system-riscv64. They failed to load with an undefined symbol error. It looks like some of the plugin API functions are missing from the symbol list, so I added them. Afterwards the plugins worked (eventhough the cache plugin

Re: [PATCH] user: Mark cpu_loop() with noreturn attribute

2021-09-05 Thread Warner Losh
On Sat, Sep 4, 2021 at 6:04 PM Philippe Mathieu-Daudé wrote: > cpu_loop() never exits, so mark it with QEMU_NORETURN. > > Signed-off-by: Philippe Mathieu-Daudé > --- > bsd-user/qemu.h | 2 +- > linux-user/qemu.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > Reviewed-By:

Re: [PATCH v2 01/24] target/avr: Remove pointless use of CONFIG_USER_ONLY definition

2021-09-05 Thread Warner Losh
On Sat, Sep 4, 2021 at 5:55 PM Philippe Mathieu-Daudé wrote: > Commit f1c671f96cb ("target/avr: Introduce basic CPU class object") > added to target/avr/cpu.h: > > #ifdef CONFIG_USER_ONLY > #error "AVR 8-bit does not support user mode" > #endif > > Remove the CONFIG_USER_ONLY definition

Re: [PATCH v2 11/24] target/i386: Move x86_cpu_exec_interrupt() under sysemu/ folder

2021-09-05 Thread Warner Losh
On Sat, Sep 4, 2021 at 5:56 PM Philippe Mathieu-Daudé wrote: > Following the logic of commit 30493a030ff ("i386: split seg_helper > into user-only and sysemu parts"), move x86_cpu_exec_interrupt() > under sysemu/seg_helper.c. > > Signed-off-by: Philippe Mathieu-Daudé > --- > I prefer to not

Re: [PATCH v2 5/5] hw/char: cadence_uart: Ignore access when unclocked or in reset for uart_{read, write}()

2021-09-05 Thread Bin Meng
On Thu, Sep 2, 2021 at 2:11 PM Philippe Mathieu-Daudé wrote: > > On 9/2/21 8:09 AM, Philippe Mathieu-Daudé wrote: > > On 9/1/21 5:27 AM, Bin Meng wrote: > >> Read or write to uart registers when unclocked or in reset should be > >> ignored. Add the check there, and as a result of this, the check

Re: [PULL 00/14] aspeed queue

2021-09-05 Thread Peter Delevoryas
> On Sep 5, 2021, at 1:51 AM, Cédric Le Goater wrote: > > On 9/5/21 1:03 AM, Philippe Mathieu-Daudé wrote: >>> On 9/4/21 7:33 AM, Cédric Le Goater wrote: >>> On 9/3/21 10:41 PM, Philippe Mathieu-Daudé wrote: Hi Peter, On 9/3/21 9:40 PM, Cédric Le Goater wrote: > The

Re: [PATCH v3 27/43] bsd-user: Implement --seed and initialize random state

2021-09-05 Thread Warner Losh
On Sun, Sep 5, 2021 at 4:33 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 9/3/21 1:47 AM, i...@bsdimp.com wrote: > > From: Warner Losh > > > > Copy --seed implementation (translated from linux-user's newer command > > line scheme to the older one bsd-user still uses).

Re: [PATCH v3 32/43] bsd-user: Rewrite target system call definintion glue

2021-09-05 Thread Warner Losh
On Sun, Sep 5, 2021 at 4:33 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 9/3/21 1:47 AM, i...@bsdimp.com wrote: > > From: Warner Losh > > > > Rewrite target definnitions to interface with the FreeBSD system calls. > > This covers basic types (time_t, iovec, umtx_time,

Re: [PATCH v2] net/colo: check vnet_hdr_support flag when using virtio-net

2021-09-05 Thread Lukas Straub
On Thu, 26 Aug 2021 05:49:23 + "Zhang, Chen" wrote: > > -Original Message- > > From: Lukas Straub > > Sent: Sunday, August 22, 2021 12:25 AM > > To: Xu, Tao3 > > Cc: Zhang, Chen ; lizhij...@cn.fujitsu.com; > > jasow...@redhat.com; qemu-devel@nongnu.org > > Subject: Re: [PATCH v2]

[PATCH] util/compatfd.c: use libc signalfd wrapper instead of raw syscall

2021-09-05 Thread Kacper Słomiński
This allows the use of native signalfd instead of the sigtimedwait based emulation on systems other than Linux. Signed-off-by: Kacper Słomiński --- Apologies if I CC'd the wrong maintaineers, it's my first time submitting patches to QEMU. According to get_maintainers.pl this file has no

Re: Virtualizing HP PA-RISC unix station other than B160L

2021-09-05 Thread Richard Henderson
On Sun, 5 Sep 2021, 10:30 , wrote: > Hie Richard, > > > > For my company (Nexter Systems, France), I am using qemu-system-hppa for > virtualizing HP PA-RISC workstations. That works well. You have made a very > good job ! > > > > But my machines are other than B160L (for example B180L), and I

Re: [PATCH] ide: Cap LBA28 capacity announcement to 2^28-1

2021-09-05 Thread Samuel Thibault
Ping? Samuel Thibault, le mar. 24 août 2021 12:43:44 +0200, a ecrit: > The LBA28 capacity (at offsets 60/61 of identification) is supposed to > express the maximum size supported by LBA28 commands. If the device is > larger than this, we have to cap it to 2^28-1. > > At least NetBSD happens to

Re: [PATCH v2 01/24] target/avr: Remove pointless use of CONFIG_USER_ONLY definition

2021-09-05 Thread Richard Henderson
On 9/5/21 1:55 AM, Philippe Mathieu-Daudé wrote: Commit f1c671f96cb ("target/avr: Introduce basic CPU class object") added to target/avr/cpu.h: #ifdef CONFIG_USER_ONLY #error "AVR 8-bit does not support user mode" #endif Remove the CONFIG_USER_ONLY definition introduced by mistake in

Re: [PATCH v2 11/24] target/i386: Move x86_cpu_exec_interrupt() under sysemu/ folder

2021-09-05 Thread Richard Henderson
On 9/5/21 1:55 AM, Philippe Mathieu-Daudé wrote: Following the logic of commit 30493a030ff ("i386: split seg_helper into user-only and sysemu parts"), move x86_cpu_exec_interrupt() under sysemu/seg_helper.c. Signed-off-by: Philippe Mathieu-Daudé --- I prefer to not squash this into the previous

Re: [PATCH v10 03/16] target/riscv: clwz must ignore high bits (use shift-left & changed logic)

2021-09-05 Thread Philipp Tomsich
On Sun 5. Sep 2021 at 11:11, Richard Henderson wrote: > > On 9/4/21 10:35 PM, Philipp Tomsich wrote: > > Assume clzw being executed on a register that is not sign-extended, such > > as for the following sequence that uses (1ULL << 63) | 392 as the operand > > to clzw: > > bseti a2, zero,

Re: [PATCH v4 10/21] target/loongarch: Add floating point arithmetic instruction translation

2021-09-05 Thread Richard Henderson
On 9/2/21 2:40 PM, Song Gao wrote: +const FloatRoundMode ieee_rm[4] = { Make static. +int ieee_ex_to_loongarch(int xcpt) This function is only used in this file. Better to make it static and remove the declaration from translate.h, which allows you to remove that include. +static

Re: [PATCH v4 12/21] target/loongarch: Add floating point conversion instruction translation

2021-09-05 Thread Richard Henderson
On 9/2/21 2:40 PM, Song Gao wrote: This patch implement floating point conversion instruction translation. This includes: - FCVT.S.D, FCVT.D.S - FFINT.{S/D}.{W/L}, FTINT.{W/L}.{S/D} - FTINT{RM/RP/RZ/RNE}.{W/L}.{S/D} - FRINT.{S/D} Signed-off-by: Song Gao Signed-off-by: XiaoJuan Yang ---

Re: [PATCH v4 14/21] target/loongarch: Add floating point load/store instruction translation

2021-09-05 Thread Richard Henderson
On 9/2/21 2:41 PM, Song Gao wrote: This patch implement floating point load/store instruction translation. This includes: - FLD.{S/D}, FST.{S/D} - FLDX.{S/D}, FSTX.{S/D} - FLD{GT/LE}.{S/D}, FST{GT/LE}.{S/D} Signed-off-by: Song Gao Signed-off-by: XiaoJuan Yang ---

Re: [PATCH v4 15/21] target/loongarch: Add branch instruction translation

2021-09-05 Thread Richard Henderson
On 9/2/21 2:41 PM, Song Gao wrote: +static bool gen_rz_bc(DisasContext *ctx, arg_fmt_rjoffs21 *a, TCGCond cond) +{ +TCGv src1 = gpr_src(ctx, a->rj, EXT_NONE); +TCGv src2 = tcg_constant_tl(0); + +gen_bc(ctx, src1, src2, (a->offs21 << 2), cond); +return true; +} +static bool

Re: [RFC PATCH v2 11/12] i386/sev: sev-snp: add support for CPUID validation

2021-09-05 Thread Dov Murik
Hi Michael, On 27/08/2021 1:26, Michael Roth wrote: > SEV-SNP firmware allows a special guest page to be populated with a > table of guest CPUID values so that they can be validated through > firmware before being loaded into encrypted guest memory where they can > be used in place of

Re: [PATCH v4 19/21] target/loongarch: Add target build suport

2021-09-05 Thread Richard Henderson
On 9/2/21 2:41 PM, Song Gao wrote: This patch add build loongarch-linux-user target support. Signed-off-by: Song Gao Signed-off-by: XiaoJuan Yang --- target/loongarch/meson.build | 18 ++ target/meson.build | 1 + 2 files changed, 19 insertions(+) create mode

Re: [PATCH v4 17/21] LoongArch Linux User Emulation

2021-09-05 Thread Richard Henderson
On 9/2/21 2:41 PM, Song Gao wrote: +#include "qemu/osdep.h" +#include "qemu.h" +#include "qemu-common.h" +#include "cpu_loop-common.h" +#include "elf.h" + +void cpu_loop(CPULoongArchState *env) +{ +CPUState *cs = env_cpu(env); +target_siginfo_t info; +int trapnr; +abi_long ret; +

Re: [PATCH v3 22/43] bsd-user: Include more things in qemu.h

2021-09-05 Thread Richard Henderson
On 9/3/21 1:47 AM, i...@bsdimp.com wrote: From: Warner Losh Include more header files to match bsd-user fork. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v3 32/43] bsd-user: Rewrite target system call definintion glue

2021-09-05 Thread Richard Henderson
On 9/3/21 1:47 AM, i...@bsdimp.com wrote: From: Warner Losh Rewrite target definnitions to interface with the FreeBSD system calls. This covers basic types (time_t, iovec, umtx_time, timespec, timeval, rusage, rwusage) and basic defines (mmap, rusage). Also included are FreeBSD version-specific

Re: [PATCH v3 37/43] bsd-user: add stubbed out core dump support

2021-09-05 Thread Richard Henderson
On 9/3/21 1:47 AM, i...@bsdimp.com wrote: From: Warner Losh Add a stubbed-out version of the bsd-user fork's core dump support. This allows elfload.c to be almost the same between what's upstream and what's in qemu-project upstream w/o the burden of reviewing the core dump support.

Re: [PATCH v3 27/43] bsd-user: Implement --seed and initialize random state

2021-09-05 Thread Richard Henderson
On 9/3/21 1:47 AM, i...@bsdimp.com wrote: From: Warner Losh Copy --seed implementation (translated from linux-user's newer command line scheme to the older one bsd-user still uses). Initialize the randomness with the glibc if a specific seed is specified or use the FWIW, it's glib, not

Re: [PATCH] target/ppc: fix setting of CR flags in bcdcfsq

2021-09-05 Thread Richard Henderson
On 8/23/21 5:02 PM, Luis Pires wrote: According to the ISA, CR should be set based on the source value, and not on the packed decimal result. The way this was implemented would cause GT, LT and EQ to be set incorrectly when the source value was too large and the 31 least significant digits of

Re: [RFC PATCH v2 04/12] i386/sev: initialize SNP context

2021-09-05 Thread Dov Murik
Hi Michael, On 27/08/2021 1:26, Michael Roth wrote: > From: Brijesh Singh > > When SEV-SNP is enabled, the KVM_SNP_INIT command is used to initialize > the platform. The command checks whether SNP is enabled in the KVM, if > enabled then it allocates a new ASID from the SNP pool and calls the >

Re: [PATCH v10 01/16] target/riscv: Introduce temporary in gen_add_uw()

2021-09-05 Thread Richard Henderson
On 9/4/21 10:35 PM, Philipp Tomsich wrote: Following the recent changes in translate.c, gen_add_uw() causes failures on CF3 and SPEC2017 due to the reuse of arg1. Fix these regressions by introducing a temporary. Signed-off-by: Philipp Tomsich --- Changes in v10: - new patch

Re: [PATCH v10 02/16] target/riscv: fix clzw implementation to operate on arg1

2021-09-05 Thread Richard Henderson
On 9/4/21 10:35 PM, Philipp Tomsich wrote: The refactored gen_clzw() uses ret as its argument, instead of arg1. Fix it. Signed-off-by: Philipp Tomsich --- Changes in v10: - New patch, fixing regressions discovered with x264_r. Fixes: 60903915050 ("target/riscv: Add DisasExtend to gen_unary")

Re: [PATCH v10 03/16] target/riscv: clwz must ignore high bits (use shift-left & changed logic)

2021-09-05 Thread Richard Henderson
On 9/4/21 10:35 PM, Philipp Tomsich wrote: Assume clzw being executed on a register that is not sign-extended, such as for the following sequence that uses (1ULL << 63) | 392 as the operand to clzw: bseti a2, zero, 63 addia2, a2, 392 clzwa3, a2 The correct

Re: [PATCH] user: Mark cpu_loop() with noreturn attribute

2021-09-05 Thread Richard Henderson
On 9/5/21 2:04 AM, Philippe Mathieu-Daudé wrote: cpu_loop() never exits, so mark it with QEMU_NORETURN. Signed-off-by: Philippe Mathieu-Daudé --- bsd-user/qemu.h | 2 +- linux-user/qemu.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v4 09/21] target/loongarch: Add fixed point extra instruction translation

2021-09-05 Thread Richard Henderson
On 9/2/21 2:40 PM, Song Gao wrote: This patch implement fixed point extra instruction translation. This includes: - CRC[C].W.{B/H/W/D}.W - SYSCALL - BREAK - ASRT{LE/GT}.D - RDTIME{L/H}.W, RDTIME.D - CPUCFG Signed-off-by: Song Gao Signed-off-by: XiaoJuan Yang --- target/loongarch/helper.h

Re: [PULL 00/14] aspeed queue

2021-09-05 Thread Cédric Le Goater
On 9/5/21 1:03 AM, Philippe Mathieu-Daudé wrote: > On 9/4/21 7:33 AM, Cédric Le Goater wrote: >> On 9/3/21 10:41 PM, Philippe Mathieu-Daudé wrote: >>> Hi Peter, >>> >>> On 9/3/21 9:40 PM, Cédric Le Goater wrote: The following changes since commit

Re: [RFC PATCH v2 04/12] i386/sev: initialize SNP context

2021-09-05 Thread Dov Murik
On 27/08/2021 1:26, Michael Roth wrote: > From: Brijesh Singh > > When SEV-SNP is enabled, the KVM_SNP_INIT command is used to initialize > the platform. The command checks whether SNP is enabled in the KVM, if > enabled then it allocates a new ASID from the SNP pool and calls the > firmware

Re: [PATCH v4 11/21] target/loongarch: Add floating point comparison instruction translation

2021-09-05 Thread Richard Henderson
On 9/2/21 2:40 PM, Song Gao wrote: +/* fcmp_cXXX_s */ +uint64_t helper_fcmp_c_s(CPULoongArchState *env, uint64_t fj, + uint64_t fk, uint32_t flags) +{ +uint32_t t0, t1; +uint64_t cmp = 0; +t0 = (uint32_t)fj; +t1 = (uint32_t)fk; + +if (flags) { +

Re: [PATCH v4 13/21] target/loongarch: Add floating point move instruction translation

2021-09-05 Thread Richard Henderson
On 9/2/21 2:40 PM, Song Gao wrote: +static bool gen_mov(DisasContext *ctx, arg_fmt_fdfj *a, +void (*func)(TCGv, TCGv)) +{ +TCGv dest = cpu_fpr[a->fd]; +TCGv src = cpu_fpr[a->fj]; Maybe clearer as gen_f2f, to match the others? +static void gen_movfrh2gr_s(TCGv

Re: [PATCH v4 13/21] target/loongarch: Add floating point move instruction translation

2021-09-05 Thread Richard Henderson
On 9/2/21 2:40 PM, Song Gao wrote: +TRANS(fmov_s, gen_mov, tcg_gen_mov_tl) Hmm. The spec says only the low 32-bits are modified? But is also says that if the source is not in the single-precision format the result is uncertain? I'm not sure how to reconcile these two statements. Ideally

Re: [PATCH v4 20/21] target/loongarch: 'make check-tcg' support

2021-09-05 Thread Richard Henderson
On 9/2/21 2:41 PM, Song Gao wrote: This patch support 'make check-tcg' after install cross-tools. Signed-off-by: Song Gao Signed-off-by: XiaoJuan Yang --- tests/tcg/configure.sh | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson r~

Re: [PATCH v4 21/21] scripts: add loongarch64 binfmt config

2021-09-05 Thread Richard Henderson
On 9/2/21 2:41 PM, Song Gao wrote: Signed-off-by: Song Gao Signed-off-by: XiaoJuan Yang --- scripts/qemu-binfmt-conf.sh | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v3 10/43] bsd-user: implement path searching

2021-09-05 Thread Richard Henderson
On 9/3/21 1:46 AM, i...@bsdimp.com wrote: From: Warner Losh Use the PATH to find the executable given a bare argument. We need to do this so we can implement mixing native and emulated binaries (e.g., execing a x86 native binary from an emulated arm binary to optimize parts of the build). By

Re: [PATCH v3 20/43] bsd-user: Move per-cpu code into target_arch_cpu.h

2021-09-05 Thread Richard Henderson
On 9/3/21 1:47 AM, i...@bsdimp.com wrote: From: Warner Losh Move cpu_loop() into target_cpu_loop(), and put that in target_arch_cpu.h for each architecture. Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/i386/target_arch_cpu.c | 1 + bsd-user/i386/target_arch_cpu.h