Re: PING: [PATCH] KVM: HWPoison: Fix memory address&size during remap

2022-08-04 Thread Eiichi Tsukata
Hi We’ve also hit this case. > On May 5, 2022, at 9:32, zhenwei pi wrote: > > Hi, Paolo > > I would appreciate it if you could review patch. > > On 4/20/22 14:45, zhenwei pi wrote: >> qemu exits during reset with log: >> qemu-system-x86_64: Could not remap addr: 1000@22001000 >> Currently, a

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Michael S. Tsirkin
On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > The boot parameter header refers to setup_data at an absolute address, > and each setup_data refers to the next setup_data at an absolute address > too. Currently QEMU simply puts the setup_datas right after the kernel > image, a

Re: [PATCH v7 07/14] KVM: Use gfn instead of hva for mmu_notifier_retry

2022-08-04 Thread Isaku Yamahata
On Wed, Jul 06, 2022 at 04:20:09PM +0800, Chao Peng wrote: > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > index 0bdb6044e316..e9153b54e2a4 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -1362,10 +1362,8 @@ void kvm_mmu_free_memory_cache(struct

[PATCH v1 1/1] QIOChannelSocket: Add support for MSG_ZEROCOPY + IPV6

2022-08-04 Thread Leonardo Bras
For using MSG_ZEROCOPY, there are two steps: 1 - io_writev() the packet, which enqueues the packet for sending, and 2 - io_flush(), which gets confirmation that all packets got correctly sent Currently, if MSG_ZEROCOPY is used to send packets over IPV6, no error will be reported in (1), but it wil

Re: [PATCH 1/2] hw/arm/virt: Improve address assignment for highmem IO regions

2022-08-04 Thread Eric Auger
On 8/4/22 04:47, Gavin Shan wrote: > Hi Eric, > > On 8/3/22 10:52 PM, Eric Auger wrote: >> On 8/3/22 15:02, Gavin Shan wrote: >>> On 8/3/22 5:01 PM, Marc Zyngier wrote: On Wed, 03 Aug 2022 04:01:04 +0100, Gavin Shan wrote: > On 8/2/22 7:41 PM, Eric Auger wrote: >> On 8/2/22 08

Re: [PATCH v5 02/10] vhost: use SVQ element ndescs instead of opaque data for desc validation

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 1:57 PM Eugenio Perez Martin wrote: > > On Thu, Aug 4, 2022 at 5:01 AM Jason Wang wrote: > > > > > > 在 2022/8/3 01:57, Eugenio Pérez 写道: > > > Since we're going to allow SVQ to add elements without the guest's > > > knowledge and without its own VirtQueueElement, it's easie

Re: [PATCH v5 03/10] vhost: Do not depend on !NULL VirtQueueElement on vhost_svq_flush

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 2:21 PM Eugenio Perez Martin wrote: > > On Thu, Aug 4, 2022 at 5:14 AM Jason Wang wrote: > > > > > > 在 2022/8/3 01:57, Eugenio Pérez 写道: > > > Since QEMU will be able to inject new elements on CVQ to restore the > > > state, we need not to depend on a VirtQueueElement to kn

Re: [PATCH v5 06/10] vdpa: Make vhost_vdpa_net_cvq_map_elem accept any out sg

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 6:17 AM Jason Wang wrote: > > > 在 2022/8/3 01:57, Eugenio Pérez 写道: > > So its generic enough to accept any out sg buffer and we can inject > > NIC state messages. > > > > Signed-off-by: Eugenio Pérez > > --- > > v5: Accept out sg instead of dev_buffers[] > > --- > > net/

Re: [PATCH] virtio-scsi: fix race in virtio_scsi_dataplane_start()

2022-08-04 Thread Stefano Garzarella
On Wed, Aug 03, 2022 at 12:28:24PM -0400, Stefan Hajnoczi wrote: As soon as virtio_scsi_data_plane_start() attaches host notifiers the IOThread may start virtqueue processing. There is a race between IOThread virtqueue processing and virtio_scsi_data_plane_start() because it only assigns s->datap

[PATCH for-7.1] virtiofsd: Fix format strings

2022-08-04 Thread Stefan Weil via
Signed-off-by: Stefan Weil --- I have also several patches which add missing G_GNUC_PRINTF. Would such changes still be wanted for 7.1? Regards, Stefan Weil tools/virtiofsd/fuse_lowlevel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/virtiofsd/fuse_lowlevel.c b

Re: [PATCH v4 2/2] target/s390x: support SHA-512 extensions

2022-08-04 Thread Christian Borntraeger
Am 04.08.22 um 08:51 schrieb Harald Freudenberger: On 2022-08-03 14:14, Jason A. Donenfeld wrote: Hi David, On Wed, Aug 03, 2022 at 01:55:21PM +0200, David Hildenbrand wrote: On 02.08.22 21:00, Jason A. Donenfeld wrote: > In order to fully support MSA_EXT_5, we have to also support the SHA-

Re: [PATCH v5 06/10] vdpa: Make vhost_vdpa_net_cvq_map_elem accept any out sg

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 3:39 PM Eugenio Perez Martin wrote: > > On Thu, Aug 4, 2022 at 6:17 AM Jason Wang wrote: > > > > > > 在 2022/8/3 01:57, Eugenio Pérez 写道: > > > So its generic enough to accept any out sg buffer and we can inject > > > NIC state messages. > > > > > > Signed-off-by: Eugenio Pé

Re: [PATCH v3 4/7] vdpa: Add asid parameter to vhost_vdpa_dma_map/unmap

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 6:36 AM Jason Wang wrote: > > > 在 2022/8/4 01:18, Eugenio Pérez 写道: > > So the caller can choose which ASID is destined. > > > > No need to update the batch functions as they will always be called from > > memory listener updates at the moment. Memory listener updates will >

Re: [PATCH v3 6/7] vhost_net: Add NetClientInfo prepare callback

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 6:46 AM Jason Wang wrote: > > > 在 2022/8/4 01:18, Eugenio Pérez 写道: > > This is used by the backend to perform actions before the device is > > started. > > > > In particular, vdpa will use it to isolate CVQ in its own ASID if > > possible, and start SVQ unconditionally only

Re: [PATCH v3 7/7] vdpa: Always start CVQ in SVQ mode

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 6:44 AM Jason Wang wrote: > > > 在 2022/8/4 01:18, Eugenio Pérez 写道: > > Isolate control virtqueue in its own group, allowing to intercept control > > commands but letting dataplane run totally passthrough to the guest. > > > > Signed-off-by: Eugenio Pérez > > --- > > v3: >

Re: [PATCH v3 4/7] vdpa: Add asid parameter to vhost_vdpa_dma_map/unmap

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 3:48 PM Eugenio Perez Martin wrote: > > On Thu, Aug 4, 2022 at 6:36 AM Jason Wang wrote: > > > > > > 在 2022/8/4 01:18, Eugenio Pérez 写道: > > > So the caller can choose which ASID is destined. > > > > > > No need to update the batch functions as they will always be called fr

Re: [PATCH v3 6/7] vhost_net: Add NetClientInfo prepare callback

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 3:52 PM Eugenio Perez Martin wrote: > > On Thu, Aug 4, 2022 at 6:46 AM Jason Wang wrote: > > > > > > 在 2022/8/4 01:18, Eugenio Pérez 写道: > > > This is used by the backend to perform actions before the device is > > > started. > > > > > > In particular, vdpa will use it to i

Re: [PATCH v7 11/14] KVM: Register/unregister the guest private memory regions

2022-08-04 Thread Chao Peng
On Wed, Aug 03, 2022 at 03:51:24PM +, Sean Christopherson wrote: > On Wed, Aug 03, 2022, Chao Peng wrote: > > On Tue, Aug 02, 2022 at 04:38:55PM +, Sean Christopherson wrote: > > > On Tue, Aug 02, 2022, Sean Christopherson wrote: > > > > I think we should avoid UNMAPPABLE even on the KVM si

Re: [PATCH] scsi-disk: support setting CD-ROM block size via device options.

2022-08-04 Thread Mark Cave-Ayland
On 01/08/2022 12:08, John Millikin wrote: Gentle ping -- this is my first time sending a patch for QEMU and it hasn't shown up in the qemu-devel mailing list web UI yet, so I can't tell whether the mail is being sent/received successfully. On Tue, Jul 26, 2022 at 12:42:06PM +0900, John Millikin

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread Mark Cave-Ayland
On 04/08/2022 00:04, BALATON Zoltan wrote: On Wed, 3 Aug 2022, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h    | 16 +++ hw/ppc/ppc405_uc.c | 71 +++--- 2 files changed, 64 insert

Re: [PATCH] ui/console: fix qemu_console_resize() regression

2022-08-04 Thread Mark Cave-Ayland
On 25/07/2022 17:35, Mark Cave-Ayland wrote: On 25/07/2022 12:58, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The display may be corrupted when changing screen colour depth in qemu-system-ppc/MacOS since 7.0. Is it worth being more specific here? Whilst MacOS with its NDRV d

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Thomas Huth
On 02/08/2022 16.09, Peter Maydell wrote: On Tue, 2 Aug 2022 at 14:53, Thomas Huth wrote: The XHCI code could enter an endless loop in case the guest points QEMU to fetch TRBs from invalid memory areas. Fix it by properly checking the return value of dma_memory_read(). It certainly makes sen

Re: VGA hardware cursor query

2022-08-04 Thread Mark Cave-Ayland
On 01/08/2022 04:58, Elliot Nunn wrote: Dear all, I want to give Mac OS 9 clients access to hardware cursor support, to improve responsiveness in absolute-cursor mode. Would it be acceptable to add a hardware cursor interface to the VGA device? And if so, can anyone advise on an appropriate re

Re: [PATCH v4 2/2] target/s390x: support SHA-512 extensions

2022-08-04 Thread David Hildenbrand
On 04.08.22 08:51, Harald Freudenberger wrote: > On 2022-08-03 14:14, Jason A. Donenfeld wrote: >> Hi David, >> >> On Wed, Aug 03, 2022 at 01:55:21PM +0200, David Hildenbrand wrote: >>> On 02.08.22 21:00, Jason A. Donenfeld wrote: In order to fully support MSA_EXT_5, we have to also support th

Re: [PATCH v5 06/10] vdpa: Make vhost_vdpa_net_cvq_map_elem accept any out sg

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 9:51 AM Jason Wang wrote: > > On Thu, Aug 4, 2022 at 3:39 PM Eugenio Perez Martin > wrote: > > > > On Thu, Aug 4, 2022 at 6:17 AM Jason Wang wrote: > > > > > > > > > 在 2022/8/3 01:57, Eugenio Pérez 写道: > > > > So its generic enough to accept any out sg buffer and we can i

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 07:56:49AM +0200, Claudio Imbrenda wrote: > On Wed, 3 Aug 2022 18:34:45 +0100 > Daniel P. Berrangé wrote: > > > On Wed, Aug 03, 2022 at 07:31:41PM +0200, Claudio Imbrenda wrote: > > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > > > When

Re: [PATCH v2 1/1] osdep: asynchronous teardown for shutdown on Linux

2022-08-04 Thread Daniel P . Berrangé
On Wed, Aug 03, 2022 at 06:34:45PM +0100, Daniel P. Berrangé wrote: > On Wed, Aug 03, 2022 at 07:31:41PM +0200, Claudio Imbrenda wrote: > > This patch adds support for asynchronously tearing down a VM on Linux. > > > > When qemu terminates, either naturally or because of a fatal signal, > > the VM

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Mauro Matteo Cascella
On Tue, Aug 2, 2022 at 3:48 PM Thomas Huth wrote: > > The XHCI code could enter an endless loop in case the guest points > QEMU to fetch TRBs from invalid memory areas. Fix it by properly > checking the return value of dma_memory_read(). > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Thomas Huth
On 04/08/2022 10.45, Mauro Matteo Cascella wrote: On Tue, Aug 2, 2022 at 3:48 PM Thomas Huth wrote: The XHCI code could enter an endless loop in case the guest points QEMU to fetch TRBs from invalid memory areas. Fix it by properly checking the return value of dma_memory_read(). Resolves: htt

Re: [PATCH v5 06/10] vdpa: Make vhost_vdpa_net_cvq_map_elem accept any out sg

2022-08-04 Thread Jason Wang
On Thu, Aug 4, 2022 at 4:19 PM Eugenio Perez Martin wrote: > > On Thu, Aug 4, 2022 at 9:51 AM Jason Wang wrote: > > > > On Thu, Aug 4, 2022 at 3:39 PM Eugenio Perez Martin > > wrote: > > > > > > On Thu, Aug 4, 2022 at 6:17 AM Jason Wang wrote: > > > > > > > > > > > > 在 2022/8/3 01:57, Eugenio

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Peter Maydell
On Thu, 4 Aug 2022 at 09:00, Thomas Huth wrote: > > On 02/08/2022 16.09, Peter Maydell wrote: > > On Tue, 2 Aug 2022 at 14:53, Thomas Huth wrote: > >> > >> The XHCI code could enter an endless loop in case the guest points > >> QEMU to fetch TRBs from invalid memory areas. Fix it by properly > >>

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Laszlo Ersek
On 08/04/22 09:03, Michael S. Tsirkin wrote: > On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: >> The boot parameter header refers to setup_data at an absolute address, >> and each setup_data refers to the next setup_data at an absolute address >> too. Currently QEMU simply puts

Re: [PATCH v2] hw/nvme: Add helper functions for qid-db conversion

2022-08-04 Thread Klaus Jensen
On Aug 3 09:58, Jinhao Fan wrote: > With the introduction of shadow doorbell and ioeventfd, we need to do > frequent conversion between qid and its doorbell offset. The original > hard-coded calculation is confusing and error-prone. Add several helper > functions to do this task. > > Signed-off-b

[RFC PATCH] cputlb and ssi: cache class to avoid expensive object_dynamic_cast_assert (HACK!!!)

2022-08-04 Thread Alex Bennée
Investigating why some BMC models are so slow compared to a plain ARM virt machines I did some profiling of: ./qemu-system-arm -M romulus-bmc -nic user \ -drive file=obmc-phosphor-image-romulus.static.mtd,format=raw,if=mtd \ -nographic -serial mon:stdio And saw that object_dynamic_c

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 10:58:36AM +0200, Laszlo Ersek wrote: > On 08/04/22 09:03, Michael S. Tsirkin wrote: > > On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > >> The boot parameter header refers to setup_data at an absolute address, > >> and each setup_data refers to the nex

Re: [PATCH v1 1/1] QIOChannelSocket: Add support for MSG_ZEROCOPY + IPV6

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 04:10:43AM -0300, Leonardo Bras wrote: > For using MSG_ZEROCOPY, there are two steps: > 1 - io_writev() the packet, which enqueues the packet for sending, and > 2 - io_flush(), which gets confirmation that all packets got correctly sent > > Currently, if MSG_ZEROCOPY is use

Re: [PATCH 0/2] vmgenid: add generation counter

2022-08-04 Thread Chalios, Babis
Hi Daniel, On 3/8/22 18:26, Daniel P. Berrangé wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. On Wed, Aug 03, 2022 at 03:41:45PM +0200, bchal...@amazon.es wrote:

Re: [PATCH 0/2] vmgenid: add generation counter

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 11:54:05AM +0200, Chalios, Babis wrote: > Hi Daniel, > > On 3/8/22 18:26, Daniel P. Berrangé wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you can confirm the sender and know > > the content i

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Thomas Huth
On 04/08/2022 10.56, Peter Maydell wrote: On Thu, 4 Aug 2022 at 09:00, Thomas Huth wrote: On 02/08/2022 16.09, Peter Maydell wrote: On Tue, 2 Aug 2022 at 14:53, Thomas Huth wrote: The XHCI code could enter an endless loop in case the guest points QEMU to fetch TRBs from invalid memory area

Re: [PATCH v2 00/20] ppc: QOM'ify 405 board

2022-08-04 Thread Daniel Henrique Barboza
On 8/4/22 03:07, Cédric Le Goater wrote: Daniel, On 8/3/22 15:28, Cédric Le Goater wrote: Hello, Here is large series QOM'ifying the PPC405 board. It introduces a new generic machine and SoC models, converts the current device models to QOM and populates the SoC. The process is quite mechan

Re: [PATCH v2 1/2] virtio: document vdc->get_features() callback

2022-08-04 Thread Cornelia Huck
On Wed, Aug 03 2022, Stefan Hajnoczi wrote: > Suggested-by: Cornelia Huck > Signed-off-by: Stefan Hajnoczi > --- > include/hw/virtio/virtio.h | 20 > 1 file changed, 20 insertions(+) > > diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h > index db1c0ddf6

Re: [PATCH 0/2] vmgenid: add generation counter

2022-08-04 Thread Chalios, Babis
On 4/8/22 12:02, Daniel P. Berrangé wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. On Thu, Aug 04, 2022 at 11:54:05AM +0200, Chalios, Babis wrote: Hi Daniel, On

Re: [PATCH v2 2/2] virtio: remove unnecessary host_features in ->get_features()

2022-08-04 Thread Cornelia Huck
On Wed, Aug 03 2022, Stefan Hajnoczi wrote: > Since at least commit 6b8f1020540c27246277377aa2c3331ad2bfb160 ("virtio: > move host_features") the ->get_features() function has been called with > host_features as an argument. > > Some devices manually add host_features in ->get_features() although

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Peter Maydell
On Thu, 4 Aug 2022 at 11:07, Thomas Huth wrote: > > On 04/08/2022 10.56, Peter Maydell wrote: > > But the point of TRB_LINK_LIMIT is that regardless of what the > > contents of the TRBs are, the loop is not supposed to > > be able to continue for more than TRB_LINK_LIMIT iterations, > > ie 32 time

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Ard Biesheuvel
On Thu, 4 Aug 2022 at 11:25, Daniel P. Berrangé wrote: > > On Thu, Aug 04, 2022 at 10:58:36AM +0200, Laszlo Ersek wrote: > > On 08/04/22 09:03, Michael S. Tsirkin wrote: > > > On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > > >> The boot parameter header refers to setup_data

Re: [PATCH] hw/net/rocker: Avoid undefined shifts with more than 31 ports

2022-08-04 Thread Peter Maydell
Ping? thanks -- PMM On Fri, 29 Jul 2022 at 16:59, Peter Maydell wrote: > > In rocker_port_phys_link_status() and rocker_port_phys_enable_read() > we construct a 64-bit value with one bit per front-panel port. > However we accidentally do the shift as 32-bit arithmetic, which > means that if ther

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread BALATON Zoltan
On Thu, 4 Aug 2022, Mark Cave-Ayland wrote: On 04/08/2022 00:04, BALATON Zoltan wrote: On Wed, 3 Aug 2022, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater --- hw/ppc/ppc405.h    | 16 +++ hw/ppc/ppc405_uc.c | 71 +

Re: [PATCH v5 06/10] vdpa: Make vhost_vdpa_net_cvq_map_elem accept any out sg

2022-08-04 Thread Eugenio Perez Martin
On Thu, Aug 4, 2022 at 10:52 AM Jason Wang wrote: > > On Thu, Aug 4, 2022 at 4:19 PM Eugenio Perez Martin > wrote: > > > > On Thu, Aug 4, 2022 at 9:51 AM Jason Wang wrote: > > > > > > On Thu, Aug 4, 2022 at 3:39 PM Eugenio Perez Martin > > > wrote: > > > > > > > > On Thu, Aug 4, 2022 at 6:17

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Laszlo Ersek
On 08/04/22 12:26, Ard Biesheuvel wrote: > On Thu, 4 Aug 2022 at 11:25, Daniel P. Berrangé wrote: >> >> On Thu, Aug 04, 2022 at 10:58:36AM +0200, Laszlo Ersek wrote: >>> On 08/04/22 09:03, Michael S. Tsirkin wrote: On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > The

Re: [PATCH v2 19/20] ppc/ppc405: QOM'ify I2C

2022-08-04 Thread BALATON Zoltan
On Thu, 4 Aug 2022, Cédric Le Goater wrote: On 8/4/22 01:31, BALATON Zoltan wrote: On Wed, 3 Aug 2022, Cédric Le Goater wrote: Having an explicit I2C model object will help if one day we want to add I2C devices on the bus. Same here as with the UIC in previous patch, it's not QOMifying here

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Thomas Huth
On 04/08/2022 12.17, Peter Maydell wrote: On Thu, 4 Aug 2022 at 11:07, Thomas Huth wrote: On 04/08/2022 10.56, Peter Maydell wrote: But the point of TRB_LINK_LIMIT is that regardless of what the contents of the TRBs are, the loop is not supposed to be able to continue for more than TRB_LINK_L

Re: [PATCH] README.rst: fix link formatting

2022-08-04 Thread Laurent Vivier
Le 03/08/2022 à 11:02, Cornelia Huck a écrit : Make the links render correctly. Signed-off-by: Cornelia Huck --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 23795b837740..21df79ef4379 100644 --- a/README.rst +++ b/README.rs

Re: [RFC v2 00/10] Introduce an extensible static analyzer

2022-08-04 Thread Marc-André Lureau
Hi On Fri, Jul 29, 2022 at 5:01 PM Alberto Faria wrote: > > This series introduces a static analyzer for QEMU. It consists of a > single static-analyzer.py script that relies on libclang's Python > bindings, and provides a common framework on which arbitrary static > analysis checks can be develo

Re: [PATCH] docs/about/removed-features: Move the -soundhw into the right section

2022-08-04 Thread Laurent Vivier
Le 02/08/2022 à 09:56, Thomas Huth a écrit : The note about the removal of '-soundhw' has been accidentally added to the section of removed "linux-user mode CPUs" ... it should reside in the section about removed "System emulator command line arguments" instead. Fixes: 039a68373c ("introduce -au

Re: [PATCH] include/qemu/host-utils.h: Simplify the compiler check in mulu128()

2022-08-04 Thread Laurent Vivier
Le 21/07/2022 à 09:48, Thomas Huth a écrit : We currently require at least GCC 7.4 or Clang 6.0 for compiling QEMU. GCC has __builtin_mul_overflow since version 5 already, and Clang 6.0 also provides this built-in function (see its documentation on this page: https://releases.llvm.org/6.0.0/tools

Re: [PATCH v10 08/21] jobs: add job lock in find_* functions

2022-08-04 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > Both blockdev.c and job-qmp.c have TOC/TOU conditions, because > they first search for the job and then perform an action on it. > Therefore, we need to do the search + action under the same > job mutex critical section. > > Note

[PATCH v11 08/15] target/hexagon: add flex/bison/glib2 to qemu.yml

2022-08-04 Thread Anton Johansson via
Note, the glib2-native mapping exists separately from the normal glib2 mapping. The latter uses a `foreign` cross-policy-default, and libvirt-ci is not able to support package mappings for multiple cross-compilation policies. This will probably change in the future. Signed-off-by: Alessandro Di F

[PATCH v11 01/15] target/hexagon: update MAINTAINERS for idef-parser

2022-08-04 Thread Anton Johansson via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5ce4227ff6..6435d54e33 100

[PATCH v11 03/15] target/hexagon: make slot number an unsigned

2022-08-04 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Acked-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/genptr.c | 24 +--- target/hexagon/macros.h | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) dif

Re: [PATCH] ppc: Remove redundant macro MSR_BOOK3S_MASK.

2022-08-04 Thread Laurent Vivier
Le 28/07/2022 à 22:11, Yonggang Luo a écrit : Signed-off-by: Yonggang Luo --- target/ppc/excp_helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index cb752b184a..7550aafed6 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/exc

[PATCH v11 09/15] target/hexagon: regenerate docker/cirrus files

2022-08-04 Thread Anton Johansson via
This patch updates the docker and cirrus files with the new packages by running tests/lcitool/refresh Signed-off-by: Anton Johansson --- .gitlab-ci.d/cirrus/freebsd-12.vars | 2 +- .gitlab-ci.d/cirrus/freebsd-13.vars | 2 +- .gitlab-ci.d/cirrus/macos-11.vars

[PATCH v11 00/15] target/hexagon: introduce idef-parser

2022-08-04 Thread Anton Johansson via
This patchset introduces the idef-parser for target/hexagon. It's the eleventh iteration of the patchset and includes fixes suggested in previous iterations. idef-parser is a build-time tool built using flex and bison. Its aim is to generate a large part of the tiny code generator frontend for He

[PATCH v11 02/15] target/hexagon: import README for idef-parser

2022-08-04 Thread Anton Johansson via
From: Alessandro Di Federico Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/README | 5 + target/hexagon/idef-parser/README.rst | 722 ++ 2 files changed, 727 insertions(+) create m

[PATCH v11 10/15] target/hexagon: manually add flex/bison/glib2 to remaining containers

2022-08-04 Thread Anton Johansson via
Adds our build-time dependencies to containers which build qemu-hexagon, but aren't covered by libvirt-ci. Signed-off-by: Anton Johansson --- .gitlab-ci.d/windows.yml | 6 -- tests/docker/dockerfiles/debian-riscv64-cross.docker | 3 +++ tests/docker/dockerfiles/de

[PATCH v11 05/15] target/hexagon: introduce new helper functions

2022-08-04 Thread Anton Johansson via
From: Niccolò Izzo These helpers will be employed by the idef-parser generated code, to correctly implement instruction semantics. "Helper" functions, in the context of this patch, refers to functions which provide a manual TCG implementation of certain features. Signed-off-by: Alessandro Di Fed

[PATCH v11 04/15] target/hexagon: make helper functions non-static

2022-08-04 Thread Anton Johansson via
From: Paolo Montesel Make certain helper functions non-static, making them available outside genptr.c. These functions are required by code generated by the idef-parser. This commit also makes some functions in op_helper.c non-static in order to avoid having them marked as unused when using the

[PATCH v11 07/15] target/hexagon: prepare input for the idef-parser

2022-08-04 Thread Anton Johansson via
From: Alessandro Di Federico Introduce infrastructure necessary to produce a file suitable for being parsed by the idef-parser. A build option is also added to fully disable the output of idef-parser, which is useful for debugging. Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Joha

[PATCH v11 12/15] target/hexagon: prepare frontend for parser

2022-08-04 Thread Anton Johansson via
This patch adds the necessary changes to the Hexagon frontend, required by idef-parser to deal with a :mem_noshuf packet with a store in slot 1 and predicated load in slot 0. Signed-off-by: Anton Johansson --- target/hexagon/cpu.h | 8 target/hexagon/translate.c | 22

[PATCH v11 06/15] target/hexagon: expose next PC in DisasContext

2022-08-04 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Reviewed-by: Richard Henderson Reviewed-by: Taylor Simpson --- target/hexagon/translate.c | 3 ++- target/hexagon/translate.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/h

[PATCH v11 11/15] target/hexagon: import lexer for idef-parser

2022-08-04 Thread Anton Johansson via
From: Paolo Montesel Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/idef-parser/idef-parser.h | 254 +++ target/hexagon/idef-parser/idef-parser.lex | 471 + target

[PATCH v11 15/15] target/hexagon: import additional tests

2022-08-04 Thread Anton Johansson via
From: Niccolò Izzo Signed-off-by: Alessandro Di Federico Signed-off-by: Niccolò Izzo Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- tests/tcg/hexagon/Makefile.target | 28 - tests/tcg/hexagon/crt.S| 14 +++ tests/tcg/hexagon/test_abs.S | 17

[PATCH v11 13/15] target/hexagon: import parser for idef-parser

2022-08-04 Thread Anton Johansson via
Signed-off-by: Alessandro Di Federico Signed-off-by: Paolo Montesel Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/idef-parser/idef-parser.y| 964 target/hexagon/idef-parser/parser-helpers.c | 2351 +++ target/hexagon/idef-parser/par

[PATCH v11 14/15] target/hexagon: call idef-parser functions

2022-08-04 Thread Anton Johansson via
From: Alessandro Di Federico Extend gen_tcg_funcs.py in order to emit calls to the functions emitted by the idef-parser, if available. Signed-off-by: Alessandro Di Federico Signed-off-by: Anton Johansson Reviewed-by: Taylor Simpson --- target/hexagon/gen_helper_funcs.py | 17 - target/

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
Hi Ard, On Thu, Aug 4, 2022 at 2:16 PM Ard Biesheuvel wrote: > > On Thu, 4 Aug 2022 at 14:11, Daniel P. Berrangé wrote: > > > > On Thu, Aug 04, 2022 at 02:03:29PM +0200, Jason A. Donenfeld wrote: > > > Hi Daniel, > > > > > > On Thu, Aug 04, 2022 at 10:25:36AM +0100, Daniel P. Berrangé wrote: > >

Re: [PATCH v10 09/21] jobs: use job locks also in the unit tests

2022-08-04 Thread Kevin Wolf
Am 25.07.2022 um 09:38 hat Emanuele Giuseppe Esposito geschrieben: > Add missing job synchronization in the unit tests, with > explicit locks. > > We are deliberately using _locked functions wrapped by a guard > instead of a normal call because the normal call will be removed > in future, as the o

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Ard Biesheuvel
On Thu, 4 Aug 2022 at 14:11, Daniel P. Berrangé wrote: > > On Thu, Aug 04, 2022 at 02:03:29PM +0200, Jason A. Donenfeld wrote: > > Hi Daniel, > > > > On Thu, Aug 04, 2022 at 10:25:36AM +0100, Daniel P. Berrangé wrote: > > > Yep, and ultimately the inability to distinguish UEFI vs other firmware >

Re: [PATCH v4 2/2] target/s390x: support SHA-512 extensions

2022-08-04 Thread Jason A. Donenfeld
Hi, On Thu, Aug 04, 2022 at 10:10:52AM +0200, David Hildenbrand wrote: > > Hm, you don't really want to implement some kind of particial complete. > > Qemu is an emulation and you would have to implement some kind of > > fragmenting this based on machine generation. > > Do we? > > "The > CPU-det

Re: [PULL 9/9] hw/i386: pass RNG seed via setup_data entry

2022-08-04 Thread Daniel P . Berrangé
On Thu, Jul 21, 2022 at 06:36:21PM +0200, Paolo Bonzini wrote: > From: "Jason A. Donenfeld" > > Tiny machines optimized for fast boot time generally don't use EFI, > which means a random seed has to be supplied some other way. For this > purpose, Linux (≥5.20) supports passing a seed in the set

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 02:03:29PM +0200, Jason A. Donenfeld wrote: > Hi Daniel, > > On Thu, Aug 04, 2022 at 10:25:36AM +0100, Daniel P. Berrangé wrote: > > Yep, and ultimately the inability to distinguish UEFI vs other firmware > > is arguably correct by design, as the QEMU <-> firmware interface

Re: [PATCH v2 00/20] ppc: QOM'ify 405 board

2022-08-04 Thread Cédric Le Goater
On 8/4/22 12:07, Daniel Henrique Barboza wrote: On 8/4/22 03:07, Cédric Le Goater wrote: Daniel, On 8/3/22 15:28, Cédric Le Goater wrote: Hello, Here is large series QOM'ifying the PPC405 board. It introduces a new generic machine and SoC models, converts the current device models to QOM an

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
Hi Daniel, On Thu, Aug 04, 2022 at 10:25:36AM +0100, Daniel P. Berrangé wrote: > Yep, and ultimately the inability to distinguish UEFI vs other firmware > is arguably correct by design, as the QEMU <-> firmware interface is > supposed to be arbitrarily pluggable for any firmware implementation > n

Re: [PATCH] hw/usb/hcd-xhci: Fix endless loop in case the DMA access fails (CVE-2020-14394)

2022-08-04 Thread Thomas Huth
On 04/08/2022 13.43, Thomas Huth wrote: On 04/08/2022 12.17, Peter Maydell wrote: On Thu, 4 Aug 2022 at 11:07, Thomas Huth wrote: On 04/08/2022 10.56, Peter Maydell wrote: But the point of TRB_LINK_LIMIT is that regardless of what the contents of the TRBs are, the loop is not supposed to be

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
On Thu, Aug 4, 2022 at 2:17 PM Jason A. Donenfeld wrote: > > Hi Ard, > > On Thu, Aug 4, 2022 at 2:16 PM Ard Biesheuvel wrote: > > > > On Thu, 4 Aug 2022 at 14:11, Daniel P. Berrangé wrote: > > > > > > On Thu, Aug 04, 2022 at 02:03:29PM +0200, Jason A. Donenfeld wrote: > > > > Hi Daniel, > > > >

Re: [PATCH v4 2/2] target/s390x: support SHA-512 extensions

2022-08-04 Thread Jason A. Donenfeld
Hi, On Thu, Aug 04, 2022 at 08:56:19AM +0200, Christian Borntraeger wrote: > We do not support the esa390 mode, but the 24/31 bit _addressing_ modes are > totally valid to be used in zarch mode (with sam31 for example). The kernel > does that for example for some diagnoses under z/VM. > Nobody in

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
On Thu, Aug 4, 2022 at 2:11 PM Jason A. Donenfeld wrote: > > Hi Laszlo, > > On Thu, Aug 04, 2022 at 01:31:36PM +0200, Laszlo Ersek wrote: > > None of the existing info passing methods seem early enough, generic > > enough, and secure enough (at the same time)... > > Can you look at the v2 patch? I

Re: [PULL 9/9] hw/i386: pass RNG seed via setup_data entry

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 02:13:41PM +0200, Jason A. Donenfeld wrote: > Hi Daniel, > > On Thu, Aug 4, 2022 at 2:01 PM Daniel P. Berrangé wrote: > > > > On Thu, Jul 21, 2022 at 06:36:21PM +0200, Paolo Bonzini wrote: > > > From: "Jason A. Donenfeld" > > > > > > Tiny machines optimized for fast boot

Re: [PULL 9/9] hw/i386: pass RNG seed via setup_data entry

2022-08-04 Thread Jason A. Donenfeld
Hi Daniel, On Thu, Aug 4, 2022 at 2:01 PM Daniel P. Berrangé wrote: > > On Thu, Jul 21, 2022 at 06:36:21PM +0200, Paolo Bonzini wrote: > > From: "Jason A. Donenfeld" > > > > Tiny machines optimized for fast boot time generally don't use EFI, > > which means a random seed has to be supplied some

Re: [PATCH] target/riscv: Fix priority of csr related check in riscv_csrrw_check

2022-08-04 Thread Weiwei Li
在 2022/8/4 上午11:38, Anup Patel 写道: On Wed, Aug 3, 2022 at 6:16 PM Weiwei Li wrote: Normally, riscv_csrrw_check is called when executing Zicsr instructions. And we can only do access control for existed CSRs. So the priority of CSR related check, from highest to lowest, should be as follows: 1

[PATCH for-7.1 2/5] target/loongarch: add gdb_arch_name()

2022-08-04 Thread Song Gao
LoongArch gdb_arch_name() is "Loongarch64", Dump from GDB. GNU gdb (GDB) 13.0.50.20220519-git Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 02:44:11AM +0200, Jason A. Donenfeld wrote: > The boot parameter header refers to setup_data at an absolute address, > and each setup_data refers to the next setup_data at an absolute address > too. Currently QEMU simply puts the setup_datas right after the kernel > image, a

[PATCH for-7.1 1/5] target/loongarch: Fix GDB get the wrong pc

2022-08-04 Thread Song Gao
GDB LoongArch add a register orig_a0, see the base64.xml [1]. We should add the orig_a0 to match the upstream GDB. [1]: https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/base64.xml Signed-off-by: Song Gao --- gdb-xml/loongarch-base64.xml | 1 + target/loongarch/cpu.c

[PATCH for-7.1 5/5] target/loongarch: Update gdb_set_fpu() and gdb_get_fpu()

2022-08-04 Thread Song Gao
GDB LoongArch fpu use fcc register, update gdb_set_fpu() and gdb_get_fpu() to match it. Signed-off-by: Song Gao --- target/loongarch/gdbstub.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/target/loongarch/gdbstub.c b/target/loongarch/gdbstub.c in

[PATCH] pc: add property for Linux setup_data seed

2022-08-04 Thread Paolo Bonzini
Using a property makes it possible to use the normal compat property mechanism instead of ad hoc code; it avoids parameter proliferation in x86_load_linux; and allows shipping the code even if it is disabled by default. Cc: Jason A. Donenfeld Cc: Michael S. Tsirkin Signed-off-by: Paolo Bonzini

[PATCH for-7.1 3/5] target/loongarch: update loongarch-base64.xml

2022-08-04 Thread Song Gao
Update loongarch-base64.xml to match the upstream GDB [1]. [1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch/base64.xml Signed-off-by: Song Gao --- gdb-xml/loongarch-base64.xml | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb-xml/l

[PATCH v2 for-7.1] hw/usb/hcd-xhci: Fix unbounded loop in xhci_ring_chain_length() (CVE-2020-14394)

2022-08-04 Thread Thomas Huth
The loop condition in xhci_ring_chain_length() is under control of the guest, and additionally the code does not check for failed DMA transfers (e.g. if reaching the end of the RAM), so the loop there could run for a very long time or even forever. Fix it by checking the return value of dma_memory_

[PATCH for-7.1 0/5] Fix gdb bugs and update gdb-xml

2022-08-04 Thread Song Gao
Hi,All This series fiex LoongArch GDB get the wrong pc, because the xml missing the register orig_a0, and update loongarch gdb-xml to match GDB[1] [1]:https://github.com/bminor/binutils-gdb/blob/master/gdb/features/loongarch Please review! Thanks. Song Gao Song Gao (5): target/loongarch: Fix

Re: [PATCH] pc: add property for Linux setup_data seed

2022-08-04 Thread Daniel P . Berrangé
On Thu, Aug 04, 2022 at 03:13:20PM +0200, Paolo Bonzini wrote: > Using a property makes it possible to use the normal compat property > mechanism instead of ad hoc code; it avoids parameter proliferation > in x86_load_linux; and allows shipping the code even if it is > disabled by default. > > Cc:

Re: [PATCH v2] hw/i386: place setup_data at fixed place in memory

2022-08-04 Thread Jason A. Donenfeld
Hi Laszlo, On Thu, Aug 4, 2022 at 3:17 PM Laszlo Ersek wrote: > > On 08/04/22 14:47, Jason A. Donenfeld wrote: > > On Thu, Aug 4, 2022 at 2:11 PM Jason A. Donenfeld wrote: > >> > >> Hi Laszlo, > >> > >> On Thu, Aug 04, 2022 at 01:31:36PM +0200, Laszlo Ersek wrote: > >>> None of the existing info

Re: [PATCH v2 12/20] ppc/ppc405: QOM'ify EBC

2022-08-04 Thread BALATON Zoltan
On Thu, 4 Aug 2022, Cédric Le Goater wrote: On 8/4/22 01:36, Daniel Henrique Barboza wrote: Cedric, On 8/3/22 10:28, Cédric Le Goater wrote: Reviewed-by: Daniel Henrique Barboza Signed-off-by: Cédric Le Goater ---   hw/ppc/ppc405.h    | 16 +++   hw/ppc/ppc405_uc.c | 71 ++

Re: [PATCH] pc: add property for Linux setup_data seed

2022-08-04 Thread Jason A. Donenfeld
On Thu, Aug 04, 2022 at 03:13:20PM +0200, Paolo Bonzini wrote: > Using a property makes it possible to use the normal compat property > mechanism instead of ad hoc code; it avoids parameter proliferation > in x86_load_linux; and allows shipping the code even if it is > disabled by default. Strong

  1   2   3   >