Re: [RFC PATCH 14/25] qemu/bswap: Introduce load/store for aligned pointer

2021-05-18 Thread Philippe Mathieu-Daudé
On 5/18/21 10:15 PM, Peter Maydell wrote: > On Tue, 18 May 2021 at 19:38, Philippe Mathieu-Daudé > wrote: >> >> When the pointer alignment is known to be safe, we can >> directly swap the data in place, without having to rely >> on the compiler builtin code. >> >> Load/store methods expecting

Re: [PATCH v6 0/9] ui: add vdagent implementation and clipboard support.

2021-05-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210519053940.1888907-1-kra...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210519053940.1888907-1-kra...@redhat.com Subject: [PATCH v6 0/9] ui: add vdagent

[PATCH v6 8/9] ui/gtk: move struct GtkDisplayState to ui/gtk.h

2021-05-18 Thread Gerd Hoffmann
Want place gtk clipboard code in a separate C file, which in turn requires GtkDisplayState being in a header file. So move it. No functional change. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- include/ui/gtk.h | 57

[PATCH v6 7/9] ui/vnc: clipboard support

2021-05-18 Thread Gerd Hoffmann
This patch adds support for cut+paste to the qemu vnc server, which allows the vnc client exchange clipbaord data with qemu and other peers like the qemu vdagent implementation. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- ui/vnc.h | 24 ui/vnc-clipboard.c |

[PATCH v6 4/9] ui/vdagent: core infrastructure

2021-05-18 Thread Gerd Hoffmann
The vdagent protocol allows the guest agent (spice-vdagent) and the spice client exchange messages to implement features which require guest cooperation, for example clipboard support. This is a qemu implementation of the spice client side. This allows the spice guest agent talk to qemu directly

[PATCH v6 9/9] ui/gtk: add clipboard support

2021-05-18 Thread Gerd Hoffmann
This patch adds clipboard support to the qemu gtk ui. Signed-off-by: Gerd Hoffmann --- include/ui/gtk.h | 10 +++ ui/gtk-clipboard.c | 192 + ui/gtk.c | 1 + ui/meson.build | 2 +- 4 files changed, 204 insertions(+), 1 deletion(-)

[PATCH v6 5/9] ui/vdagent: add mouse support

2021-05-18 Thread Gerd Hoffmann
This patch adds support for mouse messages to the vdagent implementation. This can be enabled/disabled using the new 'mouse' parameter for the vdagent chardev. Default is on. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- chardev/char.c | 3 + ui/vdagent.c | 149

[PATCH v6 6/9] ui/vdagent: add clipboard support

2021-05-18 Thread Gerd Hoffmann
This patch adds support for clipboard messages to the qemu vdagent implementation, which allows the guest exchange clipboard data with qemu. Clipboard support can be enabled/disabled using the new 'clipboard' parameter for the vdagent chardev. Default is off. Signed-off-by: Gerd Hoffmann ---

[PATCH v6 0/9] ui: add vdagent implementation and clipboard support.

2021-05-18 Thread Gerd Hoffmann
Fist sketch of cut+paste support for vnc. On the guest side we are going to reuse the spice vdagent, so things should work out-of-the-box with guests in the wild. So this patch set brings a qemu implemenation of the vdagent protocol. Beside that there is the clipboard infrastructure of course.

[PATCH v6 3/9] ui: add clipboard documentation

2021-05-18 Thread Gerd Hoffmann
Document clipboard infrastructure in qemu. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- include/ui/clipboard.h | 133 - docs/devel/index.rst | 1 + docs/devel/ui.rst | 8 +++ 3 files changed, 141 insertions(+), 1 deletion(-)

[PATCH v6 1/9] build: add separate spice-protocol config option

2021-05-18 Thread Gerd Hoffmann
When implementing spice vdagent protocol in qemu we only need the spice-protocol package for that, spice-server is not needed. So go split those two build dependencies. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- configure | 36

[PATCH v6 2/9] ui: add clipboard infrastructure

2021-05-18 Thread Gerd Hoffmann
Add some infrastructure to manage the clipboard in qemu. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- include/ui/clipboard.h | 62 ui/clipboard.c | 92 ++ ui/meson.build | 1 + 3 files

Re: [PATCH] qemu-config: load modules when instantiating option groups

2021-05-18 Thread Gerd Hoffmann
On Tue, May 18, 2021 at 09:15:42AM -0400, Paolo Bonzini wrote: > Right now the SPICE module is special cased to be loaded when processing > of the -spice command line option. However, the spice option group > can also be brought in via -readconfig, in which case the module is > not loaded. > >

[PATCH v2 0/2] target/i386: Make sure that vsyscall's tb->size != 0

2021-05-18 Thread Ilya Leoshkevich
This series for the s390-next tree fixes [1]. Patch 1 is the fix, patch 2 is the new test to avoid similar regressions in the future. [1] https://lists.nongnu.org/archive/html/qemu-devel/2021-05/msg02962.html v1: https://lists.gnu.org/archive/html/qemu-devel/2021-05/msg03219.html v1 -> v2: Fixed

[PATCH v2 2/2] tests/tcg/x86_64: add vsyscall smoke test

2021-05-18 Thread Ilya Leoshkevich
Having a small test will prevent trivial regressions in the future. Signed-off-by: Ilya Leoshkevich --- tests/tcg/x86_64/Makefile.target | 6 +- tests/tcg/x86_64/vsyscall.c | 12 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644

[PATCH v2 1/2] target/i386: Make sure that vsyscall's tb->size != 0

2021-05-18 Thread Ilya Leoshkevich
tb_gen_code() assumes that tb->size must never be zero, otherwise it may produce spurious exceptions. For x86_64 this may happen when creating a translation block for the vsyscall page. Fix by pretending that vsyscall translation blocks have at least one instruction. Signed-off-by: Ilya

Re: [PATCH 00/24] target/ppc: Clean up mmu translation

2021-05-18 Thread David Gibson
On Tue, May 18, 2021 at 03:11:22PM -0500, Richard Henderson wrote: > This attempts the cleanup I've been talking about with Bruno. > > On the way, there's a lot of MMUAccessType cleanup, to get the > code into the form I wanted the interface to share. There's a > lot more cleanup that could be

RE: [PATCH v4 00/13] virtio-gpu: Add support for Blob resources feature (v4)

2021-05-18 Thread Kasireddy, Vivek
Hi Gerd, > > On Tue, May 11, 2021 at 03:47:06PM -0700, Vivek Kasireddy wrote: > > Enabling this feature would eliminate data copies from the resource > > object in the Guest to the shadow resource in Qemu. This patch series > > however adds support only for Blobs of type VIRTIO_GPU_BLOB_MEM_GUEST

Re: [PATCH v2] target/ppc: Fix load endianness for lxvwsx/lxvdsx

2021-05-18 Thread David Gibson
On Tue, May 18, 2021 at 03:30:20PM +0200, Giuseppe Musacchio wrote: > TARGET_WORDS_BIGENDIAN may not match the machine endianness if that's a > runtime-configurable parameter. > > Fixes: bcb0b7b1a1c05707304f80ca6f523d557816f85c > Fixes: afae37d98ae991c0792c867dbd9f32f988044318 > Resolves:

Re: [PATCH v2] target/ppc: Fix load endianness for lxvwsx/lxvdsx

2021-05-18 Thread David Gibson
On Tue, May 18, 2021 at 10:42:09AM -0500, Paul A. Clarke wrote: > Thanks, all! My original patch which addressed this issue > for me probably should've been labeled as an RFC. Thanks for your > willingness to review it, in spite of its problems. It was a bit > of a stab in the dark. I hope it

Re: [PATCH v2 1/7] target/ppc: fix ppc_store_sdr1 for user-only compilation

2021-05-18 Thread David Gibson
On Tue, May 18, 2021 at 12:05:09PM -0300, Bruno Larsen (billionai) wrote: > When the function was moved to cpu.c, it should have been wrapped with > #if !defined(CONFIG_USER_ONLY), otherwise linux-user builds don't work. I already corrected this in my tree, folding it into the original change to

Re: [PATCH v2 7/7] target/ppc: wrapped some TCG only logic with ifdefs

2021-05-18 Thread David Gibson
On Tue, May 18, 2021 at 12:05:15PM -0300, Bruno Larsen (billionai) wrote: > Wrapped some function calls in cpu_init.c, gdbstub.c, mmu-hash64.c and > excp_helper.c that were TCG only with ifdef CONFIG_TCG, to support > building without TCG. > > for excp_helper we also moved the function do_rfi

Re: [PATCH] Fix `lxvdsx` (issue #212)

2021-05-18 Thread David Gibson
On Tue, May 18, 2021 at 09:30:38AM +0200, Greg Kurz wrote: > On Tue, 18 May 2021 08:40:36 +0200 > Giuseppe Musacchio wrote: > > > The ISA [1] specifies the load order to be the target one, hence > > the use of MO_TEQ in my patch (in both lxvwsx and lxvdsx). > > > > I believe the error is hidden

[PATCH v4] plugins/syscall: Added a table-like summary output

2021-05-18 Thread Mahmoud Mandour
Added a table-like output which contains the total number of calls for each used syscall along with the number of errors that occurred. Per-call tracing is still available through supplying the argument ``print`` to the plugin. Signed-off-by: Mahmoud Mandour --- v3 -> v4: Added a missing

Re: [RFC PATCH v2 5/6] hw/arm/virt-acpi-build: Add PPTT table

2021-05-18 Thread wangyanan (Y)
On 2021/5/19 3:22, Salil Mehta wrote: From: Andrew Jones [mailto:drjo...@redhat.com] Sent: Tuesday, May 18, 2021 8:06 PM To: Salil Mehta Cc: wangyanan (Y) ; Peter Maydell ; Michael S . Tsirkin ; Wanghaibin (D) ; qemu-devel@nongnu.org; Shannon Zhao ; qemu-...@nongnu.org; Alistair Francis ;

Re: [PATCH] fw_cfg: Set the max fw_cfg mem read size to 8 bytes

2021-05-18 Thread yangxiaojuan
Hi,Laszlo Thanks for your kindly reply.This is my first time to submit code to the community. I spent some time learning how to configure the email and reply. Yes you are right, fw_cfg_init_mem_wide can solve my problem. I just want to access 8 bytes width.I did not look at the code carefully.I

GSoC introduction: Rust vhost-user-scsi device

2021-05-18 Thread Gaelan Steele
Hello all, I'm Gaelan Steele, one of QEMU's Google Summer of Code students this year. My mentor (Sergio Lopez) has asked me to introduce myself and my project here. As you all may know, QEMU supports virtio-scsi in one of two ways: it can use a built-in C implementation, running in the main QEMU

RE: [PATCH Resend] block/quorum: Provide .bdrv_co_flush instead of .bdrv_co_flush_to_disk

2021-05-18 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Tuesday, May 18, 2021 7:42 PM > To: qemu-devel > Cc: qemu-block ; Alberto Garcia > ; Kevin Wolf ; Max Reitz > ; Minghao Yuan ; Zhang, Chen > ; Zhang Chen > Subject: [PATCH Resend] block/quorum: Provide .bdrv_co_flush instead > of

Re: [PATCH v5 00/13] virtio-gpu: Add support for Blob resources feature (v5)

2021-05-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210519001414.786439-1-vivek.kasire...@intel.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210519001414.786439-1-vivek.kasire...@intel.com Subject: [PATCH v5 00/13]

[PATCH v5 13/13] virtio-gpu: Update cursor data using blob

2021-05-18 Thread Vivek Kasireddy
If a blob is available for the cursor, copy the data from the blob. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hw/display/virtio-gpu.c

[PATCH v5 11/13] virtio-gpu: Factor out update scanout

2021-05-18 Thread Vivek Kasireddy
Creating a small helper function for updating the scanout will be useful in the next patch where this needs to be done early in do_set_scanout before returning. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 35 +++ 1 file

[PATCH v5 07/13] virtio-gpu: Add initial definitions for blob resources

2021-05-18 Thread Vivek Kasireddy
Add the property bit, configuration flag and other relevant macros and definitions associated with this feature. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-base.c | 3 +++ hw/display/virtio-gpu.c| 14 ++

[PATCH v5 06/13] virtio-gpu: Refactor virtio_gpu_create_mapping_iov

2021-05-18 Thread Vivek Kasireddy
Instead of passing the attach_backing object to extract nr_entries and offset, explicitly pass these as arguments to this function. This will be helpful when adding create_blob API. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-virgl.c | 3 ++-

[PATCH v5 05/13] virtio-gpu: Refactor virtio_gpu_set_scanout

2021-05-18 Thread Vivek Kasireddy
Store the meta-data associated with a FB in a new object (struct virtio_gpu_framebuffer) and pass the object to set_scanout. Also move code in set_scanout into a do_set_scanout function. This will be helpful when adding set_scanout_blob API. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann

[PATCH v5 03/13] virtio-gpu: Add udmabuf helpers

2021-05-18 Thread Vivek Kasireddy
Add helper functions to create a dmabuf for a resource and mmap it. Also, introduce the fields blob and blob_size so that these helpers can start to use them but the full picture will emerge only after adding create_blob API in patch 8 of this series. To be able to create a dmabuf using the

[PATCH v5 12/13] virtio-gpu: Add virtio_gpu_set_scanout_blob

2021-05-18 Thread Vivek Kasireddy
This API allows Qemu to set the blob allocated by the Guest as the scanout buffer. If Opengl support is available, then the scanout buffer would be submitted as a dmabuf to the UI; if not, a pixman image is created from the scanout buffer and is submitted to the UI via the display surface.

[PATCH v5 02/13] headers: Add udmabuf.h

2021-05-18 Thread Vivek Kasireddy
This adds udmabuf header to standard headers so that the relevant udmabuf objects can be accessed in subsequent patches. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/standard-headers/linux/udmabuf.h | 32

[PATCH v5 10/13] virtio-gpu: Add helpers to create and destroy dmabuf objects

2021-05-18 Thread Vivek Kasireddy
These helpers can be useful for creating dmabuf objects from blobs and submitting them to the UI. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu-udmabuf.c | 74 + include/hw/virtio/virtio-gpu.h | 15 +++ 2 files changed, 89

[PATCH v5 09/13] ui/pixman: Add qemu_pixman_to_drm_format()

2021-05-18 Thread Vivek Kasireddy
This new function to get the drm_format associated with a pixman format will be useful while creating a dmabuf. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/qemu-pixman.h | 1 + ui/qemu-pixman.c | 35

[PATCH v5 01/13] ui: Get the fd associated with udmabuf driver

2021-05-18 Thread Vivek Kasireddy
Try to open the udmabuf dev node for the first time or return the fd if the device was previously opened. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- include/ui/console.h | 3 +++ ui/meson.build | 1 + ui/udmabuf.c | 40

[PATCH v5 08/13] virtio-gpu: Add virtio_gpu_resource_create_blob

2021-05-18 Thread Vivek Kasireddy
This API allows Qemu to register the blob allocated by the Guest as a new resource and map its backing storage. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/trace-events | 1 + hw/display/virtio-gpu.c | 75

Re: [PATCH v3] target/xtensa: clean up unaligned access

2021-05-18 Thread Max Filippov
Hi Richard, On Tue, May 18, 2021 at 1:11 PM Richard Henderson wrote: > On 5/17/21 3:52 PM, Max Filippov wrote: > > @@ -1784,10 +1770,11 @@ static void translate_l32e(DisasContext *dc, const > > OpcodeArg arg[], > > const uint32_t par[]) > > { > > TCGv_i32

[PATCH v5 00/13] virtio-gpu: Add support for Blob resources feature (v5)

2021-05-18 Thread Vivek Kasireddy
Enabling this feature would eliminate data copies from the resource object in the Guest to the shadow resource in Qemu. This patch series however adds support only for Blobs of type VIRTIO_GPU_BLOB_MEM_GUEST with property VIRTIO_GPU_BLOB_FLAG_USE_SHAREABLE. Most of the patches in this series are

[PATCH v5 04/13] virtio-gpu: Add virtio_gpu_find_check_resource

2021-05-18 Thread Vivek Kasireddy
Move finding the resource and validating its backing storage into one function. Based-on-patch-by: Gerd Hoffmann Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- hw/display/virtio-gpu.c | 66 + 1 file changed, 47 insertions(+), 19 deletions(-) diff

[PATCH 3/3] sensor: Move hardware sensors from misc to a sensor directory

2021-05-18 Thread minyard
From: Corey Minyard Lots of this are expected to be coming in, create a directory for them. Also move the tmp105.h file into the include directory where it should be. Cc: Cédric Le Goater Cc: Peter Maydell Cc: Andrew Jeffery Cc: Joel Stanley Cc: Andrzej Zaborowski Cc: qemu-...@nongnu.org

[PATCH 2/3] adc: Move the max111x driver to the adc directory

2021-05-18 Thread minyard
From: Corey Minyard It's an adc, put it where it belongs. Cc: Andrzej Zaborowski Cc: Peter Maydell Cc: qemu-...@nongnu.org Signed-off-by: Corey Minyard --- MAINTAINERS| 4 ++-- hw/adc/Kconfig | 3 +++ hw/{misc => adc}/max111x.c | 2 +-

[PATCH 1/3] adc: Move the zynq-xadc file to the adc directories

2021-05-18 Thread minyard
From: Corey Minyard It's an ADC, put it where it belongs. Cc: Edgar E. Iglesias Cc: Alistair Francis Cc: Peter Maydell Cc: qemu-...@nongnu.org Signed-off-by: Corey Minyard --- MAINTAINERS | 6 -- hw/adc/meson.build | 1 + hw/{misc =>

[PATCH 0/3] Move some things out of hw/misc

2021-05-18 Thread minyard
hw/misc has collected a few things that could be moved elsewhere. Move two ADC devices into the adc directory. Create a sensor directory and move the sensors into it. There's only a few for now, but the people driving the BMC work are going to be adding many more, and it would really clutter up

[Bug 1875702] Re: madvise reports success, but doesn't implement WIPEONFORK.

2021-05-18 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/343 ** Changed in: qemu Status: Confirmed => Expired **

[Bug 1915535] Re: Assertion `child->perm & BLK_PERM_WRITE' failed in bdrv_co_write_req_prepare through atapi

2021-05-18 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/342 ** Changed in: qemu Status: New => Expired ** Changed

[Bug 1915539] Re: Null-ptr dereference on AHCICmdHdr in ahci_pio_transfer

2021-05-18 Thread Thomas Huth
This is an automated cleanup. This bug report has been moved to QEMU's new bug tracker on gitlab.com and thus gets marked as 'expired' now. Please continue with the discussion here: https://gitlab.com/qemu-project/qemu/-/issues/341 ** Changed in: qemu Status: Confirmed => Expired **

Re: [PATCH 4/4] aspeed: sonorapass: enable pca954x muxes

2021-05-18 Thread Joel Stanley
On Tue, 18 May 2021 at 19:41, Patrick Venture wrote: > > Enables the pca954x muxes in the bmc board configuration. > > Signed-off-by: Patrick Venture > Reviewed-by: Hao Wu Not sure about this one, there's no device tree for it in Linux. > --- > hw/arm/aspeed.c | 22 +++--- >

Re: [PATCH 3/4] hw/arm: quanta-q71l add pca954x muxes

2021-05-18 Thread Joel Stanley
On Tue, 18 May 2021 at 19:41, Patrick Venture wrote: > > Adds the pca954x muxes expected. > > Tested: Booted quanta-q71l image to userspace. > Signed-off-by: Patrick Venture > Reviewed-by: Hao Wu Reviewed-by: Joel Stanley

Re: [PATCH 2/4] hw/arm: gsj add pca9548

2021-05-18 Thread Joel Stanley
On Tue, 18 May 2021 at 19:41, Patrick Venture wrote: > > Tested: Quanta-gsj firmware booted. > > i2c /dev entries driver > I2C init bus 1 freq 10 > I2C init bus 2 freq 10 > I2C init bus 3 freq 10 > I2C init bus 4 freq 10 > I2C init bus 8 freq 10 > I2C init bus 9 freq 10 >

Re: [PATCH 1/4] hw/arm: gsj add i2c comments

2021-05-18 Thread Joel Stanley
On Tue, 18 May 2021 at 19:41, Patrick Venture wrote: > > Adds comments to the board init to identify missing i2c devices. > > Signed-off-by: Patrick Venture > Reviewed-by: Hao Wu Reviewed-by: Joel Stanley

Re: [RFC PATCH 02/11] hw/ide: Add PCIIDEState::isa_bus link

2021-05-18 Thread BALATON Zoltan
On Tue, 18 May 2021, Philippe Mathieu-Daudé wrote: IDE bus depends on ISA bus for IRQ/DMA. Add an ISABus reference in PCIIDEState, and add link properties to it in the PIIX and VIA objects (which inherit PCI_IDE). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ide/pci.h | 1 +

[PATCH 1/2] Hexagon (target/hexagon) fix bug in fLSBNEW*

2021-05-18 Thread Taylor Simpson
Change fLSBNEW/fLSBNEW0/fLSBNEW1 from copy to "x & 1" Remove gen_logical_not function Clean up fLSBNEWNOT to use andi-1 followed by xori-1 Test cases added to tests/tcg/hexagon/misc.c Signed-off-by: Taylor Simpson --- target/hexagon/macros.h| 27 ++-

[PATCH 0/2] Hexagon (target/hexagon) bug fixes

2021-05-18 Thread Taylor Simpson
Fixes for bugs found by inspection and internal testing Tests added to tests/tcg/hexagon/misc.c Taylor Simpson (2): Hexagon (target/hexagon) fix bug in fLSBNEW* Hexagon (target/hexagon) fix l2fetch instructions target/hexagon/gen_tcg.h | 11 target/hexagon/macros.h

[PATCH 2/2] Hexagon (target/hexagon) fix l2fetch instructions

2021-05-18 Thread Taylor Simpson
Y4_l2fetch == l2fetch(Rs32, Rt32) Y5_l2fetch == l2fetch(Rs32, Rtt32) The semantics for these instructions are present, but the encodings are missing. Note that these are treated as nops in qemu, so we add overrides. Test case added to tests/tcg/hexagon/misc.c Signed-off-by: Taylor Simpson ---

[PATCH 1/2] Hexagon (target/hexagon) fix bug in fLSBNEW*

2021-05-18 Thread Taylor Simpson
Change fLSBNEW/fLSBNEW0/fLSBNEW1 from copy to "x & 1" Remove gen_logical_not function Clean up fLSBNEWNOT to use andi-1 followed by xori-1 Test cases added to tests/tcg/hexagon/misc.c Signed-off-by: Taylor Simpson --- target/hexagon/macros.h| 27 ++-

[PATCH 2/2] Hexagon (target/hexagon) fix l2fetch instructions

2021-05-18 Thread Taylor Simpson
Y4_l2fetch == l2fetch(Rs32, Rt32) Y5_l2fetch == l2fetch(Rs32, Rtt32) The semantics for these instructions are present, but the encodings are missing. Note that these are treated as nops in qemu, so we add overrides. Test case added to tests/tcg/hexagon/misc.c Signed-off-by: Taylor Simpson ---

[RFC PATCH 10/11] hw/isa: Remove use of global isa bus

2021-05-18 Thread Philippe Mathieu-Daudé
In the previous commit we removed all call to these functions passing a NULL ISADevice argument. We can simplify and remove the use of the global isabus object. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-bus.c | 23 +-- 1 file changed, 17 insertions(+), 6

[RFC PATCH 07/11] hw/isa: Simplify isa_get_irq()

2021-05-18 Thread Philippe Mathieu-Daudé
Previous commit removed the calls to isa_get_irq() passing a NULL ISADevice. Simplify the assertion, removing the use on the global isabus object. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/isa-bus.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/isa/isa-bus.c

[RFC PATCH 08/11] hw/isa: Extract bus part from isa_register_portio_list()

2021-05-18 Thread Philippe Mathieu-Daudé
isa_register_portio_list() takes an ISADevice argument mostly to resolve the ISA bus. Extract the bus logic to a new function: isa_bus_register_portio_list(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/isa/isa.h | 4 hw/isa/isa-bus.c | 17 + 2 files changed,

[RFC PATCH 04/11] hw/ide/via: Set the ISA-bus QOM link

2021-05-18 Thread Philippe Mathieu-Daudé
Set the ISA Bus link property on the VIA IDE object from the two unique users, the Fuloong and Pegasos machines. Add a check in via_ide_realize() to be sure this property is set. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/via.c| 5 + hw/mips/fuloong2e.c | 4

[RFC PATCH 09/11] hw/ide: Let ide_init_ioport() take an ISA bus argument instead of device

2021-05-18 Thread Philippe Mathieu-Daudé
Both callers to ide_init_ioport() have access to the ISA bus of the device, so can pass it directly. This allows ide_init_ioport() to directly call isa_bus_register_portio_list(). Note, now the callers become the owner of the PortioList. Signed-off-by: Philippe Mathieu-Daudé ---

[RFC PATCH 11/11] hw/isa: Rename isabus singleton as 'g_isabus'

2021-05-18 Thread Philippe Mathieu-Daudé
To make explicit the isabus singleton isn't used anywhere else, move it's static declaration locally to isa_bus_new() and rename it as 'g_isabus'. Unfortunately we provide the get_system_io() call which expose an unique I/O bus to a machine, and the ISA bus rely on this I/O bus, so we can not

[RFC PATCH 01/11] hw/isa: Explode pci_create_simple() calls

2021-05-18 Thread Philippe Mathieu-Daudé
To be able to set a property on the ISA-IDE bridges objects before they are realized, explode the pci_create_simple() calls as pci_new() + pci_realize_and_unref(). Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 5 +++-- hw/isa/piix4.c | 3 ++- hw/mips/fuloong2e.c | 3 ++-

[RFC PATCH 02/11] hw/ide: Add PCIIDEState::isa_bus link

2021-05-18 Thread Philippe Mathieu-Daudé
IDE bus depends on ISA bus for IRQ/DMA. Add an ISABus reference in PCIIDEState, and add link properties to it in the PIIX and VIA objects (which inherit PCI_IDE). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ide/pci.h | 1 + hw/ide/piix.c| 11 ++- hw/ide/via.c

[RFC PATCH 06/11] hw/ide: Replace isa_get_irq() by isa_bus_get_irq()

2021-05-18 Thread Philippe Mathieu-Daudé
Both PIIX/VIA objects inherit PCI_IDE, thus have a pointer to an ISA bus. Pass this bus argument to isa_bus_get_irq() instead of calling isa_get_irq() with a NULL device. Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/piix.c | 2 +- hw/ide/via.c | 3 ++- 2 files changed, 3 insertions(+), 2

[RFC PATCH 05/11] hw/isa: Extract isa_bus_get_irq() from isa_get_irq()

2021-05-18 Thread Philippe Mathieu-Daudé
isa_get_irq() takes an ISADevice argument mostly to resolve the ISA bus. Extract the bus logic to isa_bus_get_irq(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/isa/isa.h | 1 + hw/isa/isa-bus.c | 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git

[RFC PATCH 03/11] hw/ide/piix: Set the ISA-bus QOM link

2021-05-18 Thread Philippe Mathieu-Daudé
Set the ISA Bus link property on the PIIX IDE object from the two unique users, the PC machine and the PIIX4 function. Add a check in pci_piix_ide_realize() to be sure this property is set. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 2 ++ hw/ide/piix.c | 5 +

[RFC PATCH 00/11] hw/isa: Remove dependencies on ISA bus singleton

2021-05-18 Thread Philippe Mathieu-Daudé
Hi, This series implements the suggestions from Markus analysis: https://www.mail-archive.com/qemu-block@nongnu.org/msg84090.html on the ISA bus. There is still work to do (remove global get_system_io?) but this is enough to convert a crash to an error message, and the changes are simple, so

Re: [PATCH v3 0/5] Add support for PMBus in QEMU

2021-05-18 Thread Titus Rwantare
That would be great. On Tue, 18 May 2021, 16:59 Corey Minyard, wrote: > > On Tue, May 18, 2021 at 03:50:57PM -0400, Titus Rwantare wrote: > > I would also like a directory for sensors. There are quite a few of > > those incoming. Any objections? > > None from me. I'll add a patch to move all

[PATCH v2 5/7] virtiofsd: Simplify skip byte logic

2021-05-18 Thread Vivek Goyal
We need to skip bytes in two cases. a. Before we start reading into in_sg, we need to skip iov_len bytes in the beginning which typically will have fuse_out_header. b. If preadv() does a short read, then we need to retry preadv() with remainig bytes and skip the bytes preadv() read in

[PATCH v2 2/7] virtiofsd: Get rid of unreachable code in read

2021-05-18 Thread Vivek Goyal
pvreadv() can return following. - error - 0 in case of EOF - short read We seem to handle all the cases already. We are retrying read in case of short read. So another check for short read seems like dead code. Get rid of it. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Connor Kuehl

[PATCH v2 1/7] virtiofsd: Check for EINTR in preadv() and retry

2021-05-18 Thread Vivek Goyal
We don't seem to check for EINTR and retry. There are other places in code where we check for EINTR. So lets add a check. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Connor Kuehl Signed-off-by: Vivek Goyal --- tools/virtiofsd/fuse_virtio.c | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH v2 7/7] virtiofsd: Set req->reply_sent right after sending reply

2021-05-18 Thread Vivek Goyal
There is no reason to set it in label "err". We should be able to set it right after sending reply. It is easier to read. Also got rid of label "err" because now only thing it was doing was return a code. We can return from the error location itself and no need to first jump to label "err".

[PATCH v2 0/7] virtiofsd: Few cleanups in virtio_send_data_iov()

2021-05-18 Thread Vivek Goyal
Hi, This is V2 of the patches. Changes since V1 are. - Took care of coding style issue. - Got rid of label "err" completely in last patch. (Dave, Connor). - Captured Reviewed-by tags from Connor and David. Code in virtio_send_data_iov() little twisted and complicated. This patch series just

[PATCH v2 6/7] virtiofsd: Check EOF before short read

2021-05-18 Thread Vivek Goyal
In virtio_send_data_iov() we are checking first for short read and then EOF condition. Change the order. Basically check for error and EOF first and last remaining piece is short ready which will lead to retry automatically at the end of while loop. Just that it is little simpler to read to the

[PATCH v2 4/7] virtiofsd: get rid of in_sg_left variable

2021-05-18 Thread Vivek Goyal
in_sg_left seems to be being used primarly for debugging purpose. It is keeping track of how many bytes are left in the scatter list we are reading into. We already have another variable "len" which keeps track how many bytes are left to be read. And in_sg_left is greater than or equal to len. We

[PATCH v2 3/7] virtiofsd: Use iov_discard_front() to skip bytes

2021-05-18 Thread Vivek Goyal
There are places where we need to skip few bytes from front of the iovec array. We have our own custom code for that. Looks like iov_discard_front() can do same thing. So use that helper instead. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Connor Kuehl Signed-off-by: Vivek Goyal ---

[PATCH 2/2] esp: only set ESP_RSEQ at the start of the select sequence

2021-05-18 Thread Mark Cave-Ayland
When processing a command to select a target and send a CDB, the ESP device maintains a sequence step register so that if an error occurs the host can determine which part of the selection/CDB submission sequence failed. The old Linux 2.6 driver is really pedantic here: it checks the sequence

[PATCH 0/2] esp: minor fixes for older Linux versions

2021-05-18 Thread Mark Cave-Ayland
Following on from the ESP changes in QEMU 6.0 someone pointed out that the old Linux 2.6 ESP driver as used in Aurelian's SPARC image at https://people.debian.org/~aurel32/qemu/sparc/ emits a constant stream of "esp0: STEP_ASEL for tgt 0" messages to the console during boot. These patches solve

[PATCH 1/2] esp: only assert INTR_DC interrupt flag if selection fails

2021-05-18 Thread Mark Cave-Ayland
The datasheet sequence tables confirm that when a target selection fails, only the INTR_DC interrupt flag should be asserted. Signed-off-by: Mark Cave-Ayland Fixes: cf47a41e05 ("esp: latch individual bits in ESP_RINTR register") --- hw/scsi/esp.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH qemu] Add basic power management to raspi.

2021-05-18 Thread ~nolanl
From: Nolan Leake This is just enough to make reboot and poweroff work. Notably, the watchdog timer functionality is not yet implemented. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/64 Signed-off-by: Nolan Leake --- hw/arm/bcm2835_peripherals.c | 13 ++-

Re: [PATCH] hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine

2021-05-18 Thread John Snow
On 4/28/21 5:32 AM, Thomas Huth wrote: On 28/04/2021 11.24, Stefan Hajnoczi wrote: On Fri, Apr 16, 2021 at 02:52:56PM +0200, Thomas Huth wrote: @@ -158,7 +166,11 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error **errp)   vmstate_register(VMSTATE_IF(dev), 0, _ide_pci, d); -   

Re: [PATCH v3 0/5] Add support for PMBus in QEMU

2021-05-18 Thread Corey Minyard
On Tue, May 18, 2021 at 03:50:57PM -0400, Titus Rwantare wrote: > I would also like a directory for sensors. There are quite a few of > those incoming. Any objections? None from me. I'll add a patch to move all the sensors from misc into it, if you like. -corey > > -Titus > > On Tue, 18 May

Re: [PULL 00/59] Linux user for 6.1 patches

2021-05-18 Thread Peter Maydell
On Tue, 18 May 2021 at 06:33, Laurent Vivier wrote: > > The following changes since commit 6d34aa9969ff85ca6eaeb4dc1988a4d4e13e7d79: > > Merge remote-tracking branch 'remotes/marcandre/tags/rtd-pull-request' into > staging (2021-05-14 17:20:08 +0100) > > are available in the Git repository at:

[PATCH 24/24] target/ppc: Restrict ppc_cpu_tlb_fill to TCG

2021-05-18 Thread Richard Henderson
This function is used by TCGCPUOps, and is thus TCG specific. Signed-off-by: Richard Henderson --- target/ppc/mmu_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c index 2535ea1836..78e6f7496b 100644 --- a/target/ppc/mmu_helper.c

[PATCH 23/24] target/ppc: Introduce ppc_xlate

2021-05-18 Thread Richard Henderson
Create one common dispatch for all of the ppc_*_xlate functions. Use ppc64_v3_radix to directly dispatch between ppc_radix64_xlate and ppc_hash64_xlate. Remove the separate *_handle_mmu_fault and *_get_phys_page_debug functions, using common code for ppc_cpu_tlb_fill and

[PATCH 22/24] target/ppc: Split out ppc_jumbo_xlate

2021-05-18 Thread Richard Henderson
Mirror the interface of ppc_radix64_xlate (mostly), putting all of the logic for older mmu translation into a single entry point. For booke, we need to add mmu_idx to the xlate-style interface. Signed-off-by: Richard Henderson --- target/ppc/mmu_helper.c | 181

[PATCH 20/24] target/ppc: Split out ppc_hash64_xlate

2021-05-18 Thread Richard Henderson
Mirror the interface of ppc_radix64_xlate, putting all of the logic for hash64 translation into a single function. Signed-off-by: Richard Henderson --- target/ppc/mmu-hash64.c | 125 +++- 1 file changed, 59 insertions(+), 66 deletions(-) diff --git

Re: [RFC PATCH 14/25] qemu/bswap: Introduce load/store for aligned pointer

2021-05-18 Thread Peter Maydell
On Tue, 18 May 2021 at 19:38, Philippe Mathieu-Daudé wrote: > > When the pointer alignment is known to be safe, we can > directly swap the data in place, without having to rely > on the compiler builtin code. > > Load/store methods expecting aligned pointer use the 'a' > infix. For example to

[PATCH 21/24] target/ppc: Split out ppc_hash32_xlate

2021-05-18 Thread Richard Henderson
Mirror the interface of ppc_radix64_xlate, putting all of the logic for hash32 translation into a single entry point. Signed-off-by: Richard Henderson --- target/ppc/mmu-hash32.c | 224 1 file changed, 113 insertions(+), 111 deletions(-) diff --git

Re: [PATCH V3 00/22] Live Update

2021-05-18 Thread Steven Sistare
On 5/18/2021 3:23 PM, Dr. David Alan Gilbert wrote: > * Steven Sistare (steven.sist...@oracle.com) wrote: >> On 5/18/2021 5:57 AM, Dr. David Alan Gilbert wrote: >>> * Steven Sistare (steven.sist...@oracle.com) wrote: On 5/14/2021 7:53 AM, Stefan Hajnoczi wrote: > On Thu, May 13, 2021 at

[PATCH 19/24] target/ppc: Use bool success for ppc_radix64_xlate

2021-05-18 Thread Richard Henderson
Instead of returning non-zero for failure, return true for success. Signed-off-by: Richard Henderson --- target/ppc/mmu-radix64.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/target/ppc/mmu-radix64.c b/target/ppc/mmu-radix64.c index

[PATCH 18/24] target/ppc: Push real-mode handling into ppc_radix64_xlate

2021-05-18 Thread Richard Henderson
This removes some incomplete duplication between ppc_radix64_handle_mmu_fault and ppc_radix64_get_phys_page_debug. The former was correct wrt SPR_HRMOR and the latter was not. Signed-off-by: Richard Henderson --- target/ppc/mmu-radix64.c | 77 ++-- 1 file

[PATCH 16/24] target/ppc: Remove PowerPCCPUClass.handle_mmu_fault

2021-05-18 Thread Richard Henderson
Instead, use a switch on env->mmu_model. This avoids some replicated information in cpu setup. Signed-off-by: Richard Henderson --- target/ppc/cpu-qom.h| 1 - target/ppc/cpu_init.c | 45 - target/ppc/mmu_helper.c | 24 ++ 3

[PATCH 13/24] target/ppc: Remove type argument from mmubooke_get_physical_address

2021-05-18 Thread Richard Henderson
It is no longer used. Signed-off-by: Richard Henderson --- target/ppc/mmu_helper.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/ppc/mmu_helper.c b/target/ppc/mmu_helper.c index 83e7e0dd13..bf0fcca9be 100644 --- a/target/ppc/mmu_helper.c +++

  1   2   3   4   5   6   >