Re: [PATCH v8 2/4] target/riscv: implement Zicboz extension

2023-02-24 Thread liweiwei
On 2023/2/24 21:25, Daniel Henrique Barboza wrote: From: Christoph Muellner The RISC-V base cache management operation (CBO) ISA extension has been ratified. It defines three extensions: Cache-Block Management, Cache-Block Prefetch and Cache-Block Zero. More information about the spec can be

Re: [PATCH 0/4] RISCVCPUConfig related cleanups

2023-02-24 Thread liweiwei
On 2023/2/25 01:45, Daniel Henrique Barboza wrote: Hi, These cleanups were suggested by LIU Zhiwei during the review of the RISCV_FEATURE_* cleanups, currently on version 7 [1]. These are dependent on the patch "[PATCH v7 01/10] target/riscv: introduce riscv_cpu_cfg()" from [1] because we use

Re: [PATCH 4/4] target/riscv/csr.c: avoid env_archcpu() usages when reading RISCVCPUConfig

2023-02-24 Thread liweiwei
On 2023/2/25 01:45, Daniel Henrique Barboza wrote: Retrieving the CPU pointer using env_archcpu() just to access cpu->cfg can be avoided by using riscv_cpu_cfg(). Suggested-by: LIU Zhiwei Signed-off-by: Daniel Henrique Barboza Reviewed-by: Weiwei Li Weiwei Li --- target/riscv/csr.c | 3

Re: [PATCH 3/4] target/riscv/csr.c: use riscv_cpu_cfg() to avoid env_cpu() pointers

2023-02-24 Thread liweiwei
On 2023/2/25 01:45, Daniel Henrique Barboza wrote: A common trend in this file is to retrieve a RISCVCPU pointer by first retrieving a CPUState pointer via env_cpu(). The CPU pointer is used only to access the RISCVCPUConfig object and nothing else. Let's use riscv_cpu_cfg() to access what we

Re: [PATCH 2/4] target/riscv/csr.c: simplify mctr()

2023-02-24 Thread liweiwei
On 2023/2/25 01:45, Daniel Henrique Barboza wrote: Use riscv_cpu_cfg() to retrieve pmu_num. Signed-off-by: Daniel Henrique Barboza --- Reviewed-by: Weiwei Li Weiwei Li target/riscv/csr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/riscv/csr.c b/targe

Re: [PATCH 1/4] target/riscv/csr.c: use env_archcpu() in ctr()

2023-02-24 Thread liweiwei
On 2023/2/25 01:45, Daniel Henrique Barboza wrote: We don't need to use env_cpu() and CPUState(). Signed-off-by: Daniel Henrique Barboza --- target/riscv/csr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 75a540bfcb..36

[PATCH v3 2/3] hw/arm: Validate cluster and NUMA node boundary

2023-02-24 Thread Gavin Shan
There are two ARM machines where NUMA is aware: 'virt' and 'sbsa-ref'. Both of them are required to follow cluster-NUMA-node boundary. To enable the validation to warn about the irregular configuration where multiple CPUs in one cluster have been associated with different NUMA nodes. Signed-off-by

[PATCH v3 3/3] hw/riscv: Validate cluster and NUMA node boundary

2023-02-24 Thread Gavin Shan
There are two RISCV machines where NUMA is aware: 'virt' and 'spike'. Both of them are required to follow cluster-NUMA-node boundary. To enable the validation to warn about the irregular configuration where multiple CPUs in one cluster has been associated with multiple NUMA nodes. Signed-off-by: G

[PATCH v3 0/3] NUMA: Apply cluster-NUMA-node boundary for aarch64 and riscv machines

2023-02-24 Thread Gavin Shan
For arm64 and riscv architecture, the driver (/base/arch_topology.c) is used to populate the CPU topology in the Linux guest. It's required that the CPUs in one cluster can't span mutiple NUMA nodes. Otherwise, the Linux scheduling domain can't be sorted out, as the following warning message indica

[PATCH v3 1/3] numa: Validate cluster and NUMA node boundary if required

2023-02-24 Thread Gavin Shan
For some architectures like ARM64, multiple CPUs in one cluster can be associated with different NUMA nodes, which is irregular configuration because we shouldn't have this in baremetal environment. The irregular configuration causes Linux guest to misbehave, as the following warning messages indic

[PATCH v2] hw/display/sm501: Add fallbacks to pixman routines

2023-02-24 Thread BALATON Zoltan
Pixman may return false if it does not have a suitable implementation. Add fallbacks to handle such cases. Also add a property to allow disabling pixman and always use the fallbacks which is useful for testing different drawing methods or debugging pixman related issues. Signed-off-by: BALATON Zol

Re: [PATCH 0/2] ui/kbd-state: QAPI'fy QKbdModifier

2023-02-24 Thread Akihiko Odaki
On 2023/02/24 20:01, Philippe Mathieu-Daudé wrote: QAPI seems designed to maintain such enums, so convert QKbdModifier to be QAPI generated. Besides, this is how QKeyCode is maintained. I recognize QkbdModifier as more like an internal detail of displays so I'm not convinced it should be conve

RE: Future of icount discussion for next KVM call?

2023-02-24 Thread Wang, Wei W
> -Original Message- > From: Wang, Wei W > Sent: Thursday, February 16, 2023 10:36 PM > To: quint...@redhat.com; Alex Bennée > Cc: Paolo Bonzini ; Pavel Dovgalyuk > ; qemu-devel@nongnu.org; Richard Henderson > ; Mark Burton > ; Bill Mills ; Marco > Liebel ; Alexandre Iooss ; > Mahmoud Ma

Re: [PATCH v2 0/4] NUMA: Apply socket-NUMA-node boundary for aarch64 and RiscV machines

2023-02-24 Thread Gavin Shan
On 2/25/23 1:20 AM, Igor Mammedov wrote: On Fri, 24 Feb 2023 21:16:39 +1100 Gavin Shan wrote: On 2/24/23 8:26 PM, Daniel Henrique Barboza wrote: On 2/24/23 04:09, Gavin Shan wrote: On 2/24/23 12:18 AM, Daniel Henrique Barboza wrote: On 2/23/23 05:13, Gavin Shan wrote: For arm64 and RiscV a

Re: [RFC PATCH 10/43] target/loongarch: Implement vaddw/vsubw

2023-02-24 Thread Richard Henderson
On 2/23/23 21:24, gaosong wrote:     {     .fniv = gen_vaddwev_s,     .fno = gen_helper_vaddwev_w_h,     .opt_opc = vecop_list,     .vece = MO_32     },     {     .fniv = gen_vaddwev_s,     .fno = gen_helper_vaddwev_d_w,   

Re: [PATCH v2 00/24] hw/ide: QOM/QDev housekeeping

2023-02-24 Thread Philippe Mathieu-Daudé
ping for 3 patches :) On 20/2/23 10:13, Philippe Mathieu-Daudé wrote: Missing review: 2, 17, 20 Since v1: - addressed review comments John, can I get your formal Ack? Thanks, Phil.

[PATCH][RESEND v3 2/3] Add Hyper-V Dynamic Memory Protocol definitions

2023-02-24 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" This commit adds Hyper-V Dynamic Memory Protocol definitions, taken from hv_balloon Linux kernel driver, adapted to the QEMU coding style and definitions. Signed-off-by: Maciej S. Szmigiero --- include/hw/hyperv/dynmem-proto.h | 423 +++

[PATCH][RESEND v3 3/3] Add a Hyper-V Dynamic Memory Protocol driver (hv-balloon)

2023-02-24 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" This driver is like virtio-balloon on steroids: it allows both changing the guest memory allocation via ballooning and inserting extra RAM into it by adding required memory backends and providing them to the driver. One of advantages of these over ACPI-based PC DIMM h

[PATCH][RESEND v3 1/3] hapvdimm: add a virtual DIMM device for memory hot-add protocols

2023-02-24 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" This device works like a virtual DIMM stick: it allows inserting extra RAM into the guest at run time and later removing it without having to duplicate all of the address space management logic of TYPE_MEMORY_DEVICE in each memory hot-add protocol driver. This device

[PATCH][RESEND v3 0/3] Hyper-V Dynamic Memory Protocol driver (hv-balloon)

2023-02-24 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" This is a rebase/resend of v2 patch series located here: https://lore.kernel.org/qemu-devel/cover.1672878904.git.maciej.szmigi...@oracle.com/ The only changes from v2 are fixing some conflicts around build files (and re-testing). Kconfig.host |

[PATCH] scripts/git.orderfile: Display QAPI script changes before schema ones

2023-02-24 Thread Philippe Mathieu-Daudé
When modifying QAPI scripts and modifying C files along, it makes sense to display QAPI changes first. Signed-off-by: Philippe Mathieu-Daudé --- Failed example: https://lore.kernel.org/qemu-devel/20230224155451.20211-3-phi...@linaro.org/ --- scripts/git.orderfile | 2 ++ 1 file changed, 2 insert

Re: [PATCH 0/4] RISCVCPUConfig related cleanups

2023-02-24 Thread Richard Henderson
On 2/24/23 07:45, Daniel Henrique Barboza wrote: Hi, These cleanups were suggested by LIU Zhiwei during the review of the RISCV_FEATURE_* cleanups, currently on version 7 [1]. These are dependent on the patch "[PATCH v7 01/10] target/riscv: introduce riscv_cpu_cfg()" from [1] because we use the

Re: [PULL 00/29] Block layer patches

2023-02-24 Thread Philippe Mathieu-Daudé
Hi, On 24/2/23 19:50, Peter Maydell wrote: On Thu, 23 Feb 2023 at 18:51, Kevin Wolf wrote: The following changes since commit 79b677d658d3d35e1e776826ac4abb28cdce69b8: Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2023-02-21 11:28:31 +) are available

Re: [PATCH 0/4] RISCVCPUConfig related cleanups

2023-02-24 Thread Richard Henderson
On 2/24/23 07:45, Daniel Henrique Barboza wrote: Hi, These cleanups were suggested by LIU Zhiwei during the review of the RISCV_FEATURE_* cleanups, currently on version 7 [1]. These are dependent on the patch "[PATCH v7 01/10] target/riscv: introduce riscv_cpu_cfg()" from [1] because we use the

[PATCH 1/2] gitlab/opensbi: Move to docker:stable

2023-02-24 Thread Palmer Dabbelt
The OpenSBI build has been using docker:19.03.1, which appears to be old enough that v2 of the manifest is no longer supported. Something has started serving us those manifests, resulting in errors along the lines of $ docker build --cache-from $IMAGE_TAG --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_

[PATCH 0/2] Fix the OpenSBI CI job and bump to v1.2

2023-02-24 Thread Palmer Dabbelt
The OpenSBI version bump found a CI failure, which appears to actually have been related to the Docker version as opposed to the Ubuntu version -- at least assuming my local CI run is accurate (thanks to Thomas for pointing out how to get t

Re: [PATCH 0/2] block/qcow2: QAPI'fy Qcow2DiscardType

2023-02-24 Thread Richard Henderson
On 2/24/23 05:20, Philippe Mathieu-Daudé wrote: QAPI seems designed to maintain such enums, so convert Qcow2DiscardType to be QAPI generated. Besides, this is how Qcow2CompressionType is maintained. Philippe Mathieu-Daudé (2): block/qcow2: Rename QCOW2_DISCARD_TYPE enum definitions block/q

Re: [PULL 00/13] testing updates (gitlab, cirrus, docker, avocado, windows)

2023-02-24 Thread Philippe Mathieu-Daudé
On 24/2/23 20:52, Alex Bennée wrote: Peter Maydell writes: On Thu, 23 Feb 2023 at 15:57, Alex Bennée wrote: The following changes since commit 79b677d658d3d35e1e776826ac4abb28cdce69b8: Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into staging (2023-02-21 11:28:31 +0

Re: [PATCH 2/2] qapi: Generate enum count as definition in gen_enum_lookup()

2023-02-24 Thread Richard Henderson
On 2/24/23 05:54, Philippe Mathieu-Daudé wrote: QAPI's gen_enum() generates QAPI enum values and the number of this values (as foo__MAX). The number of entries in an enum type is not part of the enumerated values, but we generate it as such. See for example: typedef enum OnOffAuto { ON

Re: [PATCH v5 5/5] dump: Add create_win_dump() stub for non-x86 targets

2023-02-24 Thread Richard Henderson
On 2/23/23 21:38, Philippe Mathieu-Daudé wrote: -specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('dump.c'), snappy, lzo]) +softmmu_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('dump.c'), snappy, lzo]) You can remove the when: as well, yes? r~

Re: [PATCH 5/5] hw/audio/via-ac97: Basic implementation of audio playback

2023-02-24 Thread BALATON Zoltan
On Fri, 24 Feb 2023, Daniel Henrique Barboza wrote: On 2/24/23 10:05, BALATON Zoltan wrote: Just for some motivation, this is what we want to make possible for more people with QEMU 8.0: https://youtu.be/YY9RExl4VDI That's neat! This would need at least my SM502 patches and fixing the IRQ r

Re: [PATCH v13 00/60] Xen HVM support under KVM

2023-02-24 Thread David Woodhouse
On Thu, 2023-02-23 at 12:45 +, David Woodhouse wrote: > Lucky version 13, now with a full set of Reviewed-by: tags from Paul for > the Xen side. One minor tweak to the return value of the timer op call. > > Now I think we're just looking to Paolo to approve from the KVM side, > and potentially

[PATCH 4/7] tests/docker: add USER stanzas to non-lci images

2023-02-24 Thread Alex Bennée
These are flat but not generated by lcitool so we need to manually update them with the `useradd` stanza. Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/debian-all-test-cross.docker | 5 + tests/docker/dockerfiles/debian-alpha-cross.docker| 5 + tests/docker/dockerfi

Re: [PULL 00/13] testing updates (gitlab, cirrus, docker, avocado, windows)

2023-02-24 Thread Alex Bennée
Peter Maydell writes: > On Thu, 23 Feb 2023 at 15:57, Alex Bennée wrote: >> >> The following changes since commit 79b677d658d3d35e1e776826ac4abb28cdce69b8: >> >> Merge tag 'net-pull-request' of https://github.com/jasowang/qemu >> into staging (2023-02-21 11:28:31 +) >> >> are available i

[PATCH 3/7] tests/lcitool: append user setting stanza to dockerfiles

2023-02-24 Thread Alex Bennée
For the cross-compilation use-case it is important to add the host user to the dockerfile so we can map them to the docker environment when cross-building files. Signed-off-by: Alex Bennée --- .gitlab-ci.d/cirrus/freebsd-12.vars | 5 + .gitlab-ci.d/cirrus/freebsd-13.vars

Re: [PATCH v2 2/3] qapi: use env var to trigger qapi test output updates

2023-02-24 Thread Eric Blake
On Thu, Feb 23, 2023 at 01:40:26PM +, Daniel P. Berrangé wrote: > It is possible to pass --update to tests/qapi-schema/test-qapi.py > to make it update the output files on error. This is inconvient inconvenient > to achieve though when test-qapi.py is run indirectly by make/meson. > > Instea

Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU

2023-02-24 Thread Joao Martins
On 24/02/2023 15:56, Alex Williamson wrote: > On Fri, 24 Feb 2023 12:53:26 + > Joao Martins wrote: > >> On 24/02/2023 11:25, Joao Martins wrote: >>> On 23/02/2023 23:26, Jason Gunthorpe wrote: On Thu, Feb 23, 2023 at 03:33:09PM -0700, Alex Williamson wrote: > On Thu, 23 Feb 2023

Re: [PATCH v2 00/20] vfio: Add migration pre-copy support and device dirty tracking

2023-02-24 Thread Joao Martins
On 23/02/2023 14:56, Avihai Horon wrote: > On 22/02/2023 22:55, Alex Williamson wrote: >> There are various errors running this through the CI on gitlab. >> >> This one seems bogus but needs to be resolved regardless: >> >> https://gitlab.com/alex.williamson/qemu/-/jobs/3817940731 >> FAILED: lib

Re: [RFC PATCH 10/43] target/loongarch: Implement vaddw/vsubw

2023-02-24 Thread Richard Henderson
On 2/23/23 21:24, gaosong wrote: I was wrong, the instruction is to sign-extend the odd or even elements of the vector before the operation, not to sign-extend the result. E.g vaddwev_h_b  vd, vj, vk vd->H[i] = SignExtend(vj->B[2i])  + SignExtend(vk->B[2i]); vaddwev_w_h  vd, vj, vk vd->W[i] = Si

Re: question: QEMU guest with Virtiofs but without virtiofsd

2023-02-24 Thread Ferenc Fejes
Hi Stefan! On Fri, Feb 24, 2023 at 6:23 PM Stefan Hajnoczi wrote: > > On Fri, 24 Feb 2023 at 11:47, Ferenc Fejes wrote: > > I'm using a QEMU VM with a debootstrap rootfs, shared over virtiofs for > > the guest. My best understanding is that virtiofsd must required even > > if just using one gues

[PATCH v3 06/15] audio: rename variables in audio_pcm_sw_write()

2023-02-24 Thread Volker Rümelin
The audio_pcm_sw_write() function uses a lot of very unspecific variable names. Rename them for better readability. ret => total_in total => total_out size => buf_len hwsamples => hw->mix_buf.size samples => frames_in_max Acked-by: Mark Cave-Ayland Reviewed-by: Marc-André Lureau Signed-off-by:

[PATCH v3 11/15] audio: rename variables in audio_pcm_sw_read()

2023-02-24 Thread Volker Rümelin
The audio_pcm_sw_read() function uses a few very unspecific variable names. Rename them for better readability. ret => total_out total => total_in size => buf_len samples => frames_out_max Acked-by: Mark Cave-Ayland Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- audio/audio.

[PATCH v3 05/15] audio: remove sw == NULL check

2023-02-24 Thread Volker Rümelin
All call sites of audio_pcm_sw_write() guarantee that sw is not NULL. Remove the unnecessary NULL check. Acked-by: Mark Cave-Ayland Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- audio/audio.c | 4 1 file changed, 4 deletions(-) diff --git a/audio/audio.c b/audio/audio.

[PATCH v3 01/15] audio: change type of mix_buf and conv_buf

2023-02-24 Thread Volker Rümelin
Change the type of mix_buf in struct HWVoiceOut and conv_buf in struct HWVoiceIn from STSampleBuffer * to STSampleBuffer. However, a buffer pointer is still needed. For this reason in struct STSampleBuffer samples[] is changed to *buffer. This is a preparation for the next patch. The next patch wi

[PATCH v3 09/15] audio: make playback packet length calculation exact

2023-02-24 Thread Volker Rümelin
Introduce the new function st_rate_frames_in() to calculate the exact number of audio input frames needed to get a given number of audio output frames. The exact number of frames depends only on the difference of opos - ipos and the number of output frames. When downsampling, this function returns

[PATCH v3 14/15] audio/audio_template: substitute sw->hw with hw

2023-02-24 Thread Volker Rümelin
Substitute sw->hw with hw in the audio_pcm_sw_alloc_resources_* functions. Acked-by: Mark Cave-Ayland Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin --- audio/audio_template.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/audio/audio_template.h b/audio

[PATCH v3 13/15] audio: handle leftover audio frame from upsampling

2023-02-24 Thread Volker Rümelin
Upsampling may leave one remaining audio frame in the input buffer. The emulated audio playback devices are currently resposible to write this audio frame again in the next write cycle. Push that task down to audio_pcm_sw_write. This is another step towards an audio callback interface that guarant

[PATCH v3 07/15] audio: don't misuse audio_pcm_sw_write()

2023-02-24 Thread Volker Rümelin
The audio_pcm_sw_write() function is intended to convert a PCM audio stream to the internal representation, adjust the volume, and then mix it with the other audio streams with a possibly changed sample rate in mix_buf. In order for the audio_capture_mix_and_clear() function to use audio_pcm_sw_wri

[PATCH v3 12/15] audio: make recording packet length calculation exact

2023-02-24 Thread Volker Rümelin
Introduce the new function st_rate_frames_out() to calculate the exact number of audio output frames the resampling code can generate from a given number of audio input frames. When upsampling, this function returns the maximum number of output frames. This new function replaces the audio_frontend

[PATCH v3 15/15] audio: remove sw->ratio

2023-02-24 Thread Volker Rümelin
Simplify the resample buffer size calculation. For audio playback we have sw->ratio = ((int64_t)sw->hw->info.freq << 32) / sw->info.freq; samples = ((int64_t)sw->HWBUF.size << 32) / sw->ratio; This can be simplified to samples = muldiv64(sw->HWBUF.size, sw->info.freq, sw->hw->info.freq); For aud

[PATCH v3 02/15] audio: change type and name of the resample buffer

2023-02-24 Thread Volker Rümelin
Change the type of the resample buffer from struct st_sample * to STSampleBuffer. Also change the name from buf to resample_buf for better readability. The new variables resample_buf.size and resample_buf.pos will be used after the next patches. There is no functional change. Acked-by: Mark Cave-

[PATCH v3 10/15] audio: replace the resampling loop in audio_pcm_sw_read()

2023-02-24 Thread Volker Rümelin
Replace the resampling loop in audio_pcm_sw_read() with the new function audio_pcm_sw_resample_in(). Unlike the old resample loop the new function will try to consume input frames even if the output buffer is full. This is necessary when downsampling to avoid reading less audio frames than calculat

[PATCH v3 08/15] audio: remove unused noop_conv() function

2023-02-24 Thread Volker Rümelin
The function audio_capture_mix_and_clear() no longer uses audio_pcm_sw_write() to resample audio frames from one internal buffer to another. For this reason, the noop_conv() function is now unused. Remove it. Acked-by: Mark Cave-Ayland Reviewed-by: Marc-André Lureau Signed-off-by: Volker Rümelin

[PATCH v3 03/15] audio: make the resampling code greedy

2023-02-24 Thread Volker Rümelin
Read the maximum possible number of audio frames instead of the minimum necessary number of frames when the audio stream is downsampled and the output buffer is limited. This makes the function symmetrical to upsampling when the input buffer is limited. The maximum possible number of frames is writ

[PATCH v3 04/15] audio: replace the resampling loop in audio_pcm_sw_write()

2023-02-24 Thread Volker Rümelin
Replace the resampling loop in audio_pcm_sw_write() with the new function audio_pcm_sw_resample_out(). Unlike the old resample loop the new function will try to consume input frames even if the output buffer is full. This is necessary when downsampling to avoid reading less audio frames than calcul

[PULL 1/8] hw/riscv: handle 32 bit CPUs kernel_entry in riscv_load_kernel()

2023-02-24 Thread Palmer Dabbelt
From: Daniel Henrique Barboza Next patch will move all calls to riscv_load_initrd() to riscv_load_kernel(). Machines that want to load initrd will be able to do via an extra flag to riscv_load_kernel(). This change will expose a sign-extend behavior that is happening in load_elf_ram_sym() when r

Re: [PATCH v5 8/8] hw/mem/cxl_type3: Add CXL RAS Error Injection Support.

2023-02-24 Thread Philippe Mathieu-Daudé
On 23/2/23 15:27, Jonathan Cameron wrote: On Thu, 23 Feb 2023 08:37:46 +0100 Markus Armbruster wrote: Thomas Huth writes: On 22/02/2023 19.16, Philippe Mathieu-Daudé wrote: +Thomas (meson) & Marc-André (conditional QAPI) + Markus On 22/2/23 17:49, Jonathan Cameron wrote: [...] Do

[PATCH v3 00/15] audio: improve callback interface for audio frontends

2023-02-24 Thread Volker Rümelin
Based-on: <0a4007dc-e11c-f16e-0e21-dbc4e60ca...@t-online.de> ([PATCH v2 00/11] audio: more improvements) The callback interface for emulated audio devices is strange. The callback function has an 'avail' parameter that passes the number of bytes that can be written or read. Unfortunately, this

[PULL] Fourth RISC-V PR for QEMU 8.0, Attempt 2

2023-02-24 Thread Palmer Dabbelt
The following changes since commit 417296c8d8588f782018d01a317f88957e9786d6: tests/qtest/netdev-socket: Raise connection timeout to 60 seconds (2023-02-09 11:23:53 +) are available in the Git repository at: g...@github.com:palmer-dabbelt/qemu.git tags/pull-riscv-to-apply-20230224 for

[PULL 7/8] target/riscv: avoid env_archcpu() in cpu_get_tb_cpu_state()

2023-02-24 Thread Palmer Dabbelt
From: Daniel Henrique Barboza We have a RISCVCPU *cpu pointer available at the start of the function. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Weiwei Li Message-ID: <20230210123836.506286-1-dbarb...@ventanamicro.com> Signed-off-by: Palmer Dabbelt

[PULL 3/8] hw/riscv/boot.c: make riscv_load_initrd() static

2023-02-24 Thread Palmer Dabbelt
From: Daniel Henrique Barboza The only remaining caller is riscv_load_kernel_and_initrd() which belongs to the same file. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Reviewed-by: Alistair Francis Message-Id: <20230206140022.2748401-4-dbarb

[PULL 8/8] target/riscv: Fix vslide1up.vf and vslide1down.vf

2023-02-24 Thread Palmer Dabbelt
From: LIU Zhiwei vslide1up_##BITWIDTH is used by the vslide1up.vx and vslide1up.vf. So its scalar input should be uint64_t to hold the 64 bits float register.And the same for vslide1down_##BITWIDTH. This bug is caught when run these instructions on qemu-riscv32. Signed-off-by: LIU Zhiwei Revie

[PULL 2/8] hw/riscv/boot.c: consolidate all kernel init in riscv_load_kernel()

2023-02-24 Thread Palmer Dabbelt
From: Daniel Henrique Barboza The microchip_icicle_kit, sifive_u, spike and virt boards are now doing the same steps when '-kernel' is used: - execute load_kernel() - load init_rd() - write kernel_cmdline Let's fold everything inside riscv_load_kernel() to avoid code repetition. To not change t

[PULL 6/8] target/riscv: Smepmp: Skip applying default rules when address matches

2023-02-24 Thread Palmer Dabbelt
From: Himanshu Chauhan When MSECCFG.MML is set, after checking the address range in PMP if the asked permissions are not same as programmed in PMP, the default permissions are applied. This should only be the case when there is no matching address is found. This patch skips applying default rule

[PULL 4/8] target/riscv: Remove privileged spec version restriction for RVV

2023-02-24 Thread Palmer Dabbelt
From: Frank Chang The RVV specification does not require that the core needs to support the privileged specification v1.12.0 to support RVV, and there is no dependency from ISA level. This commit removes the restriction from both RVV CSRs and extension CPU ISA string. Signed-off-by: Frank Chang

[PULL 5/8] MAINTAINERS: Add some RISC-V reviewers

2023-02-24 Thread Palmer Dabbelt
From: Alistair Francis This patch adds some active RISC-V members as reviewers to the MAINTAINERS file. Signed-off-by: Alistair Francis Acked-by: LIU Zhiwei Acked-by: Weiwei Li Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Reviewed-by: Daniel Henrique Barboza Reviewed-by: Frank

Re: [PULL 0/9] Fourth RISC-V PR for QEMU 8.0

2023-02-24 Thread Palmer Dabbelt
On Fri, 24 Feb 2023 10:52:34 PST (-0800), Peter Maydell wrote: On Fri, 24 Feb 2023 at 06:56, Thomas Huth wrote: Hi! On 23/02/2023 23.49, Palmer Dabbelt wrote: > Nobody's replied, so I'm inclined to just drop the OpenSBI bump and re-send > the PR. At least that way we can avoid getting bloc

Re: [PULL 00/13] testing updates (gitlab, cirrus, docker, avocado, windows)

2023-02-24 Thread Peter Maydell
On Thu, 23 Feb 2023 at 15:57, Alex Bennée wrote: > > The following changes since commit 79b677d658d3d35e1e776826ac4abb28cdce69b8: > > Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into > staging (2023-02-21 11:28:31 +) > > are available in the Git repository at: > > htt

Re: [PULL 0/9] Fourth RISC-V PR for QEMU 8.0

2023-02-24 Thread Peter Maydell
On Fri, 24 Feb 2023 at 06:56, Thomas Huth wrote: > > Hi! > > On 23/02/2023 23.49, Palmer Dabbelt wrote: > > Nobody's replied, so I'm inclined to just drop the OpenSBI bump and re-send > > the PR. At least that way we can avoid getting blocked on the CI issues. > > There's some more in flight so

Re: [PULL 00/12] Error reporting patches patches for 2023-02-23

2023-02-24 Thread Peter Maydell
On Thu, 23 Feb 2023 at 13:46, Markus Armbruster wrote: > > The following changes since commit 79b677d658d3d35e1e776826ac4abb28cdce69b8: > > Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into > staging (2023-02-21 11:28:31 +) > > are available in the Git repository at: > >

Re: [PULL 00/29] Block layer patches

2023-02-24 Thread Peter Maydell
On Thu, 23 Feb 2023 at 18:51, Kevin Wolf wrote: > > The following changes since commit 79b677d658d3d35e1e776826ac4abb28cdce69b8: > > Merge tag 'net-pull-request' of https://github.com/jasowang/qemu into > staging (2023-02-21 11:28:31 +) > > are available in the Git repository at: > > http

Re: [RFC QEMU] docs: vhost-user: Add custom memory mapping support

2023-02-24 Thread Alex Bennée
Viresh Kumar writes: > The current model of memory mapping at the back-end works fine with > Qemu, where a standard call to mmap() for the respective file > descriptor, passed from front-end, is generally all we need to do before > the front-end can start accessing the guest memory. > > There a

[PATCH 6/7] tests/docker: use direct RUNC call to run test jobs

2023-02-24 Thread Alex Bennée
If we build them without the script we can certainly run them without it. Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 9e73ff5cf3..cee1b347

[PATCH 5/7] tests/docker: use direct RUNC call to build containers

2023-02-24 Thread Alex Bennée
We don't really need stuff from docker.py to do the build as we have everything we need with a direct call. We do rely on the dockerfiles being able to tweak the UID/name mapping as the last step. Signed-off-by: Alex Bennée --- tests/docker/Makefile.include | 22 +- 1 file ch

[PATCH 2/7] tests/dockerfiles: unify debian-toolchain references

2023-02-24 Thread Alex Bennée
We use the debian release number elsewhere so fix it for consistency along with the broken comment. Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/debian-toolchain.docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/docker/dockerfiles/debian-toolchain.do

[PATCH 7/7] tests/gitlab: use kaniko to build images

2023-02-24 Thread Alex Bennée
Apparently the docker-in-docker approach has some flaws including needing privileged mode to run and being quite slow. An alternative approach is to use Google's kaniko tool. It also works across different gitlab executors. Following the gitlab example code we drop all the direct docker calls and

[PATCH 1/7] configure: expose the direct container command

2023-02-24 Thread Alex Bennée
In the process of migrating away from using docker.py to build our containers we need to expose the command to the build environment. The script is still a useful way to probe which command works though. Signed-off-by: Alex Bennée --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --gi

[PATCH 0/7] testing/next: docker.py removal and kaniko updates

2023-02-24 Thread Alex Bennée
This series attempts to remove our dependence on the docker.py script and build things directly with the appropriate tool. I've been noodling around with how we build images on gitlab to see if they can cache better because the normal case should be we don't need to rebuild everything if the upstre

Re: [PATCH v3 1/6] configure: Look for auxiliary Python installations

2023-02-24 Thread Eric Blake
On Tue, Feb 21, 2023 at 12:03:44PM +0100, Paolo Bonzini wrote: > > > > This configure loop will prefer, in order: > > > > 1. Whatever is specified in $PYTHON > > 2. python3 > > 3. python (Which is usually 2.x, but might be 3.x on some platforms.) > > 4. python3.11 down through python3.6 > > > >

[PATCH 2/4] target/riscv/csr.c: simplify mctr()

2023-02-24 Thread Daniel Henrique Barboza
Use riscv_cpu_cfg() to retrieve pmu_num. Signed-off-by: Daniel Henrique Barboza --- target/riscv/csr.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 3692617d13..0f4aa22a0f 100644 --- a/target/riscv/csr.c +++ b/target/riscv/

[PATCH 3/4] target/riscv/csr.c: use riscv_cpu_cfg() to avoid env_cpu() pointers

2023-02-24 Thread Daniel Henrique Barboza
A common trend in this file is to retrieve a RISCVCPU pointer by first retrieving a CPUState pointer via env_cpu(). The CPU pointer is used only to access the RISCVCPUConfig object and nothing else. Let's use riscv_cpu_cfg() to access what we need directly without these 2 pointers. Suggested-by:

[PATCH 0/4] RISCVCPUConfig related cleanups

2023-02-24 Thread Daniel Henrique Barboza
Hi, These cleanups were suggested by LIU Zhiwei during the review of the RISCV_FEATURE_* cleanups, currently on version 7 [1]. These are dependent on the patch "[PATCH v7 01/10] target/riscv: introduce riscv_cpu_cfg()" from [1] because we use the riscv_cpu_cfg() API. [1] https://lists.gnu.org/a

[PATCH 4/4] target/riscv/csr.c: avoid env_archcpu() usages when reading RISCVCPUConfig

2023-02-24 Thread Daniel Henrique Barboza
Retrieving the CPU pointer using env_archcpu() just to access cpu->cfg can be avoided by using riscv_cpu_cfg(). Suggested-by: LIU Zhiwei Signed-off-by: Daniel Henrique Barboza --- target/riscv/csr.c | 32 +--- 1 file changed, 9 insertions(+), 23 deletions(-) diff --

[PATCH 1/4] target/riscv/csr.c: use env_archcpu() in ctr()

2023-02-24 Thread Daniel Henrique Barboza
We don't need to use env_cpu() and CPUState(). Signed-off-by: Daniel Henrique Barboza --- target/riscv/csr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 75a540bfcb..3692617d13 100644 --- a/target/riscv/csr.c +++ b/target/ris

Re: [PATCH v5 8/8] hw/mem/cxl_type3: Add CXL RAS Error Injection Support.

2023-02-24 Thread Jonathan Cameron via
On Thu, 23 Feb 2023 14:27:48 + Jonathan Cameron wrote: > On Thu, 23 Feb 2023 08:37:46 +0100 > Markus Armbruster wrote: > > > Thomas Huth writes: > > > > > On 22/02/2023 19.16, Philippe Mathieu-Daudé wrote: > > >> +Thomas (meson) & Marc-André (conditional QAPI) > > > > > > + Mark

Re: question: QEMU guest with Virtiofs but without virtiofsd

2023-02-24 Thread Stefan Hajnoczi
On Fri, 24 Feb 2023 at 11:47, Ferenc Fejes wrote: > I'm using a QEMU VM with a debootstrap rootfs, shared over virtiofs for > the guest. My best understanding is that virtiofsd must required even > if just using one guest. Yes, virtiofsd is required even if just one guest is accessing a shared di

Re: [PATCH v16 08/11] qapi/s390x/cpu topology: set-cpu-topology monitor command

2023-02-24 Thread Nina Schoetterl-Glausch
On Wed, 2023-02-22 at 15:21 +0100, Pierre Morel wrote: > The modification of the CPU attributes are done through a monitor > command. > > It allows to move the core inside the topology tree to optimize > the cache usage in the case the host's hypervisor previously > moved the CPU. > > The same co

Re: [PATCH 5/5] hw/audio/via-ac97: Basic implementation of audio playback

2023-02-24 Thread Daniel Henrique Barboza
On 2/24/23 10:05, BALATON Zoltan wrote: Just for some motivation, this is what we want to make possible for more people with QEMU 8.0: https://youtu.be/YY9RExl4VDI That's neat! This would need at least my SM502 patches and fixing the IRQ routing in the VT8231 (this test was with my seri

Re: [PATCH 3/5] hw/ppc/pegasos2: Fix PCI interrupt routing

2023-02-24 Thread Daniel Henrique Barboza
On 2/21/23 15:44, BALATON Zoltan wrote: According to the PegasosII schematics the PCI interrupt lines are connected to both the gpp pins of the Mv64361 north bridge and the PINT pins of the VT8231 south bridge so guests can get interrupts from either of these. So far we only had the MV64361 co

Re: [PATCH] hw/display/sm501: Implement more 2D raster operations

2023-02-24 Thread Daniel Henrique Barboza
On 2/16/23 11:40, BALATON Zoltan wrote: Add simple implementation for two raster operations that are used by AmigaOS which fixes graphics problems in some progtams using these. Signed-off-by: BALATON Zoltan --- Reviewed-by: Daniel Henrique Barboza And queued in ppc-next. Thanks, Danie

[PATCH 06/33] x86: pcihp: fix missing PCNT callchain when intermediate root-port has 'hotplug=off' set

2023-02-24 Thread Igor Mammedov
Beside BSEL numbers change (due to 2 extra root-ports in q35/miltibridge test), following change is expected: Scope (\_SB.PCI0) { ... +Scope (S50) +{ +Scope (S00) +{ +Method (PCNT, 0, NotSerialized) +

[PATCH 12/33] tests: acpi: whitelist DSDT blobs before isolating PCI _DSM func 0 prolog

2023-02-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 35 + 1 file changed, 35 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..7e7745db39 100644 --- a/tests/qtest/

[PATCH 10/33] pcihp: piix4: do not redirect hotplug controller to piix4 when ACPI hotplug is disabled

2023-02-24 Thread Igor Mammedov
commit [1] added ability to disable ACPI PCI hotplug on hostbridge but forgot to take into account that it should disable all ACPI hotplug machinery in case both hostbridge and bridge hotplug are disabled. Commit [2] tried to fix that, however it forgot to remove hotplug_handler override which han

Re: [PATCH] hw/mips/gt64xxx_pci: Don't endian-swap GT_PCI0_CFGADDR

2023-02-24 Thread Nathan Chancellor
On Thu, Feb 23, 2023 at 04:19:58PM +, Jiaxun Yang wrote: > 145e2198d749 ("hw/mips/gt64xxx_pci: Endian-swap using PCI_HOST_BRIDGE > MemoryRegionOps") converted CFGADDR/CFGDATA registers to use PCI_HOST_BRIDGE's > accessor facility and enabled byte swap for both CFGADDR/CFGDATA register. > > How

question: QEMU guest with Virtiofs but without virtiofsd

2023-02-24 Thread Ferenc Fejes
Hi! I'm using a QEMU VM with a debootstrap rootfs, shared over virtiofs for the guest. My best understanding is that virtiofsd must required even if just using one guest. Looking around in the QEMU manpages I got a little bit confused by virtfs parameter. Is it something entirely connected with 9

[PATCH 32/33] pcihp: move fields enabling hotplug into AcpiPciHpState

2023-02-24 Thread Igor Mammedov
... instead of duplicating them in piix4 and lpc and then trying to pass them to pcihp routines as arguments. it simplifies call sites and places pcihp specific in its own structure. Signed-off-by: Igor Mammedov --- include/hw/acpi/pcihp.h | 8 include/hw/acpi/piix4.h |

[PATCH 28/33] pci: move acpi-index uniqueness check to generic PCI device code

2023-02-24 Thread Igor Mammedov
acpi-index is now working with non-hotpluggable buses (pci/q35 machine hostbridge), it can be used even if ACPI PCI hotplug is disabled and as result acpi-index uniqueness check will be omitted (since the check is done by ACPI PCI hotplug handler, which isn't wired when ACPI PCI hotplug is disabled

[PATCH 29/33] acpi: pci: drop BSEL usage when deciding that device isn't hotpluggable

2023-02-24 Thread Igor Mammedov
previous commit ("pci: fix 'hotplugglable' property behavior") fixed pcie root port's 'hotpluggable' property to behave consistently. So we don't need a BSEL crutch anymore to see of device is not hotpluggable, drop it from 'generic' PCI slots description handling. BSEL is still used to decide if

[PATCH 30/33] acpi: pci: move BSEL into build_append_pcihp_slots()

2023-02-24 Thread Igor Mammedov
Generic PCI enumeration code doesn't really need access to BSEL value, it is only used as means to decide if hotplug enumerator should be called. Use stateless object_property_find() to do that, and move the rest of BSEL handling into build_append_pcihp_slots() where it belongs. This cleans up ge

[PATCH 03/33] tests: acpi: update expected blobs

2023-02-24 Thread Igor Mammedov
expected changes: Basically adds devices present on root bus in form: Device (SXX) { Name (_ADR, 0x) // _ADR: Address } On top of that For q35.noacpihp, all ACPI PCI hotplug AML is removed and _OSC get native hotplug enabled: CreateDWordField (Arg3, 0x04

  1   2   3   >