[PATCH v5 0/3] riscv_load_fdt() semantics change

2023-02-01 Thread Daniel Henrique Barboza
Hi, This version contains changed proposed by Bin in the v4 review. Patches are based on riscv-to-apply.next. Changes from v4: - patch 1: - remove the fdt_pack() related lines instead of letting patch 2 do it - patch 2: - make riscv_compute_fdt_addr() return an uint64_t - patch 3: - do not

[PATCH v5 2/3] hw/riscv: split fdt address calculation from fdt load

2023-02-01 Thread Daniel Henrique Barboza
A common trend in other archs is to calculate the fdt address, which is usually straightforward, and then calling a function that loads the fdt/dtb by using that address. riscv_load_fdt() is doing a bit too much in comparison. It's calculating the fdt address via an elaborated heuristic to put the

[PATCH v5 1/3] hw/riscv/boot.c: calculate fdt size after fdt_pack()

2023-02-01 Thread Daniel Henrique Barboza
fdt_pack() can change the fdt size, meaning that fdt_totalsize() can contain a now deprecated (bigger) value. Reviewed-by: Alistair Francis Signed-off-by: Daniel Henrique Barboza --- hw/riscv/boot.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/riscv/boot.c b

[PATCH v5 3/3] hw/riscv: change riscv_compute_fdt_addr() semantics

2023-02-01 Thread Daniel Henrique Barboza
As it is now, riscv_compute_fdt_addr() is receiving a dram_base, a mem_size (which is defaulted to MachineState::ram_size in all boards) and the FDT pointer. And it makes a very important assumption: the DRAM interval dram_base + mem_size is contiguous. This is indeed the case for most boards that

Re: [PATCH 01/18] vfio/migration: Add VFIO migration pre-copy support

2023-02-01 Thread Jason Gunthorpe
On Tue, Jan 31, 2023 at 09:15:03PM -0700, Alex Williamson wrote: > > IMHO this is generally the way forward to do multi-device as well, > > remove the MMIO from all the address maps: VFIO, SW access, all of > > them. Nothing can touch MMIO except for the vCPU. > > Are you suggesting this relative

[PATCH 1/9] Updated the FSF address in file hw/sh4/sh7750_regs.h

2023-02-01 Thread Khadija Kamran
The Free Software Foundation moved to a new address and this file referred to their old location. The address should be updated and replaced to a pointer to Resolves: https://gitlab.com/qemu-project/qemu/-/issues/379 Signed-off-by: Khadija Kamran --- hw/sh4/sh77

Re: [PULL 00/35] Testing, docs, semihosting and plugin updates

2023-02-01 Thread Alex Bennée
Peter Maydell writes: > On Thu, 26 Jan 2023 at 11:22, Alex Bennée wrote: >> >> The following changes since commit 13356edb87506c148b163b8c7eb0695647d00c2a: >> >> Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu >> into staging (2023-01-24 09:45:33 +) >> >> are available

Re: [QEMU][PATCH v5 09/10] hw/arm: introduce xenpvh machine

2023-02-01 Thread Vikram Garhwal
Hi Paul, Thanks for reviewing this and other patches in series. Please see my reply below. On 2/1/23 12:30 AM, Paul Durrant wrote: On 31/01/2023 22:51, Vikram Garhwal wrote: Add a new machine xenpvh which creates a IOREQ server to register/connect with Xen Hypervisor. Is this really the r

Re: [RFC v2 2/2] spice: Add an option to forward the dmabuf directly to the encoder (v2)

2023-02-01 Thread Frediano Ziglio
Il giorno lun 30 gen 2023 alle ore 02:24 Kasireddy, Vivek ha scritto: > > Hi Frediano, Gerd, > > > > > Il giorno mar 24 gen 2023 alle ore 06:41 Kasireddy, Vivek > > ha scritto: > > > > > > + Frediano > > > > > > Hi Gerd, > > > > > > > > > > > Hi, > > > > > > > > > Here is the flow of things fro

Re: Fortnightly KVM call for 2023-02-07

2023-02-01 Thread Juan Quintela
Juan Quintela wrote: > Hi > > Please, send any topic that you are interested in covering in the next > call in 2 weeks. > > We have already topics: > - single qemu binary > People on previous call (today) asked if Markus, Paolo and Peter could > be there on next one to further discuss the topi

RE: [PATCH v5 03/14] Hexagon (target/hexagon) Add overrides for endloop1/endloop01

2023-02-01 Thread Taylor Simpson
> -Original Message- > From: Anton Johansson > Sent: Wednesday, February 1, 2023 6:30 AM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: richard.hender...@linaro.org; phi...@linaro.org; a...@rev.ng; Brian Cain > ; Matheus Bernardino (QUIC) > > Subject: Re: [PATCH v5 03/14] Hexagon (t

Re: [PATCH 01/18] vfio/migration: Add VFIO migration pre-copy support

2023-02-01 Thread Alex Williamson
On Wed, 1 Feb 2023 13:28:40 -0400 Jason Gunthorpe wrote: > On Tue, Jan 31, 2023 at 09:15:03PM -0700, Alex Williamson wrote: > > > > IMHO this is generally the way forward to do multi-device as well, > > > remove the MMIO from all the address maps: VFIO, SW access, all of > > > them. Nothing can

Re: [PATCH RFC 14/21] migration: Map hugetlbfs ramblocks twice, and pre-allocate

2023-02-01 Thread Juan Quintela
Peter Xu wrote: > On Mon, Jan 30, 2023 at 06:24:20AM +0100, Juan Quintela wrote: >> I would consider here: >> >> uint8_t *host_doublemap; >> >> as I have not a small name that means >> uint8_t *host_map_smaller_size_pages; >> >> That explains why we need it. > > Sure, I can rename this

Re: [PATCH RFC 15/21] migration: Teach qemu about minor faults and doublemap

2023-02-01 Thread Juan Quintela
Peter Xu wrote: > On Mon, Jan 30, 2023 at 06:45:20AM +0100, Juan Quintela wrote: >> Peter Xu wrote: >> > When a ramblock is backed by hugetlbfs and the user specified using >> > double-map feature, we trap the faults on these regions using minor mode. >> > Teach QEMU about that. >> > >> > Add som

Re: [PATCH RFC 16/21] migration: Enable doublemap with MADV_SPLIT

2023-02-01 Thread Juan Quintela
Peter Xu wrote: > MADV_SPLIT enables doublemap on hugetlb. Do that if doublemap=true > specified for the migration. > > Signed-off-by: Peter Xu > --- > migration/postcopy-ram.c | 16 > migration/ram.c | 18 ++ > 2 files changed, 34 insertions(+) Review

Re: [PATCH v6 15/36] tcg: Add guest load/store primitives for TCGv_i128

2023-02-01 Thread Richard Henderson
On 1/31/23 23:52, Alex Bennée wrote: +tcg_debug_assert((mop & (MO_BSWAP|MO_SSIZE)) == (MO_LE|MO_128)); Why not use validate_memop for this like elsewhere in cputlb? validate_memop is going away; this patch was pulled forward from that. I'm confused because the TCG ops in this patch are

Re: [PATCH RFC 17/21] migration: Rework ram discard logic for hugetlb double-map

2023-02-01 Thread Juan Quintela
Peter Xu wrote: > Hugetlb double map will make the ram discard logic different. > > The whole idea will still be the same: we need to a bitmap sync between > src/dst before we switch to postcopy. > > When discarding a range, we only erase the pgtables that were used to be > mapped for the guest le

Re: [PATCH v6 19/36] target/arm: Use tcg_gen_atomic_cmpxchg_i128 for CASP

2023-02-01 Thread Richard Henderson
On 2/1/23 05:04, Philippe Mathieu-Daudé wrote: On 30/1/23 22:48, Richard Henderson wrote: Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-Id: <20221112042555.2622152-3-richard.hender...@linaro.org> ---   target/arm/helper-a64.h    |  2 --   target/arm/helper-a64.c    | 43 -

Re: [PATCH] tests/tcg/s390x: Add cdsg.c

2023-02-01 Thread Richard Henderson
On 2/1/23 03:32, Ilya Leoshkevich wrote: Add a simple test to prevent regressions. Signed-off-by: Ilya Leoshkevich Thanks for re-posting, and sorry for missing the original. Added to the patch set. r~ --- tests/tcg/s390x/Makefile.target | 4 ++ tests/tcg/s390x/cdsg.c | 93 ++

Re: [PATCH RFC 18/21] migration: Allow postcopy_register_shared_ufd() to fail

2023-02-01 Thread Juan Quintela
Peter Xu wrote: > Let's fail double-map for vhost-user and any potential users that can have > a remote userfaultfd for now. > > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela But > -void postcopy_register_shared_ufd(struct PostCopyFD *pcfd) > +int postcopy_register_shared_ufd(struct Post

Re: [PATCH RFC 19/21] migration: Add postcopy_mark_received()

2023-02-01 Thread Juan Quintela
Peter Xu wrote: > We have a few maintainance work to do after we UFFDIO_[ZERO]COPY a page > before, e.g. on requested list of pages or when measuring page latencies. > > Move those steps into a separate function so that it can be easily reused > when we're going to support UFFDIO_CONTINUE. > > Sig

Re: [PATCH RFC 20/21] migration: Handle page faults using UFFDIO_CONTINUE

2023-02-01 Thread Juan Quintela
Peter Xu wrote: > Teach QEMU to be able to handle page faults using UFFDIO_CONTINUE for > hugetlbfs double mapped ranges. > > To copy the data, we need to use the mirror buffer created per ramblock by > a raw memcpy(), then we can kick the faulted threads using UFFDIO_CONTINUE > by installing the

Re: [PATCH 2/4] linux-user/microblaze: Handle privileged exception

2023-02-01 Thread Richard Henderson
On 1/31/23 14:46, Ilya Leoshkevich wrote: Follow what kernel's full_exception() is doing. Signed-off-by: Ilya Leoshkevich --- linux-user/microblaze/cpu_loop.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-01 Thread James Bottomley
On Wed, 2023-02-01 at 16:50 +, Peter Maydell wrote: > On Wed, 1 Feb 2023 at 15:25, James Bottomley > wrote: > > > > On Wed, 2023-02-01 at 10:10 -0500, Jason A. Donenfeld wrote: > > > This is already fixed via the patch that MST just sent in his > > > pull. > > > So wait a few days for that to

Re: [PATCH RFC 21/21] migration: Collapse huge pages again after postcopy finished

2023-02-01 Thread Juan Quintela
Peter Xu wrote: > When hugetlb-doublemap enabled, the pages will be migrated in small page > sizes during postcopy. When the migration finishes, the pgtable needs to > be rebuilt explicitly for these ranges to have huge page being mapped again. > > Signed-off-by: Peter Xu > --- > migration/ram.

Re: [PATCH 3/4] linux-user/sparc: Handle "ta 5"

2023-02-01 Thread Richard Henderson
On 1/31/23 14:46, Ilya Leoshkevich wrote: GCC lowers __builtin_trap() to "ta 5", which in turn generates trap 0x105. Follow what kernel's bad_trap() is doing there. Signed-off-by: Ilya Leoshkevich --- linux-user/sparc/cpu_loop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-us

Re: [PATCH RFC 20/21] migration: Handle page faults using UFFDIO_CONTINUE

2023-02-01 Thread Juan Quintela
Juan Quintela wrote: > Peter Xu wrote: >> Teach QEMU to be able to handle page faults using UFFDIO_CONTINUE for >> hugetlbfs double mapped ranges. >> >> To copy the data, we need to use the mirror buffer created per ramblock by >> a raw memcpy(), then we can kick the faulted threads using UFFDIO_

Re: [PATCH 4/4] tests/tcg/linux-test: Add linux-fork-trap test

2023-02-01 Thread Richard Henderson
On 1/31/23 14:46, Ilya Leoshkevich wrote: Check that dying due to a signal does not deadlock. Signed-off-by: Ilya Leoshkevich --- tests/tcg/multiarch/linux/linux-fork-trap.c | 48 + 1 file changed, 48 insertions(+) create mode 100644 tests/tcg/multiarch/linux/linux-fork-

Re: [PATCH 1/4] cpus: Make {start,end}_exclusive() recursive

2023-02-01 Thread Richard Henderson
On 2/1/23 03:07, Ilya Leoshkevich wrote: I can include this in v2, if the overall recursive lock approach is considered appropriate. I think it's a good idea. Certainly an improvement over removing the lock from the plugin code, like I tried. r~

Re: [PATCH 01/18] vfio/migration: Add VFIO migration pre-copy support

2023-02-01 Thread Jason Gunthorpe
On Wed, Feb 01, 2023 at 11:42:46AM -0700, Alex Williamson wrote: > > 'p2p off' is a valuable option in its own right because this stuff > > doesn't work reliably and is actively dangerous. Did you know you can > > hard crash the bare metal from a guest on some platforms with P2P > > operations? Yi

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-01 Thread Jason A. Donenfeld
It's not a secret, but I have so little internet right now that I can't even load a webpage, and I'm on my phone, hence the short HTMLified emails. In brief, though, it gets rid of all modifications to the kernel image all together, so it should fix your issue. On Wed, Feb 1, 2023, 10:24 James Bo

Re: [PATCH] accel/tcg: Complete cpu initialization before registration

2023-02-01 Thread Richard Henderson
On 2/1/23 04:20, Eric Auger wrote: What I fail to understand is why this code is called with a kvm accelerated qemu (the test runs by default with kvm). ... #2 0x02aaab1500f0 in vmsa_ttbr_write (env=0x2aaac393850, ri=0x2aaac3c90e0, value=2154950976315703518) at ../target/arm/helper.c:3784

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-01 Thread James Bottomley
On Wed, 2023-02-01 at 12:51 -0500, Jason A. Donenfeld wrote: > It's not a secret, but I have so little internet right now that I > can't even load a webpage, and I'm on my phone, hence the short > HTMLified emails. > > In brief, though, it gets rid of all modifications to the kernel > image all to

Re: [PATCH 17/32] migration: Move HMP commands from monitor/ to migration/

2023-02-01 Thread Juan Quintela
Markus Armbruster wrote: > This moves these commands from MAINTAINERS sections "Human > Monitor (HMP)" and "QMP" to "Migration". > > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH 18/32] migration: Move the QMP command from monitor/ to migration/

2023-02-01 Thread Juan Quintela
Markus Armbruster wrote: > This moves the command from MAINTAINERS sections "Human Monitor (HMP)" > and "QMP" to "Migration". > > Signed-off-by: Markus Armbruster Reviewed-by: Juan Quintela

Re: [PATCH] x86: fix q35 kernel measurements broken due to rng seeding

2023-02-01 Thread Jason A. Donenfeld
Hi James, On Wed, Feb 1, 2023, 15:39 James Bottomley wrote: > On Wed, 2023-02-01 at 12:51 -0500, Jason A. Donenfeld wrote: > > It's not a secret, but I have so little internet right now that I > > can't even load a webpage, and I'm on my phone, hence the short > > HTMLified emails. > > > > In br

Re: [PATCH: fix for virt instr exception] target/riscv: fix for virtual instr exception

2023-02-01 Thread Deepak Gupta
I was traveling. Sorry for the late reply. On Sun, Jan 29, 2023 at 2:49 PM Alistair Francis wrote: > > On Sat, Jan 28, 2023 at 6:37 AM Deepak Gupta wrote: > > > > Please dis-regard this. > > I've sent the patch to qemu-ri...@nongnu.org > > That's not entirely correct either. > > You can run the

Re: [RFC PATCH 2/2] hw/sd: skip double power-up in sd_vmstate_pre_load()

2023-02-01 Thread Juan Quintela
Philippe Mathieu-Daudé wrote: > +David / Juan / Peter for migration and timers. > > On 20/1/23 13:01, Daniel Henrique Barboza wrote: >> At this moment any migration with the RISC-V sifive_u machine >> fails with the following error: >> qemu-system-riscv64: ../hw/sd/sd.c:297: sd_ocr_powerup: Assert

Re: [RFC PATCH v5 7/9] target/avocado: Pass parameters to migration test on aarch64

2023-02-01 Thread Juan Quintela
Philippe Mathieu-Daudé wrote: > On 23/1/23 15:37, Fabiano Rosas wrote: >> Philippe Mathieu-Daudé writes: >> >>> On 20/1/23 19:48, Fabiano Rosas wrote: The migration tests are currently broken for an aarch64 host because the tests pass no 'machine' and 'cpu' options on the QEMU command

[PATCH v2 1/3] linux-headers: Update to v6.1

2023-02-01 Thread Peter Xu
Signed-off-by: Peter Xu --- include/standard-headers/drm/drm_fourcc.h | 34 - include/standard-headers/linux/ethtool.h | 63 +++- include/standard-headers/linux/fuse.h | 6 +- .../linux/input-event-codes.h | 1 + include/standard-headers/linux/virtio

[PATCH v2 0/3] util/userfaultfd: Support /dev/userfaultfd

2023-02-01 Thread Peter Xu
v2: - Added R-bs for Phil - Move open_mode into uffd_detect_open_mode() [Phil] - Document uffd_open() in the header file [Phil] - [Discussed with Daniel/Michal, decided to leave fd support for later] The new /dev/userfaultfd handle is superior to the system call with a better permission control an

[PATCH v2 3/3] util/userfaultfd: Support /dev/userfaultfd

2023-02-01 Thread Peter Xu
Teach QEMU to use /dev/userfaultfd when it existed and fallback to the system call if either it's not there or doesn't have enough permission. Firstly, as long as the app has permission to access /dev/userfaultfd, it always have the ability to trap kernel faults which QEMU mostly wants. Meanwhile,

[PATCH v2 2/3] util/userfaultfd: Add uffd_open()

2023-02-01 Thread Peter Xu
Add a helper to create the uffd handle. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Xu --- include/qemu/userfaultfd.h | 8 migration/postcopy-ram.c | 11 +-- tests/qtest/migration-test.c | 3 ++- util/userfaultfd.c | 13 +++-- 4 files chan

[PATCH 0/5] docs: expand block driver documentation

2023-02-01 Thread Stefan Hajnoczi
During an IRC discussion Michael Tokarev pointed out that block drivers are not well-documented. This patch series tries to improve the situation. It's a small step, but any improvement will help. Stefan Hajnoczi (5): docs: expand introduction to disk images docs: differentiate between block

[PATCH 1/5] docs: expand introduction to disk images

2023-02-01 Thread Stefan Hajnoczi
Explain --blockdev, the graph, protocols, formats, and filters. Also mention the relationship between --blockdev and --drive, since new users are likely to hit both syntaxes. Signed-off-by: Stefan Hajnoczi --- docs/system/images.rst | 35 --- 1 file changed, 32 in

[PATCH 3/5] docs: flesh out raw format driver description

2023-02-01 Thread Stefan Hajnoczi
Modernize the description and document the size=/offset= runtime options. Signed-off-by: Stefan Hajnoczi --- docs/system/qemu-block-drivers.rst.inc | 32 ++ 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/docs/system/qemu-block-drivers.rst.inc b/docs/syste

[PATCH 5/5] docs: add throttle filter description

2023-02-01 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi --- docs/system/qemu-block-drivers.rst.inc | 110 + 1 file changed, 110 insertions(+) diff --git a/docs/system/qemu-block-drivers.rst.inc b/docs/system/qemu-block-drivers.rst.inc index af72817763..ea4be5c210 100644 --- a/docs/system/qemu-bl

[PATCH 2/5] docs: differentiate between block driver create and runtime opts

2023-02-01 Thread Stefan Hajnoczi
Options available with qemu-img create -o ... are called create options. They affect how the image file is created on disk. Options available with --blockdev ... are called runtime options. They affect how the open blockdev behaves. The documentation makes no distinction is made between the two.

[PATCH 4/5] docs: flesh out qcow2 format driver description

2023-02-01 Thread Stefan Hajnoczi
Put the create options in alphabetical order, add compression_type and extended_l2, and also mention the common runtime options. I did not add rarely-used runtime options because I think it's too much information. Signed-off-by: Stefan Hajnoczi --- docs/system/qemu-block-drivers.rst.inc | 91 +++

Re: [PATCH] target/riscv: Add RVV registers to log

2023-02-01 Thread Richard Henderson
On 2/1/23 04:24, Ivan Klokov wrote: + * @CPU_DUMP_RVV: dump RISC-V RVV registers */ enum CPUDumpFlags { CPU_DUMP_CODE = 0x0001, CPU_DUMP_FPU = 0x0002, CPU_DUMP_CCOP = 0x0004, +CPU_DUMP_RVV = 0x0008, We're certainly not going to call this "RVV", as th

Re: An issue with x86 tcg and MMIO

2023-02-01 Thread Richard Henderson
On 2/1/23 05:24, Jørgen Hansen wrote: Hello Richard, We are using x86 qemu to test some CXL stuff, and in that process we are running into an issue with tcg. In qemu, CXL memory is mapped as an MMIO region, so when using CXL memory as part of the system memory, application code and data can be s

Re: [PATCH 4/4] hw/misc/macio: Return bool from functions taking errp

2023-02-01 Thread Mark Cave-Ayland
On 18/01/2023 00:32, BALATON Zoltan wrote: Use the convention to return bool from functions which take an error pointer which allows for callers to pass through their error pointer without needing a local. Signed-off-by: BALATON Zoltan --- hw/misc/macio/macio.c | 62 +

Re: [PATCH v7 3/7] mac_{old,new}world: Pass MacOS VGA NDRV in card ROM instead of fw_cfg

2023-02-01 Thread Mark Cave-Ayland
On 24/01/2023 00:13, BALATON Zoltan wrote: On Mon, 23 Jan 2023, Mark Cave-Ayland wrote: On 22/01/2023 22:16, BALATON Zoltan wrote: The problem you are ultimately trying to solve though is that OpenBIOS is loading the NDRV for all VGA PCI devices, so why not just fix drivers/vga.fs so that the

Re: [PATCH] mac_nvram: Add block backend to persist NVRAM contents

2023-02-01 Thread Mark Cave-Ayland
On 19/01/2023 22:28, BALATON Zoltan wrote: Add a way to set a backing store for the mac_nvram similar to what spapr_nvram or mac_via PRAM already does to allow to save its contents between runs. Use -drive file=nvram.img,format=raw,if=mtd to specify backing file where nvram.img must be MACIO_NVR

Re: [PATCH v7 0/7] Misc ppc/mac machines clean up

2023-02-01 Thread Mark Cave-Ayland
On 04/01/2023 21:59, BALATON Zoltan wrote: This is the remainder of the series that were postponed to after the freeze the last time I've tried to submit them with some new patches I did meanwhile. BALATON Zoltan (7): input/adb: Only include header where needed mac_{old,new}world: Use loc

Re: [PATCH 0/4] Misc macio clean ups

2023-02-01 Thread Mark Cave-Ayland
On 18/01/2023 00:32, BALATON Zoltan wrote: Just some small trivial clean ups that I've found while looking at hw/misc/macio/macio.c Regards, BALATON Zoltan BALATON Zoltan (4): hw/misc/macio: Avoid some QOM casts hw/misc/macio: Rename sysbus_dev to sbd for consistency and brevity hw/mi

Re: [PATCH 4/4] hw/misc/macio: Return bool from functions taking errp

2023-02-01 Thread BALATON Zoltan
On Wed, 1 Feb 2023, Mark Cave-Ayland wrote: On 18/01/2023 00:32, BALATON Zoltan wrote: Use the convention to return bool from functions which take an error pointer which allows for callers to pass through their error pointer without needing a local. Signed-off-by: BALATON Zoltan --- hw/misc/

Re: [PATCH v7 0/7] Misc ppc/mac machines clean up

2023-02-01 Thread BALATON Zoltan
On Wed, 1 Feb 2023, Mark Cave-Ayland wrote: On 04/01/2023 21:59, BALATON Zoltan wrote: This is the remainder of the series that were postponed to after the freeze the last time I've tried to submit them with some new patches I did meanwhile. BALATON Zoltan (7): input/adb: Only include header

[PATCH v2 2/2] mac_oldworld: Allow specifying nvram backing store

2023-02-01 Thread BALATON Zoltan
Add a way to set a backing store for the mac_nvram. Use -drive file=nvram.img,format=raw,if=mtd to specify backing file where nvram.img must be MACIO_NVRAM_SIZE which is 8192 bytes. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/ppc/mac_oldworld.c | 8 +++- 1 file

Re: [PATCH] hw/riscv: boot: Don't use CSRs if they are disabled

2023-02-01 Thread Alistair Francis
On Tue, Jan 31, 2023 at 10:31 PM Bin Meng wrote: > > On Mon, Jan 30, 2023 at 7:19 AM Alistair Francis wrote: > > > > On Thu, Jan 26, 2023 at 10:03 PM Bin Meng wrote: > > > > > > On Tue, Jan 24, 2023 at 9:42 AM Alistair Francis > > > wrote: > > > > > > > > On Tue, Jan 24, 2023 at 11:24 AM Bin M

[PATCH v2 0/2] mac_nvram: Add block backend to persist NVRAM contents

2023-02-01 Thread BALATON Zoltan
Same as v1 just split in two patches as suggested by Mark. Regards, BALATON Zoltan BALATON Zoltan (2): mac_nvram: Add block backend to persist NVRAM contents mac_oldworld: Allow specifying nvram backing store hw/nvram/mac_nvram.c | 28 hw/ppc/mac_oldworl

[PATCH v2 1/2] mac_nvram: Add block backend to persist NVRAM contents

2023-02-01 Thread BALATON Zoltan
Add a way to set a backing store for the mac_nvram similar to what spapr_nvram or mac_via PRAM already does to allow to save its contents between runs. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/nvram/mac_nvram.c | 28 include/

Re: [PATCH v9 1/3] hw/riscv: clear kernel_entry higher bits from load_elf_ram_sym()

2023-02-01 Thread Alistair Francis
On Wed, Feb 1, 2023 at 11:48 PM Daniel Henrique Barboza wrote: > > > > On 1/31/23 21:16, Alistair Francis wrote: > > On Fri, Jan 20, 2023 at 7:38 AM Daniel Henrique Barboza > > wrote: > >> > >> load_elf_ram_sym() will sign-extend 32 bit addresses. If a 32 bit > >> QEMU guest happens to be running

Re: [PATCH v2] target/riscv: set tval for triggered watchpoints

2023-02-01 Thread Alistair Francis
On Wed, Feb 1, 2023 at 3:35 AM Sergey Matyukevich wrote: > > From: Sergey Matyukevich > > According to priviledged spec, if [sm]tval is written with a nonzero > value when a breakpoint exception occurs, then [sm]tval will contain > the faulting virtual address. Set tval to hit address when breakp

Re: [PATCH v2] target/riscv: set tval for triggered watchpoints

2023-02-01 Thread Alistair Francis
On Wed, Feb 1, 2023 at 3:35 AM Sergey Matyukevich wrote: > > From: Sergey Matyukevich > > According to priviledged spec, if [sm]tval is written with a nonzero > value when a breakpoint exception occurs, then [sm]tval will contain > the faulting virtual address. Set tval to hit address when breakp

Re: [PATCH v7 3/7] mac_{old,new}world: Pass MacOS VGA NDRV in card ROM instead of fw_cfg

2023-02-01 Thread BALATON Zoltan
On Wed, 1 Feb 2023, Mark Cave-Ayland wrote: On 24/01/2023 00:13, BALATON Zoltan wrote: On Mon, 23 Jan 2023, Mark Cave-Ayland wrote: On 22/01/2023 22:16, BALATON Zoltan wrote: The problem you are ultimately trying to solve though is that OpenBIOS is loading the NDRV for all VGA PCI devices, so

Re: [PATCH v9 3/5] riscv: Allow user to set the satp mode

2023-02-01 Thread Alistair Francis
On Wed, Feb 1, 2023 at 1:13 AM Alexandre Ghiti wrote: > > RISC-V specifies multiple sizes for addressable memory and Linux probes for > the machine's support at startup via the satp CSR register (done in > csr.c:validate_vm). > > As per the specification, sv64 must support sv57, which in turn must

[PATCH 09/14] linux-user/sparc: Handle priviledged opcode trap

2023-02-01 Thread Richard Henderson
For the most part priviledged opcodes are ifdefed out of the user-only sparc translator, which will then incorrectly produce illegal opcode traps. But there are some code paths that properly raise TT_PRIV_INSN, so we must handle it. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop

[PATCH 02/14] linux-user/sparc: Tidy syscall trap

2023-02-01 Thread Richard Henderson
Use TT_TRAP. For sparc32, 0x88 is the "Slowaris" system call, currently BAD_TRAP in the kernel's ttable_32.S. For sparc64, 0x110 is tl0_linux32, the sparc32 trap, as also seen in the adjacent code. We do not implement multiple abis, so treat this as !defined(CONFIG_COMPAT), which vectors this ca

[PATCH 00/14] linux-user/sparc: Handle missing traps

2023-02-01 Thread Richard Henderson
Lots of missing trap code for cpu_loop(). r~ Richard Henderson (14): linux-user/sparc: Raise SIGILL for all unhandled software traps linux-user/sparc: Tidy syscall trap linux-user/sparc: Use TT_TRAP for flush windows linux-user/sparc: Tidy window spill/fill traps linux-user/sparc: Fix s

[PATCH 12/14] linux-user/sparc: Handle unimplemented flush trap

2023-02-01 Thread Richard Henderson
For sparc64, TT_UNIMP_FLUSH == TT_ILL_INSN, so this is already handled. For sparc32, the kernel uses SKIP_TRAP. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index

[PATCH 06/14] linux-user/sparc: Handle software breakpoint trap

2023-02-01 Thread Richard Henderson
This is 'ta 1' for both v9 and pre-v9. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index 493845fe76..573d97c60b 100644 --- a/linux-user/sparc

[PATCH 07/14] linux-user/sparc: Handle division by zero traps

2023-02-01 Thread Richard Henderson
In addition to the hw trap vector, there is a software trap assigned for older sparc without hw division instructions. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 5 + 1 file changed, 5 insertions(+) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop

[PATCH 05/14] linux-user/sparc: Fix sparc64_{get,set}_context traps

2023-02-01 Thread Richard Henderson
These traps are present for sparc64 with ilp32, aka sparc32plus. Enabling them means adjusting the defines over in signal.c, and fixing an incorrect usage of abi_ulong when we really meant the full register, target_ulong. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 23

[PATCH 11/14] linux-user/sparc: Handle coprocessor disabled trap

2023-02-01 Thread Richard Henderson
Since qemu does not implement a sparc coprocessor, all such instructions raise this trap. Because of that, we never raise the coprocessor exception trap, which would be vector 0x28. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 4 1 file changed, 4 insertions(+) diff

[PATCH 08/14] linux-user/sparc: Handle getcc, setcc, getpsr traps

2023-02-01 Thread Richard Henderson
These are really only meaningful for sparc32, but they're still present for backward compatibility for sparc64. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 62 +++-- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/linux-user/s

[PATCH 10/14] linux-user/sparc: Handle privilidged action trap

2023-02-01 Thread Richard Henderson
This is raised by using an %asi < 0x80 in user-mode. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index 3af791455f..42e92ef859 100644 --- a/linux-user/sparc/cpu

[PATCH 04/14] linux-user/sparc: Tidy window spill/fill traps

2023-02-01 Thread Richard Henderson
Add some macros to localize the hw difference between v9 and pre-v9. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index a94b

[PATCH 14/14] linux-user/sparc: Handle tag overflow traps

2023-02-01 Thread Richard Henderson
This trap is raised by taddcctv and tsubcctv insns. Signed-off-by: Richard Henderson --- linux-user/sparc/target_signal.h | 2 +- linux-user/syscall_defs.h| 5 + linux-user/sparc/cpu_loop.c | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/linux-user/sparc/t

[PATCH 03/14] linux-user/sparc: Use TT_TRAP for flush windows

2023-02-01 Thread Richard Henderson
The v9 and pre-v9 code can be unified with this macro. Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/linux-user/sparc/cpu_loop.c b/linux-user/sparc/cpu_loop.c index 18d5c24af1..a94bffc583 100644 --- a/l

[PATCH 13/14] linux-user/sparc: Handle floating-point exceptions

2023-02-01 Thread Richard Henderson
Raise SIGFPE for ieee exceptions. The other types, such as FSR_FTT_UNIMPFPOP, should not appear, because we enable normal emulation of missing insns at the start of sparc_cpu_realizefn(). Signed-off-by: Richard Henderson --- target/sparc/cpu.h | 3 +-- linux-user/sparc/cpu_loop.c | 22

[PATCH 01/14] linux-user/sparc: Raise SIGILL for all unhandled software traps

2023-02-01 Thread Richard Henderson
The linux kernel's trap tables vector all unassigned trap numbers to BAD_TRAP, which then raises SIGILL. Reported-by: Ilya Leoshkevich Signed-off-by: Richard Henderson --- linux-user/sparc/cpu_loop.c | 8 1 file changed, 8 insertions(+) diff --git a/linux-user/sparc/cpu_loop.c b/linux

Re: [PATCH] vhost-user-fs: add capability to allow migration

2023-02-01 Thread Anton Kuchin
On 01/02/2023 16:26, Juan Quintela wrote: Anton Kuchin wrote: On 19/01/2023 18:02, Stefan Hajnoczi wrote: On Thu, 19 Jan 2023 at 10:29, Anton Kuchin wrote: On 19/01/2023 16:30, Stefan Hajnoczi wrote: On Thu, 19 Jan 2023 at 07:43, Anton Kuchin wrote: On 18/01/2023 17:52, Stefan Hajnoczi wr

Re: [RFC v2 12/13] vdpa: preemptive kick at enable

2023-02-01 Thread Si-Wei Liu
On 1/13/2023 1:06 AM, Eugenio Perez Martin wrote: On Fri, Jan 13, 2023 at 4:39 AM Jason Wang wrote: On Fri, Jan 13, 2023 at 11:25 AM Zhu, Lingshan wrote: On 1/13/2023 10:31 AM, Jason Wang wrote: On Fri, Jan 13, 2023 at 1:27 AM Eugenio Pérez wrote: Spuriously kick the destination devic

Re: [RFC v2 00/13] Dinamycally switch to vhost shadow virtqueues at vdpa net migration

2023-02-01 Thread Si-Wei Liu
On 1/12/2023 9:24 AM, Eugenio Pérez wrote: It's possible to migrate vdpa net devices if they are shadowed from the start. But to always shadow the dataplane is effectively break its host passthrough, so its not convenient in vDPA scenarios. This series enables dynamically switching to sh

Re: [PATCH v5 3/3] hw/riscv: change riscv_compute_fdt_addr() semantics

2023-02-01 Thread Alistair Francis
On Thu, Feb 2, 2023 at 3:13 AM Daniel Henrique Barboza wrote: > > As it is now, riscv_compute_fdt_addr() is receiving a dram_base, a > mem_size (which is defaulted to MachineState::ram_size in all boards) > and the FDT pointer. And it makes a very important assumption: the DRAM > interval dram_bas

Re: [PATCH 02/14] linux-user/sparc: Tidy syscall trap

2023-02-01 Thread Richard Henderson
On 2/1/23 14:51, Richard Henderson wrote: Use TT_TRAP. For sparc32, 0x88 is the "Slowaris" system call, currently BAD_TRAP in the kernel's ttable_32.S. For sparc64, 0x110 is tl0_linux32, the sparc32 trap, as also seen in the adjacent code. We do not implement multiple abis, so treat this as !d

Re: [RFC v2 11/13] vdpa: add vdpa net migration state notifier

2023-02-01 Thread Si-Wei Liu
On 1/12/2023 9:24 AM, Eugenio Pérez wrote: This allows net to restart the device backend to configure SVQ on it. Ideally, these changes should not be net specific. However, the vdpa net backend is the one with enough knowledge to configure everything because of some reasons: * Queues might ne

Re: [PATCH v5 0/3] riscv_load_fdt() semantics change

2023-02-01 Thread Alistair Francis
On Thu, Feb 2, 2023 at 3:12 AM Daniel Henrique Barboza wrote: > > Hi, > > This version contains changed proposed by Bin in the v4 review. > > Patches are based on riscv-to-apply.next. > > Changes from v4: > - patch 1: > - remove the fdt_pack() related lines instead of letting patch 2 do it > - p

Re: [SeaBIOS] [SeaBIOS PATCH] xen: require Xen info structure at 0x1000 to detect Xen

2023-02-01 Thread Kevin O'Connor
On Fri, Jan 20, 2023 at 11:33:19AM +, David Woodhouse wrote: > From: David Woodhouse > > When running under Xen, hvmloader places a table at 0x1000 with the e820 > information and BIOS tables. If this isn't present, SeaBIOS will > currently panic. > > We now have support for running Xen gue

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-02-01 Thread Jason Wang
On Wed, Feb 1, 2023 at 2:56 PM Eugenio Perez Martin wrote: > > On Wed, Feb 1, 2023 at 4:27 AM Jason Wang wrote: > > > > On Wed, Feb 1, 2023 at 3:10 AM Eugenio Perez Martin > > wrote: > > > > > > Hi, > > > > > > The current approach of offering an emulated CVQ to the guest and map > > > the comm

[PATCH 1/1] target/loongarch: LL.{W/D} need writes val to dest register after sign extension

2023-02-01 Thread Song Gao
The Manual 2.2.7.2: 'The LL.{W/D} instruction retrieves a word/double-word data from the specified address of the memory and writes it to the general register rd after sign extension.' Signed-off-by: Song Gao --- target/loongarch/insn_trans/trans_atomic.c.inc | 2 +- 1 file changed,

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-02-01 Thread Jason Wang
在 2023/2/1 15:49, Eugenio Perez Martin 写道: On Wed, Feb 1, 2023 at 4:29 AM Jason Wang wrote: On Wed, Feb 1, 2023 at 3:11 AM Eugenio Perez Martin wrote: On Tue, Jan 31, 2023 at 8:10 PM Eugenio Perez Martin wrote: Hi, The current approach of offering an emulated CVQ to the guest and map the

Re: Emulating device configuration / max_virtqueue_pairs in vhost-vdpa and vhost-user

2023-02-01 Thread Jason Wang
在 2023/2/1 19:48, Eugenio Perez Martin 写道: On Wed, Feb 1, 2023 at 12:20 PM Michael S. Tsirkin wrote: On Wed, Feb 01, 2023 at 12:14:18PM +0100, Maxime Coquelin wrote: Thanks Eugenio for working on this. On 1/31/23 20:10, Eugenio Perez Martin wrote: Hi, The current approach of offering an e

[PATCH 10/10] MAINTAINERS: Add entry for RISC-V ACPI

2023-02-01 Thread Sunil V L
RISC-V ACPI related functionality for virt machine is added in virt-acpi-build.c. Add the maintainer entry. Signed-off-by: Sunil V L --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index c581c11a64..23fcaaf54a 100644 --- a/MAINTAINERS +++ b/MAI

[PATCH 02/10] hw/riscv/virt: Add a switch to enable/disable ACPI

2023-02-01 Thread Sunil V L
ACPI is optional. So, add a switch to toggle. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 38 ++ include/hw/riscv/virt.h | 2 ++ 2 files changed, 40 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 7ad9fda20c..84962962ff 100644 -

[PATCH 06/10] hw/riscv/virt: virt-acpi-build.c: Add RHCT Table

2023-02-01 Thread Sunil V L
RISC-V ACPI platforms need to provide RISC-V Hart Capabilities Table (RHCT). Add this to the ACPI tables. Signed-off-by: Sunil V L --- hw/riscv/virt-acpi-build.c | 62 ++ 1 file changed, 62 insertions(+) diff --git a/hw/riscv/virt-acpi-build.c b/hw/riscv/virt

[PATCH 09/10] hw/riscv/virt.c: Initialize the ACPI tables

2023-02-01 Thread Sunil V L
When the "acpi=on", ACPI tables need to be added. Detect the option and initialize the ACPI tables. Signed-off-by: Sunil V L --- hw/riscv/virt.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 26caea59ff..f1f5612c69 100644 --- a/hw/riscv/virt.c +++

[PATCH 07/10] hw/riscv: meson.build: Build virt-acpi-build.c

2023-02-01 Thread Sunil V L
ACPI functions are defined in new file virt-acpi-build.c. Enable it to be built as part of virt machine if CONFIG_ACPI is set. Signed-off-by: Sunil V L --- hw/riscv/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/riscv/meson.build b/hw/riscv/meson.build index ab6cae57ea..2f7ee

[PATCH 08/10] hw/riscv/Kconfig: virt: Enable ACPI config options

2023-02-01 Thread Sunil V L
Enable ACPI related config options to build ACPI subsystem for virt machine. Signed-off-by: Sunil V L --- hw/riscv/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/riscv/Kconfig b/hw/riscv/Kconfig index 4550b3b938..92b1a9eb64 100644 --- a/hw/riscv/Kconfig +++ b/hw/riscv/Kconfig

<    1   2   3   4   >