Re: [PATCH v3 3/5] hw/block: Add Microchip's 25CSM04 to m25p80

2024-05-19 Thread Cédric Le Goater
On 5/15/24 19:41, Chalapathi V wrote: Add Microchip's 25CSM04 Serial EEPROM to m25p80. 25CSM04 provides 4 Mbits of Serial EEPROM utilizing the Serial Peripheral Interface (SPI) compatible bus. The device is organized as 524288 bytes of 8 bits each (512Kbyte) and is optimized for use in consumer

Re: [PATCH v3 1/5] ppc/pnv: Add SPI controller model

2024-05-19 Thread Cédric Le Goater
On 5/15/24 19:41, Chalapathi V wrote: SPI controller device model supports a connection to a single SPI responder. This provide access to SPI seeproms, TPM, flash device and an ADC controller. All SPI function control is mapped into the SPI register space to enable full control by firmware. In

RE: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-19 Thread Liu, Yi L
> From: Duan, Zhenzhong > Sent: Monday, May 20, 2024 11:41 AM > > > > >-Original Message- > >From: Jason Wang > >Sent: Monday, May 20, 2024 8:44 AM > >To: Duan, Zhenzhong > >Cc: qemu-devel@nongnu.org; Liu, Yi L ; Peng, Chao P > >; Yu Zhang ; Michael > >S. Tsirkin ; Paolo Bonzini ; >

Re: [PATCH v12 10/13] virtio-gpu: Move fence_poll timer to VirtIOGPUGL

2024-05-19 Thread Akihiko Odaki
On 2024/05/20 6:27, Dmitry Osipenko wrote: Move fence_poll timer to VirtIOGPUGL for consistency with cmdq_resume_bh that are used only by GL device. Signed-off-by: Dmitry Osipenko Thanks for refacotoring. Please move this before "[PATCH v12 01/13] virtio-gpu: Unrealize GL device" so that

Re: [PATCH v12 09/13] virtio-gpu: Handle resource blob commands

2024-05-19 Thread Akihiko Odaki
On 2024/05/20 6:27, Dmitry Osipenko wrote: 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

RE: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-19 Thread Duan, Zhenzhong
>-Original Message- >From: Jason Wang >Sent: Monday, May 20, 2024 8:44 AM >To: Duan, Zhenzhong >Cc: qemu-devel@nongnu.org; Liu, Yi L ; Peng, Chao P >; Yu Zhang ; Michael >S. Tsirkin ; Paolo Bonzini ; >Richard Henderson ; Eduardo Habkost >; Marcel Apfelbaum >Subject: Re: [PATCH]

RE: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-19 Thread Duan, Zhenzhong
>-Original Message- >From: Liu, Yi L >Subject: RE: [PATCH] intel_iommu: Use the latest fault reasons defined by >spec > >> From: CLEMENT MATHIEU--DRIF >> Sent: Friday, May 17, 2024 9:13 PM >> >> Hi Zhenzhong >> >> On 17/05/2024 12:23, Zhenzhong Duan wrote: >> > Caution: External email.

RE: [PATCH v3 08/16] aspeed/smc: support 64 bits dma dram address

2024-05-19 Thread Jamin Lin
Hi Cedric, > > Hello Jamin > > On 5/15/24 11:01, Jamin Lin wrote: > > Hi Cedric, > > > > Sorry reply you late. > >> Hello Jamin, > >> > >> To handle the DMA DRAM Side Address High register, we should > >> reintroduce an "dram-base" property which I removed a while ago. > Something like : > >> >

[PATCH 1/1] scsi-bus: Remove unused parameter state from scsi_dma_restart_cb

2024-05-19 Thread Ray Lee
Signed-off-by: Ray Lee --- hw/scsi/scsi-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 9e40b0c920..7c3df9b31a 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -255,7 +255,7 @@ static void

Re: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-19 Thread Jason Wang
On Fri, May 17, 2024 at 6:26 PM Zhenzhong Duan wrote: > > From: Yu Zhang > > Currently we use only VTD_FR_PASID_TABLE_INV as fault reason. > Update with more detailed fault reasons listed in VT-d spec 7.2.3. > > Signed-off-by: Yu Zhang > Signed-off-by: Zhenzhong Duan > --- I wonder if this

[PATCH v12 07/13] virtio-gpu: Support blob scanout using dmabuf fd

2024-05-19 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 v12 11/13] virtio-gpu: Move print_stats timer to VirtIOGPUGL

2024-05-19 Thread Dmitry Osipenko
Move print_stats timer to VirtIOGPUGL for consistency with cmdq_resume_bh and fence_poll that are used only by GL device. Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c | 12 +++- include/hw/virtio/virtio-gpu.h | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-)

[PATCH v12 02/13] virtio-gpu: Handle virtio_gpu_virgl_init() failure

2024-05-19 Thread Dmitry Osipenko
virtio_gpu_virgl_init() may fail, leading to a further Qemu crash because Qemu assumes it never fails. Check virtio_gpu_virgl_init() return code and don't execute virtio commands on error. Failed virtio_gpu_virgl_init() will result in a timed out virtio commands for a guest OS. Signed-off-by:

[PATCH v12 13/13] virtio-gpu: Support Venus context

2024-05-19 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 v12 08/13] virtio-gpu: Support suspension of commands processing

2024-05-19 Thread Dmitry Osipenko
Check whether command processing has been finished; otherwise, stop processing commands and retry the command again next time. This allows us to support asynchronous execution of non-fenced commands needed for unmapping host blobs safely. Suggested-by: Akihiko Odaki Signed-off-by: Dmitry

[PATCH v12 09/13] virtio-gpu: Handle resource blob commands

2024-05-19 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

[PATCH v12 06/13] virtio-gpu: Add virgl resource management

2024-05-19 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:

[PATCH v12 01/13] virtio-gpu: Unrealize GL device

2024-05-19 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 | 6 ++ include/hw/virtio/virtio-gpu.h | 1 + 3

[PATCH v12 12/13] virtio-gpu: Register capsets dynamically

2024-05-19 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

[PATCH v12 03/13] virtio-gpu: Use pkgconfig version to decide which virgl features are available

2024-05-19 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 v12 10/13] virtio-gpu: Move fence_poll timer to VirtIOGPUGL

2024-05-19 Thread Dmitry Osipenko
Move fence_poll timer to VirtIOGPUGL for consistency with cmdq_resume_bh that are used only by GL device. Signed-off-by: Dmitry Osipenko --- hw/display/virtio-gpu-virgl.c | 9 + include/hw/virtio/virtio-gpu.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git

[PATCH v12 04/13] virtio-gpu: Support context-init feature with virglrenderer

2024-05-19 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

[PATCH v12 00/13] Support blob memory and venus on qemu

2024-05-19 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],

[PATCH v12 05/13] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled

2024-05-19 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

[PATCH V9 8/8] docs/specs/acpi_hw_reduced_hotplug: Add the CPU Hotplug Event Bit

2024-05-19 Thread Salil Mehta via
GED interface is used by many hotplug events like memory hotplug, NVDIMM hotplug and non-hotplug events like system power down event. Each of these can be selected using a bit in the 32 bit GED IO interface. A bit has been reserved for the CPU hotplug event. Signed-off-by: Salil Mehta

[PATCH V9 4/8] hw/acpi: Update GED _EVT method AML with CPU scan

2024-05-19 Thread Salil Mehta via
OSPM evaluates _EVT method to map the event. The CPU hotplug event eventually results in start of the CPU scan. Scan figures out the CPU and the kind of event(plug/unplug) and notifies it back to the guest. Update the GED AML _EVT method with the call to \\_SB.CPUS.CSCN Also, macro

[PATCH V9 7/8] gdbstub: Add helper function to unregister GDB register space

2024-05-19 Thread Salil Mehta via
Add common function to help unregister the GDB register space. This shall be done in context to the CPU unrealization. Signed-off-by: Salil Mehta Tested-by: Vishnu Pajjuri Reviewed-by: Gavin Shan Tested-by: Xianglai Li Tested-by: Miguel Luis Reviewed-by: Shaoqin Huang Reviewed-by: Vishnu

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

2024-05-19 Thread Salil Mehta via
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 Reviewed-by: Gavin Shan Tested-by: Xianglai Li Tested-by:

[PATCH V9 5/8] hw/acpi: Update CPUs AML with cpu-(ctrl)dev change

2024-05-19 Thread Salil Mehta via
CPUs Control device(\\_SB.PCI0) register interface for the x86 arch is IO port based and existing CPUs AML code assumes _CRS objects would evaluate to a system resource which describes IO Port address. But on ARM arch CPUs control device(\\_SB.PRES) register interface is memory-mapped hence _CRS

[PATCH V9 3/8] hw/acpi: Update ACPI GED framework to support vCPU Hotplug

2024-05-19 Thread Salil Mehta via
ACPI GED (as described in the ACPI 6.4 spec) uses an interrupt listed in the _CRS object of GED to intimate OSPM about an event. Later then demultiplexes the notified event by evaluating ACPI _EVT method to know the type of event. Use ACPI GED to also notify the guest kernel about any CPU

[PATCH V9 0/8] Add architecture agnostic code to support vCPU Hotplug

2024-05-19 Thread Salil Mehta via
Virtual CPU hotplug support is being added across various architectures[1][3]. This series adds various code bits common across all architectures: 1. vCPU creation and Parking code refactor [Patch 1] 2. Update ACPI GED framework to support vCPU Hotplug [Patch 2,3] 3. ACPI CPUs AML code change

[PATCH V9 2/8] hw/acpi: Move CPU ctrl-dev MMIO region len macro to common header file

2024-05-19 Thread Salil Mehta via
CPU ctrl-dev MMIO region length could be used in ACPI GED and various other architecture specific places. Move ACPI_CPU_HOTPLUG_REG_LEN macro to more appropriate common header file. Signed-off-by: Salil Mehta Reviewed-by: Alex Bennée Reviewed-by: Jonathan Cameron Reviewed-by: Gavin Shan

[PATCH V9 1/8] accel/kvm: Extract common KVM vCPU {creation, parking} code

2024-05-19 Thread Salil Mehta via
KVM vCPU creation is done once during the vCPU realization when Qemu vCPU thread is spawned. This is common to all the architectures as of now. Hot-unplug of vCPU results in destruction of the vCPU object in QOM but the corresponding KVM vCPU object in the Host KVM is not destroyed as KVM doesn't

Re: A question regarding TARGET_ALIGNED_ONLY flag

2024-05-19 Thread Richard Henderson
On 5/19/24 16:23, Michael Rolnik wrote: Hi all, Previously there was *TARGET_ALIGNED_ONLY* option that caused all memory accessed to be aligned, now it seems to be removed. Is there a way to achieve memory access alignment with QEMU v9.0.0 when I am building a custom target? Explicitly add

A question regarding TARGET_ALIGNED_ONLY flag

2024-05-19 Thread Michael Rolnik
Hi all, Previously there was *TARGET_ALIGNED_ONLY* option that caused all memory accessed to be aligned, now it seems to be removed. Is there a way to achieve memory access alignment with QEMU v9.0.0 when I am building a custom target? -- Best Regards, Michael Rolnik

[PATCH v3 0/3] Initial support for One-Time Programmable Memory (OTP) in BCM2835

2024-05-19 Thread Rayhan Faizel
All BCM2835 boards have on-board OTP memory with 66 32-bit rows. Usually, its contents are accessible via mailbox commands. [Changes in v3] - Forgot to replace constant with macro in one particular spot. [Changes in v2] - Replace read/write with get/set in bcm2835_otp.c. - Use impl instead of

[PATCH v3 2/3] hw/arm: Connect OTP device to BCM2835

2024-05-19 Thread Rayhan Faizel
Replace stubbed OTP memory region with the new OTP device. Signed-off-by: Rayhan Faizel --- hw/arm/bcm2835_peripherals.c | 13 - include/hw/arm/bcm2835_peripherals.h | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/hw/arm/bcm2835_peripherals.c

[PATCH v3 1/3] hw/nvram: Add BCM2835 OTP device

2024-05-19 Thread Rayhan Faizel
The OTP device registers are currently stubbed. For now, the device houses the OTP rows which will be accessed directly by other peripherals. Signed-off-by: Rayhan Faizel --- hw/nvram/bcm2835_otp.c | 187 + hw/nvram/meson.build | 1 +

[PATCH v3 3/3] hw/misc: Implement mailbox properties for customer OTP and device specific private keys

2024-05-19 Thread Rayhan Faizel
Four mailbox properties are implemented as follows: 1. Customer OTP: GET_CUSTOMER_OTP and SET_CUSTOMER_OTP 2. Device-specific private key: GET_PRIVATE_KEY and SET_PRIVATE_KEY. The customer OTP is located in the rows 36-43. The device-specific private key is located in the rows 56-63. The

Re: [PATCH] hw/riscv/virt: Add hotplugging and virtio-md-pci support

2024-05-19 Thread Daniel Henrique Barboza
On 5/18/24 16:50, David Hildenbrand wrote: Hi, diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 4fdb66052587..16c2bdbfe6b6 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -53,6 +53,8 @@    #include "hw/pci-host/gpex.h"    #include "hw/display/ramfb.h"    #include

Re: [PATCH] intel_iommu: Use the latest fault reasons defined by spec

2024-05-19 Thread CLEMENT MATHIEU--DRIF
> From: CLEMENT MATHIEU--DRIF > Sent: Friday, May 17, 2024 9:13 PM > > Hi Zhenzhong > > On 17/05/2024 12:23, Zhenzhong Duan wrote: > > Caution: External email. Do not open attachments or click links, unless > > this email > comes from a known sender and you know the content is safe. > > > > > >