Re: [Qemu-devel] [PATCH 1/7] blockjob: record time of last yield

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > qemu_coroutine_yield(); > +job->last_yield_ns = qemu_clock_get_ns(QEMU_CLOCK_REALTIME); This is not the time the job has yielded control, but the time the job has gotten it back. Is it intended? Thanks, Paolo

Re: [Qemu-devel] [PATCH 3/7] blockjob: create block_job_throttle

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > + * Yield if it has been SLICE_TIME nanoseconds since the last yield. > + * Otherwise, check if we need to pause (and update the yield counter). What is the yield counter? Thanks, Paolo

Re: [Qemu-devel] QEMU not honouring bootorder

2017-12-14 Thread Michal Privoznik
On 12/13/2017 10:21 PM, Paolo Bonzini wrote: > On 11/12/2017 13:14, Michal Privoznik wrote: qemu-system-x86_64 \ -boot menu=on,strict=on \ -device lsi,id=scsi0,bus=pci.0 \ -drive file=/var/lib/libvirt/images/fedora.qcow2,format=qcow2,if=none,id=drive-scsi0 \

Re: [Qemu-devel] [PATCH 4/7] blockjob: allow block_job_throttle to take delay_ns

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > Instead of only sleeping for 0ms when we've hit a timeout, optionally > take a longer more explicit delay_ns that always forces the sleep. > > Signed-off-by: John Snow > --- > block/mirror.c | 4 ++-- > blockjob.c | 9

Re: [Qemu-devel] [PATCH 5/7] block/commit: use block_job_throttle

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > Depending on the value of `speed` and how fast our backends are, > delay_ns might be 0 very, very often. This creates some warning > messages that spook users, but it's also pretty inefficient. > > Use block_job_throttle instead to yield a little more intell

Re: [Qemu-devel] [PATCH 7/7] block/backup: use block_job_throttle

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > Signed-off-by: John Snow > --- > block/backup.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/block/backup.c b/block/backup.c > index d71b25c017..a5ede5f643 100644 > --- a/block/backup.c > +++ b/block/backup.c > @@ -3

Re: [Qemu-devel] [PATCH 6/7] block/stream: use block_job_throttle

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > Signed-off-by: John Snow > --- > block/stream.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/stream.c b/block/stream.c > index e85af18c54..3ad3190387 100644 > --- a/block/stream.c > +++ b/block/stream.c > @@ -139,7 +139,7

Re: [Qemu-devel] [PATCH 2/7] blockjob: consolidate SLICE_TIME definition

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 01:59, John Snow wrote: > They're all the same. If it actually becomes important to configure it, > it can become a job or driver property. > > Signed-off-by: John Snow > --- > block/backup.c | 1 - > block/commit.c | 2 -- > block/mirror.c

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-14 Thread Maxime Coquelin
Hi Ilya, On 12/14/2017 08:06 AM, Ilya Maximets wrote: On 13.12.2017 22:48, Michael S. Tsirkin wrote: On Wed, Dec 13, 2017 at 04:45:20PM +0300, Ilya Maximets wrote: That looks very strange. Some of the functions gets 'old_status', others the 'new_status'. I'm a bit confused. OK, fair enough.

Re: [Qemu-devel] [Qemu-arm] [PATCH 3/8] cputlb: Support generating CPU exceptions on memory transaction failures

2017-12-14 Thread Paolo Bonzini
On 13/12/2017 17:39, Peter Maydell wrote: > I was looking at a bug that involved stepping through this function, > and it turns out that the value in the variable "physaddr" here is > not in fact the physical address of the access. It's just the offset > into the memory region. > > This doesn't ma

Re: [Qemu-devel] [PATCH 01/26] sdbus: add a QMP command to access a SDBus

2017-12-14 Thread Kevin Wolf
Am 14.12.2017 um 00:20 hat Philippe Mathieu-Daudé geschrieben: > Use Base64 to serialize the binary blobs in JSON. > So far at most 512 bytes will be transfered, which result > in a 684 bytes payload. > Since this command is intented for qtesting, this is acceptable. > > Signed-off-by: Philippe Ma

Re: [Qemu-devel] [PATCH 01/26] sdbus: add a QMP command to access a SDBus

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 10:06, Kevin Wolf wrote: > Am 14.12.2017 um 00:20 hat Philippe Mathieu-Daudé geschrieben: >> Use Base64 to serialize the binary blobs in JSON. >> So far at most 512 bytes will be transfered, which result >> in a 684 bytes payload. >> Since this command is intented for qtesting, this i

Re: [Qemu-devel] [RFC PATCH 02/26] sdcard: add a Python qtest

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 00:20, Philippe Mathieu-Daudé wrote: > Use Python to write high-level SD commands. > > Signed-off-by: Philippe Mathieu-Daudé > --- > tests/Makefile.include | 2 + > tests/sdcard_tests.py | 172 > + > 2 files changed, 174 insertion

Re: [Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Stefan Hajnoczi
On Wed, Dec 13, 2017 at 06:35:51PM -0300, Philippe Mathieu-Daudé wrote: > Hi, > > With this series we can now write tests using Python rather than C. > For complex tests this can reduce the test development time, we can focus on > the test purposes instead of his implementation details. > > - 1,2

Re: [Qemu-devel] [PATCH] docs: update information for TLS certificate management

2017-12-14 Thread Thomas Huth
On 12.12.2017 15:17, Daniel P. Berrange wrote: > On Fri, Dec 08, 2017 at 10:16:50AM -0600, Eric Blake wrote: >> On 12/08/2017 05:58 AM, Daniel P. Berrange wrote: [...] >>> + >>> +@node tls_creds_setup >>> +@subsection TLS x509 credential configuration >>> + >>> +QEMU has a standard mechanism for lo

Re: [Qemu-devel] [PATCH v2] blockjob: kick jobs on set-speed

2017-12-14 Thread Stefan Hajnoczi
On Wed, Dec 13, 2017 at 03:46:11PM -0500, John Snow wrote: > If users set an unreasonably low speed (like one byte per second), the > calculated delay may exceed many hours. While we like to punish users > for asking for stupid things, we do also like to allow users to correct > their wicked ways.

[Qemu-devel] [PATCH 2/4] virtio-scsi: implement target rescan

2017-12-14 Thread Hannes Reinecke
Implement a new virtio-scsi command 'rescan' to return a list of attached targets. The guest is required to set the 'next_id' field to the next expected target id; the host will return either that or the next higher target id (if present), or -1 if no additional targets are found. Signed-off-by: H

[Qemu-devel] [PATCH 4/4] scsi: support REPORT_LUNS for LUNs != 0

2017-12-14 Thread Hannes Reinecke
SPC doesn't restrict the use of REPORT LUNS to LUN 0, so we shouldn't be doing so, either. Signed-off-by: Hannes Reinecke --- hw/scsi/scsi-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 83497ac916..67ac472c14 100644 --- a/h

[Qemu-devel] [PATCH 3/4] virtio-scsi: Implement 'native LUN' feature

2017-12-14 Thread Hannes Reinecke
The 'native LUN' feature allows virtio-scsi to use the LUN numbers from the underlying storage directly, without having to modify the LUN number when sending over the wire. It works by shifting the existing LUN number down by 8 bytes, and add the virtio-specific 8-byte LUN steering header. With tha

[Qemu-devel] [PATCH 0/4] virtio-vfc implementation

2017-12-14 Thread Hannes Reinecke
Hi all, here's my attempt to implement a 'Virtual FC' emulation for virtio-scsi, based on the presentation at the KVM Forum in Prague. This doesn't so much implement the FC protocol per se, but rather enables virtio to pass in addition port information so that the guest can setup the FC infrastru

Re: [Qemu-devel] [PATCH v2 for-2.12] hmp-commands: Remove the deprecated usb_add and usb_del

2017-12-14 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > It's easy to use device_add and device_del as replacement instead. > The usb_add and usb_del commands are deprecated since QEMU 2.10, > and nobody complained that they are still needed, so let's get rid > of them now to make the HMP interface a little bit l

[Qemu-devel] [PATCH 1/4] scsi: use 64-bit LUN

2017-12-14 Thread Hannes Reinecke
The LUN value really is a 64-bit number, so we should as well treat it as such. And we should be using accessor functions to provide backwards compability. Signed-off-by: Hannes Reinecke --- hw/scsi/esp.c | 6 ++- hw/scsi/lsi53c895a.c | 7 +-- hw/scsi/megasas.c | 24 +---

Re: [Qemu-devel] Adding more function keys support

2017-12-14 Thread Daniel P. Berrange
On Wed, Dec 13, 2017 at 02:18:49PM -0500, Programmingkid wrote: > > > On Dec 13, 2017, at 1:22 PM, BALATON Zoltan wrote: > > > > On Wed, 13 Dec 2017, Programmingkid wrote: > >>> On Dec 13, 2017, at 4:14 AM, Daniel P. Berrange > >>> wrote: > >>> > >>> On Tue, Dec 12, 2017 at 12:49:34PM -0500,

Re: [Qemu-devel] [PATCH 4/4] tests: test-hmp: print command execution result

2017-12-14 Thread Dr. David Alan Gilbert
* Vadim Galitsyn (vadim.galit...@profitbricks.com) wrote: > Provide HMP monitor command execution result as it would be seen > by user who established an HMP monitor session. > > Currently many commands may silently fail without any sign of that. > This patch let this info to be printed once test

Re: [Qemu-devel] [RFC v5 0/2] virtio: introduce `info virtio' hmp command

2017-12-14 Thread Cornelia Huck
On Tue, 12 Dec 2017 16:54:50 +0300 Jan Dakinevich wrote: > I am going to reanimate works under this QMP/HMP. First of all, it > could be meaningful to settle what output would provide the QMP. I would > like to suggest the following description: > > ## > # @VirtioFeature: > ## > { > 'struct'

Re: [Qemu-devel] [PATCH v2 0/6] block: avoid recursive AioContext acquire in bdrv_inactivate_all()

2017-12-14 Thread Stefan Hajnoczi
On Thu, Dec 07, 2017 at 08:13:14PM +, Stefan Hajnoczi wrote: > v2: > * Added docs/devel/multiple-iothreads.txt doc update [Kevin] > * Added qemu-iotests 203 test case [Kevin] > * Added iothread_stop() race fix to make 203 reliable > > Patch 1 is Paolo's recursive locking removal in bdrv_ina

Re: [Qemu-devel] [RFC v5 17/26] qmp: add new event "request-dropped"

2017-12-14 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:51:51PM +0800, Peter Xu wrote: > +## > +# @RequestDropReason: > +# > +# Reasons that caused one command to be dropped. > +# > +# @queue-full: the queue of request is full. > +# > +# Since: 2.12 > +## > +{ 'enum': 'RequestDropReason', qapi-schema.json calls them "commands

Re: [Qemu-devel] [PATCH] docs: Convert migration.txt to rst

2017-12-14 Thread Kashyap Chamarthy
On Wed, Dec 13, 2017 at 08:11:46PM +, Dr. David Alan Gilbert wrote: > * Kashyap Chamarthy (kcham...@redhat.com) wrote: > > On Tue, Dec 12, 2017 at 01:56:00PM +, Dr. David Alan Gilbert (git) > > wrote: [...] > > A good chunk of changes I suggest are pre-existing, so take it with a > > gra

Re: [Qemu-devel] [PATCH 0/2] Don't abort on writes to ROMs

2017-12-14 Thread Paolo Bonzini
On 13/12/2017 18:52, Peter Maydell wrote: > Currently we set up the io_mem_rom special memory region using the > unassigned_mem_ops structure; this is then used when a guest tries to > write to ROM. This is incorrect, because the behaviour of unassigned > memory may be different from that of ROM f

Re: [Qemu-devel] QEMU not honouring bootorder

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 09:48, Michal Privoznik wrote: > On 12/13/2017 10:21 PM, Paolo Bonzini wrote: >> On 11/12/2017 13:14, Michal Privoznik wrote: > qemu-system-x86_64 \ > -boot menu=on,strict=on \ > -device lsi,id=scsi0,bus=pci.0 \ > -drive > file=/var/lib/libvirt/images/fedo

Re: [Qemu-devel] [PATCH 2/2] ide: fix crash in IDE cdrom read

2017-12-14 Thread Denis V. Lunev
On 12/13/2017 02:40 AM, John Snow wrote: > Hi Den, the long email about IDE stuff: > > On 11/30/2017 07:01 AM, Denis V. Lunev wrote: >> On 11/29/2017 02:50 AM, John Snow wrote: >>> On 11/28/2017 07:10 AM, Denis V. Lunev wrote: There is the following crash reported from the field in QEMU 2.9: >

Re: [Qemu-devel] [RFC v5 17/26] qmp: add new event "request-dropped"

2017-12-14 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:51:51PM +0800, Peter Xu wrote: > +## > +# @RequestDropReason: > +# > +# Reasons that caused one command to be dropped. > +# > +# @queue-full: the queue of request is full. Please add: This can only occur when the client sends a new non-oob command before the respons

Re: [Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Paolo Bonzini
On 14/12/2017 10:39, Stefan Hajnoczi wrote: >> # verify Card ID >> data = self.bus.do_cmd(ALL_SEND_CID) >> oid, pnm, psn = struct.unpack(">x2s5sxLxxx", data) >> self.assertEqual(oid, "XY") # QEMU default >> self.assertEqual(pnm, "QEMU!") #

Re: [Qemu-devel] [RFC v5 18/26] monitor: send event when request queue full

2017-12-14 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:51:52PM +0800, Peter Xu wrote: > Set maximum QMP request queue length to 8. If queue full, instead of > queue the command, we directly return a "request-dropped" event, telling > client that specific command is dropped. > > Note that this flow control mechanism is only

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v19 3/7] xbitmap: add more operations

2017-12-14 Thread Wei Wang
On 12/14/2017 11:47 AM, Wei Wang wrote: On 12/13/2017 10:16 PM, Tetsuo Handa wrote: if (set) ret = find_next_bit(&tmp, BITS_PER_LONG, ebit); else ret = find_next_zero_bit(&

Re: [Qemu-devel] [PATCH v4 05/46] windbg: added helper features

2017-12-14 Thread Ladi Prosek
On Mon, Dec 11, 2017 at 2:21 PM, Mihail Abakumov wrote: > Added some helper features for windbgstub. > > Signed-off-by: Mihail Abakumov > Signed-off-by: Pavel Dovgalyuk > Signed-off-by: Dmitriy Koltunov > --- > include/exec/windbgstub-utils.h | 31 +++ > include/e

Re: [Qemu-devel] [PATCH v1] s390x/cpumodel: make qemu cpu model play with "none" machine

2017-12-14 Thread Cornelia Huck
On Wed, 13 Dec 2017 14:24:07 +0100 David Hildenbrand wrote: > Make sure "-cpu qemu" works with "-M none". > > Signed-off-by: David Hildenbrand > --- > > Conny, if this is okay, can you squash with the original patch? > > hw/s390x/s390-virtio-ccw.c | 4 > target/s390x/cpu_models.c | 7

Re: [Qemu-devel] [PATCH v1] s390x/tcg: don't include z13 features in the qemu model

2017-12-14 Thread Cornelia Huck
On Wed, 13 Dec 2017 18:15:12 +0100 David Hildenbrand wrote: > As Cornelia noticed, -cpu qemu will not boot on a z12 machine. Don't > enable z13 features as default for now (as we are emulating a z12 in > TCG for now). > > Signed-off-by: David Hildenbrand > --- > target/s390x/gen-features.c | 3

Re: [Qemu-devel] [PATCH for-2.12 2/2] net: Remove the deprecated -tftp, -bootp, -redir and -smb options

2017-12-14 Thread Thomas Huth
Hi Peter, On 11.12.2017 23:04, Peter Maydell wrote: > On 7 December 2017 at 18:02, Thomas Huth wrote: >> These options likely do not work as expected as soon as the user >> tries to use more than one network interface at once. The parameters >> have been marked as deprecated since QEMU v2.6, so

Re: [Qemu-devel] [PATCH v4 00/46] Windbg supporting

2017-12-14 Thread Ladi Prosek
On Mon, Dec 11, 2017 at 2:21 PM, Mihail Abakumov wrote: > An update of: > > v1: > https://lists.nongnu.org/archive/html/qemu-devel/2017-09/msg07092.html > > We made the debugger module WinDbg (like GDB) for QEMU. This is the > replacement > of the remote stub in Windows kernel. Used for

Re: [Qemu-devel] [PATCH v19 3/7] xbitmap: add more operations

2017-12-14 Thread Matthew Wilcox
On Wed, Dec 13, 2017 at 08:26:06PM +0800, Wei Wang wrote: > On 12/12/2017 09:20 PM, Tetsuo Handa wrote: > > Can you eliminate exception path and fold all xbitmap patches into one, and > > post only one xbitmap patch without virtio-baloon changes? If exception path > > is valuable, you can add excep

Re: [Qemu-devel] [RFC v5 19/26] qapi: introduce new cmd option "allow-oob"

2017-12-14 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:51:53PM +0800, Peter Xu wrote: > Here "oob" stands for "Out-Of-Band". When "allow-oob" is set, it means > the command allows out-of-band execution. > > The "oob" idea is proposed by Markus Armbruster in following thread: > > https://lists.gnu.org/archive/html/qemu-de

[Qemu-devel] [PULL 1/2] hmp-commands: Remove the deprecated usb_add and usb_del

2017-12-14 Thread Dr. David Alan Gilbert (git)
From: Thomas Huth It's easy to use device_add and device_del as replacement instead. The usb_add and usb_del commands are deprecated since QEMU 2.10, and nobody complained that they are still needed, so let's get rid of them now to make the HMP interface a little bit less overloaded. Reviewed-by

[Qemu-devel] [PULL 2/2] tests: test-hmp: print command execution result

2017-12-14 Thread Dr. David Alan Gilbert (git)
From: Vadim Galitsyn Provide HMP monitor command execution result as it would be seen by user who established an HMP monitor session. Currently many commands may silently fail without any sign of that. This patch let this info to be printed once test is running in verbose mode. For the future i

[Qemu-devel] [PULL 0/2] hmp queue

2017-12-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit 0a0dc59d27527b78a195c2d838d28b7b49e5a639: Update version for v2.11.0 release (2017-12-13 14:31:09 +) are available in the Git repository at: git://github.com/dagrh/qemu.git tags/pull-hmp-20171214 for yo

[Qemu-devel] [Bug 1429841] Re: error "rom: requested regions overlap" for NOLOAD sections

2017-12-14 Thread Roman
Just tested with QEMU 2.10.93 in cygwin: problem does not occour anymore! Thanks a lot! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1429841 Title: error "rom: requested regions overlap" for NOLO

Re: [Qemu-devel] [Qemu-arm] [PATCH 0/2] GICv2 & GICv3: RAZ/WI reserved addresses rather than aborting

2017-12-14 Thread Ard Biesheuvel
On 13 December 2017 at 16:54, Peter Maydell wrote: > On 13 December 2017 at 16:52, Peter Maydell wrote: >> The GICv2 and GICv3 specifications say that reserved register >> addresses should RAZ/WI. This means we need to return MEMTX_OK, not >> MEMTX_ERROR, because now that we support generating e

[Qemu-devel] [Bug 1738202] [NEW] qemu 2.11 segfaults on elf file that worked with qemu2.7

2017-12-14 Thread Roman
Public bug reported: running on cygwin in Windows 7 QEMU 2.10.93 segfaults: $ /opt/qemu2.11/qemu-system-arm -M integratorcp -cpu cortex-m4 -semihosting -nographic -monitor null -serial null -no-reboot -kernel MFWso_Cycle_f1uP2_CUNIT_0.elf Segmentation fault where QEMU 2.7.0 worked: $ /opt/qemu

Re: [Qemu-devel] [PATCH v5 06/28] migration: allow dst vm pause on postcopy

2017-12-14 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > When there is IO error on the incoming channel (e.g., network down), > instead of bailing out immediately, we allow the dst vm to switch to the > new POSTCOPY_PAUSE state. Currently it is still simple - it waits the > new semaphore, until someone poke it for

Re: [Qemu-devel] [PATCH for-2.12 2/2] net: Remove the deprecated -tftp, -bootp, -redir and -smb options

2017-12-14 Thread Peter Maydell
On 14 December 2017 at 12:28, Thomas Huth wrote: > On 11.12.2017 23:04, Peter Maydell wrote: >> The deprecation message says: >>error_report("The -redir option is deprecated. " >> "Please use '-netdev user,hostfwd=...' >> instead."); >> >> How does this

Re: [Qemu-devel] [RFC v5 20/26] qmp: support out-of-band (oob) execution

2017-12-14 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:51:54PM +0800, Peter Xu wrote: > if (qdict) { > id = qdict_get(qdict, "id"); > +/* When OOB is enabled, the "id" field is mandatory. */ > +if (qmp_oob_enabled(mon) && !id) { > +error_setg(&err, "Out-Of-Band capability requires tha

Re: [Qemu-devel] [PATCH 01/26] sdbus: add a QMP command to access a SDBus

2017-12-14 Thread Philippe Mathieu-Daudé
Hi Kevin, On 12/14/2017 06:06 AM, Kevin Wolf wrote: > Am 14.12.2017 um 00:20 hat Philippe Mathieu-Daudé geschrieben: >> Use Base64 to serialize the binary blobs in JSON. >> So far at most 512 bytes will be transfered, which result >> in a 684 bytes payload. >> Since this command is intented for qt

Re: [Qemu-devel] [PATCH v3 1/1] s390-ccw-virtio: allow for systems larger that 7.999TB

2017-12-14 Thread Cornelia Huck
On Mon, 11 Dec 2017 13:21:46 +0100 Christian Borntraeger wrote: > KVM does not allow memory regions > KVM_MEM_MAX_NR_PAGES, basically > limiting the memory per slot to 8TB-4k. As memory slots on s390/kvm must > be a multiple of 1MB we need start a new memory region if we cross > 8TB-1M. > > With

Re: [Qemu-devel] [PATCH v5 08/28] migration: allow send_rq to fail

2017-12-14 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > We will not allow failures to happen when sending data from destination > to source via the return path. However it is possible that there can be > errors along the way. This patch allows the migrate_send_rp_message() > to return error when it happens, and f

Re: [Qemu-devel] [PATCH 01/26] sdbus: add a QMP command to access a SDBus

2017-12-14 Thread Philippe Mathieu-Daudé
Hi Paolo, On 12/14/2017 06:34 AM, Paolo Bonzini wrote: > On 14/12/2017 10:06, Kevin Wolf wrote: [...] >> Doing this kind of thing over QMP doesn't look right to me. qtests >> should access hardware the same way as real guests access the hardware >> (i.e. MMIO and I/O ports). [...] > > Yeah, what

Re: [Qemu-devel] [PATCH v3 1/1] s390-ccw-virtio: allow for systems larger that 7.999TB

2017-12-14 Thread David Hildenbrand
On 14.12.2017 14:21, Cornelia Huck wrote: > On Mon, 11 Dec 2017 13:21:46 +0100 > Christian Borntraeger wrote: > >> KVM does not allow memory regions > KVM_MEM_MAX_NR_PAGES, basically >> limiting the memory per slot to 8TB-4k. As memory slots on s390/kvm must >> be a multiple of 1MB we need start

Re: [Qemu-devel] [PATCH v3 1/1] s390-ccw-virtio: allow for systems larger that 7.999TB

2017-12-14 Thread Cornelia Huck
On Thu, 14 Dec 2017 14:26:17 +0100 David Hildenbrand wrote: > On 14.12.2017 14:21, Cornelia Huck wrote: > > On Mon, 11 Dec 2017 13:21:46 +0100 > > Christian Borntraeger wrote: > > > >> KVM does not allow memory regions > KVM_MEM_MAX_NR_PAGES, basically > >> limiting the memory per slot to 8TB

[Qemu-devel] [Bug 1738202] Re: qemu 2.11 segfaults on elf file that worked with qemu2.7

2017-12-14 Thread Peter Maydell
Your command line is badly broken: "-M integratorcp" requests a model of an integratorcp board, but "-cpu cortex-m4" tries to put an M-profile CPU in it, which is not something that board can support. In particular the resulting system model will have no NVIC in it. This only worked by accident in

Re: [Qemu-devel] [RFC v5 21/26] qmp: isolate responses into io thread

2017-12-14 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:51:55PM +0800, Peter Xu wrote: > @@ -4429,6 +4515,13 @@ void monitor_cleanup(void) > */ > iothread_stop(mon_global.mon_iothread); > > +/* > + * After we have IOThread to send responses, it's possible that > + * when we stop the IOThread there are

Re: [Qemu-devel] [RFC v5 23/26] qmp: add command "x-oob-test"

2017-12-14 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:51:57PM +0800, Peter Xu wrote: > This command is only used to test OOB functionality. It should not be > used for any other purposes. > > Signed-off-by: Peter Xu > --- > qapi-schema.json | 18 ++ > qmp.c| 16 > 2 files chan

Re: [Qemu-devel] [RFC v5 22/26] monitor: enable IO thread for (qmp & !mux) typed

2017-12-14 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:51:56PM +0800, Peter Xu wrote: > Start to use dedicate IO thread for QMP monitors that are not using > MUXed chardev. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Peter Xu > --- > monitor.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewe

Re: [Qemu-devel] [PATCH 3/4] hw/registerfields: add 64-bit extract/deposit macros

2017-12-14 Thread Philippe Mathieu-Daudé
Hi Francisco, On 12/13/2017 06:37 PM, francisco iglesias wrote: > On 13 December 2017 at 06:17, Philippe Mathieu-Daudé > wrote: [...] >> /* Extract a field from an array of registers */ [...] >> +#define FIELD_DP64(storage, reg, field, val) ({ >> \ >> +struct { >> \ >> +unsigned int

Re: [Qemu-devel] [PATCH v3 40/50] qapi: add -i/--include filename.h

2017-12-14 Thread Markus Armbruster
Marc-André Lureau writes: > Add a new option to add user-specified #include lines in the generated > headers. This will help to split a schema, where one generated header > will depend on another. > > Signed-off-by: Marc-André Lureau If we need to manage includes manually, then this patch is on

Re: [Qemu-devel] [PATCH v3 41/50] qapi: add a 'unit' pragma

2017-12-14 Thread Markus Armbruster
Marc-André Lureau writes: > Add a pragma that allows to tag the following expressions with a unit > name. By default, an expression has no unit name. Please explain the unit name's intended purpose. > Signed-off-by: Marc-André Lureau > --- > scripts/qapi.py | 9 - > docs/

[Qemu-devel] [Bug 1738202] Re: qemu 2.11 segfaults on elf file that worked with qemu2.7

2017-12-14 Thread Roman
Thanks Peter for this information! I guess our code was tweaked to run with this options a long time ago - so I will have to do some investigations to get it working with a valid NVIC... As of writing I remember having a similar issue some time ago (which I now found to have resulted in Bug 1636

[Qemu-devel] [Bug 1307225] Re: Running a virtual machine on a Haswell system produces machine check events

2017-12-14 Thread Thomas Huth
** Changed in: qemu Status: Incomplete => Triaged -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1307225 Title: Running a virtual machine on a Haswell system produces machine check events

Re: [Qemu-devel] [PATCH v3 41/50] qapi: add a 'unit' pragma

2017-12-14 Thread Marc-André Lureau
Hi On Thu, Dec 14, 2017 at 2:54 PM, Markus Armbruster wrote: > Marc-André Lureau writes: > >> Add a pragma that allows to tag the following expressions with a unit >> name. By default, an expression has no unit name. > > Please explain the unit name's intended purpose. > It's syccintly explaine

Re: [Qemu-devel] [PATCH 12/13] sdhci: Add i.MX specific subtype of SDHCI

2017-12-14 Thread Andrey Smirnov
On Tue, Dec 12, 2017 at 9:52 AM, Peter Maydell wrote: > On 11 December 2017 at 21:30, Andrey Smirnov wrote: >> IP block found on several generations of i.MX family does not use >> vanilla SDHCI implementation and it comes with a number of quirks. >> >> Introduce i.MX SDHCI subtype of SDHCI block

Re: [Qemu-devel] [PATCH v4 2/6] vhost: Simplify ring verification checks

2017-12-14 Thread Igor Mammedov
On Wed, 13 Dec 2017 18:08:03 + "Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > vhost_verify_ring_mappings() were used to verify that > rings are still accessible and related memory hasn't > been moved after flatview is updated. > > It was doing checks by mapping

Re: [Qemu-devel] [PATCH 00/13] i.MX FEC and SD changes

2017-12-14 Thread Andrey Smirnov
On Tue, Dec 12, 2017 at 9:40 AM, Peter Maydell wrote: > On 11 December 2017 at 21:29, Andrey Smirnov wrote: >> Hi everyone, >> >> This patchset is a spin-off from original i.MX7 support submission >> found here [1], containing all of the patchest that are more or less >> agreed upon and are ready

[Qemu-devel] [PATCH v2 1/1] virtio: fix IO request length in virtio SCSI/block

2017-12-14 Thread Denis V. Lunev
Linux guests submit IO requests no longer than PAGE_SIZE * max_seg field reported by SCSI controler. Thus typical sequential read with 1 MB size results in the following pattern of the IO from the guest: 8,16 115754 2.766095122 2071 D R 2095104 + 1008 [dd] 8,16 115755 2.

Re: [Qemu-devel] [PATCH 00/13] i.MX FEC and SD changes

2017-12-14 Thread Andrey Smirnov
On Wed, Dec 13, 2017 at 6:09 PM, Philippe Mathieu-Daudé wrote: > Hi Andrey, Peter, > > On 12/12/2017 02:40 PM, Peter Maydell wrote: >> On 11 December 2017 at 21:29, Andrey Smirnov >> wrote: >>> Hi everyone, >>> >>> This patchset is a spin-off from original i.MX7 support submission >>> found here

Re: [Qemu-devel] [PULL 0/4] VFIO updates for v2.12

2017-12-14 Thread Peter Maydell
On 13 December 2017 at 18:08, Alex Williamson wrote: > The following changes since commit 0a0dc59d27527b78a195c2d838d28b7b49e5a639: > > Update version for v2.11.0 release (2017-12-13 14:31:09 +) > > are available in the git repository at: > > git://github.com/awilliam/qemu-vfio.git tags/vf

Re: [Qemu-devel] [PATCH v4 1/6] vhost: Move log_dirty check

2017-12-14 Thread Igor Mammedov
On Wed, 13 Dec 2017 18:08:02 + "Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Move the log_dirty check into vhost_section. > > Signed-off-by: Dr. David Alan Gilbert > --- > hw/virtio/trace-events | 3 +++ > hw/virtio/vhost.c | 20 +--- >

Re: [Qemu-devel] [RFC v5 24/26] docs: update QMP documents for OOB commands

2017-12-14 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:51:58PM +0800, Peter Xu wrote: > diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/qapi-code-gen.txt > index f04c63fe82..8597fdb087 100644 > --- a/docs/devel/qapi-code-gen.txt > +++ b/docs/devel/qapi-code-gen.txt > @@ -556,7 +556,8 @@ following example objects: > >

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-14 Thread Ilya Maximets
One update for the testing scenario: No need to kill OVS. The issue reproducible with simple 'del-port' and 'add-port'. virtio driver in guest could crash on both operations. Most times it crashes in my case on 'add-port' after deletion. Hi Maxime, I already saw below patches and original linux k

Re: [Qemu-devel] [PATCH 0/6] QTests: use Python to run complex tests

2017-12-14 Thread Philippe Mathieu-Daudé
Hi Stefan, On 12/14/2017 06:39 AM, Stefan Hajnoczi wrote: [...] > Device qtests are better done in C than Python. Python is not good at > binary I/O and porting this to Python 3 will be extra work later (Python > 2 is set for End-of-Life in 2020, see https://pythonclock.org/). > > More important

Re: [Qemu-devel] [PATCH v3 41/50] qapi: add a 'unit' pragma

2017-12-14 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, Dec 14, 2017 at 2:54 PM, Markus Armbruster wrote: >> Marc-André Lureau writes: >> >>> Add a pragma that allows to tag the following expressions with a unit >>> name. By default, an expression has no unit name. >> >> Please explain the unit name's inten

[Qemu-devel] [PATCH v2] Add ability for user to specify mouse ungrab key

2017-12-14 Thread John Arbuckle
Currently the ungrab keys for the Cocoa and GTK interface are Control-Alt-g. This combination may not be very fun for the user to have to enter, so we now enable the user to specify their own key as the ungrab key. Since the function keys are the keys that don't tend to be used that often and are

Re: [Qemu-devel] [RFC v5 25/26] tests: qmp-test: verify command batching

2017-12-14 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:51:59PM +0800, Peter Xu wrote: > OOB introduced DROP event for flow control. This should not affect old > QMP clients. Add a command batching check to make sure of it. > > Signed-off-by: Peter Xu > --- > tests/qmp-test.c | 19 +++ > 1 file changed, 19

Re: [Qemu-devel] [PATCH v2] Add ability for user to specify mouse ungrab key

2017-12-14 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20171214143713.3795-1-programmingk...@gmail.com Subject: [Qemu-devel] [PATCH v2] Add ability for user to specify mouse ungrab key Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE

Re: [Qemu-devel] [RFC v5 26/26] tests: qmp-test: add oob test

2017-12-14 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:52:00PM +0800, Peter Xu wrote: > +/* Try a fake capability, it should fail. */ > +resp = qmp("{ 'execute': 'qmp_capabilities', " > + " 'arguments': { 'enable': [ 'cap-does-not-exist' ] } }"); > +g_assert(qdict_haskey(resp, "error")); Missing QD

Re: [Qemu-devel] [RFC v5 00/26] QMP: out-of-band (OOB) execution support

2017-12-14 Thread Stefan Hajnoczi
On Tue, Dec 05, 2017 at 01:51:34PM +0800, Peter Xu wrote: > This version is mostly document update, and dropped the single patch > that is migration related (will be put into postcopy recovery > series). I've finished reviewing this revision. The overall approach looks good. Stefan signature.a

[Qemu-devel] [PATCH v2 02/15] imx_fec: Refactor imx_eth_enable_rx()

2017-12-14 Thread Andrey Smirnov
Refactor imx_eth_enable_rx() to have more meaningfull variable name than 'tmp' and to reduce number of logical negations done. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmail.com Reviewed-by: Peter Maydell Signed-

[Qemu-devel] [PATCH v2 01/15] imx_fec: Do not link to netdev

2017-12-14 Thread Andrey Smirnov
Binding to a particular netdev doesn't seem to belong to this layer and should probably be done as a part of board or SoC specific code. Convert all of the users of this IP block to use qdev_set_nic_properties() instead. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: qemu-deve

[Qemu-devel] [PATCH v2 05/15] imx_fec: Use ENET_FTRL to determine truncation length

2017-12-14 Thread Andrey Smirnov
Frame truncation length, TRUNC_FL, is determined by the contents of ENET_FTRL register, so convert the code to use it instead of a hardcoded constant. To avoid the case where TRUNC_FL is greater that ENET_MAX_FRAME_SIZE, increase the value of the latter to its theoretical maximum of 16K. Cc: Pete

[Qemu-devel] [PATCH v2 04/15] imx_fec: Move Tx frame buffer away from the stack

2017-12-14 Thread Andrey Smirnov
Make Tx frame assembly buffer to be a paort of IMXFECState structure to avoid a concern about having large data buffer on the stack. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmail.com Signed-off-by: Andrey Smirnov

[Qemu-devel] [PATCH v2 00/15] i.MX FEC and SD changes

2017-12-14 Thread Andrey Smirnov
Hi everyone, This patchset is v2 of a spin-off from original i.MX7 support submission found here [1], containing all of the patchest that are more or less agreed upon and are ready (hopefully!) for inclusion. Changes since [v1]: - Collected Reviewed-by tags from Peter - Implemen

[Qemu-devel] [PATCH v2 12/15] sdhci: Add i.MX specific subtype of SDHCI

2017-12-14 Thread Andrey Smirnov
IP block found on several generations of i.MX family does not use vanilla SDHCI implementation and it comes with a number of quirks. Introduce i.MX SDHCI subtype of SDHCI block to add code necessary to support unmodified Linux guest driver. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-

[Qemu-devel] [PATCH v2 11/15] imx_fec: Reserve full FSL_IMX25_FEC_SIZE page for the register file

2017-12-14 Thread Andrey Smirnov
Some i.MX SoCs (e.g. i.MX7) have FEC registers going as far as offset 0x614, so to avoid getting aborts when accessing those on QEMU, extend the register file to cover FSL_IMX25_FEC_SIZE(16K) of address space instead of just 1K. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: qe

[Qemu-devel] [PATCH v2 03/15] imx_fec: Change queue flushing heuristics

2017-12-14 Thread Andrey Smirnov
In current implementation, packet queue flushing logic seem to suffer from a deadlock like scenario if a packet is received by the interface before before Rx ring is initialized by Guest's driver. Consider the following sequence of events: 1. A QEMU instance is started against a TAP device

Re: [Qemu-devel] [PATCH] vhost: fix crash on virtio_error while device stop

2017-12-14 Thread Ilya Maximets
On 14.12.2017 17:31, Ilya Maximets wrote: > One update for the testing scenario: > > No need to kill OVS. The issue reproducible with simple 'del-port' > and 'add-port'. virtio driver in guest could crash on both operations. > Most times it crashes in my case on 'add-port' after deletion. > > H

[Qemu-devel] [PATCH v2 09/15] imx_fec: Use correct length for packet size

2017-12-14 Thread Andrey Smirnov
Use 'frame_size' instead of 'len' when calling qemu_send_packet(), failing to do so results in malformed packets send in case when that packed is fragmented into multiple DMA transactions. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.

[Qemu-devel] [PATCH v2 10/15] imx_fec: Fix a typo in imx_enet_receive()

2017-12-14 Thread Andrey Smirnov
Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Andrey Smirnov --- hw/net/imx_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/imx_fec

[Qemu-devel] [PATCH v2 06/15] imx_fec: Use MIN instead of explicit ternary operator

2017-12-14 Thread Andrey Smirnov
Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmail.com Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Andrey Smirnov --- hw/net/imx_fec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ne

[Qemu-devel] [PATCH v2 14/15] sd: Check for READ_MULTIPLE_BLOCK size limit violation first

2017-12-14 Thread Andrey Smirnov
Check for READ_MULTIPLE_BLOCK size limit violation first as opposed to doing at the end of the command handler. Consider the following scenario: Emulated host driver is trying to read last byte of the last sector via CMD18/ADMA, so what would happen is the following: 1. "ret" is filled with desir

[Qemu-devel] [PATCH v2 08/15] imx_fec: Add support for multiple Tx DMA rings

2017-12-14 Thread Andrey Smirnov
More recent version of the IP block support more than one Tx DMA ring, so add the code implementing that feature. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Andre

[Qemu-devel] [PATCH v2 07/15] imx_fec: Emulate SHIFT16 in ENETx_RACC

2017-12-14 Thread Andrey Smirnov
Needed to support latest Linux kernel driver which relies on that functionality. Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Andrey Smirnov --- hw/net/imx_fec.c

[Qemu-devel] [PATCH v2 15/15] sdhci: Implement write method of ACMD12ERRSTS register

2017-12-14 Thread Andrey Smirnov
Cc: Peter Maydell Cc: Jason Wang Cc: Philippe Mathieu-Daudé Cc: qemu-devel@nongnu.org Cc: qemu-...@nongnu.org Cc: yurov...@gmail.com Reviewed-by: Peter Maydell Signed-off-by: Andrey Smirnov --- hw/sd/sdhci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c

Re: [Qemu-devel] [virtio-dev] [PATCH v3 0/7] Vhost-pci for inter-VM communication

2017-12-14 Thread Stefan Hajnoczi
On Wed, Dec 13, 2017 at 10:59:10PM +0200, Michael S. Tsirkin wrote: > > * VHOST_USER_SET_VRING_KICK > > > >Set up vring kick doorbell (unless bit 8 is set) before sending > >VHOST_USER_SET_VRING_KICK to the guest. > > But guest can't use it, now can it? > > What guest needs is a mapping

  1   2   3   4   5   >