Re: [Qemu-devel] [PATCH 4/9] target/ppc: Fix lxvw4x, lxvh8x and lxvb16x

2019-05-10 Thread Mark Cave-Ayland
On 07/05/2019 01:48, Anton Blanchard wrote: > During the conversion these instructions were incorrectly treated as > stores. We need to use set_cpu_vsr* and not get_cpu_vsr*. > > Fixes: 8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() > helpers for VSR register access") > Signe

Re: [Qemu-devel] [PATCH] target/ppc: Optimise VSX_LOAD_SCALAR_DS and VSX_VECTOR_LOAD_STORE

2019-05-10 Thread Mark Cave-Ayland
On 09/05/2019 01:35, Anton Blanchard wrote: > A few small optimisations: > > In VSX_LOAD_SCALAR_DS() we can don't need to read the VSR via > get_cpu_vsrh(). > > Split VSX_VECTOR_LOAD_STORE() into two functions. Loads only need to > write the VSRs (set_cpu_vsr*()) and stores only need to read the

Re: [Qemu-devel] [Question] Memory hotplug clarification for Qemu ARM/virt

2019-05-10 Thread Igor Mammedov
On Fri, 10 May 2019 11:58:38 +0200 Auger Eric wrote: > Hi Shameer, > > On 5/10/19 11:27 AM, Shameerali Kolothum Thodi wrote: > > Hi Eric, > > > >> -Original Message- > >> From: Auger Eric [mailto:eric.au...@redhat.com] > >> Sent: 10 May 2019 10:16 > >> To: Shameerali Kolothum Thodi ; >

Re: [Qemu-devel] [PATCH v2] target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p

2019-05-10 Thread Mark Cave-Ayland
On 09/05/2019 01:49, Anton Blanchard wrote: > We were using set_cpu_vsr*() when we should have used get_cpu_vsr*(). > > Fixes: 8b3b2d75c7c0 ("introduce get_cpu_vsr{l,h}() and set_cpu_vsr{l,h}() > helpers for VSR register access") > Signed-off-by: Anton Blanchard > --- > target/ppc/translate/vs

Re: [Qemu-devel] [PULL 00/13] Trivial branch patches

2019-05-10 Thread Markus Armbruster
Peter Maydell writes: > On Thu, 9 May 2019 at 09:32, Markus Armbruster wrote: >> >> Alex Bennée writes: >> > I couldn't replicate the bug with access to my s390 account so I think >> > it might be existing build artefact related which is odd. >> >> Any ideas on how to debug this further? > > It

Re: [Qemu-devel] [PATCH v5 00/15] demacro softmmu (plus tests/coverage)

2019-05-10 Thread Mark Cave-Ayland
On 10/05/2019 11:36, Alex Bennée wrote: > Alex Bennée writes: > >> Hi, >> >> This is the latest iteration of the softmmu demacro series. The main >> changes from the last submission are some updates from Richard. > > Ping Emilio/Mark > > Would you be able to re-run your tests to check there ar

Re: [Qemu-devel] [PULL 0/8] Input 20190510 patches

2019-05-10 Thread Peter Maydell
available in the Git repository at: > > git://git.kraxel.org/qemu tags/input-20190510-pull-request > > for you to fetch changes up to 7fb6e5a839bc625fd64c32d167f231ecd6f2b3e2: > > virtio-input: fix Kconfig depe

[Qemu-devel] [PATCH 0/5] Retrieving zPCI specific info from QEMU

2019-05-10 Thread Pierre Morel
This patch implement the QEMU part to retrieve ZPCI specific information from the host. The Linux part has been posted on a separate patch on the LKML. Subject: [PATCH 0/4] Retrieving zPCI specific info with VFIO Message-Id: <1557476555-20256-1-git-send-email-pmo...@linux.ibm.com> We use the PCI

[Qemu-devel] [PATCH 2/5] s390: PCI: Creation a header dedicated to PCI CLP

2019-05-10 Thread Pierre Morel
To have a clean separation between s390-pci-bus.h and s390-pci-inst.h headers we export the PCI CLP instructions in a dedicated header. Signed-off-by: Pierre Morel Reviewed-by: Collin Walling --- hw/s390x/s390-pci-bus.h | 1 + hw/s390x/s390-pci-clp.h | 211 ++

[Qemu-devel] [Bug 1823458] Re: race condition between vhost_net_stop and CHR_EVENT_CLOSED on shutdown crashes qemu

2019-05-10 Thread Dan Streetman
On a Xenial DPDK setup with the proposed qemu version (1:2.5+dfsg- 5ubuntu10.37), I created a VM and attached a vhost-user interface to it using this xml: $ cat vm3-iface2.xml the OVS interface was created with: # ovs-vsctl add-port br1 vhu2 -- set Interface vhu2 t

[Qemu-devel] [PATCH 4/5] s390: vfio_pci: Use a PCI Function structure

2019-05-10 Thread Pierre Morel
We use a ClpRspQueryPci structure to hold the information related to zPCI Function. This allows us to be ready to support different zPCI functions and to retrieve the zPCI function information from the host. Signed-off-by: Pierre Morel --- hw/s390x/s390-pci-bus.c | 22 +-

[Qemu-devel] [PATCH 3/5] s390: vfio_pci: Use a PCI Group structure

2019-05-10 Thread Pierre Morel
We use a S390PCIGroup structure to hold the information related to zPCI Function group. This allows us to be ready to support multiple groups and to retrieve the group information from the host. Signed-off-by: Pierre Morel --- hw/s390x/s390-pci-bus.c | 42 ++

[Qemu-devel] [PATCH 5/5] s390: vfio_pci: Get zPCI function info from host

2019-05-10 Thread Pierre Morel
The VFIO_IOMMU_INFO_CAPABILITIES flag allows to retrieve IOMMU specific informations from the iommu associated with the zPCI VFIO device. When we retrieve the host device information, we take care to - use the virtual UID and FID - Disable all the IOMMU flags we do not support yet. Just keeping

[Qemu-devel] [PATCH 1/5] vfio: vfio_iommu_type1: linux header place holder

2019-05-10 Thread Pierre Morel
This should be copied from Linux kernel UAPI includes. Signed-off-by: Pierre Morel --- linux-headers/linux/vfio.h | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index 12a7b1d..eaecaef 100644 --- a/linu

Re: [Qemu-devel] [Qemu-ppc] [PATCH v8 1/6] ppc: spapr: Handle "ibm, nmi-register" and "ibm, nmi-interlock" RTAS calls

2019-05-10 Thread Greg Kurz
On Fri, 10 May 2019 11:06:04 +0200 Greg Kurz wrote: > On Mon, 22 Apr 2019 12:32:58 +0530 > Aravinda Prasad wrote: > > > This patch adds support in QEMU to handle "ibm,nmi-register" > > and "ibm,nmi-interlock" RTAS calls. > > > > The machine check notification address is saved when the > > OS i

Re: [Qemu-devel] [PULL 0/8] Block patches

2019-05-10 Thread Peter Maydell
On Fri, 10 May 2019 at 14:02, Stefan Hajnoczi wrote: > > The following changes since commit 812b835fb4d23dd108b2f9802158472d50b73579: > > Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-05-07' > into staging (2019-05-09 16:31:12 +0100) > > are available in the Git repository

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-10 Thread Peter Maydell
On Thu, 9 May 2019 at 17:59, Alex Bennée wrote: > > For running system tests we want to be able to re-direct output to a > file like we do with serial output. This does the wiring to allow us > to treat semihosting like just another character output device. > > diff --git a/qemu-options.hx b/qemu-

Re: [Qemu-devel] [PATCH v3 6/7] tests/qemu-iotests/group: Re-use the "auto" group for tests that can always run

2019-05-10 Thread Kevin Wolf
Am 10.05.2019 um 10:55 hat Thomas Huth geschrieben: > On 08/05/2019 07.47, Thomas Huth wrote: > > On 07/05/2019 17.50, Eric Blake wrote: > >> On 5/7/19 10:22 AM, Thomas Huth wrote: > >>> On 07/05/2019 15.22, Markus Armbruster wrote: > Thomas Huth writes: > > > Currently, all tests ar

[Qemu-devel] [Bug 1828507] Re: qemu-system-ppc64 smp crash on manual reset

2019-05-10 Thread Amol Surati
If one continues with the iso, and installs the OS in the guest, the rebooting of the guest from within the guest OS too causes qemu to exit fatally. So, one can run 'systemctl reboot' or 'reboot' within the guest OS and see qemu crash (immediately after SLOF prints version, etc. as part of the reb

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-10 Thread Peter Maydell
On Fri, 10 May 2019 at 15:05, Alex Bennée wrote: > Only for the first one though.. that said I'm sure the write string is > leaking when we do gdb output with whatever lock_user_string is trying > to achieve. Yes, there looks like there's a leak there. (The fix is complicated because we need to c

Re: [Qemu-devel] [PATCH v2] chardev/char-i2c: Implement Linux I2C character device

2019-05-10 Thread Ernest Esene
On Tue, May 07, 2019 at 07:33:09PM +0200, Markus Armbruster wrote: > Ernest Esene writes: > > > Add support for Linux I2C character device for I2C device passthrough > > For example: > > -chardev linux-i2c,address=0x46,path=/dev/i2c-N,id=i2c-chardev > > > > Signed-off-by: Ernest Esene > > Could

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-10 Thread Alex Bennée
Richard Henderson writes: > On 5/9/19 11:55 PM, Alex Bennée wrote: >> >> Richard Henderson writes: >> >>> On 5/9/19 9:58 AM, Alex Bennée wrote: @@ -51,12 +51,18 @@ static inline const char *semihosting_get_cmdline(void) { return NULL; } + +static inline Cha

[Qemu-devel] [PULL 8/8] virtio-input: fix Kconfig dependency and Makefile

2019-05-10 Thread Gerd Hoffmann
Make VIRTIO_INPUT_HOST depend on VIRTIO_INPUT. Use CONFIG_VIRTIO_INPUT_HOST in Makefile. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 20190510105137.17481-2-kra...@redhat.com --- hw/input/Kconfig | 2 +- hw/input/Makefile.objs | 4 +--- 2 files changed, 2 insert

[Qemu-devel] [PULL 6/8] contrib: add vhost-user-input

2019-05-10 Thread Gerd Hoffmann
From: Marc-André Lureau Add a vhost-user input backend example, based on virtio-input-host device. It takes an evdev path as argument, and can be associated with a vhost-user-input device via a UNIX socket: $ vhost-user-input -p /dev/input/eventX -s /tmp/vui.sock $ qemu ... -chardev socket,id=v

[Qemu-devel] [PULL 7/8] virtio-input-host-pci: cleanup types

2019-05-10 Thread Gerd Hoffmann
virtio input is virtio-1.0 only, so we don't need the -transitional and -non-transitional variants. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau Message-id: 20190510105137.17481-1-kra...@redhat.com --- hw/virtio/virtio-input-host-pci.c | 7 ++- 1 file changed, 2 insertions(+)

Re: [Qemu-devel] [PATCH v3] tests/qemu-iotests: re-format output to for make check-block

2019-05-10 Thread Kevin Wolf
Am 10.05.2019 um 12:29 hat Alex Bennée geschrieben: > This attempts to clean-up the output to better match the output of the > rest of the QEMU check system when called with -pretty. This includes: > > - formatting as " TESTiotest: nnn" > - calculating time diff at the end > - only dump

[Qemu-devel] [PULL 2/8] libvhost-user: add PROTOCOL_F_CONFIG if {set, get}_config

2019-05-10 Thread Gerd Hoffmann
From: Marc-André Lureau Add the config protocol feature bit if the set_config & get_config callbacks are implemented. Signed-off-by: Marc-André Lureau Message-id: 20190503130034.24916-3-marcandre.lur...@redhat.com Signed-off-by: Gerd Hoffmann --- contrib/libvhost-user/libvhost-user.c | 4

[Qemu-devel] [PULL 3/8] Add vhost-user-backend

2019-05-10 Thread Gerd Hoffmann
From: Marc-André Lureau Create a vhost-user-backend object that holds a connection to a vhost-user backend (or "slave" process) and can be referenced from virtio devices that support it. See later patches for input & gpu usage. Note: a previous iteration of this object made it user-creatable, an

[Qemu-devel] [PULL 4/8] Add vhost-user-input-pci

2019-05-10 Thread Gerd Hoffmann
From: Marc-André Lureau Add a new virtio-input device, which connects to a vhost-user backend. Instead of reading configuration directly from an input device / evdev (like virtio-input-host), it reads it over vhost-user protocol with {SET,GET}_CONFIG messages. The vhost-user-backend handles the

[Qemu-devel] [PULL 0/8] Input 20190510 patches

2019-05-10 Thread Gerd Hoffmann
The following changes since commit 812b835fb4d23dd108b2f9802158472d50b73579: Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-05-07' into staging (2019-05-09 16:31:12 +0100) are available in the Git repository at: git://git.kraxel.org/qemu tags/input-201

[Qemu-devel] [PULL 5/8] util: simplify unix_listen()

2019-05-10 Thread Gerd Hoffmann
From: Marc-André Lureau The only caller of unix_listen() left is qga/channel-posix.c. There is no need to deal with legacy coma-trailing options ",...". Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-id: 20190503130034.24916-6-marcandre.lur...@redhat.com Signed-off-b

[Qemu-devel] [PULL 1/8] libvhost-user: fix -Waddress-of-packed-member

2019-05-10 Thread Gerd Hoffmann
From: Marc-André Lureau /home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c: In function ‘vu_set_mem_table_exec_postcopy’: /home/elmarco/src/qemu/contrib/libvhost-user/libvhost-user.c:546:31: warning: taking address of packed member of ‘struct VhostUserMsg’ may result in an unaligned

Re: [Qemu-devel] [PULL SUBSYSTEM s390x 2/3] s390-bios: Skip bootmap signature entries

2019-05-10 Thread Christian Borntraeger
Shall we cc stable this? On 08.05.19 11:48, Thomas Huth wrote: > From: "Jason J. Herne" > > Newer versions of zipl have the ability to write signature entries to the boot > script for secure boot. We don't yet support secure boot, but we need to skip > over signature entries while reading the bo

[Qemu-devel] [PATCH v4] tests/qemu-iotests: re-format output to for make check-block

2019-05-10 Thread Alex Bennée
This attempts to clean-up the output to better match the output of the rest of the QEMU check system when called with -pretty. This includes: - formatting as " TESTiotest: nnn" - calculating time diff at the end - only dumping config on failure (when -pretty enabled) The existing outpu

Re: [Qemu-devel] [PATCH v1 05/23] semihosting: enable chardev backed output

2019-05-10 Thread Richard Henderson
On 5/9/19 11:55 PM, Alex Bennée wrote: > > Richard Henderson writes: > >> On 5/9/19 9:58 AM, Alex Bennée wrote: >>> @@ -51,12 +51,18 @@ static inline const char *semihosting_get_cmdline(void) >>> { >>> return NULL; >>> } >>> + >>> +static inline Chardev *semihosting_get_chardev(void) >>>

Re: [Qemu-devel] [PULL SUBSYSTEM s390x 3/3] pc-bios/s390: Update firmware image with "Skip bootmap signature entries" fix

2019-05-10 Thread Jason J. Herne
On 5/8/19 5:48 AM, Thomas Huth wrote: Firmware now skips the unsupported signature entries instead of aborting the boot process. Signed-off-by: Thomas Huth --- pc-bios/s390-ccw.img | Bin 42608 -> 42608 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/pc-bios/s390-ccw.img

Re: [Qemu-devel] [PULL SUBSYSTEM s390x 0/3] s390-ccw-bios: Skip bootmap signature entries

2019-05-10 Thread Christian Borntraeger
Shall we actually CC stable that feature? On 08.05.19 11:48, Thomas Huth wrote: > This pull request is not for master. > > > Hi Cornelia, > > the following changes since commit a6f6d24757a73f7176989134b97284a1a7df11e5: > > Merge remote-tracking branch > 'remotes/kraxel/tags/vga-20190507-pu

Re: [Qemu-devel] Failing QEMU iotest 175

2019-05-10 Thread Max Reitz
On 28.04.19 17:18, Thomas Huth wrote: > QEMU iotest 175 is failing for me when I run it with -raw: > > $ ./check -raw 175 > QEMU -- > "/home/thuth/tmp/qemu-build/tests/qemu-iotests/../../x86_64-softmmu/qemu-system-x86_64" > -nodefaults -machine accel=qtest > QEMU_IMG -- > "/home/thut

Re: [Qemu-devel] [PATCH v3 7/7] tests: Run the iotests during "make check" again

2019-05-10 Thread Max Reitz
On 10.05.19 15:36, Thomas Huth wrote: > On 10/05/2019 15.34, Max Reitz wrote: >> On 10.05.19 06:29, Thomas Huth wrote: >>> On 09/05/2019 20.08, Max Reitz wrote: On 02.05.19 10:45, Thomas Huth wrote: > People often forget to run the iotests before submitting patches or > pull requests -

[Qemu-devel] [PATCH v3 2/3] rng-builtin: add an RNG backend that uses qemu_guest_getrandom()

2019-05-10 Thread Laurent Vivier
Add a new RNG backend using QEMU builtin getrandom function. It can be created and used with something like: ... -object rng-builtin,id=rng0 -device virtio-rng,rng=rng0 ... Reviewed-by: Richard Henderson Signed-off-by: Laurent Vivier --- backends/Makefile.objs | 2 +- backends/rng-builti

[Qemu-devel] [PATCH v3 3/3] virtio-rng: change default backend to rng-builtin

2019-05-10 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- backends/rng-builtin.c | 8 +++- hw/virtio/virtio-rng.c | 2 +- include/hw/virtio/virtio-rng.h | 4 ++-- include/sysemu/rng-builtin.h | 17 + qemu-options.hx| 5 ++--- 5 files changed, 25 insertions(+), 11

[Qemu-devel] [PATCH v3 1/3] VirtIO-RNG: Update default entropy source to `/dev/urandom`

2019-05-10 Thread Laurent Vivier
From: Kashyap Chamarthy When QEMU exposes a VirtIO-RNG device to the guest, that device needs a source of entropy, and that source needs to be "non-blocking", like `/dev/urandom`. However, currently QEMU defaults to the problematic `/dev/random`, which is "blocking" (as in, it waits until suffic

[Qemu-devel] [PATCH v3 0/3] rng-builtin: add an RNG backend that uses qemu_guest_getrandom()

2019-05-10 Thread Laurent Vivier
Add a new RNG backend using QEMU builtin getrandom function. This patch applies on top of "[PATCH v5 00/24] Add qemu_getrandom and ARMv8.5-RNG etc" Based-on: 20190510012458.22706-1-richard.hender...@linaro.org v3: Include Kashyap's patch in the series Add a patch to change virtio-rng defa

Re: [Qemu-devel] [PATCH v3 7/7] tests: Run the iotests during "make check" again

2019-05-10 Thread Max Reitz
On 10.05.19 15:34, Max Reitz wrote: > On 10.05.19 06:29, Thomas Huth wrote: >> On 09/05/2019 20.08, Max Reitz wrote: >>> On 02.05.19 10:45, Thomas Huth wrote: People often forget to run the iotests before submitting patches or pull requests - this is likely due to the fact that we do not

Re: [Qemu-devel] [PATCH v3 7/7] tests: Run the iotests during "make check" again

2019-05-10 Thread Max Reitz
On 10.05.19 06:29, Thomas Huth wrote: > On 09/05/2019 20.08, Max Reitz wrote: >> On 02.05.19 10:45, Thomas Huth wrote: >>> People often forget to run the iotests before submitting patches or >>> pull requests - this is likely due to the fact that we do not run the >>> tests during our mandatory "ma

Re: [Qemu-devel] [PATCH v8 4/6] target/ppc: Build rtas error log upon an MCE

2019-05-10 Thread David Gibson
On Fri, May 10, 2019 at 12:35:13PM +0530, Aravinda Prasad wrote: > > > On Friday 10 May 2019 12:12 PM, David Gibson wrote: > > On Mon, Apr 22, 2019 at 12:33:26PM +0530, Aravinda Prasad wrote: > >> Upon a machine check exception (MCE) in a guest address space, > >> KVM causes a guest exit to enabl

Re: [Qemu-devel] [Qemu-ppc] [PATCH v8 1/6] ppc: spapr: Handle "ibm, nmi-register" and "ibm, nmi-interlock" RTAS calls

2019-05-10 Thread David Gibson
On Fri, May 10, 2019 at 11:06:04AM +0200, Greg Kurz wrote: > On Mon, 22 Apr 2019 12:32:58 +0530 > Aravinda Prasad wrote: > > > This patch adds support in QEMU to handle "ibm,nmi-register" > > and "ibm,nmi-interlock" RTAS calls. > > > > The machine check notification address is saved when the > >

Re: [Qemu-devel] [PATCH v3 7/7] tests: Run the iotests during "make check" again

2019-05-10 Thread Thomas Huth
On 10/05/2019 15.34, Max Reitz wrote: > On 10.05.19 06:29, Thomas Huth wrote: >> On 09/05/2019 20.08, Max Reitz wrote: >>> On 02.05.19 10:45, Thomas Huth wrote: People often forget to run the iotests before submitting patches or pull requests - this is likely due to the fact that we do no

Re: [Qemu-devel] [Qemu-ppc] [PATCH v8 5/6] ppc: spapr: Enable FWNMI capability

2019-05-10 Thread David Gibson
On Fri, May 10, 2019 at 12:45:29PM +0530, Aravinda Prasad wrote: > > > On Friday 10 May 2019 12:16 PM, David Gibson wrote: > > On Mon, Apr 22, 2019 at 12:33:35PM +0530, Aravinda Prasad wrote: > >> Enable the KVM capability KVM_CAP_PPC_FWNMI so that > >> the KVM causes guest exit with NMI as exit

Re: [Qemu-devel] [Qemu-ppc] [PATCH v8 2/6] Wrapper function to wait on condition for the main loop mutex

2019-05-10 Thread Greg Kurz
On Mon, 22 Apr 2019 12:33:07 +0530 Aravinda Prasad wrote: > Introduce a wrapper function to wait on condition for > the main loop mutex. This function atomically releases > the main loop mutex and causes the calling thread to > block on the condition. This wrapper is required because > qemu_globa

Re: [Qemu-devel] [PATCH] pflash: Only read non-zero parts of backend image

2019-05-10 Thread Xiang Zheng
On 2019/5/9 19:59, Markus Armbruster wrote: > Xiang Zheng writes: > >> On 2019/5/8 21:20, Markus Armbruster wrote: >>> Laszlo Ersek writes: >>> Hi Markus, On 05/07/19 20:01, Markus Armbruster wrote: > The subject is slightly misleading. Holes read as zero. So do > non

[Qemu-devel] [PULL 3/8] util/readline: Add braces to fix checkpatch errors

2019-05-10 Thread Stefan Hajnoczi
From: Jules Irenge Add braces to fix errors issued by checkpatch.pl tool "ERROR: braces {} are necessary for all arms of this statement" Within "util/readline.c" file Message-Id: <20190330112142.14082-1-jbi.oct...@gmail.com> Signed-off-by: Stefan Hajnoczi --- util/readline.c | 50 +

[Qemu-devel] [PULL 1/8] util/readline: add a space to fix errors by checkpatch tool

2019-05-10 Thread Stefan Hajnoczi
From: Jules Irenge util/readline: add a space to fix errors reported by checkpatch.pl tool "ERROR: space required before the open parenthesis" "ERROR: space required after that ..." within "util/redline.c" file Signed-off-by: Jules Irenge Reviewed-by: Thomas Huth Message-id: 20190401024406.108

[Qemu-devel] [PULL 2/8] util: readline: replace tab indent by four spaces to fix checkpatch errors

2019-05-10 Thread Stefan Hajnoczi
From: Jules Irenge Replace tab indent by four spaces to fix errors issued by checkpatch.pl tool "ERROR: code indent should never use tabs" within "util/readline.c" file. Signed-off-by: Jules Irenge Reviewed-by: Thomas Huth Message-id: 20190401024406.10819-3-jbi.oct...@gmail.com Message-Id: <20

[Qemu-devel] [PULL 6/8] aio-posix: ensure poll mode is left when aio_notify is called

2019-05-10 Thread Stefan Hajnoczi
From: Paolo Bonzini With aio=thread, adaptive polling makes latency worse rather than better, because it delays the execution of the ThreadPool's completion bottom half. event_notifier_poll() does run while polling, detecting that a bottom half was scheduled by a worker thread, but because ctx->

[Qemu-devel] [PULL 8/8] docs: add Security chapter to the documentation

2019-05-10 Thread Stefan Hajnoczi
This new chapter in the QEMU documentation covers the security requirements that QEMU is designed to meet and principles for securely deploying QEMU. It is just a starting point that can be extended in the future with more information. Signed-off-by: Stefan Hajnoczi Acked-by: Stefano Garzarella

[Qemu-devel] [PULL 7/8] docs: add Secure Coding Practices to developer docs

2019-05-10 Thread Stefan Hajnoczi
At KVM Forum 2018 I gave a presentation on security in QEMU: https://www.youtube.com/watch?v=YAdRf_hwxU8 (video) https://vmsplice.net/~stefan/stefanha-kvm-forum-2018.pdf (slides) This patch adds a guide to secure coding practices. This document covers things that developers should know about secu

[Qemu-devel] [PULL 4/8] block: Add coroutine_fn to bdrv_check_co_entry

2019-05-10 Thread Stefan Hajnoczi
From: Nikita Alekseev bdrv_check_co_entry calls bdrv_co_check, which is a coroutine function. Thus, it also needs to be marked as a coroutine. Signed-off-by: Nikita Alekseev Message-id: 20190401093051.16488-1-n.alekseev2...@gmail.com Message-Id: <20190401093051.16488-1-n.alekseev2...@gmail.com>

[Qemu-devel] [PULL 5/8] block/io.c: fix for the allocation failure

2019-05-10 Thread Stefan Hajnoczi
From: Andrey Shinkevich On a file system used by the customer, fallocate() returns an error if the block is not properly aligned. So, bdrv_co_pwrite_zeroes() fails. We can handle that case the same way as it is done for the unsupported cases, namely, call to bdrv_driver_pwritev() that writes zero

[Qemu-devel] [PULL 0/8] Block patches

2019-05-10 Thread Stefan Hajnoczi
The following changes since commit 812b835fb4d23dd108b2f9802158472d50b73579: Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-05-07' into staging (2019-05-09 16:31:12 +0100) are available in the Git repository at: https://github.com/stefanha/qemu.git tags/block-pull-reque

Re: [Qemu-devel] [PATCH v2] rng-builtin: add an RNG backend that uses qemu_guest_getrandom()

2019-05-10 Thread Laurent Vivier
On 10/05/2019 14:27, Markus Armbruster wrote: Laurent Vivier writes: Add a new RNG backend using QEMU builtin getrandom function. It can be created and used with something like: ... -object rng-builtin,id=rng0 -device virtio-rng,rng=rng0 ... Reviewed-by: Richard Henderson Signed-off-b

Re: [Qemu-devel] [PATCH v2] rng-builtin: add an RNG backend that uses qemu_guest_getrandom()

2019-05-10 Thread Markus Armbruster
Laurent Vivier writes: > Add a new RNG backend using QEMU builtin getrandom function. > > It can be created and used with something like: > > ... -object rng-builtin,id=rng0 -device virtio-rng,rng=rng0 ... > > Reviewed-by: Richard Henderson > Signed-off-by: Laurent Vivier > --- > > Notes: >

Re: [Qemu-devel] [PULL v2 0/7] Linux user for 4.1 patches

2019-05-10 Thread Peter Maydell
On Fri, 10 May 2019 at 11:47, Laurent Vivier wrote: > > The following changes since commit 68a7b9724fe80bedb85060bde605213ce3f9baec: > > Merge remote-tracking branch > 'remotes/vivier2/tags/trivial-branch-pull-request' into staging (2019-05-09 > 13:36:10 +0100) > > are available in the Git rep

Re: [Qemu-devel] [PATCH v2] VirtIO-RNG: Update default entropy source to `/dev/urandom`

2019-05-10 Thread Markus Armbruster
Kashyap Chamarthy writes: > When QEMU exposes a VirtIO-RNG device to the guest, that device needs a > source of entropy, and that source needs to be "non-blocking", like > `/dev/urandom`. However, currently QEMU defaults to the problematic > `/dev/random`, which is "blocking" (as in, it waits un

Re: [Qemu-devel] [PATCH v2] VirtIO-RNG: Update default entropy source to `/dev/urandom`

2019-05-10 Thread Daniel P . Berrangé
On Fri, May 10, 2019 at 02:03:33PM +0200, Markus Armbruster wrote: > Kashyap Chamarthy writes: > > > When QEMU exposes a VirtIO-RNG device to the guest, that device needs a > > source of entropy, and that source needs to be "non-blocking", like > > `/dev/urandom`. However, currently QEMU default

Re: [Qemu-devel] [PATCH v3] tests/qemu-iotests: re-format output to for make check-block

2019-05-10 Thread Alex Bennée
Thomas Huth writes: > On 10/05/2019 12.48, Thomas Huth wrote: > [...] >> >> I think the "make check" mode should only print out one time for each >> test, preferable at the end, like the other tests (like qtests) are >> doing it...? > > s/preferable at the end/preferably at the beginning/ > > .

Re: [Qemu-devel] [PATCH v2 0/3] vhost-scsi: Support migration

2019-05-10 Thread Liran Alon
> On 25 Apr 2019, at 20:53, Michael S. Tsirkin wrote: > > On Thu, Apr 25, 2019 at 09:38:19AM +0100, Stefan Hajnoczi wrote: >> On Wed, Apr 24, 2019 at 07:38:57PM +0300, Liran Alon wrote: >>> >>> On 18 Apr 2019, at 12:41, Stefan Hajnoczi wrote: On Tue, Apr 16, 2019 at 03:59:09

Re: [Qemu-devel] [PATCH v3 6/7] tests/qemu-iotests/group: Re-use the "auto" group for tests that can always run

2019-05-10 Thread Markus Armbruster
Thomas Huth writes: > Thinking about this again, "make check" now runs quite a bit longer > indeed. So I now rather tend to remove the tests that run longer than 5s > from the auto group instead... I think I'll send a v4 of this patch > where I'll remove them from the auto group. Appreciated! I

Re: [Qemu-devel] [PATCH v3] tests/qemu-iotests: re-format output to for make check-block

2019-05-10 Thread Thomas Huth
On 10/05/2019 12.48, Thomas Huth wrote: [...] > > I think the "make check" mode should only print out one time for each > test, preferable at the end, like the other tests (like qtests) are > doing it...? s/preferable at the end/preferably at the beginning/ ... I think the makefile rules for the

Re: [Qemu-devel] [PATCH v2] rng-builtin: add an RNG backend that uses qemu_guest_getrandom()

2019-05-10 Thread Daniel P . Berrangé
On Fri, May 10, 2019 at 12:26:37PM +0200, Laurent Vivier wrote: > Add a new RNG backend using QEMU builtin getrandom function. > > It can be created and used with something like: > > ... -object rng-builtin,id=rng0 -device virtio-rng,rng=rng0 ... > > Reviewed-by: Richard Henderson > Signed-

Re: [Qemu-devel] [PATCH 0/2] i386: "unavailable-features" QOM property

2019-05-10 Thread Jiri Denemark
On Thu, May 09, 2019 at 13:08:25 -0300, Eduardo Habkost wrote: > On Thu, May 09, 2019 at 05:26:16PM +0200, Jiri Denemark wrote: > > On Thu, May 09, 2019 at 10:56:17 -0300, Eduardo Habkost wrote: > > > On Thu, May 09, 2019 at 03:35:37PM +0200, Jiri Denemark wrote: > > > > Would this unavailable-feat

Re: [Qemu-devel] [PATCH v3] tests/qemu-iotests: re-format output to for make check-block

2019-05-10 Thread Thomas Huth
On 10/05/2019 13.10, Alex Bennée wrote: > > Thomas Huth writes: > >> On 10/05/2019 12.29, Alex Bennée wrote: >>> This attempts to clean-up the output to better match the output of the >>> rest of the QEMU check system when called with -pretty. This includes: >>> >>> - formatting as " TEST

Re: [Qemu-devel] [PATCH v1 8/8] target/avr: Register AVR support with the rest of QEMU, the build system, and the MAINTAINERS file

2019-05-10 Thread Sarah Harris
Hi Richard, Having discussed with my colleagues, we don't have the resources to maintain this. If you wanted to take up Michael's offer then I'm happy to respond to queries and provide minor fixes. Otherwise, we will make our repository publicly available in the near future for anyone who wants

[Qemu-devel] [PATCH v2 1/2] virtio-input-host-pci: cleanup types

2019-05-10 Thread Gerd Hoffmann
virtio input is virtio-1.0 only, so we don't need the -transitional and -non-transitional variants. Signed-off-by: Gerd Hoffmann --- hw/virtio/virtio-input-host-pci.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/virtio/virtio-input-host-pci.c b/hw/virtio/virtio-

Re: [Qemu-devel] [PATCH v2 1/2] virtio-input-host-pci: cleanup types

2019-05-10 Thread Marc-André Lureau
On Fri, May 10, 2019 at 1:09 PM Gerd Hoffmann wrote: > > virtio input is virtio-1.0 only, so we don't need the -transitional and > -non-transitional variants. > > Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau > --- > hw/virtio/virtio-input-host-pci.c | 7 ++- > 1 file change

Re: [Qemu-devel] [PATCH v3] tests/qemu-iotests: re-format output to for make check-block

2019-05-10 Thread Alex Bennée
Thomas Huth writes: > On 10/05/2019 12.29, Alex Bennée wrote: >> This attempts to clean-up the output to better match the output of the >> rest of the QEMU check system when called with -pretty. This includes: >> >> - formatting as " TESTiotest: nnn" >> - calculating time diff at the e

[Qemu-devel] [PATCH v2 11/13] tests/vm: netbsd autoinstall, using serial console

2019-05-10 Thread Gerd Hoffmann
Instead of fetching the prebuilt image from patchew download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Signed-off-by: Gerd Hoffmann --- tests/vm/netbsd | 187 +++

Re: [Qemu-devel] [PULL 0/7] Linux user for 4.1 patches

2019-05-10 Thread Laurent Vivier
On 10/05/2019 11:16, Peter Maydell wrote: On Fri, 10 May 2019 at 08:18, Laurent Vivier wrote: The following changes since commit 68a7b9724fe80bedb85060bde605213ce3f9baec: Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-pull-request' into staging (2019-05-09 13:36:10 +01

[Qemu-devel] [PATCH v2 06/13] tests/vm: add vm-boot-{ssh, serial}- targets

2019-05-10 Thread Gerd Hoffmann
For testing/troubleshooting convinience. make vm-boot-serial- Boot guest, with the serial console on stdio. make vm-boot-ssh- Boot guest, login via ssh. Signed-off-by: Gerd Hoffmann --- tests/vm/Makefile.include | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tests

[Qemu-devel] [PATCH v2] target/arm: Implement NSACR gating of floating point

2019-05-10 Thread Peter Maydell
The NSACR register allows secure code to configure the FPU to be inaccessible to non-secure code. If the NSACR.CP10 bit is set then: * NS accesses to the FPU trap as UNDEF (ie to NS EL1 or EL2) * CPACR.{CP10,CP11} behave as if RAZ/WI * HCPTR.{TCP11,TCP10} behave as if RAO/WI Note that we do not

[Qemu-devel] [PATCH v2 09/13] tests/vm: openbsd autoinstall, using serial console

2019-05-10 Thread Gerd Hoffmann
Instead of fetching the prebuilt image from patchew download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Signed-off-by: Gerd Hoffmann --- tests/vm/openbsd | 154 ++

[Qemu-devel] [PATCH v2 12/13] tests/vm: fedora autoinstall, using serial console

2019-05-10 Thread Gerd Hoffmann
Download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Yes, we have docker images for fedora. But for trouble-shooting it might be helpful to have a vm too. When vm build

[Qemu-devel] [PATCH v2 07/13] tests/vm: add DEBUG=1 to help text

2019-05-10 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- tests/vm/Makefile.include | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 47084d5717c6..8714b5947958 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -25,6 +25,8 @@ vm-test:

[Qemu-devel] [PATCH v2 00/13] tests/vm: serial console autoinstall, misc fixes.

2019-05-10 Thread Gerd Hoffmann
This patch series changes the way virtual machines for test builds are managed. They are created locally on the developer machine now. The installer is booted on the serial console and the scripts walks through the dialogs to install and configure the guest. That takes the download.patchew.org s

Re: [Qemu-devel] [PATCH 3/3] ramfb enhancement

2019-05-10 Thread Marcel Apfelbaum
Hi Gerd, On 5/10/19 1:39 PM, Gerd Hoffmann wrote: On Fri, May 10, 2019 at 12:20:56PM +0300, Marcel Apfelbaum wrote: Hi Gerd, On 5/10/19 11:59 AM, Gerd Hoffmann wrote: Hi, Got it, thanks. Is a pity ramfb is not a PCI device :), it was worth the question anyway. If you look for a simple

[Qemu-devel] [PATCH v2 03/13] tests/vm: use ssh with pty unconditionally

2019-05-10 Thread Gerd Hoffmann
Allways ask ssh to run with a pseudo terminal. Not having a terminal causes problems now and then. Signed-off-by: Gerd Hoffmann --- tests/vm/basevm.py | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 6b46674f4497..89b

[Qemu-devel] [PATCH v2 05/13] tests/vm: proper guest shutdown

2019-05-10 Thread Gerd Hoffmann
When not running in snapshot mode ask the guest to poweroff and wait for this to finish instead of simply quitting qemu, so the guest can flush pending updates to disk. Signed-off-by: Gerd Hoffmann --- tests/vm/basevm.py | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(

[Qemu-devel] [PATCH v2 04/13] tests/vm: run test builds on snapshot

2019-05-10 Thread Gerd Hoffmann
The build script doesn't shutdown the guest VMs properly, which results in filesystem corruption and guest boot failures sooner or later. Use the --snapshot to run builds on a snapshot, That way killing the VM doesn't corrupt the base image. Signed-off-by: Gerd Hoffmann --- tests/vm/Makefile.in

[Qemu-devel] [PULL v2 3/7] linux-user: avoid string truncation warnings in uname field copying

2019-05-10 Thread Laurent Vivier
From: Daniel P. Berrangé In file included from /usr/include/string.h:494, from include/qemu/osdep.h:101, from linux-user/uname.c:20: In function ‘strncpy’, inlined from ‘sys_uname’ at linux-user/uname.c:94:3: /usr/include/bits/string_fortified.h:106:10: warni

[Qemu-devel] [PATCH v2 2/2] virtio-input: fix Kconfig dependency and Makefile

2019-05-10 Thread Gerd Hoffmann
Make VIRTIO_INPUT_HOST depend on VIRTIO_INPUT. Use CONFIG_VIRTIO_INPUT_HOST in Makefile. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- hw/input/Kconfig | 2 +- hw/input/Makefile.objs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/input/Kconfi

[Qemu-devel] [PATCH v2 08/13] tests/vm: serial console support helpers

2019-05-10 Thread Gerd Hoffmann
Add a bunch of helpers to talk to the guest using the serial console. Also drop the hard-coded -serial parameter for the vm so QEMUMachine.set_console() actually works. Signed-off-by: Gerd Hoffmann --- tests/vm/basevm.py | 85 -- 1 file changed, 82 in

Re: [Qemu-devel] [PATCH v3] tests/qemu-iotests: re-format output to for make check-block

2019-05-10 Thread Thomas Huth
On 10/05/2019 12.29, Alex Bennée wrote: > This attempts to clean-up the output to better match the output of the > rest of the QEMU check system when called with -pretty. This includes: > > - formatting as " TESTiotest: nnn" > - calculating time diff at the end > - only dumping config o

[Qemu-devel] [PATCH v2 02/13] tests/vm: send proxy environment variables over ssh

2019-05-10 Thread Gerd Hoffmann
Packages are fetched via proxy that way, if configured on the host. That might be required to pass firewalls, and it allows to route package downloads through a caching proxy server. Needs AcceptEnv setup in sshd_config on the guest side to work. Signed-off-by: Gerd Hoffmann --- tests/vm/basevm

[Qemu-devel] [PATCH v2 01/13] scripts: use git archive in archive-source

2019-05-10 Thread Gerd Hoffmann
Use git archive to create tarballs of qemu and submodules instead of cloning the repository and the submodules. This is a order of magnitude faster because it doesn't fetch the submodules from the internet each time the script runs. Signed-off-by: Gerd Hoffmann --- scripts/archive-source.sh | 7

[Qemu-devel] [PULL v2 2/7] linux-user/elfload: Fix GCC 9 build warnings

2019-05-10 Thread Laurent Vivier
From: Alistair Francis Fix this warning when building with GCC9 on Fedora 30: In function ‘strncpy’, inlined from ‘fill_psinfo’ at /home/alistair/qemu/linux-user/elfload.c:3208:12, inlined from ‘fill_note_info’ at /home/alistair/qemu/linux-user/elfload.c:3390:5, inlined from ‘elf_co

[Qemu-devel] [PATCH v2 10/13] tests/vm: freebsd autoinstall, using serial console

2019-05-10 Thread Gerd Hoffmann
Instead of fetching the prebuilt image from patchew download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Note that freebsd package downloads are delivered as non-cachabl

[Qemu-devel] [PULL v2 5/7] linux-user: elf: Map empty PT_LOAD segments

2019-05-10 Thread Laurent Vivier
From: Giuseppe Musacchio Some PT_LOAD segments may be completely zeroed out and their p_filesize is zero, in that case the loader should just allocate a page that's at least p_memsz bytes large (plus eventual alignment padding). Calling zero_bss does this job for us, all we have to do is make su

[Qemu-devel] [PULL v2 6/7] linux-user: avoid treading on gprof's SIGPROF signals

2019-05-10 Thread Laurent Vivier
From: Alex Bennée The guest tends to get confused when it receives signals it doesn't know about. Given the gprof magic has also set up it's own handler we would do well to avoid stomping on it as well. Signed-off-by: Alex Bennée Message-Id: <20190502145846.26226-1-alex.ben...@linaro.org> Signe

[Qemu-devel] [PULL v2 4/7] The ioctl(SIOCGIFNAME) call requires a struct ifreq.

2019-05-10 Thread Laurent Vivier
From: Erik Kline Signed-off-by: Erik Kline Buglink: https://bugs.launchpad.net/qemu/+bug/1814352 Reviewed-by: Peter Maydell Message-Id: <20190423222005.246981-1...@google.com> Signed-off-by: Laurent Vivier --- linux-user/ioctls.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[Qemu-devel] [PATCH v2 13/13] tests/vm: ubuntu.i386: apt proxy setup

2019-05-10 Thread Gerd Hoffmann
Configure apt proxy so package downloads can be cached and can pass firewalls. Signed-off-by: Gerd Hoffmann --- tests/vm/ubuntu.i386 | 4 1 file changed, 4 insertions(+) diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index a22d137e76df..b869afd212fa 100755 --- a/tests/vm/ubuntu.i

<    1   2   3   4   >