Re: [PATCH 11/12] linux-user: Add support for getting/setting selected alsa timer parameters using ioctls

2020-01-14 Thread Laurent Vivier
Le 09/01/2020 à 13:59, Filip Bozuta a écrit : > This patch implements functionalities of following ioctls: > > SNDRV_TIMER_IOCTL_INFO - Getting information about selected timer > > Read information about the selected timer. The information is returned in > the following structure: > >

[PULL 26/30] Bug #1829242 correction.

2020-01-14 Thread Juan Quintela
From: Alexey Romko Added type conversions to ram_addr_t before all left shifts of page indexes to TARGET_PAGE_BITS, to correct overflows when the page address was 4Gb and more. Signed-off-by: Alexey Romko Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Juan Quint

[PULL 20/30] migration/postcopy: enable random order target page arrival

2020-01-14 Thread Juan Quintela
From: Wei Yang After using number of target page received to track one host page, we could have the capability to handle random order target page arrival in one host page. This is a preparation for enabling compress during postcopy. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert

[PULL 27/30] migration: Define VMSTATE_INSTANCE_ID_ANY

2020-01-14 Thread Juan Quintela
From: Peter Xu Define the new macro VMSTATE_INSTANCE_ID_ANY for callers who wants to auto-generate the vmstate instance ID. Previously it was hard coded as -1 instead of this macro. It helps to change this default value in the follow up patches. No functional change. Signed-off-by: Peter Xu

Re: [PATCH] target/arm: adjust program counter for wfi exception in AArch32

2020-01-14 Thread Jeff Kubascik
On 1/13/2020 9:41 PM, Richard Henderson wrote: > On 1/10/20 8:02 AM, Jeff Kubascik wrote: >> -env->pc -= insn_len; >> +if (env->aarch64) >> +env->pc -= insn_len; >> +else >> +env->regs[15] -= insn_len; > > QEMU requires all braces. See CODING_STYLE.

[PULL 22/30] migration/multifd: clean pages after filling packet

2020-01-14 Thread Juan Quintela
From: Wei Yang This is a preparation for the next patch: not use multifd during postcopy. Without enabling postcopy, everything looks good. While after enabling postcopy, migration may fail even not use multifd during postcopy. The reason is the pages is not properly cleared and *old* targe

[PULL 29/30] apic: Use 32bit APIC ID for migration instance ID

2020-01-14 Thread Juan Quintela
From: Peter Xu Migration is silently broken now with x2apic config like this: -smp 200,maxcpus=288,sockets=2,cores=72,threads=2 \ -device intel-iommu,intremap=on,eim=on After migration, the guest kernel could hang at anything, due to x2apic bit not migrated correctly in IA32_APIC_BASE

[PULL 23/30] migration/multifd: not use multifd during postcopy

2020-01-14 Thread Juan Quintela
From: Wei Yang We don't support multifd during postcopy, but user still could enable both multifd and postcopy. This leads to migration failure. Skip multifd during postcopy. Signed-off-by: Wei Yang Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 9 ++--- 1

Re: [PATCH 12/12] linux-user: Add support for selected alsa timer instructions using ioctls

2020-01-14 Thread Laurent Vivier
Le 09/01/2020 à 13:59, Filip Bozuta a écrit : > This patch implements functionalities of following ioctls: > > SNDRV_TIMER_IOCTL_START - Start selected alsa timer > > Starts the timer device that is selected. The third ioctl's argument is > ignored. Before calling this ioctl, the ioctl "S

Re: Making QEMU easier for management tools and applications

2020-01-14 Thread Markus Armbruster
Kevin Wolf writes: > Am 08.01.2020 um 12:40 hat Christophe de Dinechin geschrieben: >> > On 8 Jan 2020, at 11:43, Kevin Wolf wrote: >> > Am 07.01.2020 um 18:11 hat Christophe de Dinechin geschrieben: >> >> So I think that it might help, in the long run, to start defining the >> >> language in qu

Re: [PATCH 06/15] migration/savevm: Replace current_machine by qdev_get_machine()

2020-01-14 Thread Juan Quintela
Philippe Mathieu-Daudé wrote: > As we want to remove the global current_machine, > replace MACHINE_GET_CLASS(current_machine) by > MACHINE_GET_CLASS(qdev_get_machine()). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela by the migration bits.

Re: [PULL 1/1] trace: update qemu-trace-stap to Python 3

2020-01-14 Thread Philippe Mathieu-Daudé
On 1/14/20 10:29 AM, Stefan Hajnoczi wrote: qemu-trace-stap does not support Python 3 yet: $ scripts/qemu-trace-stap list path/to/qemu-system-x86_64 Traceback (most recent call last): File "scripts/qemu-trace-stap", line 175, in main() File "scripts/qemu-trace-stap", line

Re: KVM call for agenda for 2020-01-14

2020-01-14 Thread Juan Quintela
Juan Quintela wrote: > Hi > > Please, send any topic that you are interested in covering. > > We have already one topic for this call already: > > * Multi-process QEMU and muser Hi folks Remember that today is a call in 30 minutes. Thanks, Juan. > > By popular demand, a google calendar public

Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size

2020-01-14 Thread Max Reitz
On 09.01.20 20:12, Alberto Garcia wrote: > The qcow2 header specifies the virtual size of the image in bytes, but > BlockDriverState stores it as a number of 512-byte sectors. > > If the user tries to create an image with a size that is not a > multiple of the sector size then this is fixed on cre

Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size

2020-01-14 Thread Alberto Garcia
On Tue 14 Jan 2020 02:01:03 PM CET, Max Reitz wrote: >> However when an image is opened the virtual size is rounded down, >> which means that trying to access the last few advertised bytes will >> result in an error. As seen above QEMU cannot create such images and >> there's no good use case that

Re: [PATCH v2] iotests: Add more "skip_if_unsupported" statements to the python tests

2020-01-14 Thread Thomas Huth
On 19/12/2019 13.19, Kevin Wolf wrote: > Am 18.12.2019 um 15:43 hat Thomas Huth geschrieben: >> The python code already contains a possibility to skip tests if the >> corresponding driver is not available in the qemu binary - use it >> in more spots to avoid that the tests are failing if the driver

Re: [PATCH v2 2/4] qcow2: Don't round the L1 table allocation up to the sector size

2020-01-14 Thread Max Reitz
On 09.01.20 20:13, Alberto Garcia wrote: > The L1 table is read from disk using the byte-based bdrv_pread() and > is never accessed beyond its last element, so there's no need to > allocate more memory than that. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cluster.c | 5 ++--- > block

Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size

2020-01-14 Thread Max Reitz
On 14.01.20 14:20, Alberto Garcia wrote: > On Tue 14 Jan 2020 02:01:03 PM CET, Max Reitz wrote: >>> However when an image is opened the virtual size is rounded down, >>> which means that trying to access the last few advertised bytes will >>> result in an error. As seen above QEMU cannot create suc

Re: PCIe device paththrough via vfio issue

2020-01-14 Thread yurij
On 1/13/20 7:28 PM, Alex Williamson wrote: On Mon, 13 Jan 2020 18:49:21 +0300 yurij wrote: Hello everybody! I have a specific PCIe device (sorry, but I can't tell about what is it and what it does) but PCI configuration space consists of 4 BARs (lspci output brief): lspci -s 84:00.00 -vvv

Re: [PATCH v2 3/4] qcow2: Tighten cluster_offset alignment assertions

2020-01-14 Thread Max Reitz
On 09.01.20 20:13, Alberto Garcia wrote: > qcow2_alloc_cluster_offset() and qcow2_get_cluster_offset() always > return offsets that are cluster-aligned so don't just check that they > are sector-aligned. > > The check in qcow2_co_preadv_task() is also replaced by an assertion > for the same reason

RE: [for-5.0 PATCH 08/11] replay: flush rr queue before loading the vmstate

2020-01-14 Thread Pavel Dovgalyuk
> From: Alex Bennée [mailto:alex.ben...@linaro.org] > Pavel Dovgalyuk writes: > > > From: Pavel Dovgalyuk > > > > Non-empty record/replay queue prevents saving and loading the VM state, > > because it includes pending bottom halves and block coroutines. > > But when the new VM state is loaded, w

Re: [PATCH v2 3/4] qcow2: Tighten cluster_offset alignment assertions

2020-01-14 Thread Max Reitz
On 10.01.20 13:14, Alberto Garcia wrote: > On Thu 09 Jan 2020 08:13:01 PM CET, Alberto Garcia wrote: >> -assert((cluster_offset & 511) == 0); >> +assert(QEMU_IS_ALIGNED(cluster_offset, s->cluster_size)); > > On second thoughts this patch could also use the (probably more > efficien

Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size

2020-01-14 Thread Alberto Garcia
On Tue 14 Jan 2020 02:47:53 PM CET, Max Reitz wrote: >> Yes, but does it make sense to try to support images with unaligned >> sizes if no one is going to create them ever and QEMU cannot even >> generate them? > > If nobody uses such images ever, isn’t the current code fine as-is? I'll rephrase:

[PATCH v3] iotests: Add more "skip_if_unsupported" statements to the python tests

2020-01-14 Thread Thomas Huth
The python code already contains a possibility to skip tests if the corresponding driver is not available in the qemu binary - use it in more spots to avoid that the tests are failing if the driver has been disabled. While we're at it, we can now also remove some of the old checks that were using

Re: [PATCH v2 1/4] qcow2: Require that the virtual size is a multiple of the sector size

2020-01-14 Thread Max Reitz
On 14.01.20 14:58, Alberto Garcia wrote: > On Tue 14 Jan 2020 02:47:53 PM CET, Max Reitz wrote: > >>> Yes, but does it make sense to try to support images with unaligned >>> sizes if no one is going to create them ever and QEMU cannot even >>> generate them? >> >> If nobody uses such images ever,

Re: PCIe device paththrough via vfio issue

2020-01-14 Thread Alex Williamson
On Tue, 14 Jan 2020 17:14:33 +1100 Alexey Kardashevskiy wrote: > On 14/01/2020 03:28, Alex Williamson wrote: > > On Mon, 13 Jan 2020 18:49:21 +0300 > > yurij wrote: > > > >> Hello everybody! > >> > >> I have a specific PCIe device (sorry, but I can't tell about what is it > >> and what it do

Re: Requirements for out-of-process device emulation

2020-01-14 Thread Stefan Hajnoczi
The call is starting now! Sorry, I forgot to send this to qemu-devel. Stefan On Tue, Jan 14, 2020 at 11:50 AM Stefan Hajnoczi wrote: > > Hi, > In today's KVM Community Call we will discuss multi-process QEMU and > related topics (muser and VFIO). > > I wanted to share requirements that I've gat

[PATCH v2 0/5] vhost-user block device backend implementation

2020-01-14 Thread Coiby Xu
v2: * Only enable this feauture for Linux for eventfd is a Linux-specific feature This patch series is an implementation of vhost-user-backend server, thanks to Stefan's guidance after reviewing the draft version and the instructions on https://wiki.qemu.org/Google_Summer_of_Code_2019#vhost-

[PATCH v2 1/5] vhost-user block device backend

2020-01-14 Thread Coiby Xu
By making use of libvhost, multiple block device drives can be exported and each drive can serve multiple clients simultaneously. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Signed-off-by: Coiby Xu --- blockdev-vu.c | 1008 ++

[PATCH v2 4/5] new qTest case for the vhost-user-blk device backend

2020-01-14 Thread Coiby Xu
This test case has the same tests as tests/virtio-blk-test.c except for tests have block_resize. Signed-off-by: Coiby Xu --- tests/libqos/vhost-user-blk.c | 125 ++ tests/libqos/vhost-user-blk.h | 44 +++ tests/vhost-user-blk-test.c | 691 ++ 3 files change

[PATCH v2 5/5] building configuration files changes

2020-01-14 Thread Coiby Xu
libvhost-user depends on sys/poll.h, sys/socket.h and eventfd. Although Windows has the equivalent Winsock, it doesn't have eventfd. So only enable this feature on Linux. Signed-off-by: Coiby Xu --- Makefile | 1 + Makefile.objs | 2 +- Makefile.target| 1 + config

[PATCH v2 2/5] extend libvhost to support IOThread

2020-01-14 Thread Coiby Xu
Previously libvhost dispatch events in its own GMainContext. Now vhost-user client's kick event can be dispatched in block device drive's AioContext thus IOThread is supported. Signed-off-by: Coiby Xu --- contrib/libvhost-user/libvhost-user.c | 64 ++- contrib/libvhost-

Re: [PULL 0/1] Tracing patches

2020-01-14 Thread Peter Maydell
On Tue, 14 Jan 2020 at 09:29, Stefan Hajnoczi wrote: > > The following changes since commit dc65a5bdc9fa543690a775b50d4ffbeb22c56d6d: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.0-20200108' > into staging (2020-01-10 16:15:04 +) > > are available in the Git repository a

[PATCH v2 3/5] a standone-alone tool to directly share disk image file via vhost-user protocol

2020-01-14 Thread Coiby Xu
vhost-user-blk can have played as vhost-user backend but it only supports raw file and don't support VIRTIO_BLK_T_DISCARD and VIRTIO_BLK_T_WRITE_ZEROES operations on raw file (ioctl(fd, BLKDISCARD) is only valid for real block device). Signed-off-by: Coiby Xu --- qemu-vu.c | 264 +

Re: [PATCH v1 0/5] vhost-user block device backend implementation

2020-01-14 Thread Coiby Xu
It fails MinGW because libvhost-user depends on eventfd which is a Linux-specific feature. Now fixed in v2. On Mon, Jan 13, 2020 at 1:21 PM wrote: > Patchew URL: > https://patchew.org/QEMU/20200113045704.12318-1-coiby...@gmail.com/ > > > > Hi, > > This series failed the docker-mingw@fedora build

Re: [PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-14 Thread Max Reitz
On 09.01.20 20:13, Alberto Garcia wrote: > This replaces all remaining instances in the qcow2 code. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cluster.c | 2 +- > block/qcow2.c | 10 ++ > 2 files changed, 7 insertions(+), 5 deletions(-) The question of course is why

Re: [PATCH v5 01/20] linux-user: Fix some constants in termbits.h

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > Some constants were defined in terms of host, instead of target, > as they should be. > > Some additional trivial changes in this patch were forced by > checkpatch.pl. > > Reviewed-by: Max Filippov > Signed-of

Re: [PATCH] virtio-9p-device: fix memleak in virtio_9p_device_unrealize

2020-01-14 Thread Christian Schoenebeck
On Dienstag, 14. Januar 2020 11:08:59 CET Christian Schoenebeck wrote: > On Dienstag, 14. Januar 2020 08:40:20 CET pannengy...@huawei.com wrote: > > From: Pan Nengyuan > > > > v->vq forgot to cleanup in virtio_9p_device_unrealize, the memory leak > > stack is as follow: > > > > Direct leak of 14

Re: [PATCH v5 09/20] linux-user: Add support for FS_IOC_VERSION ioctls

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > A very specific thing for these two ioctls is that their code > implies that their third argument is of type 'long', but the > kernel uses that argument as if it is of type 'int'. This anomaly > is recognized als

Re: [PATCH v5 10/20] linux-user: Add support for FS_IOC32_FLAGS ioctls

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > These FS_IOC32_FLAGS ioctls are identical to > FS_IOC_FLAGS ioctls, but without the anomaly of their > number defined as if their third argument is of type long, while > it is treated internally in kernel as is o

Re: [PATCH v5 11/20] linux-user: Add support for FS_IOC32_VERSION ioctls

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > These FS_IOC32_VERSION ioctls are identical to > FS_IOC_VERSION ioctls, but without the anomaly of their > number defined as if their third argument is of type long, while > it is treated internally in kernel as

Re: [PATCH v5 12/20] linux-user: Add support for FS_IOC_FSXATTR ioctls

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > Both FS_IOC_FSGETXATTR and FS_IOC_FSSETXATTR accept a pointer to > the structure > > struct file_clone_range { > __s64 src_fd; > __u64 src_offset; > __u64 src_length; > __u64 dest_offset;

Re: [PATCH v5 13/20] linux-user: Add support for FITRIM ioctl

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > FITRIM ioctl accepts a pointer to the structure > > struct fstrim_range { > __u64 start; > __u64 len; > __u64 minlen; > }; > > as its third argument. > > All ioctls in this group (FI* ioctl)

Re: [PATCH v3] iotests: Add more "skip_if_unsupported" statements to the python tests

2020-01-14 Thread Kevin Wolf
Am 14.01.2020 um 15:02 hat Thomas Huth geschrieben: > The python code already contains a possibility to skip tests if the > corresponding driver is not available in the qemu binary - use it > in more spots to avoid that the tests are failing if the driver has > been disabled. > > While we're at it

Re: [Qemu-devel] [PATCH] qemu-doc: Do not hard-code the name of the QEMU binary

2020-01-14 Thread Peter Maydell
On Wed, 28 Aug 2019 at 10:37, Thomas Huth wrote: > > In our documentation, we use a mix of "$QEMU", "qemu-system-i386" and > "qemu-system-x86_64" when we give examples to the users how to run > QEMU. Some more consistency would be good here. Also some distributions > use different names for the QE

Re: [PATCH v5 14/20] linux-user: Add support for FIFREEZE and FITHAW ioctls

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > Both FIFREEZE and FITHAW ioctls accept an integer as their third > argument. > > All ioctls in this group (FI* ioctl) are guarded with "#ifdef", so the > guards are used in this implementation too for consistenc

Re: [PATCH v5 15/20] linux-user: Add support for FD ioctls

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls are commands > for controlling error reporting of a floppy drive. > > FDSETEMSGTRESH's third agrument is a pointer to the structure: > > struct floppy_max_e

Re: [PATCH v5 16/20] linux-user: Add support for FDFMT ioctls

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls provide means for controlling > formatting of a floppy drive. > > FDFMTTRK's third agrument is a pointer to the structure: > > struct format_descr { > unsigned int de

Re: [Xen-devel] [PATCH 6/6] xen-pt: Round pci regions sizes to XEN_PAGE_SIZE

2020-01-14 Thread Jason Andryuk
On Tue, Jan 14, 2020 at 5:04 AM Roger Pau Monné wrote: > > On Mon, Jan 13, 2020 at 02:01:47PM -0500, Jason Andryuk wrote: > > On Fri, Mar 22, 2019 at 3:43 PM Jason Andryuk wrote: > > > > > > On Thu, Mar 21, 2019 at 11:09 PM Roger Pau Monné > > > wrote: > > > > > > > > On Wed, Mar 20, 2019 at 01

Re: [PATCH v5 17/20] linux-user: Add support for FDGETFDCSTAT ioctl

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > FDGETFDCSTAT's third agrument is a pointer to the structure: > > struct floppy_fdc_state { > int spec1; > int spec2; > int dtr; > unsigned char version; > unsigned char dor; > unsigned lo

Re: [PATCH v5 18/20] configure: Detect kcov support and introduce CONFIG_KCOV

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > kcov is kernel code coverage tracing tool. It requires kernel 4.4+ > compiled with certain kernel options. Its interface consists of > three ioctls. > > This patch checks if kcov support is present on build mach

Re: [PATCH v5 19/20] linux-user: Add support for KCOV_ ioctls

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > KCOV_ENABLE and KCOV_DISABLE play the role in kernel coverage > tracing. These ioctls do not use the third argument of ioctl() > system call and are straightforward to implement in QEMU. > > Signed-off-by: Aleks

Re: [PATCH v2 2/3] memory: Allow a MemoryRegion to be marked no_vhost

2020-01-14 Thread Michael S. Tsirkin
On Tue, Jan 14, 2020 at 11:26:08AM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Mon, Jan 13, 2020 at 05:36:46PM +, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > Allow a memory region to be marked as 'no

Re: [Qemu-devel] [PATCH] qemu-doc: Do not hard-code the name of the QEMU binary

2020-01-14 Thread Miroslav Rezanina
- Original Message - > From: "Peter Maydell" > To: "Thomas Huth" > Cc: "QEMU Developers" , "Paolo Bonzini" > , "QEMU Trivial" > , "Miroslav Rezanina" , > "Eduardo Habkost" , > "Qemu-block" , "Richard Henderson" > Sent: Tuesday, January 14, 2020 3:34:22 PM > Subject: Re: [Qemu-devel]

[PATCH] qcow2: Use a GString in report_unsupported_feature()

2020-01-14 Thread Alberto Garcia
This is a bit more efficient than having to allocate and free memory for each item. The default size (60) is enough for all the existing incompatible features. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Alberto Garcia --- block/qcow2.c | 24 1 file changed, 12

Re: [PATCH v5 20/20] linux-user: Add support for KCOV_INIT_TRACE ioctl

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > KCOV_INIT_TRACE ioctl plays the role in kernel coverage tracing. > This ioctl's third argument is of type 'unsigned long', and the > implementation in QEMU is straightforward. > > Signed-off-by: Aleksandar Marko

Re: [PATCH v5 08/20] linux-user: xtensa: Remove unused constant TARGET_NR_syscall_count

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > Currently, there is no usage of TARGET_NR_syscall_count for target > xtensa, and there is no obvious indication if there is some planned > usage in future. > > Acked-by: Max Filippov > Signed-off-by: Aleksandar

Re: [PATCH v2 2/3] memory: Allow a MemoryRegion to be marked no_vhost

2020-01-14 Thread Alex Williamson
On Tue, 14 Jan 2020 02:19:39 -0500 "Michael S. Tsirkin" wrote: > On Mon, Jan 13, 2020 at 05:36:46PM +, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Allow a memory region to be marked as 'no_vhost' and > > exclude that region from vhost's list build. > > >

Re: [PATCH v5 03/20] linux-user: m68k: Update syscall numbers to kernel 5.5 rc3 level

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > Update m68k syscall numbers based on Linux kernel tag v5.5-rc3 > (commit 46cf053e). > > Signed-off-by: Aleksandar Markovic > > --- > > cc: Laurent Vivier > --- > linux-user/m68k/syscall_nr.h | 50 > +++

Re: [PATCH v5 04/20] linux-user: microblaze: Update syscall numbers to kernel 5.5 rc3 level

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > Update microblaze syscall numbers based on Linux kernel tag v5.5-rc3 > (commit 46cf053e). > > Signed-off-by: Aleksandar Markovic > > --- > > cc: Edgar E. Iglesias > --- > linux-user/microblaze/syscall_nr.h

Re: [PATCH v5 07/20] linux-user: xtensa: Update syscall numbers to kernel 5.5 rc3 level

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > Update xtensa syscall numbers based on Linux kernel tag v5.5-rc3 > (commit 46cf053e). > > Acked-by: Max Filippov > Signed-off-by: Aleksandar Markovic > > --- > > cc: Max Filippov > --- > linux-user/xtensa/

[PATCH v5 00/22] gdbstub refactor and SVE support (+check-tcg tweaks)

2020-01-14 Thread Alex Bennée
Hi, The main fixes are correcting the maths of the PPC re-swap code. I've also finally plumbed in the gdbstub tests for SVE. These will also be useful for adding tests for reverse-replay debug. The following patches need review 09 - target arm prepare for multiple dynamic XMLs 12 - target arm

[PATCH v5 01/22] gdbstub: make GDBState static and have common init function

2020-01-14 Thread Alex Bennée
Instead of allocating make this entirely static. We shall reduce the size of the structure in later commits and dynamically allocate parts of it. We introduce an init and reset helper function to keep all the manipulation in one place. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Re

[PATCH v5 06/22] target/arm: use gdb_get_reg helpers

2020-01-14 Thread Alex Bennée
This is cleaner than poking memory directly and will make later clean-ups easier. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- v2 - make sure we pass hi/lo correctly as quads are stored in LE order --- target/arm/helper.c | 18 +++

[PATCH v5 07/22] target/m68k: use gdb_get_reg helpers

2020-01-14 Thread Alex Bennée
This is cleaner than poking memory directly and will make later clean-ups easier. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Laurent Vivier --- v3 - fix mem_buf references - fix mem_buf + len cases --- target/m68k/helper.c | 29 +++-- 1

[PATCH v5 04/22] gdbstub: move mem_buf to GDBState and use GByteArray

2020-01-14 Thread Alex Bennée
This is in preparation for further re-factoring of the register API with the rest of the code. Theoretically the read register function could overwrite the MAX_PACKET_LENGTH buffer although currently all registers are well within the size range. Signed-off-by: Alex Bennée Reviewed-by: Richard Hen

[PATCH v5 03/22] gdbstub: move str_buf to GDBState and use GString

2020-01-14 Thread Alex Bennée
Rather than having a static buffer replace str_buf with a GString which we know can grow on demand. Convert the internal functions to take a GString instead of a char * and length. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Damien Hedde Tested-by: Damien Hedde --- v

[PATCH v5 05/22] gdbstub: add helper for 128 bit registers

2020-01-14 Thread Alex Bennée
Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- v2 - take care of endianess of the whole 128 bit word --- include/exec/gdbstub.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h

[PATCH v5 14/22] target/arm: don't bother with id_aa64pfr0_read for USER_ONLY

2020-01-14 Thread Alex Bennée
For system emulation we need to check the state of the GIC before we report the value. However this isn't relevant to exporting of the value to linux-user and indeed breaks the exported value as set by modify_arm_cp_regs. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v2 - exte

[PATCH v5 09/22] target/arm: prepare for multiple dynamic XMLs

2020-01-14 Thread Alex Bennée
We will want to generate similar dynamic XML for gdbstub support of SVE registers (the upstream doesn't use XML). To that end lightly rename a few things to make the distinction. Signed-off-by: Alex Bennée --- target/arm/cpu.h | 20 +--- target/arm/gdbstub.c | 30

[PATCH v5 11/22] target/arm: default SVE length to 64 bytes for linux-user

2020-01-14 Thread Alex Bennée
The Linux kernel chooses the default of 64 bytes for SVE registers on the basis that it is the largest size on known hardware that won't grow the signal frame. We still honour the sve-max-vq property and userspace can expand the number of lanes by calling PR_SVE_SET_VL. This should not make any di

[PATCH v5 12/22] target/arm: generate xml description of our SVE registers

2020-01-14 Thread Alex Bennée
We also expose a the helpers to read/write the the registers. Signed-off-by: Alex Bennée --- v2 - instead of zNpM expose zN at sve_max_vq width - wrap union in union q(us), d(usf), s(usf), h(usf), b(us) v3 - add a vg pseudo register for current width - spacing fixes - use switch/case f

[PATCH v5 22/22] gdbstub: do not split gdb_monitor_write payload

2020-01-14 Thread Alex Bennée
From: Damien Hedde Since we can now send packets of arbitrary length: simplify gdb_monitor_write() and send the whole payload in one packet. Suggested-by: Luc Michel Signed-off-by: Damien Hedde Signed-off-by: Alex Bennée Message-Id: <20191211160514.58373-3-damien.he...@greensocs.com> --- gdb

[PATCH v5 02/22] gdbstub: stop passing GDBState * around and use global

2020-01-14 Thread Alex Bennée
We only have one GDBState which should be allocated at the time we process any commands. This will make further clean-up a bit easier. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v3 - remove final *s paramters from function calls v4 - a few fixups for coding style --- gdb

[PATCH v5 10/22] target/arm: explicitly encode regnum in our XML

2020-01-14 Thread Alex Bennée
This is described as optional but I'm not convinced of the numbering when multiple target fragments are sent. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v2 - post inc param->n in place so we don't get out count wrong --- target/arm/cpu.h | 2 +- target/arm/gdbstub.c |

[PATCH v5 16/22] configure: allow user to specify what gdb to use

2020-01-14 Thread Alex Bennée
This is useful, especially when testing relatively new gdbstub features that might not be in distro packages yet. Signed-off-by: Alex Bennée --- configure | 9 + 1 file changed, 9 insertions(+) diff --git a/configure b/configure index 08c3a1c1f0..df702a708f 100755 --- a/configure +++ b/

[PATCH v5 13/22] tests/tcg: add a configure compiler check for ARMv8.1 and SVE

2020-01-14 Thread Alex Bennée
We will need this for some tests later. The docker images already support it by default. Signed-off-by: Alex Bennée --- tests/tcg/configure.sh | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 210e68396f..e0d1fbb182 100755 -

[PATCH v5 20/22] tests/tcg/aarch64: add test-sve-ioctl guest-debug test

2020-01-14 Thread Alex Bennée
This test exercises the gdbstub while runing the sve-iotcl test. I haven't plubmed it into make system as we need a way of verifying if gdb has the right support for SVE. Signed-off-by: Alex Bennée --- v4 - interrogate ZCR_EL1 directly as no longer have vg v5 - plumb in - skip if fails to

[PATCH v5 08/22] gdbstub: extend GByteArray to read register helpers

2020-01-14 Thread Alex Bennée
Instead of passing a pointer to memory now just extend the GByteArray to all the read register helpers. They can then safely append their data through the normal way. We don't bother with this abstraction for write registers as we have already ensured the buffer being copied from is the correct siz

[PATCH v5 21/22] gdbstub: change GDBState.last_packet to GByteArray

2020-01-14 Thread Alex Bennée
From: Damien Hedde Remove the packet size upper limit by using a GByteArray instead of a statically allocated array for last_packet. Thus we can now send big packets. Also remove the last_packet_len field and use last_packet->len instead. Signed-off-by: Damien Hedde Reviewed-by: Philippe Mathi

Re: [PATCH v5 02/20] linux-user: alpha: Update syscall numbers to kernel 5.5 rc3 level

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > Update alpha syscall numbers based on Linux kernel tag v5.5-rc3 > (commit 46cf053e). > > Signed-off-by: Aleksandar Markovic > > --- > > cc: Richard Henderson > --- > linux-user/alpha/syscall_nr.h | 35 +

[PATCH v5 18/22] tests/tcg/aarch64: add a gdbstub testcase for SVE registers

2020-01-14 Thread Alex Bennée
A very simple test case which sets and reads SVE registers while running a test case. We don't really need to compile a SVE binary for this case but we will later so keep it simple for now. Signed-off-by: Alex Bennée --- v5 - properly plumb in - skip if fails to connect --- tests/.gitignore

[PATCH v5 15/22] tests/tcg/aarch64: userspace system register test

2020-01-14 Thread Alex Bennée
This tests a bunch of registers that the kernel allows userspace to read including the CPUID registers. We need a SVE aware compiler as we are testing the id_aa64zfr0_el1 register in the set. Signed-off-by: Alex Bennée Message-Id: <20190205190224.2198-7-alex.ben...@linaro.org> --- vgdbstub - d

Re: [PATCH v5 06/20] linux-user: x86_64: Update syscall numbers to kernel 5.5 rc3 level

2020-01-14 Thread Laurent Vivier
Le 13/01/2020 à 21:34, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > Update x86_64 syscall numbers based on Linux kernel tag v5.5-rc3 > (commit 46cf053e). > > Signed-off-by: Aleksandar Markovic > > --- > > cc: Paolo Bonzini > cc: Richard Henderson > cc: Eduardo Habkost > --

KVM call minutes for 2020-01-14

2020-01-14 Thread Juan Quintela
Hi This notes are very terse because the discussion was quite technical and I am not familiar with this part of qemu. Feel free to fill this. - libmuser: * Take all the complication of implementing the device * support several transport types? * mediated devices * tcp or rdma

[PATCH v5 19/22] tests/tcg/aarch64: add SVE iotcl test

2020-01-14 Thread Alex Bennée
This is a fairly bare-bones test of setting the various vector sizes for SVE which will only fail if the PR_SVE_SET_VL can't reduce the user-space vector length by powers of 2. However we will also be able to use it in a future test which exercises the GDB stub. Signed-off-by: Alex Bennée --- v

[PATCH v5 17/22] tests/guest-debug: add a simple test runner

2020-01-14 Thread Alex Bennée
The test runners job is to start QEMU with guest debug enabled and then spawn a gdb process running a test script that exercises the functionality it wants to test. Signed-off-by: Alex Bennée --- tests/guest-debug/run-test.py | 57 +++ 1 file changed, 57 insertion

Feedback on multi-process QEMU muser prototype

2020-01-14 Thread Stefan Hajnoczi
I haven't seen the link to the muser prototype shared on the list yet, so I'm taking the liberty of posting it for discussion: https://github.com/oracle/qemu/tree/multi-process-qemu-v0.4.1-muser Great that a lot of the multi-process patch series is no longer necessary. The muser approach requires

Re: [PATCH v2 1/4] luks: extract block_crypto_calculate_payload_offset()

2020-01-14 Thread Max Reitz
On 09.01.20 12:10, Stefan Hajnoczi wrote: > The qcow2 .bdrv_measure() code calculates the crypto payload offset. > This logic really belongs in block/crypto.c where it can be reused by > other image formats. > > The "luks" block driver will need this same logic in order to implement > .bdrv_measur

Re: [PATCH v2 1/3] target/riscv: Fix tb->flags FS status

2020-01-14 Thread Richard Henderson
On 1/14/20 12:13 AM, shihpo.h...@sifive.com wrote: > if (riscv_cpu_fp_enabled(env)) { > -*flags |= TB_FLAGS_MSTATUS_FS; > +*flags |= env->mstatus & MSTATUS_FS; > } Note that riscv_cpu_fp_enabled is *also* testing env->mstatus, and that this assignment can be made uncondit

Re: [PATCH v2 2/4] luks: implement .bdrv_measure()

2020-01-14 Thread Max Reitz
On 09.01.20 12:10, Stefan Hajnoczi wrote: > Add qemu-img measure support in the "luks" block driver. > > Signed-off-by: Stefan Hajnoczi > --- > block/crypto.c | 82 ++ > 1 file changed, 82 insertions(+) > > diff --git a/block/crypto.c b/block/cryp

Re: [PATCH v2 3/4] qemu-img: allow qemu-img measure --object without a filename

2020-01-14 Thread Max Reitz
On 09.01.20 12:10, Stefan Hajnoczi wrote: > In most qemu-img sub-commands the --object option only makes sense when > there is a filename. qemu-img measure is an exception because objects > may be referenced from the image creation options instead of an existing > image file. Allow --object witho

Re: [PATCH v2 3/3] target/riscv: update mstatus.SD when FS is set dirty

2020-01-14 Thread Richard Henderson
On 1/14/20 12:14 AM, shihpo.h...@sifive.com wrote: > tcg_gen_ori_tl(tmp, tmp, MSTATUS_FS); > +tcg_gen_ori_tl(tmp, tmp, MSTATUS_SD); Merge these: tcg_gen_ori_tl(tmp, tmp, MSTATUS_FS | MSTATUS_SD); The TCG optimizer doesn't try to handle this sort of thing. With that, Reviewed-by: Rich

Re: [PATCH v2 2/3] target/riscv: fsd/fsw doesn't dirty FP state

2020-01-14 Thread Richard Henderson
On 1/14/20 12:13 AM, shihpo.h...@sifive.com wrote: > Signed-off-by: ShihPo Hung > --- > target/riscv/insn_trans/trans_rvd.inc.c | 1 - > target/riscv/insn_trans/trans_rvf.inc.c | 1 - > 2 files changed, 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 4/4] iotests: add 282 luks qemu-img measure test

2020-01-14 Thread Max Reitz
On 09.01.20 12:10, Stefan Hajnoczi wrote: > This test exercises the block/crypto.c "luks" block driver > .bdrv_measure() code. > > Signed-off-by: Stefan Hajnoczi > --- > tests/qemu-iotests/282 | 93 ++ > tests/qemu-iotests/282.out | 30 > test

Re: [PATCH] qemu-deprecated: Remove text about Python 2

2020-01-14 Thread John Snow
On 1/14/20 5:20 AM, Daniel P. Berrangé wrote: > On Tue, Jan 14, 2020 at 11:08:16AM +0100, Thomas Huth wrote: >> On 13/01/2020 23.36, John Snow wrote: >>> >>> >>> On 1/9/20 4:51 AM, Thomas Huth wrote: Python 2 support has been removed, so we should now also remove the announcement text

Re: [PATCH v28 17/22] hw/rx: RX Target hardware definition

2020-01-14 Thread Igor Mammedov
On Tue, 14 Jan 2020 21:55:42 +0900 Yoshinori Sato wrote: > On Mon, 13 Jan 2020 18:17:14 +0900, > Igor Mammedov wrote: > > > > On Sun, 12 Jan 2020 21:49:08 +0900 > > Yoshinori Sato wrote: > > > > > rx62n - RX62N cpu. > > > rx-virt - RX QEMU virtual target. > > > > > > v23 changes. > > > Add

Re: [PULL 0/1] Block patches

2020-01-14 Thread Peter Maydell
On Tue, 14 Jan 2020 at 09:31, Stefan Hajnoczi wrote: > > The following changes since commit dc65a5bdc9fa543690a775b50d4ffbeb22c56d6d: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.0-20200108' > into staging (2020-01-10 16:15:04 +) > > are available in the Git repository a

[PULL 0/5] 9p patches 2020-01-14

2020-01-14 Thread Greg Kurz
The following changes since commit 3c8a6575985b1652b45bfa670b5e1907d642cfa0: Merge remote-tracking branch 'remotes/kraxel/tags/usb-20200113-pull-request' into staging (2020-01-13 14:19:57 +) are available in the Git repository at: https://github.com/gkurz/qemu.git tags/9p-next-2020-01-1

[PULL 1/5] 9pfs: local: Fix possible memory leak in local_link()

2020-01-14 Thread Greg Kurz
From: Jiajun Chen There is a possible memory leak while local_link return -1 without free odirpath and oname. Reported-by: Euler Robot Signed-off-by: Jaijun Chen Signed-off-by: Xiang Zheng Reviewed-by: Christian Schoenebeck Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Greg Kurz ---

<    1   2   3   4   5   >