Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-11 Thread Marc-André Lureau
On Fri, Mar 12, 2021 at 3:14 AM Philippe Mathieu-Daudé wrote: > Introduce the 'query-accels' QMP command which returns a list > of built-in accelerators names. > > - Accelerator is an QAPI enum of all existing accelerators, > > - AcceleratorInfo is a QAPI structure providing accelerator > speci

Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP

2021-03-11 Thread Jason Wang
On 2021/3/12 2:53 下午, Bin Meng wrote: On Fri, Mar 12, 2021 at 2:50 PM Jason Wang wrote: On 2021/3/12 2:28 下午, Bin Meng wrote: On Fri, Mar 12, 2021 at 2:23 PM Jason Wang wrote: On 2021/3/11 6:27 下午, Bin Meng wrote: On Thu, Mar 11, 2021 at 6:22 PM Peter Maydell wrote: On Thu, 11 Mar 2021

Re: 3D Acceleration for Windows hosts?

2021-03-11 Thread Marc-André Lureau
Hi On Fri, Mar 12, 2021 at 2:44 AM John Klimek wrote: > Does QEMU have any support for 3D acceleration on Windows hosts? > > I'm not too familiar with video/graphics libraries, but it seems like > QEMU OpenGL support requires Mesa GBM which is only available for > Linux (DRM/KMS). > In theory,

Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP

2021-03-11 Thread Bin Meng
On Fri, Mar 12, 2021 at 2:50 PM Jason Wang wrote: > > > On 2021/3/12 2:28 下午, Bin Meng wrote: > > On Fri, Mar 12, 2021 at 2:23 PM Jason Wang wrote: > >> > >> On 2021/3/11 6:27 下午, Bin Meng wrote: > >>> On Thu, Mar 11, 2021 at 6:22 PM Peter Maydell > >>> wrote: > On Thu, 11 Mar 2021 at 09:5

Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP

2021-03-11 Thread Jason Wang
On 2021/3/12 2:28 下午, Bin Meng wrote: On Fri, Mar 12, 2021 at 2:23 PM Jason Wang wrote: On 2021/3/11 6:27 下午, Bin Meng wrote: On Thu, Mar 11, 2021 at 6:22 PM Peter Maydell wrote: On Thu, 11 Mar 2021 at 09:58, Bin Meng wrote: On Thu, Mar 11, 2021 at 5:43 PM Peter Maydell wrote: On Thu,

Re: [PATCH 4/4] ui: honour the actual guest display dimensions without rounding

2021-03-11 Thread Marc-André Lureau
On Thu, Mar 11, 2021 at 10:38 PM Daniel P. Berrangé wrote: > A long time ago the VNC server code had some memory corruption > fixes done in: > > commit bea60dd7679364493a0d7f5b54316c767cf894ef > Author: Peter Lieven > Date: Mon Jun 30 10:57:51 2014 +0200 > > ui/vnc: fix potential mem

Re: [PATCH] floppy: remove unused function fdctrl_format_sector

2021-03-11 Thread John Snow
On 1/8/21 6:01 PM, Alexander Bulekov wrote: fdctrl_format_sector was added in baca51faff ("updated floppy driver: formatting code, disk geometry auto detect (Jocelyn Mayer)") The single callsite is guarded by a check: fdctrl->data_state & FD_STATE_FORMAT However, the only place where the FD_ST

Re: [PATCH v2 3/3] tests/qtest: Add test for Aspeed HACE

2021-03-11 Thread Joel Stanley
On Fri, 12 Mar 2021 at 05:53, Thomas Huth wrote: > > On 12/03/2021 00.47, Joel Stanley wrote: > > This adds a test for the Aspeed Hash and Crypto (HACE) engine. It tests > > the currently implemented behavior of the hash functionality. > > > > The tests are similar, but are cut/pasted instead of b

[PATCH] fdc: fix floppy boot for Red Hat Linux 5.2

2021-03-11 Thread John Snow
The image size indicates it's an 81 track floppy disk image, which we don't have a listing for in the geometry table. When you force the drive type to 1.44MB, it guesses the reasonably close 18/80. When the drive type is allowed to auto-detect or set to 2.88, it guesses a very incorrect geometry.

[PULL 16/16] pvrdma: wean code off pvrdma_ring.h kernel header

2021-03-11 Thread Jason Wang
From: Cornelia Huck The pvrdma code relies on the pvrdma_ring.h kernel header for some basic ring buffer handling. The content of that header isn't very exciting, but contains some (q)atomic_*() invocations that (a) cause manual massaging when doing a headers update, and (b) are an indication tha

[PULL 14/16] cadence_gem: switch to use qemu_receive_packet() for loopback

2021-03-11 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alexander Bulekov Signed-off-by:

Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP

2021-03-11 Thread Bin Meng
On Fri, Mar 12, 2021 at 2:23 PM Jason Wang wrote: > > > On 2021/3/11 6:27 下午, Bin Meng wrote: > > On Thu, Mar 11, 2021 at 6:22 PM Peter Maydell > > wrote: > >> On Thu, 11 Mar 2021 at 09:58, Bin Meng wrote: > >>> On Thu, Mar 11, 2021 at 5:43 PM Peter Maydell > >>> wrote: > On Thu, 11 Mar

[PULL 10/16] sungem: switch to use qemu_receive_packet() for loopback

2021-03-11 Thread Jason Wang
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Mark Cave-Ayland Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Signed-off-b

Re: qemu broke booting of old RedHat floppies

2021-03-11 Thread John Snow
On 1/20/21 10:41 AM, Thomas Huth wrote: On 20/01/2021 16.11, Michael Tokarev wrote: As someone noticed on IRC, old (2.x) RedHat floppies does not boot in current qemu.  When qemu is booted from floppy image at   https://archive.org/details/RedHatLinuxBootDisk521998 (download the "ISO image" link

Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP

2021-03-11 Thread Jason Wang
On 2021/3/9 8:30 下午, Yan Vugenfirer wrote: On 9 Mar 2021, at 12:13 PM, Peter Maydell > wrote: On Tue, 9 Mar 2021 at 09:01, Bin Meng > wrote: Hi Jason, On Tue, Mar 9, 2021 at 5:00 PM Bin Meng > wrote:

[PULL 09/16] msf2-mac: switch to use qemu_receive_packet() for loopback

2021-03-11 Thread Jason Wang
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/msf2-emac.c | 2 +- 1 file changed,

[PULL 13/16] pcnet: switch to use qemu_receive_packet() for loopback

2021-03-11 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Buglink: https://bugs.launchpad.net/qemu/+bug/1917085 Reviewed-by: Philippe Mathieu-D

Re: [RFC PATCH v3 02/10] net: Pad short frames to minimum size before send from SLiRP/TAP

2021-03-11 Thread Jason Wang
On 2021/3/11 6:27 下午, Bin Meng wrote: On Thu, Mar 11, 2021 at 6:22 PM Peter Maydell wrote: On Thu, 11 Mar 2021 at 09:58, Bin Meng wrote: On Thu, Mar 11, 2021 at 5:43 PM Peter Maydell wrote: On Thu, 11 Mar 2021 at 03:01, Jason Wang wrote: And after a discussion 10 years ago [1]. Michael

[PULL 05/16] e1000: fail early for evil descriptor

2021-03-11 Thread Jason Wang
During procss_tx_desc(), driver can try to chain data descriptor with legacy descriptor, when will lead underflow for the following calculation in process_tx_desc() for bytes: if (tp->size + bytes > msh) bytes = msh - tp->size; This will lead a infinite loop. So check

[PULL 12/16] rtl8139: switch to use qemu_receive_packet() for loopback

2021-03-11 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Buglink: https://bugs.launchpad.net/qemu/+bug/1910826 Reviewed-by: Philippe Mathieu-D

[PULL 11/16] tx_pkt: switch to use qemu_receive_packet_iov() for loopback

2021-03-11 Thread Jason Wang
This patch switches to use qemu_receive_receive_iov() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/net_tx_pkt.c | 2 +- 1 file ch

[PULL 06/16] net: introduce qemu_receive_packet()

2021-03-11 Thread Jason Wang
Some NIC supports loopback mode and this is done by calling nc->info->receive() directly which in fact suppresses the effort of reentrancy check that is done in qemu_net_queue_send(). Unfortunately we can't use qemu_net_queue_send() here since for loopback there's no sender as peer, so this patch

[PULL 15/16] lan9118: switch to use qemu_receive_packet() for loopback

2021-03-11 Thread Jason Wang
From: Alexander Bulekov This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/lan9118.c

[PULL 08/16] dp8393x: switch to use qemu_receive_packet() for loopback packet

2021-03-11 Thread Jason Wang
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé --- hw/net/dp8393x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[PULL 07/16] e1000: switch to use qemu_receive_packet() for loopback

2021-03-11 Thread Jason Wang
This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/e1000.c | 2 +- 1 file changed, 1 i

[PULL 03/16] net: validate that ids are well formed

2021-03-11 Thread Jason Wang
From: Paolo Bonzini When a network or network device is created from the command line or HMP, QemuOpts ensures that the id passes the id_wellformed check. However, QMP skips this: $ qemu-system-x86_64 -qmp stdio -S -nic user,id=123/456 qemu-system-x86_64: -nic user,id=123/456: Parameter i

[PULL 04/16] net: unbreak well-form id check for "-nic"

2021-03-11 Thread Jason Wang
The auto genreated id for "-nic" has "_" prefix which can't satisfy the well-formed id check that is introduced by 871579b9834aca517dc2d4941691a1d2082db6f2 ("net: validate that ids are well formed"). Fix this by simply removing the "__" prefix. Signed-off-by: Jason Wang --- net/net.c | 2 +- 1 f

[PULL 02/16] net: Fix build error when DEBUG_NET is on

2021-03-11 Thread Jason Wang
From: Bin Meng "qemu-common.h" should be included to provide the forward declaration of qemu_hexdump() when DEBUG_NET is on. Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- net/net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/net.c b/net

[PULL 01/16] virtio-net: calculating proper msix vectors on init

2021-03-11 Thread Jason Wang
Currently, the default msix vectors for virtio-net-pci is 3 which is obvious not suitable for multiqueue guest, so we depends on the user or management tools to pass a correct vectors parameter. In fact, we can simplifying this by calculating the number of vectors on realize. Consider we have N qu

[PULL 00/16] Net patches

2021-03-11 Thread Jason Wang
The following changes since commit f4abdf32714d1845b7c01ec136dd2b04c2f7db47: Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-docs-xen-updates-100321-2' into staging (2021-03-11 16:20:58 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags

Re: [PATCH v2 3/3] tests/qtest: Add test for Aspeed HACE

2021-03-11 Thread Thomas Huth
On 12/03/2021 00.47, Joel Stanley wrote: This adds a test for the Aspeed Hash and Crypto (HACE) engine. It tests the currently implemented behavior of the hash functionality. The tests are similar, but are cut/pasted instead of broken out into a common function so the assert machinery produces u

Re: [PATCH V2] virtio-net: calculating proper msix vectors on init

2021-03-11 Thread Jason Wang
On 2021/3/9 12:23 下午, Jason Wang wrote: Currently, the default msix vectors for virtio-net-pci is 3 which is obvious not suitable for multiqueue guest, so we depends on the user or management tools to pass a correct vectors parameter. In fact, we can simplifying this by calculating the number o

[PATCH v2 07/10] Reset the auto-converge counter at every checkpoint.

2021-03-11 Thread leirao
From: "Rao, Lei" if we don't reset the auto-converge counter, it will continue to run with COLO running, and eventually the system will hang due to the CPU throttle reaching DEFAULT_MIGRATE_MAX_CPU_THROTTLE. Signed-off-by: Lei Rao --- migration/colo.c | 4 migration/ram.c | 10 +

[PATCH v2 10/10] Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()

2021-03-11 Thread leirao
From: "Rao, Lei" The data pointer has skipped vnet_hdr_len in the function of parse_packet_early().So, we can not subtract vnet_hdr_len again when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, it will cause network packet comparsion errors and greatly increase the frequency of c

[PATCH v2 05/10] Optimize the function of packet_new

2021-03-11 Thread leirao
From: "Rao, Lei" if we put the data copy outside the packet_new(), then for the filter-rewrite module, there will be one less memory copy in the processing of each network packet. Signed-off-by: Lei Rao --- net/colo-compare.c| 7 +-- net/colo.c| 4 ++-- net/colo.h

[PATCH v2 09/10] Add the function of colo_bitmap_clear_diry

2021-03-11 Thread leirao
From: "Rao, Lei" When we use continuous dirty memory copy for flushing ram cache on secondary VM, we can also clean up the bitmap of contiguous dirty page memory. This also can reduce the VM stop time during checkpoint. Signed-off-by: Lei Rao --- migration/ram.c | 29 +-

[PATCH v2 06/10] Add the function of colo_compare_cleanup

2021-03-11 Thread leirao
From: "Rao, Lei" This patch fixes the following: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x7f6ae4559859 in __GI_abort () at abort.c:79 #2 0x559aaa386720 in error_exit (err=16, msg=0x559aaa5973d0 <__func__.16227> "qemu_mutex_destroy") at

[PATCH v2 03/10] Optimize the function of filter_send

2021-03-11 Thread leirao
From: "Rao, Lei" The iov_size has been calculated in filter_send(). we can directly return the size.In this way, this is no need to repeat calculations in filter_redirector_receive_iov(); Signed-off-by: Lei Rao --- net/filter-mirror.c | 8 1 file changed, 4 insertions(+), 4 deletions(

[PATCH v2 08/10] Reduce the PVM stop time during Checkpoint

2021-03-11 Thread leirao
From: "Rao, Lei" When flushing memory from ram cache to ram during every checkpoint on secondary VM, we can copy continuous chunks of memory instead of 4096 bytes per time to reduce the time of VM stop during checkpoint. Signed-off-by: Lei Rao --- migration/ram.c | 44 +

[PATCH v2 04/10] Remove migrate_set_block_enabled in checkpoint

2021-03-11 Thread leirao
From: "Rao, Lei" We can detect disk migration in migrate_prepare, if disk migration is enabled in COLO mode, we can directly report an error.and there is no need to disable block migration at every checkpoint. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen --- migration/colo.c | 6

[PATCH v2 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-03-11 Thread leirao
From: "Rao, Lei" This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown' Aborted (core dumped) Signed-off-by: Lei Rao --- softmmu/runstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/softmmu/runstate.c b/softmmu/runstate.c index 28

[PATCH v2 00/10] Fixed some bugs and optimized some codes for COLO.

2021-03-11 Thread leirao
Changes since v1: --Reset the state of the auto-converge counters at every checkpoint instead of directly disabling. --Treat the filter_send function returning zero as a normal case. The series of patches include: Fixed some bugs of qemu crash. Optimized some code

[PATCH v2 01/10] Remove some duplicate trace code.

2021-03-11 Thread leirao
From: "Rao, Lei" There is the same trace code in the colo_compare_packet_payload. Signed-off-by: Lei Rao --- net/colo-compare.c | 13 - 1 file changed, 13 deletions(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 84db497..9e18baa 100644 --- a/net/colo-compare.c +++ b

RE: [PATCH v2 1/1] docs/devel: Add VFIO device migration documentation

2021-03-11 Thread Tian, Kevin
> From: Tarun Gupta > Sent: Thursday, March 11, 2021 3:20 AM > > Document interfaces used for VFIO device migration. Added flow of state > changes > during live migration with VFIO device. Tested by building docs with the new > vfio-migration.rst file. > > v2: > - Included the new vfio-migration

Re: [PATCH 1/3] memory: add a sparse memory device

2021-03-11 Thread Alexander Bulekov
On 210311 1525, Philippe Mathieu-Daudé wrote: > On 3/11/21 6:36 AM, Alexander Bulekov wrote: > > For testing, it can be useful to simulate an enormous amount of memory > > (e.g. 2^64 RAM). This adds an MMIO device that acts as sparse memory. > > When something writes a nonzero value to a sparse-mem

Re: [PATCH v1 1/1] vfio: Make migration support non experimental by default.

2021-03-11 Thread Shenming Lu
On 2021/3/9 6:51, Alex Williamson wrote: > [Cc +Intel] > > On Mon, 8 Mar 2021 21:39:49 +0530 > Tarun Gupta wrote: > >> VFIO migration support in QEMU is experimental as of now, which was done to >> provide soak time and resolve concerns regarding bit-stream. >> But, with the patches discussed in

RE: [PATCH v2 1/1] docs/devel: Add VFIO device migration documentation

2021-03-11 Thread Tian, Kevin
> From: Qemu-devel > On Behalf Of Dr. David Alan Gilbert > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Thu, Mar 11, 2021 at 12:50:09AM +0530, Tarun Gupta wrote: > > > Document interfaces used for VFIO device migration. Added flow of state > changes > > > during live migration with

RE: [PATCH v1 1/1] vfio: Make migration support non experimental by default.

2021-03-11 Thread Tian, Kevin
> From: Alex Williamson > Sent: Tuesday, March 9, 2021 6:51 AM > > [Cc +Intel] > > On Mon, 8 Mar 2021 21:39:49 +0530 > Tarun Gupta wrote: > > > VFIO migration support in QEMU is experimental as of now, which was > done to > > provide soak time and resolve concerns regarding bit-stream. > > But

Re: [PATCH 1/1] spapr.c: remove 'ibm,chip-id' from DT

2021-03-11 Thread David Gibson
On Thu, Mar 11, 2021 at 03:22:39PM -0300, Daniel Henrique Barboza wrote: > > > On 3/11/21 1:29 PM, Greg Kurz wrote: > > On Thu, 11 Mar 2021 12:15:57 -0300 > > Daniel Henrique Barboza wrote: > > > > > The attribute 'ibm,chip-id' does not exist in PAPR. This alone would be > > > enough reason to

Re: [RESEND PATCH] hw/ppc: e500: Add missing #address-cells and #size-cells in the eTSEC node

2021-03-11 Thread David Gibson
On Thu, Mar 11, 2021 at 04:16:08PM +0800, Bin Meng wrote: > From: Bin Meng > > Per devicetree spec v0.3 [1] chapter 2.3.5: > > The #address-cells and #size-cells properties are not inherited > from ancestors in the devicetree. They shall be explicitly defined. > If missing, a client program shou

Re: [PATCH v2 1/8] powerpc/xive: Use cpu_to_node() instead of ibm,chip-id property

2021-03-11 Thread David Gibson
On Tue, 9 Mar 2021 18:26:35 +0100 Cédric Le Goater wrote: > On 3/9/21 6:08 PM, Daniel Henrique Barboza wrote: > > > > > > On 3/9/21 12:33 PM, Cédric Le Goater wrote: > >> On 3/8/21 6:13 PM, Greg Kurz wrote: > >>> On Wed, 3 Mar 2021 18:48:50 +0100 > >>> Cédric Le Goater wrote: > >>> > >>>

Re: [RFC PATCH 4/5] Add migration support for KVM guest with MTE

2021-03-11 Thread Haibo Xu
++ more migration experts! On Tue, 23 Feb 2021 at 06:47, Richard Henderson wrote: > > On 2/22/21 1:46 AM, Haibo Xu wrote: > > As I mentioned in the cover later, the reason to let the tag go with the > > memory data together is to make it easier to sync with each other. I think > > if we migratie

Re: [RFC PATCH 3/5] Add APIs to get/set MTE tags

2021-03-11 Thread Haibo Xu
++ more migration experts! On Mon, 8 Feb 2021 at 11:20, Haibo Xu wrote: > > MTE spec provide instructions to retrieve the memory tags: > (1) LDG, at 16 bytes granularity, and available in both user > and kernel space; > (2) LDGM, at 256 bytes granularity in maximum, and only > available i

Re: [RFC PATCH 5/5] Enable the MTE support for KVM guest

2021-03-11 Thread Haibo Xu
++ more migration experts! On Mon, 8 Feb 2021 at 11:20, Haibo Xu wrote: > > Signed-off-by: Haibo Xu > --- > hw/arm/virt.c | 22 +++--- > 1 file changed, 19 insertions(+), 3 deletions(-) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index 623d5e9397..c2358cf4c5 100644 > --- a/

Re: [RFC PATCH 2/5] Add basic MTE support to KVM guest

2021-03-11 Thread Haibo Xu
++ more migration experts! On Mon, 8 Feb 2021 at 11:20, Haibo Xu wrote: > > Enable the virt machine feature "mte" to work with > KVM guest. This feature is still hiden from the user > in this patch, and will be available in a later patch. > > Signed-off-by: Haibo Xu > --- > hw/arm/virt.c |

Re: [RFC PATCH 1/5] Update Linux headers with new MTE support

2021-03-11 Thread Haibo Xu
++ more migration experts! On Mon, 8 Feb 2021 at 11:20, Haibo Xu wrote: > > Signed-off-by: Haibo Xu > --- > linux-headers/linux/kvm.h | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h > index 020b62a619..6a291a9a35 10

Re: [PATCH v7 1/8] vt82c686: Implement control of serial port io ranges via config regs

2021-03-11 Thread David Gibson
On Fri, Mar 12, 2021 at 12:47:54AM +0100, Philippe Mathieu-Daudé wrote: > ping for review? I'm not sure who you're asking for a review from. > > On 3/10/21 3:58 AM, BALATON Zoltan wrote: > > In VIA super south bridge the io ranges of superio components > > (parallel and serial ports and FDC) can

Re: [RFC] adding a generic QAPI event for failed device hotunplug

2021-03-11 Thread David Gibson
On Thu, Mar 11, 2021 at 05:50:42PM -0300, Daniel Henrique Barboza wrote: > > > On 3/9/21 3:22 AM, Markus Armbruster wrote: > > Cc: Paolo and Julia in addition to Igor, because the thread is wandering > > towards DeviceState member pending_deleted_event. > > > > Cc: Laine for libvirt expertise.

Re: [PATCH v4 0/4] Drop deprecated floppy config & bogus -drive if=T

2021-03-11 Thread John Snow
On 3/11/21 2:52 AM, Markus Armbruster wrote: v4: * PATCH 3: Move a declaration into a loop [Richard] * PATCH 4: Drop a superfluous call to drive_check_orphaned() [Daniel], fix comments [John] v3: * PATCH 1: New [Daniel] v2: * Rebased, straightforward conflict with commit f5d33dd51f "hw/bl

Re: [PATCH 3/3] Andes AE350 RISC-V Machine

2021-03-11 Thread Bin Meng
On Thu, Mar 11, 2021 at 11:47 PM Alistair Francis wrote: > > On Thu, Mar 11, 2021 at 2:03 AM Dylan Jhong wrote: > > > > On Wed, Mar 10, 2021 at 02:15:25PM +0800, Bin Meng wrote: > > > On Wed, Mar 10, 2021 at 11:36 AM Dylan Jhong wrote: > > > > > > > > This provides a RISC-V Board based on Andes'

[PATCH] target/mips: Deprecate Trap-and-Emul KVM support

2021-03-11 Thread Jiaxun Yang
Upstream kernel had removed both host[1] and guest[2] support. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 [2]: https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=a1515ec7204edca770c07929df8538fcdb

Re: [PATCH v7 2/8] vt82c686: QOM-ify superio related functionality

2021-03-11 Thread BALATON Zoltan
On Fri, 12 Mar 2021, Philippe Mathieu-Daudé wrote: On 3/10/21 3:58 AM, BALATON Zoltan wrote: Collect superio functionality and its controlling config registers handling in an abstract VIA_SUPERIO class that is a subclass of ISA_SUPERIO and put vt82c686b specific parts in a subclass of this abstr

[PATCH] hw/timer/sse-timer: Propagate eventual error in sse_timer_realize()

2021-03-11 Thread Philippe Mathieu-Daudé
If the SSECounter link is absent, we set an error message in sse_timer_realize() but forgot to propagate this error. Add the missing 'return'. Fixes: CID 1450755 (Null pointer dereferences) Signed-off-by: Philippe Mathieu-Daudé --- hw/timer/sse-timer.c | 1 + 1 file changed, 1 insertion(+) diff

Re: [RFC PATCH v2 00/22] target/mips: Reintroduce the R5900 CPU (without testing)

2021-03-11 Thread Philippe Mathieu-Daudé
On 3/9/21 3:56 PM, Philippe Mathieu-Daudé wrote: > First part (TCG, testing postponed) of RFC v1: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg782449.html > > 3 patches can still be improved for performance, but the improvement > is not yet addressed in this series. Other patches are go

Re: [PATCH v7 1/8] vt82c686: Implement control of serial port io ranges via config regs

2021-03-11 Thread Philippe Mathieu-Daudé
ping for review? On 3/10/21 3:58 AM, BALATON Zoltan wrote: > In VIA super south bridge the io ranges of superio components > (parallel and serial ports and FDC) can be controlled by superio > config registers to set their base address and enable/disable them. > This is not easy to implement in QEM

[PATCH v2 1/3] hw: Model ASPEED's Hash and Crypto Engine

2021-03-11 Thread Joel Stanley
The HACE (Hash and Crypto Engine) is a device that offloads MD5, SHA1, SHA2, RSA and other cryptographic algorithms. This initial model implements a subset of the device's functionality; currently only direct access (non-scatter gather) hashing. Signed-off-by: Joel Stanley Signed-off-by: Cédric

Re: [PATCH v7 2/8] vt82c686: QOM-ify superio related functionality

2021-03-11 Thread Philippe Mathieu-Daudé
On 3/10/21 3:58 AM, BALATON Zoltan wrote: > Collect superio functionality and its controlling config registers > handling in an abstract VIA_SUPERIO class that is a subclass of > ISA_SUPERIO and put vt82c686b specific parts in a subclass of this > abstract class. > > Signed-off-by: BALATON Zoltan

[PATCH v2 3/3] tests/qtest: Add test for Aspeed HACE

2021-03-11 Thread Joel Stanley
This adds a test for the Aspeed Hash and Crypto (HACE) engine. It tests the currently implemented behavior of the hash functionality. The tests are similar, but are cut/pasted instead of broken out into a common function so the assert machinery produces useful output when a test fails. Signed-off

[PULL 10/10] vfio/migrate: Move switch of dirty tracking into vfio_memory_listener

2021-03-11 Thread Alex Williamson
From: Keqian Zhu For now the switch of vfio dirty page tracking is integrated into @vfio_save_handler. The reason is that some PCI vendor driver may start to track dirty base on _SAVING state of device, so if dirty tracking is started before setting device state, vfio will report full-dirty to QE

[PULL 07/10] vfio: Set the priority of the VFIO VM state change handler explicitly

2021-03-11 Thread Alex Williamson
From: Shenming Lu In the VFIO VM state change handler when stopping the VM, the _RUNNING bit in device_state is cleared which makes the VFIO device stop, including no longer generating interrupts. Then we can save the pending states of all interrupts in the GIC VM state change handler (on ARM).

[PATCH v2 2/3] aspeed: Integrate HACE

2021-03-11 Thread Joel Stanley
Add the hash and crypto engine model to the aspeed socs. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley --- docs/system/arm/aspeed.rst | 2 +- include/hw/arm/aspeed_soc.h | 3 +++ hw/arm/aspeed_ast2600.c | 14 ++ hw/arm/aspeed_soc.c | 15 +++ 4 fi

[PATCH v2 0/3] hw/misc: Model ASPEED hash and crpyto engine

2021-03-11 Thread Joel Stanley
v2: Address review from Andrew and Phillepe. Adds a qtest. This adds a model for the ASPEED hash and crypto engine (HACE) found on all supported ASPEED SoCs. The model uses Qemu's gcrypto API to perform the SHA and MD5 hashing directly in the machine's emulated memory space, which I found a neat

[PULL 09/10] vfio: Support host translation granule size

2021-03-11 Thread Alex Williamson
From: Kunkun Jiang The cpu_physical_memory_set_dirty_lebitmap() can quickly deal with the dirty pages of memory by bitmap-traveling, regardless of whether the bitmap is aligned correctly or not. cpu_physical_memory_set_dirty_lebitmap() supports pages in bitmap of host page size. So it'd better t

[PULL 08/10] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration

2021-03-11 Thread Alex Williamson
From: Shenming Lu In VFIO migration resume phase and some guest startups, there are already unmasked vectors in the vector table when calling vfio_msix_enable(). So in order to avoid inefficiently disabling and enabling vectors repeatedly, let's allocate all needed vectors first and then enable t

[PULL 06/10] vfio: Move the saving of the config space to the right place in VFIO migration

2021-03-11 Thread Alex Williamson
From: Shenming Lu On ARM64 the VFIO SET_IRQS ioctl is dependent on the VM interrupt setup, if the restoring of the VFIO PCI device config space is before the VGIC, an error might occur in the kernel. So we move the saving of the config space to the non-iterable process, thus it will be called af

[PULL 03/10] MAINTAINERS: Cover docs/igd-assign.txt in VFIO section

2021-03-11 Thread Alex Williamson
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210202155611.998424-1-phi...@redhat.com> Signed-off-by: Alex Williamson --- MAINTAINERS |1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8e9f0d591ee2..5518813224f1 100644 ---

[PULL 05/10] spapr_iommu: Fix vhost integration regression

2021-03-11 Thread Alex Williamson
From: Eric Auger Previous work on dev-iotlb message broke spapr_iommu/vhost integration as it did for SMMU and virtio-iommu. The spapr_iommu currently only sends IOMMU_NOTIFIER_UNMAP notifications. Since commit 958ec334bca3 ("vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support"), VHOST firs

[PULL 04/10] vfio: Do not register any IOMMU_NOTIFIER_DEVIOTLB_UNMAP notifier

2021-03-11 Thread Alex Williamson
From: Eric Auger In an attempt to fix smmu/virtio-iommu - vhost regression, commit 958ec334bca3 ("vhost: Unbreak SMMU and virtio-iommu on dev-iotlb support") broke virtio-iommu integration. This is due to the fact VFIO registers IOMMU_NOTIFIER_ALL notifiers, which includes IOMMU_NOTIFIER_DEVIOTLB

[PULL 01/10] vfio: Fix vfio_listener_log_sync function name typo

2021-03-11 Thread Alex Williamson
From: Zenghui Yu There is an obvious typo in the function name of the .log_sync() callback. Spell it correctly. Signed-off-by: Zenghui Yu Message-Id: <20201204014240.772-1-yuzeng...@huawei.com> Signed-off-by: Alex Williamson --- hw/vfio/common.c |4 ++-- 1 file changed, 2 insertions(+), 2

[RFC PATCH] hw/mem/cxl_type3: Go back to subregions

2021-03-11 Thread Ben Widawsky
Each device allocates its memory (persistent only for now) out of a container memory that represents a "window" that would be defined by the host bridge. For example, a host bridge may claim all traffic from 0x0 - 0x4000; it might then also direct 0x1000-0x1fff to a specific CXL device. Change the

Re: [PATCH RESEND 0/6] hw/mips/gt64120: Minor fixes

2021-03-11 Thread Philippe Mathieu-Daudé
On 3/9/21 3:26 PM, Philippe Mathieu-Daudé wrote: > Trivial fixes extracted from another series which became too big, > so I prefer to send them in a previous step. > > (This is a resend for Zoltan). > > Philippe Mathieu-Daudé (6): > hw/mips/gt64xxx: Initialize ISD I/O memory region in DeviceRea

[PATCH 4/6] qtest/arm-cpu-features: Check KVM availability at runtime

2021-03-11 Thread Philippe Mathieu-Daudé
sve_tests_sve_off_kvm() and test_query_cpu_model_expansion_kvm() are KVM specific tests. Skip them if KVM is not built-in. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/arm-cpu-features.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/qtest/arm-cpu

[PATCH 3/6] qtest/bios-tables-test: Make test build-independent from accelerator

2021-03-11 Thread Philippe Mathieu-Daudé
Now than we can probe if the TCG accelerator is available at runtime with a QMP command, we can remove the #ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/bios-tables-test.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/qtest/bios-tables

[PATCH 5/6] qtest/arm-cpu-features: Check TCG availability at runtime

2021-03-11 Thread Philippe Mathieu-Daudé
Now than we can probe if the TCG accelerator is available at runtime with a QMP command, skip these TCG specific tests when TCG is not built into the QEMU binary. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/arm-cpu-features.c | 23 +++ 1 file changed, 19 insertions(

[PATCH 6/6] tests/qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore

2021-03-11 Thread Philippe Mathieu-Daudé
Since commit 82bf7ae84ce ("target/arm: Remove KVM support for 32-bit Arm hosts") we can remove the comment / check added in commit ab6b6a4 and directly run the bios-tables-test. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 delet

[PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-11 Thread Philippe Mathieu-Daudé
Introduce the 'query-accels' QMP command which returns a list of built-in accelerators names. - Accelerator is an QAPI enum of all existing accelerators, - AcceleratorInfo is a QAPI structure providing accelerator specific information. Currently the common structure base provides the name of

[PATCH 2/6] tests/qtest: Add qtest_probe_accel() method

2021-03-11 Thread Philippe Mathieu-Daudé
Introduce the qtest_probe_accel() method which allows to query at runtime if a QEMU instance has an accelerator built-in. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/libqos/libqtest.h | 9 + tests/qtest/libqtest.c| 24 2 files changed, 33 inser

[PATCH 0/6] qtests: Check accelerator available at runtime via QMP 'query-accels'

2021-03-11 Thread Philippe Mathieu-Daudé
Hi, This series aims at having accelerator-independent qtests by querying a QEMU instance at runtime to check the list of built-in accelerators. First we add the 'query-accels' QMP command, then we add the qtest_probe_accel() method to libqtest, finally we use this new method to allow running bio

3D Acceleration for Windows hosts?

2021-03-11 Thread John Klimek
Does QEMU have any support for 3D acceleration on Windows hosts? I'm not too familiar with video/graphics libraries, but it seems like QEMU OpenGL support requires Mesa GBM which is only available for Linux (DRM/KMS). The other option is the Virgl3D renderer but that also requires Linux (DRM). I

Re: [PULL 5/9] char: add goldfish-tty

2021-03-11 Thread Philippe Mathieu-Daudé
On 3/11/21 11:04 PM, Laurent Vivier wrote: > Le 11/03/2021 à 22:57, Peter Maydell a écrit : >> On Thu, 11 Mar 2021 at 21:22, Laurent Vivier wrote: >>> >>> Implement the goldfish tty device as defined in >>> >>> https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-

[PULL 3/4] target/m68k: reformat m68k_features enum

2021-03-11 Thread Laurent Vivier
From: Mark Cave-Ayland Move the feature comment from after the feature name to the preceding line to allow for longer feature names and descriptions without hitting the 80 character line limit. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier Reviewed-by: Richard Henderson Message-

[PULL 2/4] target/m68k: don't set SSW ATC bit for physical bus errors

2021-03-11 Thread Laurent Vivier
From: Mark Cave-Ayland If a NuBus slot doesn't contain a card, the Quadra hardware generates a physical bus error if the CPU attempts to access the slot address space. Both Linux and MacOS use a separate bus error handler during NuBus accesses in order to detect and recover when addressing empty

[PULL 4/4] target/m68k: add M68K_FEATURE_UNALIGNED_DATA feature

2021-03-11 Thread Laurent Vivier
From: Mark Cave-Ayland According to the M68040UM Appendix D the requirement for data accesses to be word aligned is only for the 68000, 68008 and 68010 CPUs. Later CPUs from the 68020 onwards will allow unaligned data accesses but at the cost of being less efficient. Add a new M68K_FEATURE_UNALI

[PULL 1/4] target/m68k: implement rtr instruction

2021-03-11 Thread Laurent Vivier
This is needed to boot MacOS ROM. Pull the condition code and the program counter from the stack. Operation: (SP) -> CCR SP + 2 -> SP (SP) -> PC SP + 4 -> SP This operation is not privileged. Reported-by: Mark Cave-Ayland Tested-by: Mark Cave-Ayland Signed-off-by: Laurent Viv

[PULL 0/4] M68k for 6.0 patches

2021-03-11 Thread Laurent Vivier
The following changes since commit f4abdf32714d1845b7c01ec136dd2b04c2f7db47: Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-docs-xen-up= dates-100321-2' into staging (2021-03-11 16:20:58 +) are available in the Git repository at: git://github.com/vivier/qemu-m68k.git tag

Re: [PULL 5/9] char: add goldfish-tty

2021-03-11 Thread Laurent Vivier
Le 11/03/2021 à 22:57, Peter Maydell a écrit : > On Thu, 11 Mar 2021 at 21:22, Laurent Vivier wrote: >> >> Implement the goldfish tty device as defined in >> >> https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT >> >> and based on the kernel driver

Re: [PATCH 05/14] migrate: remove QMP/HMP commands for speed, downtime and cache size

2021-03-11 Thread Paolo Bonzini
On 11/03/21 19:33, Daniel P. Berrangé wrote: On Thu, Mar 11, 2021 at 07:18:54PM +0100, Paolo Bonzini wrote: On 11/03/21 12:54, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé (berra...@redhat.com) wrote: The generic 'migrate_set_parameters' command handle all types of param. Only the QMP c

Re: [PULL 5/9] char: add goldfish-tty

2021-03-11 Thread Peter Maydell
On Thu, 11 Mar 2021 at 21:22, Laurent Vivier wrote: > > Implement the goldfish tty device as defined in > > https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT > > and based on the kernel driver code: > > https://git.kernel.org/pub/scm/linux/kernel/g

Re: [PATCH v3 02/12] softmmu/physmem: Fix ram_block_discard_range() to handle shared anonymous memory

2021-03-11 Thread David Hildenbrand
On 11.03.21 22:37, Peter Xu wrote: On Mon, Mar 08, 2021 at 04:05:50PM +0100, David Hildenbrand wrote: We can create shared anonymous memory via "-object memory-backend-ram,share=on,..." which is, for example, required by PVRDMA for mremap() to work. Shared anonymous memory is weird, though

Re: [PATCH] hw/riscv: Fix OT IBEX reset vector

2021-03-11 Thread Alistair Francis
On Wed, Mar 10, 2021 at 5:23 PM Alexander Wagner wrote: > > The IBEX documentation [1] specifies the reset vector to be "the most > significant 3 bytes of the boot address and the reset value (0x80) as > the least significant byte". > > [1] > https://github.com/lowRISC/ibex/blob/master/doc/03_ref

  1   2   3   4   5   6   >