[Qemu-devel] [PATCH v2 1/9] usb: rearrange usb_ep_get()

2019-02-06 Thread Liam Merwick
There is no need to calculate the 'eps' variable in usb_ep_get() if 'ep' is the control endpoint. Instead the calculation should be done after validating the input before returning an entry indexed by the endpoint 'ep'. Signed-off-by: Liam Merwick Reviewed-by: Darren Kenny Reviewed-by: Mark Kan

[Qemu-devel] [PATCH v2 5/9] ohci: check device is not NULL before calling usb_ep_get()

2019-02-06 Thread Liam Merwick
A call to ohci_find_device() can return NULL if it doesn't find a device matching 'addr' so for the two callers, explicitly check the return value before passing it to usb_ep_get(). Signed-off-by: Liam Merwick --- hw/usb/hcd-ohci.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/u

[Qemu-devel] [PATCH v2 2/9] xhci: add asserts to help with static code analysis

2019-02-06 Thread Liam Merwick
Most callers of xhci_port_update() and xhci_wakeup() pass in a pointer to an array entry and can never be NULL but add two defensive asserts to protect against future changes (e.g. adding a new port speed, etc.) adding a path through xhci_lookup_port() that could result in the return of a NULL XHCI

[Qemu-devel] [PATCH v2 4/9] ehci: check device is not NULL before calling usb_ep_get()

2019-02-06 Thread Liam Merwick
In ehci_process_itd(), the call to ehci_find_device() can return NULL if it doesn't find a device matching 'devaddr' so explicitly check the return value before passing it to usb_ep_get(). Signed-off-by: Liam Merwick --- hw/usb/hcd-ehci.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions

[Qemu-devel] [PATCH v2 8/9] usb: add device checks before redirector calls to usb_ep_get()

2019-02-06 Thread Liam Merwick
Add an assert and an explicit check before the two callers to usb_ep_get() in the USB redirector code to ensure the device passed in is not NULL. Signed-off-by: Liam Merwick --- hw/usb/redirect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/usb/redirect.c b/hw/usb/red

[Qemu-devel] [PATCH v2 7/9] usb: check device is not NULL before calling usb_ep_get()

2019-02-06 Thread Liam Merwick
In musb_packet(), the call to usb_find_device() can return NULL if it doesn't find a device matching 'addr' so explicitly check the return value before passing it to usb_ep_get(). This then allows the subsequent calculation of 'id' to be streamlined. Signed-off-by: Liam Merwick --- hw/usb/hcd-m

[Qemu-devel] [PATCH v2 9/9] usb: remove unnecessary NULL device check from usb_ep_get()

2019-02-06 Thread Liam Merwick
No caller of usb_ep_get() calls it with a NULL device (previous commits have addressed the few remaining cases which didn't explicitly check). Replace check for 'dev == NULL' with an assert instead. Signed-off-by: Liam Merwick --- hw/usb/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletio

[Qemu-devel] [PATCH v2 6/9] uhci: check device is not NULL before calling usb_ep_get()

2019-02-06 Thread Liam Merwick
In uhci_handle_td(), the call to ehci_find_device() can return NULL if it doesn't find a device matching 'addr' so explicitly check the return value before passing it to usb_ep_get(). Signed-off-by: Liam Merwick --- hw/usb/hcd-uhci.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-)

Re: [Qemu-devel] [PATCH v2 00/16] chardev: refactoring & many bugfixes related tcp_chr_wait_connected

2019-02-06 Thread Marc-André Lureau
Hi On Wed, Jan 23, 2019 at 6:27 PM Daniel P. Berrangé wrote: > > This is a followup to > > v1: https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg03344.html > > This series comes out of a discussion between myself & Yongji Xie in: > > https://lists.gnu.org/archive/html/qemu-devel/2019-01

Re: [Qemu-devel] [PATCH v2 00/16] chardev: refactoring & many bugfixes related tcp_chr_wait_connected

2019-02-06 Thread Daniel P . Berrangé
On Wed, Feb 06, 2019 at 02:45:22PM +0100, Marc-André Lureau wrote: > Hi > On Wed, Jan 23, 2019 at 6:27 PM Daniel P. Berrangé > wrote: > > > > This is a followup to > > > > v1: https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg03344.html > > > > This series comes out of a discussion betwe

Re: [Qemu-devel] [PATCH v3 0/6] vfio-ccw: support hsch/csch (kernel part)

2019-02-06 Thread Cornelia Huck
On Wed, 30 Jan 2019 14:22:06 +0100 Cornelia Huck wrote: > [This is the Linux kernel part, git tree is available at > https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw.git > vfio-ccw-eagain-caps-v3 I've pushed out the changes I've made so far (patch 1) to vfio-ccw-eagain-caps-v3.5

Re: [Qemu-devel] security implications of caching with virtio pmem (was Re: [PATCH v3 0/5] kvm "virtio pmem" device)

2019-02-06 Thread David Hildenbrand
On 04.02.19 23:56, Michael S. Tsirkin wrote: > > On Wed, Jan 09, 2019 at 08:17:31PM +0530, Pankaj Gupta wrote: >> This patch series has implementation for "virtio pmem". >> "virtio pmem" is fake persistent memory(nvdimm) in guest >> which allows to bypass the guest page cache. This also >> i

[Qemu-devel] [RFC PATCH 4/4] spapr: Add Hcalls to support PAPR NVDIMM device

2019-02-06 Thread Shivaprasad G Bhat
This patch implements few of the necessary hcalls for the nvdimm support. PAPR semantics is such that each NVDIMM device is comprising of multiple SCM(Storage Class Memory) blocks. The guest requests the hypervisor to bind each of the SCM blocks of the NVDIMM device using hcalls. There can be SCM

[Qemu-devel] [RFC PATCH 1/4] mem: make nvdimm_device_list global

2019-02-06 Thread Shivaprasad G Bhat
nvdimm_device_list is required for parsing the list for devices in subsequent patches. Move it to common area. Signed-off-by: Shivaprasad G Bhat --- hw/acpi/nvdimm.c| 27 --- hw/mem/nvdimm.c | 27 +++ include/hw/mem/nvdimm.h |

[Qemu-devel] [RFC PATCH 0/4] ppc: spapr: virtual NVDIMM support

2019-02-06 Thread Shivaprasad G Bhat
The patchset attempts to implement the virtual NVDIMM for pseries. PAPR semantics is such that each NVDIMM device is comprising of multiple SCM(Storage Class Memory) blocks. The hypervisor is expected to prepare the FDT for the NVDIMM device and send guest a hotplug interrupt with new type RTAS_L

[Qemu-devel] [RFC PATCH 3/4] spapr: Add NVDIMM device support

2019-02-06 Thread Shivaprasad G Bhat
Add support for NVDIMM devices for sPAPR. Piggyback on existing nvdimm device interface in QEMU to support virtual NVDIMM devices for Power (May have to re-look at this later). Create the required DT entries for the device (some entries have dummy values right now). The patch creates the required

[Qemu-devel] [RFC PATCH 2/4] mem: implement memory_device_set_region_size

2019-02-06 Thread Shivaprasad G Bhat
Required for PAPR NVDIMM implementation. Need memory_device_set_region_size for aligning the size to the SCM block size. Signed-off-by: Shivaprasad G Bhat --- hw/mem/memory-device.c | 15 +++ include/hw/mem/memory-device.h |2 ++ 2 files changed, 17 insertions(+) diff

Re: [Qemu-devel] [PATCH v2] softfloat: add float128_is_{normal, denormal}

2019-02-06 Thread Alex Bennée
David Hildenbrand writes: > Needed on s390x, to test for the data class of a number. So it will > gain soon a user. > > A number is considered normal if the exponent is neither 0 nor all 1's. > That can be checked by adding 1 to the exponent, and comparing against >>= 2 after dropping an eventu

Re: [Qemu-devel] [PATCH 2/4] multifd: Drop x-multifd-page-count parameter

2019-02-06 Thread Laurent Vivier
On 06/02/2019 14:23, Juan Quintela wrote: > Libvirt don't want to expose (and explain it). And testing looks like > 128 is good for all use cases, so just drop it. > > Signed-off-by: Juan Quintela > --- > hmp.c | 7 --- > migration/migration.c | 30 -

Re: [Qemu-devel] [qemu-s390x] [PATCH] s390x: Fix the confusing contributions-after-2012 license statements

2019-02-06 Thread Christian Borntraeger
On 06.02.2019 13:41, Thomas Huth wrote: > The license information in these files is rather confusing. The text > declares LGPL first, but then says that contributions after 2012 are > licensed under the GPL instead. How should the average user who just > downloaded the release tarball know which

Re: [Qemu-devel] [PATCH v13 3/3] qcow2: list of bitmaps new test 242

2019-02-06 Thread Eric Blake
On 2/6/19 4:23 AM, Andrey Shinkevich wrote: > A new test file 242 added to the qemu-iotests set. It checks > the format of qcow2 specific information for the new added > section that lists details of bitmaps. > > Signed-off-by: Andrey Shinkevich > Reviewed-by: Eric Blake > Reviewed-by: Vladimir

Re: [Qemu-devel] [PATCH v13 3/3] qcow2: list of bitmaps new test 242

2019-02-06 Thread Eric Blake
On 2/6/19 5:58 AM, Andrey Shinkevich wrote: >> + >> +def add_bitmap(bitmap_number, persistent, disabled): >> +granularity = 2**(13 + bitmap_number) > > I wish I wrote: > granularity = 1 << (13 + bitmap_number) Sure, that's easy to squash in. -- Eric Blake, Principal Software Engineer

[Qemu-devel] [Bug 1813940] Re: kvm_mem_ioeventfd_add: error adding ioeventfd: No space left on device

2019-02-06 Thread Philippe Mathieu-Daudé
Does this patch from Jagannathan Raman fixes it? https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg01397.html ** Changed in: qemu Status: New => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.lau

Re: [Qemu-devel] [PATCH v2 00/16] chardev: refactoring & many bugfixes related tcp_chr_wait_connected

2019-02-06 Thread Marc-André Lureau
Hi On Wed, Feb 6, 2019 at 2:56 PM Daniel P. Berrangé wrote: > > On Wed, Feb 06, 2019 at 02:45:22PM +0100, Marc-André Lureau wrote: > > Hi > > On Wed, Jan 23, 2019 at 6:27 PM Daniel P. Berrangé > > wrote: > > > > > > This is a followup to > > > > > > v1: https://lists.gnu.org/archive/html/qemu

[Qemu-devel] [Bug 1813165] Re: KVM internal error. Suberror: 1 emulation failure

2019-02-06 Thread Thomas
Yes. I was using a 4.20.x kernel. But i guess the bug can be closed because the vm does not exist anymore and the new one does not show this behaviour. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/18

Re: [Qemu-devel] [PATCH v2 02/20] Acceptance tests: show avocado test execution by default

2019-02-06 Thread Cornelia Huck
On Fri, 1 Feb 2019 19:55:52 -0500 Cleber Rosa wrote: > The current version of the "check-acceptance" target will only show > one line for execution of all tests. That's probably OK if the tests > to be run are quick enough and they're always the same. > > But, there's already one test alone th

Re: [Qemu-devel] [PATCH 05/10] hw/pvrdma: Add device statistics counters

2019-02-06 Thread Yuval Shaia
On Wed, Feb 06, 2019 at 12:17:54PM +0200, Marcel Apfelbaum wrote: > > > On 1/31/19 3:08 PM, Yuval Shaia wrote: > > Signed-off-by: Yuval Shaia > > --- > > hw/rdma/rdma_backend.c| 53 --- > > hw/rdma/rdma_rm.c | 6 + > > hw/rdma/rdma_rm_defs

Re: [Qemu-devel] [Qemu-trivial] [PATCH] target/moxie: Fix LGPL information in the file headers

2019-02-06 Thread Laurent Vivier
On 04/02/2019 08:54, Thomas Huth wrote: > It's either "GNU *Library* General Public License version 2" or "GNU > Lesser General Public License version *2.1*", but there was no "version > 2.0" of the "Lesser" license. So assume that version 2.1 is meant here. > Also the files mentioned the GPL inste

Re: [Qemu-devel] [Qemu-trivial] [PATCH] qemu-common.h: Update copyright string for 2019

2019-02-06 Thread Laurent Vivier
On 01/02/2019 18:36, Peter Maydell wrote: > Update the copyright string we use in version/help output, > since we're well into the new year now. > > Signed-off-by: Peter Maydell > --- > Better than last year, where we didn't get round to doing > the year bump until September :-) > --- > include/

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Avoid non-portable 'test -o/-a'

2019-02-06 Thread Laurent Vivier
On 05/02/2019 03:39, Eric Blake wrote: > POSIX says that it is better to use &&/|| and two separate test > invocations than it is to try and use -a and -o (in fact, there > are some tests that are inherently ambiguous to parse if the > user passes in corner-case input like "("). > > Since we canno

Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/3] hw/sparc64/sun4u: Drop useless inclusion of "hw/i386/pc.h"

2019-02-06 Thread Laurent Vivier
On 04/02/2019 22:04, Philippe Mathieu-Daudé wrote: > In 47973a2dbf we split the last generic chipset out of the PC > board, but forgot to remove the include of "hw/i386/pc.h". > Since it is now unused, remove it. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/sparc64/sun4u.c | 1 - > 1 fil

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/3] hw/unicore32/puv3: Drop useless inclusion of "hw/i386/pc.h"

2019-02-06 Thread Laurent Vivier
On 04/02/2019 22:04, Philippe Mathieu-Daudé wrote: > In 47973a2dbf we split the last generic chipset out of the PC > board, but forgot to remove the include of "hw/i386/pc.h". > Since it is now unused, remove it. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/unicore32/puv3.c | 1 - > 1 fi

Re: [Qemu-devel] [Qemu-trivial] [PATCH] hw/input/tsc210x: Fix building with no verbosity

2019-02-06 Thread Laurent Vivier
On 04/02/2019 21:45, Philippe Mathieu-Daudé wrote: > When building with TSC_VERBOSE not defined, we get: > CC arm-softmmu/hw/input/tsc210x.o > hw/input/tsc210x.c: In function ‘tsc2102_data_register_write’: > hw/input/tsc210x.c:554:5: error: label at end of compound statement >

Re: [Qemu-devel] [Qemu-trivial] [PATCH] hw/cpu/cluster: Mark the cpu-cluster device with user_creatable = false

2019-02-06 Thread Laurent Vivier
On 05/02/2019 13:58, Thomas Huth wrote: > The device can not be instantiated by the user and QEMU currently > aborts when you try to use it: > > $ x86_64-softmmu/qemu-system-x86_64 -device cpu-cluster > qemu-system-x86_64: hw/cpu/cluster.c:73: cpu_cluster_realize: > Assertion `cbdata.cpu_count >

[Qemu-devel] [PULL 1/1] dump: Set correct vaddr for ELF dump

2019-02-06 Thread Marc-André Lureau
From: Jon Doron vaddr needs to be equal to the paddr since the dump file represents the physical memory image. Without setting vaddr correctly, GDB would load all the different memory regions on top of each other to vaddr 0, thus making GDB showing the wrong memory data for a given address. Sig

[Qemu-devel] [PULL 0/1] Dump patches

2019-02-06 Thread Marc-André Lureau
The following changes since commit 47994e16b1d66411953623e7c0bf0cdcd50bd507: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190205' into staging (2019-02-05 18:25:07 +) are available in the Git repository at: https://github.com/elmarco/qemu.git tags/dump-pull-requ

Re: [Qemu-devel] [PATCH 03/10] hw/rdma: Warn when too many consecutive poll CQ triggered on an empty CQ

2019-02-06 Thread Yuval Shaia
On Wed, Feb 06, 2019 at 12:14:24PM +0200, Marcel Apfelbaum wrote: > Hi Yuval, > > On 1/31/19 3:08 PM, Yuval Shaia wrote: > > To protect against CPU over utilization when guest performs unneeded > > busy waiting loop on an empty CQ. > > > > Signed-off-by: Yuval Shaia > > --- > > hw/rdma/rdma_ba

Re: [Qemu-devel] [PATCH 03/10] hw/rdma: Warn when too many consecutive poll CQ triggered on an empty CQ

2019-02-06 Thread Yuval Shaia
> > @@ -60,6 +60,8 @@ static int pvrdma_post_cqe(PVRDMADev *dev, uint32_t > > cq_handle, > > return -EINVAL; > > } > > +atomic_dec(&cq->missing_cqe); > > + > > We should set it to 0 here? (If we are counting cq-empty hits) No, this counter just count the number of missing CQE

Re: [Qemu-devel] [PATCH v1] softfloat: Implement float128_to_uint32

2019-02-06 Thread Alex Bennée
David Hildenbrand writes: > Handling it just like float128_to_uint32_round_to_zero, that hopefully > is free of bugs :) > > Documentation basically copied from float128_to_uint64 Queued to fpu/next, thanks. BTW to test: tests/fp: add wrapping for f128_to_ui32 Needed to test: softfloat: add

[Qemu-devel] [PATCH] qemugdb/coroutine: fix arch_prctl has unknown return type

2019-02-06 Thread Vladimir Sementsov-Ogievskiy
qemu coroutine command results in following error output: Python Exception 'arch_prctl' has unknown return type; cast the call to its declared return type: Error occurred in Python command: 'arch_prctl' has unknown return type; cast the call to its declared return type Fix it by giving it what i

Re: [Qemu-devel] [PATCH v1] softfloat: Implement float128_to_uint32

2019-02-06 Thread David Hildenbrand
On 06.02.19 16:12, Alex Bennée wrote: > > David Hildenbrand writes: > >> Handling it just like float128_to_uint32_round_to_zero, that hopefully >> is free of bugs :) >> >> Documentation basically copied from float128_to_uint64 > > Queued to fpu/next, thanks. > > BTW to test: > > tests/fp: add

Re: [Qemu-devel] [PATCH v3] chardev: Allow for pty path passing.

2019-02-06 Thread Marc-André Lureau
Hi On Sat, Jan 26, 2019 at 2:34 PM Paulo Neves wrote: > > If a user requires a virtual serial device like provided > by the pty char device, the user needs to accept the > returned device name. This makes the program need to > have smarts to parse or communicate with qemu to get the > pty device.

[Qemu-devel] [PULL 3/7] configure: Avoid non-portable 'test -o/-a'

2019-02-06 Thread Laurent Vivier
From: Eric Blake POSIX says that it is better to use &&/|| and two separate test invocations than it is to try and use -a and -o (in fact, there are some tests that are inherently ambiguous to parse if the user passes in corner-case input like "("). Since we cannot guarantee which shell runs con

[Qemu-devel] [PULL 0/7] Trivial patches patches

2019-02-06 Thread Laurent Vivier
The following changes since commit 47994e16b1d66411953623e7c0bf0cdcd50bd507: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190205' into staging (2019-02-05 18:25:07 +) are available in the Git repository at: git://github.com/vivier/qemu.git tags/trivial-patches-p

[Qemu-devel] [PULL 2/7] target/moxie: Fix LGPL information in the file headers

2019-02-06 Thread Laurent Vivier
From: Thomas Huth It's either "GNU *Library* General Public License version 2" or "GNU Lesser General Public License version *2.1*", but there was no "version 2.0" of the "Lesser" license. So assume that version 2.1 is meant here. Also the files mentioned the GPL instead of the LGPL after declari

[Qemu-devel] [PULL 5/7] hw/unicore32/puv3: Drop useless inclusion of "hw/i386/pc.h"

2019-02-06 Thread Laurent Vivier
From: Philippe Mathieu-Daudé In 47973a2dbf we split the last generic chipset out of the PC board, but forgot to remove the include of "hw/i386/pc.h". Since it is now unused, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20190204210433.26088-3-phi...@red

[Qemu-devel] [PULL 6/7] hw/cpu/cluster: Mark the cpu-cluster device with user_creatable = false

2019-02-06 Thread Laurent Vivier
From: Thomas Huth The device can not be instantiated by the user and QEMU currently aborts when you try to use it: $ x86_64-softmmu/qemu-system-x86_64 -device cpu-cluster qemu-system-x86_64: hw/cpu/cluster.c:73: cpu_cluster_realize: Assertion `cbdata.cpu_count > 0' failed. Aborted (core dumped)

[Qemu-devel] [PULL 7/7] hw/input/tsc210x: Fix building with no verbosity

2019-02-06 Thread Laurent Vivier
From: Philippe Mathieu-Daudé When building with TSC_VERBOSE not defined, we get: CC arm-softmmu/hw/input/tsc210x.o hw/input/tsc210x.c: In function ‘tsc2102_data_register_write’: hw/input/tsc210x.c:554:5: error: label at end of compound statement default: ^

[Qemu-devel] [PULL 4/7] hw/sparc64/sun4u: Drop useless inclusion of "hw/i386/pc.h"

2019-02-06 Thread Laurent Vivier
From: Philippe Mathieu-Daudé In 47973a2dbf we split the last generic chipset out of the PC board, but forgot to remove the include of "hw/i386/pc.h". Since it is now unused, remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Mark Cave-Ayland Message-Id: <20

[Qemu-devel] [PULL 1/7] qemu-common.h: Update copyright string for 2019

2019-02-06 Thread Laurent Vivier
From: Peter Maydell Update the copyright string we use in version/help output, since we're well into the new year now. Signed-off-by: Peter Maydell Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Reviewed-by: Alex Bennée Message-Id: <20190201173655.4567-1-peter.mayd...@linaro.org> Signe

[Qemu-devel] [PATCH v2 2/2] block/ssh: Implement .bdrv_dirname()

2019-02-06 Thread Max Reitz
ssh_bdrv_dirname() is basically the generic bdrv_dirname(), except it takes care not to silently chop off any query string (i.e., host_key_check). Signed-off-by: Max Reitz --- block/ssh.c | 21 + 1 file changed, 21 insertions(+) diff --git a/block/ssh.c b/block/ssh.c index 8

[Qemu-devel] [PATCH v2 0/2] block/ssh: Implement .bdrv_refresh_filename()

2019-02-06 Thread Max Reitz
This series implements .bdrv_refresh_filename() for the ssh block driver, along with an appropriate .bdrv_dirname() so we don't chop off query strings for backing files with relative filenames. This series depends on my "block: Fix some filename generation issues" series. Based-on: 20190201192935

[Qemu-devel] [PATCH v2 1/2] block/ssh: Implement .bdrv_refresh_filename()

2019-02-06 Thread Max Reitz
Signed-off-by: Max Reitz --- block/ssh.c | 52 +++- 1 file changed, 47 insertions(+), 5 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index 190ef95300..88401bbd31 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -75,6 +75,14 @@ typedef struct BD

Re: [Qemu-devel] [PATCH 0/3] qemu-img: Allow rebase with no input base

2019-02-06 Thread Max Reitz
Ping On 13.07.18 13:14, Max Reitz wrote: > This series allows using qemu-img rebase on images that do not have a > backing file. Right now, this fails with the rather cryptic error > message: > > $ qemu-img rebase -b base.qcow2 foo.qcow2 > qemu-img: Could not open old backing file '': The 'file'

Re: [Qemu-devel] [PATCH v3] chardev: Allow for pty path passing.

2019-02-06 Thread Daniel P . Berrangé
On Sat, Jan 26, 2019 at 02:33:55PM +0100, Paulo Neves wrote: > If a user requires a virtual serial device like provided > by the pty char device, the user needs to accept the > returned device name. This makes the program need to > have smarts to parse or communicate with qemu to get the > pty devi

Re: [Qemu-devel] [PATCH v2 05/20] Acceptance tests: introduce arch parameter and attribute

2019-02-06 Thread Cornelia Huck
On Fri, 1 Feb 2019 19:55:55 -0500 Cleber Rosa wrote: > It's useful to define the architecture that should be used in > situations such as: > * the intended target of the QEMU binary to be used on tests > * the architecture of code to be run within the QEMU binary, such >as a kernel image o

Re: [Qemu-devel] [PATCH v1] softfloat: Implement float128_to_uint32

2019-02-06 Thread Alex Bennée
David Hildenbrand writes: > On 06.02.19 16:12, Alex Bennée wrote: >> >> David Hildenbrand writes: >> >>> Handling it just like float128_to_uint32_round_to_zero, that hopefully >>> is free of bugs :) >>> >>> Documentation basically copied from float128_to_uint64 >> >> Queued to fpu/next, thanks

Re: [Qemu-devel] [PATCH v2 19/20] Boot Linux Console Test: add a test for s390x + s390-ccw-virtio

2019-02-06 Thread Cornelia Huck
On Fri, 1 Feb 2019 19:56:09 -0500 Cleber Rosa wrote: > Just like the previous tests, boots a Linux kernel on a s390x target > using the s390-ccw-virtio machine. > > Because it's not possible to have multiple VT220 consoles, > '-nodefaults' is used, so that the one set with set_console() works >

Re: [Qemu-devel] [PATCH v2 00/10] tcg vector improvements

2019-02-06 Thread BALATON Zoltan
On Wed, 6 Feb 2019, Mark Cave-Ayland wrote: Howard has also pointed out that he's still spotted some corruption in his tests, so I will do a bit more investigation and report back. I wonder if instead of "visually testing" shouldn't it be verified by some more exact tests? Could any of these

Re: [Qemu-devel] [PATCH] target/i386: Generate #UD when applying LOCK to a register

2019-02-06 Thread Philippe Mathieu-Daudé
On 2/6/19 6:42 AM, Richard Henderson wrote: > Ping. > > On 12/7/18 5:09 PM, Richard Henderson wrote: >> This covers inc, dec, and the bit test instructions. >> >> I believe we've finally covered all of the cases for >> which we have an atomic path that would use the cpu_A0 >> temp, which is only i

Re: [Qemu-devel] [PATCH] accel/tcg: Consider cluster index in tb_lookup__cpu_state()

2019-02-06 Thread Emilio G. Cota
On Wed, Feb 06, 2019 at 03:15:26 +, Richard Henderson wrote: > > Does anybody know why tb_lookup__cpu_state() has that odd > > double-underscore in the middle of its name? > > I'm inclined to think typo... Emilio? It's not a typo -- it's there to separate "tb lookup" and "cpu state" to avoid

Re: [Qemu-devel] [PATCH v2 0/2] block/ssh: Implement .bdrv_refresh_filename()

2019-02-06 Thread Richard W.M. Jones
On Wed, Feb 06, 2019 at 04:29:17PM +0100, Max Reitz wrote: > This series implements .bdrv_refresh_filename() for the ssh block > driver, along with an appropriate .bdrv_dirname() so we don't chop off > query strings for backing files with relative filenames. > > This series depends on my "block: F

Re: [Qemu-devel] [PATCH 09/10] hw/rdma: Free all receive buffers when QP is destroyed

2019-02-06 Thread Yuval Shaia
On Wed, Feb 06, 2019 at 12:23:25PM +0200, Marcel Apfelbaum wrote: > > > On 1/31/19 3:08 PM, Yuval Shaia wrote: > > When QP is destroyed the backend QP is destroyed as well. This ensures > > we clean all received buffer we posted to it. > > However, a contexts of these buffers are still remain in

Re: [Qemu-devel] [PATCH 4/4] tests: Add migration multifd test

2019-02-06 Thread Thomas Huth
On 2019-02-06 14:23, Juan Quintela wrote: > We set multifd-channels. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Juan Quintela > --- > tests/migration-test.c | 48 ++ > 1 file changed, 48 insertions(+) > > diff --git a/tests/migration-test.c

Re: [Qemu-devel] [PATCH v2 0/2] block/ssh: Implement .bdrv_refresh_filename()

2019-02-06 Thread Max Reitz
On 06.02.19 16:45, Richard W.M. Jones wrote: > On Wed, Feb 06, 2019 at 04:29:17PM +0100, Max Reitz wrote: >> This series implements .bdrv_refresh_filename() for the ssh block >> driver, along with an appropriate .bdrv_dirname() so we don't chop off >> query strings for backing files with relative f

Re: [Qemu-devel] [PATCH v2] chardev: Avoid adding duplicate chardev

2019-02-06 Thread Marc-André Lureau
Hi On Tue, Jan 29, 2019 at 7:36 AM Pankaj Gupta wrote: > > Hotplugging existing char chardev with qmp, dereferences(removes) > existing chardev. This patch avoids adding a chardev if a chardev > with same id exists. As you pointed out, if you attempt to add a chardev with an existing ID, you get

Re: [Qemu-devel] [PATCH v2] chardev: Avoid adding duplicate chardev

2019-02-06 Thread Daniel P . Berrangé
On Wed, Feb 06, 2019 at 05:08:25PM +0100, Marc-André Lureau wrote: > Hi > > On Tue, Jan 29, 2019 at 7:36 AM Pankaj Gupta wrote: > > > > Hotplugging existing char chardev with qmp, dereferences(removes) > > existing chardev. This patch avoids adding a chardev if a chardev > > with same id exists.

[Qemu-devel] [PATCH 0/1] Introduce a Python module structure

2019-02-06 Thread Cleber Rosa
The amount of Python code that is being reused by a now large number of different scripts and tests on QEMU urges for a better structure. This addresses the feedback received on a previous RFC[1], but further changes that will really benefit from this change were not attempted here. Once, the mod

[Qemu-devel] [PATCH 1/1] Introduce a Python module structure

2019-02-06 Thread Cleber Rosa
This is a simple move of Python code that wraps common QEMU functionality, and are used by a number of different tests and scripts. By treating that code as a real Python module, we can more easily: * reuse code * have a proper place for the module's own unittests * apply a more consistent styl

[Qemu-devel] 07333e1ca (kbd-state: use state tracker for sdl2) breaks keyboard input

2019-02-06 Thread BALATON Zoltan
Hello, The commit 07333e1ca breaks keyboard input in bios console with SDL2 UI. To reproduce: start qemu-system-i386 without any options, press Ctrl-B when prompted to get an IPXE command line and type. Key presses are doubled. (Besides this the output window mixup when something is output t

Re: [Qemu-devel] [PATCH v2 0/2] block/ssh: Implement .bdrv_refresh_filename()

2019-02-06 Thread Max Reitz
On 06.02.19 17:37, Richard W.M. Jones wrote: > On Wed, Feb 06, 2019 at 04:29:17PM +0100, Max Reitz wrote: >> This series implements .bdrv_refresh_filename() for the ssh block >> driver, along with an appropriate .bdrv_dirname() so we don't chop off >> query strings for backing files with relative f

Re: [Qemu-devel] [PATCH v2 0/2] block/ssh: Implement .bdrv_refresh_filename()

2019-02-06 Thread Richard W.M. Jones
On Wed, Feb 06, 2019 at 04:29:17PM +0100, Max Reitz wrote: > This series implements .bdrv_refresh_filename() for the ssh block > driver, along with an appropriate .bdrv_dirname() so we don't chop off > query strings for backing files with relative filenames. > > This series depends on my "block: F

[Qemu-devel] [PATCH] hw/i2c/smbus_ich9: Fix the confusing contributions-after-2012 statement

2019-02-06 Thread Thomas Huth
The license information in this file is rather confusing. The text declares LGPL first, but then says that contributions after Jan 2012 are licensed under the GPL instead. How should the average user who just downloaded the release tarball know which part is now GPL and which is LGPL? Also, as far

Re: [Qemu-devel] [Qemu-block] Guest unresponsive after Virtqueue size exceeded error

2019-02-06 Thread Fernando Casas Schössow
I could also repro the same with virtio-scsi on the same guest a couple of hours later: 2019-02-06 07:10:37.672+: starting up libvirt version: 4.10.0, qemu version: 3.1.0, kernel: 4.19.18-0-vanilla, hostname: vmsvr01.homenet.local LC_ALL=C PATH=/bin:/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/

Re: [Qemu-devel] [PR RFC] RISC-V Patches for 3.2, Part 3

2019-02-06 Thread Palmer Dabbelt
On Mon, 04 Feb 2019 01:59:48 PST (-0800), Peter Maydell wrote: On Mon, 4 Feb 2019 at 09:05, Thomas Huth wrote: On 2019-02-02 09:41, Palmer Dabbelt wrote: >> My mail filter finds these RFC pullrequests, yes. I'm then >> relying on my manual brain to not actually apply them. >> (If it's a slow da

[Qemu-devel] [PATCH v5 0/1] ppc/gdbstub: Expose SPRs to GDB

2019-02-06 Thread Fabiano Rosas
This series implements the reading and writing of Special Purpose Registers in PPC's gdbstub. How it works generally [1]: GDB asks for the target.xml file which contains the target description along with the list of available feature XMLs. GDB then asks for each of the XML files in sequence. The

[Qemu-devel] [PATCH v2 0/2] block: local qiov helper: part I

2019-02-06 Thread Vladimir Sementsov-Ogievskiy
Hi all! Here is a proposal for a new simple helper for a very often patter around qemu_iovec_init_external, when we need simple qiov with only one iov, initialized from external buffer. Here only block/io.c updated to use new helper, I'll update other things on top of this separately. v2: - s

[Qemu-devel] [PATCH v2 1/2] block: enhance QEMUIOVector structure

2019-02-06 Thread Vladimir Sementsov-Ogievskiy
Add a possibility of embedded iovec, for cases when we need only one local iov. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/iov.h | 47 -- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/include/qemu/iov.h b/include/qemu

[Qemu-devel] [PATCH v2 2/2] block/io: use qemu_iovec_init_buf

2019-02-06 Thread Vladimir Sementsov-Ogievskiy
Use new qemu_iovec_init_buf() instead of qemu_iovec_init_external( ... , 1), which simplifies the code. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/io.c | 90 +- 1 file changed, 21 insertions(+), 69 deletions(-) diff --git a/block/io

[Qemu-devel] [PATCH v5 1/1] target/ppc: Enable reporting of SPRs to GDB

2019-02-06 Thread Fabiano Rosas
This allows reading and writing of SPRs via GDB: (gdb) p/x $srr1 $1 = 0x82803033 (gdb) p/x $pvr $2 = 0x4b0201 (gdb) set $pvr=0x4b (gdb) p/x $pvr $3 = 0x4b The `info` command can also be used: (gdb) info registers spr For this purpose, GDB needs to be provided with an XML descrip

Re: [Qemu-devel] [PATCH v2 02/20] Acceptance tests: show avocado test execution by default

2019-02-06 Thread Cleber Rosa
On 2/6/19 9:36 AM, Cornelia Huck wrote: > On Fri, 1 Feb 2019 19:55:52 -0500 > Cleber Rosa wrote: > >> The current version of the "check-acceptance" target will only show >> one line for execution of all tests. That's probably OK if the tests >> to be run are quick enough and they're always t

Re: [Qemu-devel] [PATCH v2 0/2] block/ssh: Implement .bdrv_refresh_filename()

2019-02-06 Thread Richard W.M. Jones
On Wed, Feb 06, 2019 at 05:42:15PM +0100, Max Reitz wrote: > On 06.02.19 17:37, Richard W.M. Jones wrote: > > On Wed, Feb 06, 2019 at 04:29:17PM +0100, Max Reitz wrote: > >> This series implements .bdrv_refresh_filename() for the ssh block > >> driver, along with an appropriate .bdrv_dirname() so w

[Qemu-devel] [PATCH] blockdev: acquire aio_context for bitmap add/remove

2019-02-06 Thread John Snow
When bitmaps are persistent, they may incur a disk read or write when bitmaps are added or removed. For configurations like virtio-dataplane, failing to acquire this lock will abort QEMU when disk IO occurs. We used to acquire aio_context as part of the bitmap lookup, so re-introduce the lock for

Re: [Qemu-devel] [PATCH v2 0/2] block/ssh: Implement .bdrv_refresh_filename()

2019-02-06 Thread Max Reitz
On 06.02.19 18:00, Richard W.M. Jones wrote: > On Wed, Feb 06, 2019 at 05:42:15PM +0100, Max Reitz wrote: >> On 06.02.19 17:37, Richard W.M. Jones wrote: >>> On Wed, Feb 06, 2019 at 04:29:17PM +0100, Max Reitz wrote: This series implements .bdrv_refresh_filename() for the ssh block driver

Re: [Qemu-devel] [PATCH] blockdev: acquire aio_context for bitmap add/remove

2019-02-06 Thread Vladimir Sementsov-Ogievskiy
add Paolo 06.02.2019 20:02, John Snow wrote: > When bitmaps are persistent, they may incur a disk read or write when bitmaps > are added or removed. For configurations like virtio-dataplane, failing to > acquire this lock will abort QEMU when disk IO occurs. > > We used to acquire aio_context as

Re: [Qemu-devel] [PATCH v2 02/20] Acceptance tests: show avocado test execution by default

2019-02-06 Thread Cornelia Huck
On Wed, 6 Feb 2019 12:02:55 -0500 Cleber Rosa wrote: > On 2/6/19 9:36 AM, Cornelia Huck wrote: > > On Fri, 1 Feb 2019 19:55:52 -0500 > > Cleber Rosa wrote: > > > >> The current version of the "check-acceptance" target will only show > >> one line for execution of all tests. That's probably

Re: [Qemu-devel] [PATCH v6 03/73] cpu: introduce cpu_mutex_lock/unlock

2019-02-06 Thread Alex Bennée
Emilio G. Cota writes: > The few direct users of &cpu->lock will be converted soon. > > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota > --- > include/qom/cpu.h | 33 +++ > cpus.c | 48 +++-- >

Re: [Qemu-devel] [PATCH v6 05/73] cpu: move run_on_cpu to cpus-common

2019-02-06 Thread Alex Bennée
Emilio G. Cota writes: > We don't pass a pointer to qemu_global_mutex anymore. > > Reviewed-by: Richard Henderson > Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée > --- > include/qom/cpu.h | 10 -- > cpus-common.c | 2 +- > cpus.c| 5 - > 3 files chan

Re: [Qemu-devel] [PATCH qemu 0/3] spapr_pci, vfio: NVIDIA V100 + P9 passthrough

2019-02-06 Thread Daniel Henrique Barboza
Based on this series, I've sent a Libvirt patch to allow a QEMU process to inherit IPC_LOCK when using VFIO passthrough with the Tesla V100 GPU: https://www.redhat.com/archives/libvir-list/2019-February/msg00219.html In that thread, Alex raised concerns about allowing QEMU to freely lock all th

Re: [Qemu-devel] [PATCH v2 1/2] block: enhance QEMUIOVector structure

2019-02-06 Thread Eric Blake
On 2/6/19 10:53 AM, Vladimir Sementsov-Ogievskiy wrote: > Add a possibility of embedded iovec, for cases when we need only one > local iov. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > include/qemu/iov.h | 47 -- > 1 file changed, 45 inserti

Re: [Qemu-devel] SeaBIOS regression

2019-02-06 Thread John Snow
On 2/5/19 4:47 AM, Thomas Huth wrote: > On 2019-02-05 10:42, Gerd Hoffmann wrote: >> On Tue, Feb 05, 2019 at 10:31:24AM +0100, Thomas Huth wrote: >>> On 2019-02-05 08:52, Gerd Hoffmann wrote: On Mon, Feb 04, 2019 at 04:10:37PM +0100, Thomas Huth wrote: > > Hi Gerd, > > I no

Re: [Qemu-devel] 07333e1ca (kbd-state: use state tracker for sdl2) breaks keyboard input

2019-02-06 Thread Daniel P . Berrangé
On Wed, Feb 06, 2019 at 05:41:22PM +0100, BALATON Zoltan wrote: > Hello, > > The commit 07333e1ca breaks keyboard input in bios console with SDL2 UI. To > reproduce: start qemu-system-i386 without any options, press Ctrl-B when > prompted to get an IPXE command line and type. Key presses are doubl

Re: [Qemu-devel] [PATCH v2 2/2] block/io: use qemu_iovec_init_buf

2019-02-06 Thread Eric Blake
On 2/6/19 10:53 AM, Vladimir Sementsov-Ogievskiy wrote: > Use new qemu_iovec_init_buf() instead of > qemu_iovec_init_external( ... , 1), which simplifies the code. Did you just do a manual search for candidate callers? As you said in the cover letter, there are other files that can benefit as wel

Re: [Qemu-devel] [PATCH v2 02/20] Acceptance tests: show avocado test execution by default

2019-02-06 Thread Cleber Rosa
On 2/6/19 12:20 PM, Cornelia Huck wrote: > On Wed, 6 Feb 2019 12:02:55 -0500 > Cleber Rosa wrote: > >> On 2/6/19 9:36 AM, Cornelia Huck wrote: >>> On Fri, 1 Feb 2019 19:55:52 -0500 >>> Cleber Rosa wrote: >>> The current version of the "check-acceptance" target will only show one

[Qemu-devel] [PATCH v2 2/6] char-fe: set_handlers() needs an associated chardev

2019-02-06 Thread Marc-André Lureau
It is futile to call qemu_chr_fe_set_handlers() without an associated chardev, because the function is doing nothing in that case, not even reporting an error, it would likely be a programming error. Let's not handle that hypothetical case. (fwiw, I introduced the check in commit 94a40fc56036b5058

[Qemu-devel] [PATCH v2 0/6] chardev: various cleanups and improvements (resend)

2019-02-06 Thread Marc-André Lureau
Hi, Some chardev-related patches I have accumulated. Please review, thanks! v2: - rebased - update commit messages Marc-André Lureau (6): char: update the mux handlers in class callback char-fe: set_handlers() needs an associated chardev terminal3270: do not use backend timer sources cha

[Qemu-devel] [PATCH v2 1/6] char: update the mux handlers in class callback

2019-02-06 Thread Marc-André Lureau
Instead of handling mux chardev in a special way in qemu_chr_fe_set_handlers(), we may use the chr_update_read_handler class callback instead. Signed-off-by: Marc-André Lureau --- include/chardev/char-mux.h | 1 - chardev/char-fe.c | 4 chardev/char-mux.c | 5 +++-- 3 files

[Qemu-devel] [PATCH v2 4/6] chardev: add a note about frontend sources and context switch

2019-02-06 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/chardev/char-fe.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h index 54f0d61d32..2211913734 100644 --- a/include/chardev/char-fe.h +++ b/include/chardev/char-fe.h @@ -166,6 +166,9 @@ void

[Qemu-devel] [PATCH v2 6/6] char-pty: remove write_lock usage

2019-02-06 Thread Marc-André Lureau
The lock usage was described with its introduction in commit 9005b2a7589540a3733b3abdcfbccfe7746cd1a1. It was necessary because PTY write() shares more state than GIOChannel with other operations. This made char-pty a bit different from other chardev, that only lock around the write operation. Th

[Qemu-devel] [PATCH v2 5/6] char-pty: remove the check for connection on write

2019-02-06 Thread Marc-André Lureau
This doesn't help much compared to the 1 second poll PTY timer. I can't think of a use case where this would help. However, we can simplify the code around chr_write(): the write lock is no longer needed for other char-pty callbacks (see following patch). Signed-off-by: Marc-André Lureau --- ch

<    1   2   3   >