Re: [PATCH v8 08/11] virtio-gpu: Handle resource blob commands

2024-05-04 Thread Akihiko Odaki
On 2024/05/02 4:20, Dmitry Osipenko wrote: On 4/27/24 08:52, Akihiko Odaki wrote: On 2024/04/24 19:30, Dmitry Osipenko wrote: On 4/19/24 12:18, Akihiko Odaki wrote: @@ -61,6 +61,10 @@ struct virtio_gpu_simple_resource {    int dmabuf_fd;    uint8_t *remapped;    +    MemoryRegion *m

Re: [PATCH v8 07/11] virtio-gpu: Support suspension of commands processing

2024-05-04 Thread Akihiko Odaki
On 2024/05/02 4:02, Dmitry Osipenko wrote: On 4/27/24 08:48, Akihiko Odaki wrote: The VIRTIO_GPU_FILL_CMD() macro returns void and this macro is used by every function processing commands. Changing process_cmd() to return bool will require to change all those functions. Not worthwhile to change

Re: [PATCH] Fixes: Indentation using TABs and improve formatting

2024-05-04 Thread Tanmay
Hi, I completely agree! This was more of a "NEWCOMERS" issue to help us understand how the patch flow works. I'll take up a trivial issue and work on it instead. Thanks, Tanmay On Sun, 5 May 2024 at 02:05, Michael Tokarev wrote: > 04.05.2024 21:58, Tanmay wrote: > > Hi, > > > > I have attached

Re: [PULL 0/9] target/alpha: Implement CF_PCREL

2024-05-04 Thread Richard Henderson
gitlab.com/rth7680/qemu.git tags/pull-axp-20240504 for you to fetch changes up to 23bb086350c0de390f77dd034d775742314cabd7: target/alpha: Implement CF_PCREL (2024-05-04 08:05:51 -0700) target/alpha: Implement CF_PCREL Appli

Re: [PATCH] Fixes: Indentation using TABs and improve formatting

2024-05-04 Thread Michael Tokarev
04.05.2024 21:58, Tanmay wrote: Hi, I have attached a patch file that fixes indentation and formatting for some files as listed in https://gitlab.com/qemu-project/qemu/-/issues/373 . it is sort of good you posted this patch to stable@. It ha

[PATCH v10 06/10] virtio-gpu: Support blob scanout using dmabuf fd

2024-05-04 Thread Dmitry Osipenko
From: Robert Beckett Support displaying blob resources by handling SET_SCANOUT_BLOB command. Signed-by: Antonio Caggiano Signed-off-by: Robert Beckett Signed-off-by: Huang Rui Reviewed-by: Antonio Caggiano Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c | 109

[PATCH v10 02/10] virtio-gpu: Use pkgconfig version to decide which virgl features are available

2024-05-04 Thread Dmitry Osipenko
New virglrerenderer features were stabilized with release of v1.0.0. Presence of symbols in virglrenderer.h doesn't guarantee ABI compatibility with pre-release development versions of libvirglerender. Use virglrenderer version to decide reliably which virgl features are available. Signed-off-by:

[PATCH v10 04/10] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled

2024-05-04 Thread Dmitry Osipenko
The udmabuf usage is mandatory when virgl is disabled and blobs feature enabled in the Qemu machine configuration. If virgl and blobs are enabled, then udmabuf requirement is optional. Since udmabuf isn't widely supported by a popular Linux distros today, let's relax the udmabuf requirement for blo

[PATCH v10 08/10] virtio-gpu: Handle resource blob commands

2024-05-04 Thread Dmitry Osipenko
From: Antonio Caggiano Support BLOB resources creation, mapping and unmapping by calling the new stable virglrenderer 0.10 interface. Only enabled when available and via the blob config. E.g. -device virtio-vga-gl,blob=true Signed-off-by: Antonio Caggiano Signed-off-by: Xenia Ragiadakou Signed

[PATCH v10 01/10] virtio-gpu: Unrealize GL device

2024-05-04 Thread Dmitry Osipenko
Even though GL GPU doesn't support hotplugging today, free virgl resources when GL device is unrealized. For consistency. Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-gl.c | 11 +++ hw/display/virtio-gpu-virgl.c | 9 + include/hw/virtio/virtio-gpu.h | 1 + 3 fi

[PATCH v10 07/10] virtio-gpu: Support suspension of commands processing

2024-05-04 Thread Dmitry Osipenko
Add new "suspended" flag to virtio_gpu_ctrl_command telling cmd processor that it should stop processing commands and retry again next time until flag is unset. Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-gl.c | 1 + hw/display/virtio-gpu-rutabaga.c | 1 + hw/display/virtio-gp

[PATCH v10 09/10] virtio-gpu: Register capsets dynamically

2024-05-04 Thread Dmitry Osipenko
From: Pierre-Eric Pelloux-Prayer virtio_gpu_virgl_get_num_capsets will return "num_capsets", but we can't assume that capset_index 1 is always VIRGL2 once we'll support more capsets, like Venus and DRM capsets. Register capsets dynamically to avoid that problem. Signed-off-by: Pierre-Eric Pellou

[PATCH v10 03/10] virtio-gpu: Support context-init feature with virglrenderer

2024-05-04 Thread Dmitry Osipenko
From: Huang Rui Patch "virtio-gpu: CONTEXT_INIT feature" has added the context_init feature flags. Expose this feature and support creating virglrenderer context with flags using context_id if libvirglrenderer is new enough. Originally-by: Antonio Caggiano Signed-off-by: Huang Rui Reviewed-by:

[PATCH v10 05/10] virtio-gpu: Add virgl resource management

2024-05-04 Thread Dmitry Osipenko
From: Huang Rui In a preparation to adding host blobs support to virtio-gpu, add virgl resource management that allows to retrieve resource based on its ID and virgl resource wrapper on top of simple resource that will be contain fields specific to virgl. Signed-off-by: Huang Rui Reviewed-by: A

[PATCH v10 10/10] virtio-gpu: Support Venus context

2024-05-04 Thread Dmitry Osipenko
From: Antonio Caggiano Request Venus when initializing VirGL and if venus=true flag is set for virtio-gpu-gl device. Signed-off-by: Antonio Caggiano Signed-off-by: Huang Rui Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-gl.c | 2 ++ hw/display/virtio-gpu-virgl.c | 22 +++

[PATCH v10 00/10] Support blob memory and venus on qemu

2024-05-04 Thread Dmitry Osipenko
Hello, This series enables Vulkan Venus context support on virtio-gpu. All virglrender and almost all Linux kernel prerequisite changes needed by Venus are already in upstream. For kernel there is a pending KVM patchset that fixes mapping of compound pages needed for DRM drivers using TTM [1], ot

[PULL 1/9] target/alpha: Use cpu_env in preference to ALPHA_CPU

2024-05-04 Thread Richard Henderson
ALPHA_CPU has a dynamic object type assert, which is unnecessary considering that these are all class hooks. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240503072014.24751-2-phi...@linaro.org> --- target/alpha/cpu.c

[PULL 3/9] target/alpha: Use DISAS_NEXT definition instead of magic '0' value

2024-05-04 Thread Richard Henderson
Signed-off-by: Richard Henderson Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org> [PMD: Split bigger patch, part 1/5] Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240503072014.24751-4-phi...@linaro.org> --- target/alpha/translate.c | 6 -- 1 file changed, 4 insertio

[PULL 9/9] target/alpha: Implement CF_PCREL

2024-05-04 Thread Richard Henderson
Signed-off-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240503072014.24751-10-phi...@linaro.org> --- target/alpha/cpu.c | 23 ++- target/alpha/translate.c | 29 + 2 files chan

[PULL 0/9] target/alpha: Implement CF_PCREL

2024-05-04 Thread Richard Henderson
The following changes since commit 97c872276d147c882296f5da245bd8432f1582f6: Merge tag 'accel-sh4-ui-20240503' of https://github.com/philmd/qemu into staging (2024-05-03 14:42:50 -0700) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-axp-202

[PULL 4/9] target/alpha: Inline DISAS_PC_UPDATED and return DISAS_NORETURN

2024-05-04 Thread Richard Henderson
Inline DISAS_PC_UPDATED switch case from alpha_tr_tb_stop(): switch (ctx->base.is_jmp) { ... case DISAS_PC_UPDATED: tcg_gen_lookup_and_goto_ptr(); break; Signed-off-by: Richard Henderson Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org> [PMD: Split bi

[PULL 8/9] target/alpha: Split out gen_pc_disp

2024-05-04 Thread Richard Henderson
Prepare for pcrel by not modifying cpu_pc before use, in the case of JSR. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240503072014.24751-9-phi...@linaro.org> --- target/alpha/translate.c | 41 ++--

[PULL 7/9] target/alpha: Split out gen_goto_tb

2024-05-04 Thread Richard Henderson
Signed-off-by: Richard Henderson Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org> [PMD: Split bigger patch, part 5/5] Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20240503072014.24751-8-phi...@linaro.org> --- target/alpha/translate.c |

[PULL 5/9] target/alpha: Return DISAS_NORETURN once

2024-05-04 Thread Richard Henderson
Trivial change to make next commits easier to understand. Signed-off-by: Richard Henderson Message-Id: <20240424234436.995410-4-richard.hender...@linaro.org> [PMD: Split bigger patch, part 3/5] Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240503072014.24751-6-phi...@linaro.org> --- targ

[PULL 6/9] target/alpha: Simplify gen_bcond_internal()

2024-05-04 Thread Richard Henderson
From: Philippe Mathieu-Daudé Richard Henderson explained on IRC: bcond_internal() used to insist that both branch destination and branch fallthrough are use_goto_tb; if not, we'd use movcond to compute an indirect jump. But it's perfectly fine for e.g. the branch fallthrough to use_got

[PULL 2/9] target/alpha: Hoist branch shift to initial decode

2024-05-04 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20240503072014.24751-3-phi...@linaro.org> --- target/alpha/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/alpha/translate.c b/tar

Re: [PATCH v2 6/9] target/alpha: Simplify gen_bcond_internal()

2024-05-04 Thread Richard Henderson
On 5/3/24 00:20, Philippe Mathieu-Daudé wrote: Richard Henderson explained on IRC: bcond_internal() used to insist that both branch destination and branch fallthrough are use_goto_tb; if not, we'd use movcond to compute an indirect jump. But it's perfectly fine for e.g. the branch fa

Re: [PATCH] hw/arm/npcm7xx: remove setting of mp-affinity

2024-05-04 Thread Richard Henderson
On 5/4/24 07:17, Dorjoy Chowdhury wrote: The value of the mp-affinity property being set in npcm7xx_realize is always the same as the default value it would have when arm_cpu_realizefn is called if the property is not set here. So there is no need to set the property value in npcm7xx_realize func

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-04 Thread Dorjoy Chowdhury
On Sat, May 4, 2024 at 7:31 PM Peter Maydell wrote: > > On Fri, 3 May 2024 at 19:14, Dorjoy Chowdhury wrote: > > > > On Fri, May 3, 2024 at 10:28 PM Peter Maydell > > wrote: > > > In the meantime, there is one tiny bit of this that we can > > > do now: > > > > > > > diff --git a/hw/arm/npcm7xx.

[PATCH] hw/arm/npcm7xx: remove setting of mp-affinity

2024-05-04 Thread Dorjoy Chowdhury
The value of the mp-affinity property being set in npcm7xx_realize is always the same as the default value it would have when arm_cpu_realizefn is called if the property is not set here. So there is no need to set the property value in npcm7xx_realize function. Signed-off-by: Dorjoy Chowdhury ---

Re: [PATCH V8 6/8] physmem: Add helper function to destroy CPU AddressSpace

2024-05-04 Thread Peter Maydell
On Tue, 12 Mar 2024 at 02:02, Salil Mehta wrote: > > Virtual CPU Hot-unplug leads to unrealization of a CPU object. This also > involves destruction of the CPU AddressSpace. Add common function to help > destroy the CPU AddressSpace. > > Signed-off-by: Salil Mehta > Tested-by: Vishnu Pajjuri > R

Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT

2024-05-04 Thread Peter Maydell
On Fri, 3 May 2024 at 19:14, Dorjoy Chowdhury wrote: > > On Fri, May 3, 2024 at 10:28 PM Peter Maydell > wrote: > > In the meantime, there is one tiny bit of this that we can > > do now: > > > > > diff --git a/hw/arm/npcm7xx.c b/hw/arm/npcm7xx.c > > > index cc68b5d8f1..9d5dcf1a3f 100644 > > > --

Re: [PATCH v3] target/i386: Fix CPUID encoding of Fn8000001E_ECX

2024-05-04 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v2 0/5] vvfat: Fix write bugs for large files and add iotests

2024-05-04 Thread Amjad Alsharafi
Explaination of the patch list: These patches fix some bugs found when modifying files in vvfat. First, there was a bug when writing to the cluster 2 or above of a file, it will copy the cluster before it instead, so, when writing to cluster=2, the content of cluster=1 will be copied into disk ins

[PATCH v2 4/5] iotests: Add `vvfat` tests

2024-05-04 Thread Amjad Alsharafi
Added several tests to verify the implementation of the vvfat driver. We needed a way to interact with it, so created a basic `fat16.py` driver that handled writing correct sectors for us. Signed-off-by: Amjad Alsharafi --- tests/qemu-iotests/check | 2 +- tests/qemu-iotests/fat16.

[PATCH v2 5/5] iotests: Filter out `vvfat` fmt from failing tests

2024-05-04 Thread Amjad Alsharafi
`vvfat` is a special format and not all tests (even generic) can run without crashing. So, added `unsupported_fmt: vvfat` to all failling tests. Also added `vvfat` format into `meson.build`, vvfaat tests can be run on the `block-thorough` suite. Signed-off-by: Amjad Alsharafi --- .gitlab-ci.d

[PATCH v2 2/5] vvfat: Fix usage of `info.file.offset`

2024-05-04 Thread Amjad Alsharafi
The field is marked as "the offset in the file (in clusters)", but it was being used like this `cluster_size*(nums)+mapping->info.file.offset`, which is incorrect. Additionally, removed the `abort` when `first_mapping_index` does not match, as this matches the case when adding new clusters for fil

[PATCH v2 3/5] vvfat: Fix reading files with non-continuous clusters

2024-05-04 Thread Amjad Alsharafi
When reading with `read_cluster` we get the `mapping` with `find_mapping_for_cluster` and then we call `open_file` for this mapping. The issue appear when its the same file, but a second cluster that is not immediately after it, imagine clusters `500 -> 503`, this will give us 2 mappings one has th

[PATCH v2 0/5] vvfat: Fix write bugs for large files and add iotests

2024-05-04 Thread Amjad Alsharafi
v2: Added iotests for `vvfat` driver along with a simple `fat16` module to run the tests. v1: https://patchew.org/QEMU/20240327201231.31046-1-amjadsharaf...@gmail.com/ Fix the issue of writing to the middle of the file in vvfat Amjad Alsharafi (5): vvfat: Fix bug in writing to middle of

[PATCH v2 1/5] vvfat: Fix bug in writing to middle of file

2024-05-04 Thread Amjad Alsharafi
Before this commit, the behavior when calling `commit_one_file` for example with `offset=0x2000` (second cluster), what will happen is that we won't fetch the next cluster from the fat, and instead use the first cluster for the read operation. This is due to off-by-one error here, where `i=0x2000

Re: [PATCH for-9.0 v3 0/4] target/sh4: Fix mac.[lw]

2024-05-04 Thread Michael Tokarev
06.04.2024 08:37, Richard Henderson wrote: Zack's recent patches, tidied a little bit, and with test cases added. These fixes ended up in stable-8.2, but not in stable-7.2. This is because in 7.2, the context is a bit different. Later, a couple other fixes in this area come from Philippe (Fix

PCIE Memory Information

2024-05-04 Thread Muzammil Ashraf
Hi All, I am debugging a PCI subsystem. I saw callbacks registered here to catch the pcie config read/write request at hw/pci/pci_host.c:201. How can I make my subregion to overlap this area and How to receive those pcie config read/write requests to my callbacks?