[PATCH 3/3] sh: Call paging_init() earlier in the init sequence

2024-02-09 Thread Oreoluwa Babatunde
The unflatten_device_tree() function contains a call to memblock_alloc(). This is a problem because this allocation is done before any of the reserved memory is set aside in paging_init(). This means that there is a possibility for memblock to allocate from any of the memory regions that are

[PATCH 2/3] openrisc: Call setup_memory() earlier in the init sequence

2024-02-09 Thread Oreoluwa Babatunde
The unflatten_and_copy_device_tree() function contains a call to memblock_alloc(). This means that memblock is allocating memory before any of the reserved memory regions are set aside in the setup_memory() function which calls early_init_fdt_scan_reserved_mem(). Therefore, there is a possibility

[PATCH 1/3] loongarch: Call arch_mem_init() before platform_init() in the init sequence

2024-02-09 Thread Oreoluwa Babatunde
The platform_init() function which is called during device bootup contains a few calls to memblock_alloc(). This is an issue because these allocations are done before reserved memory regions are set aside in arch_mem_init(). This means that there is a possibility for memblock to allocate memory

[PATCH 0/3] Restructure init sequence to set aside reserved memory earlier

2024-02-09 Thread Oreoluwa Babatunde
The loongarch, openric, and sh architectures allocate memory from memblock before it gets the chance to set aside reserved memory regions. This means that there is a possibility for memblock to allocate from memory regions that are supposed to be reserved. This series makes changes to the arch

Re: [PATCH V1] vdpa_sim: reset must not run

2024-02-09 Thread Steven Sistare
On 1/22/2024 5:59 AM, Stefano Garzarella wrote: > On Mon, Jan 22, 2024 at 11:47:22AM +0100, Eugenio Perez Martin wrote: >> On Mon, Jan 22, 2024 at 11:22 AM Stefano Garzarella >> wrote: >>> >>> On Wed, Jan 17, 2024 at 11:23:23AM -0800, Steve Sistare wrote: >>> >vdpasim_do_reset sets running to

[PATCH V1] vdpa: suspend and resume require DRIVER_OK

2024-02-09 Thread Steve Sistare
Calling suspend or resume requires VIRTIO_CONFIG_S_DRIVER_OK, for all vdpa devices. Suggested-by: Eugenio Perez Martin " Signed-off-by: Steve Sistare --- drivers/vhost/vdpa.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index

[PATCH V2] vdpa_sim: reset must not run

2024-02-09 Thread Steve Sistare
vdpasim_do_reset sets running to true, which is wrong, as it allows vdpasim_kick_vq to post work requests before the device has been configured. To fix, do not set running until VIRTIO_CONFIG_S_DRIVER_OK is set. Fixes: 0c89e2a3a9d0 ("vdpa_sim: Implement suspend vdpa op") Signed-off-by: Steve

RE: CPU data cache across reboot/kexec for pmem/dax devices

2024-02-09 Thread Dan Williams
Mathieu Desnoyers wrote: > Hi Dan, > > In the context of extracting user-space trace data when the kernel crashes, > the LTTng user-space tracer recommends using nvdimm/pmem to reserve an area > of physical (volatile) RAM at boot (memmap=nn[KMG]!ss[KMG]), and use the > resulting device to

[PATCH] dt-bindings: usb: typec: anx7688: start a binding document

2024-02-09 Thread Pavel Machek
Add binding for anx7688 usb type-c bridge. I don't have a datasheet, but I did best I could. Signed-off-by: Pavel Machek diff --git a/Documentation/devicetree/bindings/usb/analogix,anx7688.yaml b/Documentation/devicetree/bindings/usb/analogix,anx7688.yaml new file mode 100644 index

Re: [PATCH] usb: typec: anx7688: Add driver for ANX7688 USB-C HDMI bridge

2024-02-09 Thread Pavel Machek
Hi! > > From: Ondrej Jirman > > > > This is driver for ANX7688 USB-C HDMI, with flashing and debugging > > features removed. ANX7688 is rather criticial piece on PinePhone, > > there's no display and no battery charging without it. > > Don't remove the flashing part. Some Pinephones come

CPU data cache across reboot/kexec for pmem/dax devices

2024-02-09 Thread Mathieu Desnoyers
Hi Dan, In the context of extracting user-space trace data when the kernel crashes, the LTTng user-space tracer recommends using nvdimm/pmem to reserve an area of physical (volatile) RAM at boot (memmap=nn[KMG]!ss[KMG]), and use the resulting device to create/mount a dax-enabled fs (e.g. ext4).

Re: [PATCH v17 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-09 Thread Alex Williamson
On Fri, 9 Feb 2024 13:19:03 -0400 Jason Gunthorpe wrote: > On Fri, Feb 09, 2024 at 08:55:31AM -0700, Alex Williamson wrote: > > I think Kevin's point is also relative to this latter scenario, in the > > L1 instance of the nvgrace-gpu driver the mmap of the usemem BAR is > > cachable, but in the

Re: [PATCH v17 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-09 Thread Jason Gunthorpe
On Fri, Feb 09, 2024 at 08:55:31AM -0700, Alex Williamson wrote: > I think Kevin's point is also relative to this latter scenario, in the > L1 instance of the nvgrace-gpu driver the mmap of the usemem BAR is > cachable, but in the L2 instance of the driver where we only use the > vfio-pci-core ops

[PATCH v5 0/5] input/touchscreen: imagis: add support for IST3032C

2024-02-09 Thread Karel Balej
From: Karel Balej Hello, this patch series generalizes the Imagis touchscreen driver to support other Imagis chips, namely IST3038B and IST3032C, which use a slightly different protocol. The motivation for IST3032C is the samsung,coreprimevelte smartphone with which this series has been

[PATCH v5 3/5] input/touchscreen: imagis: Add support for Imagis IST3038B

2024-02-09 Thread Karel Balej
From: Markuss Broks Imagis IST3038B is another variant of Imagis IST3038 IC, which has a different register interface from IST3038C (possibly firmware defined). This should also work for IST3044B (though untested), however other variants using this interface/protocol(IST3026, IST3032, IST3026B,

[PATCH v5 4/5] dt-bindings: input/touchscreen: imagis: add compatible for IST3032C

2024-02-09 Thread Karel Balej
From: Karel Balej IST3032C is a touchscreen IC which seems mostly compatible with IST3038C except that it reports a different chip ID value. Acked-by: Rob Herring Signed-off-by: Karel Balej --- Notes: v5: - Add Rob's trailer. v4: - Reword commit description to mention how

[PATCH v5 2/5] dt-bindings: input/touchscreen: Add compatible for IST3038B

2024-02-09 Thread Karel Balej
From: Markuss Broks Imagis IST3038B is a variant (firmware?) of Imagis IST3038 IC differing from IST3038C in its register interface. Add the compatible for it to the IST3038C bindings. Signed-off-by: Markuss Broks Acked-by: Conor Dooley [bal...@matfyz.cz: elaborate chip differences in the

[PATCH v5 1/5] input/touchscreen: imagis: Correct the maximum touch area value

2024-02-09 Thread Karel Balej
From: Markuss Broks As specified in downstream IST3038B driver and proved by testing, the correct maximum reported value of touch area is 16. Signed-off-by: Markuss Broks Signed-off-by: Karel Balej --- drivers/input/touchscreen/imagis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v5 5/5] input/touchscreen: imagis: add support for IST3032C

2024-02-09 Thread Karel Balej
From: Karel Balej IST3032C is a touchscreen chip used for instance in the samsung,coreprimevelte smartphone, with which this was tested. Add the chip specific information to the driver. Reviewed-by: Markuss Broks Signed-off-by: Karel Balej --- Notes: v4: * Change the WHOAMI

[PATCH v16 5/6] Documentation: tracing: Add ring-buffer mapping

2024-02-09 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v16 4/6] tracing: Allow user-space mapping of the ring-buffer

2024-02-09 Thread Vincent Donnefort
Currently, user-space extracts data from the ring-buffer via splice, which is handy for storage or network sharing. However, due to splice limitations, it is imposible to do real-time analysis without a copy. A solution for that problem is to let the user-space map the ring-buffer directly. The

[PATCH v16 3/6] tracing: Add snapshot refcount

2024-02-09 Thread Vincent Donnefort
When a ring-buffer is memory mapped by user-space, no trace or ring-buffer swap is possible. This means the snapshot feature is mutually exclusive with the memory mapping. Having a refcount on snapshot users will help to know if a mapping is possible or not. Instead of relying on the global

[PATCH v16 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-09 Thread Vincent Donnefort
In preparation for allowing the user-space to map a ring-buffer, add a set of mapping functions: ring_buffer_{map,unmap}() ring_buffer_map_fault() And controls on the ring-buffer: ring_buffer_map_get_reader() /* swap reader and head */ Mapping the ring-buffer also involves: A unique

[PATCH v16 1/6] ring-buffer: Zero ring-buffer sub-buffers

2024-02-09 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping where each subbuf will be accessible to user-space, zero all the page allocations. Signed-off-by: Vincent Donnefort Reviewed-by: Masami Hiramatsu (Google) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index

[PATCH v16 0/6] Introducing trace buffer mapping by user-space

2024-02-09 Thread Vincent Donnefort
The tracing ring-buffers can be stored on disk or sent to network without any copy via splice. However the later doesn't allow real time processing of the traces. A solution is to give userspace direct access to the ring-buffer pages via a mapping. An application can now become a consumer of the

Re: [PATCH v17 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-09 Thread Alex Williamson
On Fri, 9 Feb 2024 09:20:22 + Ankit Agrawal wrote: > Thanks Kevin for the review. Comments inline. > > >> > >> Note that the usemem memory is added by the VM Nvidia device driver [5] > >> to the VM kernel as memblocks. Hence make the usable memory size > >> memblock > >> aligned. > > > >

Re: [RFC V1 05/13] vhost-vdpa: VHOST_IOTLB_REMAP

2024-02-09 Thread Steven Sistare
On 1/16/2024 1:14 PM, Eugenio Perez Martin wrote: > On Wed, Jan 10, 2024 at 9:40 PM Steve Sistare > wrote: >> >> When device ownership is passed to a new process via VHOST_NEW_OWNER, >> some devices need to know the new userland addresses of the dma mappings. >> Define the new iotlb message type

Re: [PATCH v15 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-09 Thread Steven Rostedt
On Fri, 9 Feb 2024 10:21:58 + Vincent Donnefort wrote: > +static void rb_update_meta_page(struct ring_buffer_per_cpu *cpu_buffer) > +{ > + struct trace_buffer_meta *meta = cpu_buffer->meta_page; > + > + WRITE_ONCE(meta->reader.read, cpu_buffer->reader_page->read); > +

Re: [v2 PATCH 0/1] ALSA: virtio: add support for audio controls

2024-02-09 Thread Takashi Iwai
On Mon, 15 Jan 2024 14:36:53 +0100, Aiswarya Cyriac wrote: > > From: Anton Yakovlev > > Changes in v2 > - Fix reporting of incorrect number of items for ENUMERATED controls > > Implementation of support for audio controls in accordance with the > extension of the virtio sound device

Re: [PATCH net-next v5] virtio_net: Support RX hash XDP hint

2024-02-09 Thread Paolo Abeni
On Fri, 2024-02-09 at 18:39 +0800, Liang Chen wrote: > On Wed, Feb 7, 2024 at 10:27 PM Paolo Abeni wrote: > > > > On Wed, 2024-02-07 at 10:54 +0800, Liang Chen wrote: > > > On Tue, Feb 6, 2024 at 6:44 PM Paolo Abeni wrote: > > > > > > > > On Sat, 2024-02-03 at 10:56 +0800, Liang Chen wrote: >

[PATCH v2] tracing: Fix wasted memory in saved_cmdlines logic

2024-02-09 Thread Steven Rostedt
From: "Steven Rostedt (Google)" While looking at improving the saved_cmdlines cache I found a huge amount of wasted memory that should be used for the cmdlines. The tracing data saves pids during the trace. At sched switch, if a trace occurred, it will save the comm of the task that did the

Re: [PATCH net-next v5] virtio_net: Support RX hash XDP hint

2024-02-09 Thread Liang Chen
On Wed, Feb 7, 2024 at 10:27 PM Paolo Abeni wrote: > > On Wed, 2024-02-07 at 10:54 +0800, Liang Chen wrote: > > On Tue, Feb 6, 2024 at 6:44 PM Paolo Abeni wrote: > > > > > > On Sat, 2024-02-03 at 10:56 +0800, Liang Chen wrote: > > > > On Sat, Feb 3, 2024 at 12:20 AM Jesper Dangaard Brouer > > >

[PATCH v15 5/6] Documentation: tracing: Add ring-buffer mapping

2024-02-09 Thread Vincent Donnefort
It is now possible to mmap() a ring-buffer to stream its content. Add some documentation and a code example. Signed-off-by: Vincent Donnefort diff --git a/Documentation/trace/index.rst b/Documentation/trace/index.rst index 5092d6c13af5..0b300901fd75 100644 --- a/Documentation/trace/index.rst

[PATCH v15 4/6] tracing: Allow user-space mapping of the ring-buffer

2024-02-09 Thread Vincent Donnefort
Currently, user-space extracts data from the ring-buffer via splice, which is handy for storage or network sharing. However, due to splice limitations, it is imposible to do real-time analysis without a copy. A solution for that problem is to let the user-space map the ring-buffer directly. The

[PATCH v15 3/6] tracing: Add snapshot refcount

2024-02-09 Thread Vincent Donnefort
When a ring-buffer is memory mapped by user-space, no trace or ring-buffer swap is possible. This means the snapshot feature is mutually exclusive with the memory mapping. Having a refcount on snapshot users will help to know if a mapping is possible or not. Instead of relying on the global

[PATCH v15 2/6] ring-buffer: Introducing ring-buffer mapping functions

2024-02-09 Thread Vincent Donnefort
In preparation for allowing the user-space to map a ring-buffer, add a set of mapping functions: ring_buffer_{map,unmap}() ring_buffer_map_fault() And controls on the ring-buffer: ring_buffer_map_get_reader() /* swap reader and head */ Mapping the ring-buffer also involves: A unique

[PATCH v15 1/6] ring-buffer: Zero ring-buffer sub-buffers

2024-02-09 Thread Vincent Donnefort
In preparation for the ring-buffer memory mapping where each subbuf will be accessible to user-space, zero all the page allocations. Signed-off-by: Vincent Donnefort Reviewed-by: Masami Hiramatsu (Google) diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index

[PATCH v15 0/6] Introducing trace buffer mapping by user-space

2024-02-09 Thread Vincent Donnefort
The tracing ring-buffers can be stored on disk or sent to network without any copy via splice. However the later doesn't allow real time processing of the traces. A solution is to give userspace direct access to the ring-buffer pages via a mapping. An application can now become a consumer of the

Re: [PATCH v17 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-09 Thread Ankit Agrawal
>> > >> > IMO, this seems like adding too much code to reduce the call length for a >> > very specific case. If there aren't any strong opinion on this, I'm >> > planning to >> > leave this code as it is. >> >> a slight difference. if mem_count==0 the result should always succeed >> no matter

Re: [PATCH v17 3/3] vfio/nvgrace-gpu: Add vfio pci variant module for grace hopper

2024-02-09 Thread Ankit Agrawal
Thanks Kevin for the review. Comments inline. >> >> Note that the usemem memory is added by the VM Nvidia device driver [5] >> to the VM kernel as memblocks. Hence make the usable memory size >> memblock >> aligned. > > Is memblock size defined in spec or purely a guest implementation choice?