Re: [Qemu-devel] [Qemu-block] [PATCH v0 0/2] Postponed actions

2018-08-14 Thread Denis Plotnikov
On 13.08.2018 19:30, Kevin Wolf wrote: Am 13.08.2018 um 10:32 hat Denis Plotnikov geschrieben: Ping ping! On 16.07.2018 21:59, John Snow wrote: On 07/16/2018 11:01 AM, Denis Plotnikov wrote: Ping! I never saw a reply to Stefan's question on July 2nd, did you reply off-list? --js Yes

Re: [Qemu-devel] [PATCH 39/56] json: Leave rejecting invalid interpolation to parser

2018-08-14 Thread Markus Armbruster
Eric Blake writes: > On 08/08/2018 07:03 AM, Markus Armbruster wrote: >> Both lexer and parser reject invalid interpolation specifications. >> The parser's check is useless. >> >> The lexer ends the token right after the first bad character. This >> tends to lead to suboptimal error reporting.

Re: [Qemu-devel] [PATCH 40/56] json: Replace %I64d, %I64u by %PRId64, %PRIu64

2018-08-14 Thread Markus Armbruster
Eric Blake writes: > On 08/08/2018 07:03 AM, Markus Armbruster wrote: >> Support for %I64d got addded in commit 2c0d4b36e7f "json: fix PRId64 > > s/addded/added/ Fixing... >> on Win32". We had to hard-code I64d because we used the lexer's >> finite state machine to check interpolations. No mo

[Qemu-devel] [PATCH] luks: Allow share-rw=on

2018-08-14 Thread Fam Zheng
Format drivers such as qcow2 don't allow sharing the same image between two QEMU instances in order to prevent image corruptions, because of metadata cache. LUKS driver don't modify metadata except for when creating image, so it is safe to relax the permission. This makes share-rw=on property work

Re: [Qemu-devel] [PATCH] luks: Allow share-rw=on

2018-08-14 Thread Daniel P . Berrangé
On Tue, Aug 14, 2018 at 03:25:51PM +0800, Fam Zheng wrote: > Format drivers such as qcow2 don't allow sharing the same image between > two QEMU instances in order to prevent image corruptions, because of > metadata cache. LUKS driver don't modify metadata except for when > creating image, so it is

Re: [Qemu-devel] [PATCH 3/4] target/i386/translate: use thread-local storage in !user-mode

2018-08-14 Thread Emilio G. Cota
On Tue, Aug 14, 2018 at 08:31:02 +0200, Paolo Bonzini wrote: > On 14/08/2018 03:38, Emilio G. Cota wrote: > > Needed for MTTCG. > > > > Signed-off-by: Emilio G. Cota > > Why not always use TLS, even in user-mode? To avoid TLS waste; user-mode uses a single TCGContext, so a single copy of these

Re: [Qemu-devel] [PATCH v2] nvme: correct locking around completion

2018-08-14 Thread Paolo Bonzini
On 14/08/2018 08:45, Fam Zheng wrote: > On Tue, 08/14 08:27, Paolo Bonzini wrote: >> nvme_poll_queues is already protected by q->lock, and >> AIO callbacks are invoked outside the AioContext lock. >> So remove the acquire/release pair in nvme_handle_event. >> >> Signed-off-by: Paolo Bonzini >> ---

Re: [Qemu-devel] [PATCH 1/3] qsp: QEMU's Synchronization Profiler

2018-08-14 Thread Paolo Bonzini
On 13/08/2018 19:11, Emilio G. Cota wrote: > +struct qsp_report rep; Don't like camelcase? But that's really all that I have to remark on this lovely series. Paolo

Re: [Qemu-devel] [PATCH v2] file-posix: Skip effectiveless OFD lock operations

2018-08-14 Thread Fam Zheng
On Mon, 08/13 15:42, Kevin Wolf wrote: > Am 13.08.2018 um 04:39 hat Fam Zheng geschrieben: > > If we know we've already locked the bytes, don't do it again; similarly > > don't unlock a byte if we haven't locked it. This doesn't change the > > behavior, but fixes a corner case explained below. > >

Re: [Qemu-devel] [PATCH 2/3] monitor: show sync profiling info with 'info sync'

2018-08-14 Thread Paolo Bonzini
On 13/08/2018 19:11, Emilio G. Cota wrote: > diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx > index 70639f656a..56a3249bad 100644 > --- a/hmp-commands-info.hx > +++ b/hmp-commands-info.hx > @@ -297,6 +297,22 @@ STEXI > @item info opcount > @findex info opcount > Show dynamic compiler o

Re: [Qemu-devel] RAMBlocks and memory_region_init_ram_nomigrate

2018-08-14 Thread Dr. David Alan Gilbert
* Frank Yang (l...@google.com) wrote: > Ah got it, thanks for the replies / info! > > We're using a modified QEMU 2.12, and I don't see the migratable-only loops > and field, so it either got missed in the rebase or was added after 2.12. It went in after 2.12; it's b895de50 (followed by some clea

Re: [Qemu-devel] [PATCH v7 6/9] qcow2: Increase the default upper limit on the L2 cache size

2018-08-14 Thread Kevin Wolf
Am 13.08.2018 um 18:42 hat Leonid Bloch geschrieben: > > I don't actually think it's so bad to keep the cache permanently > > allocated, but I wouldn't object to a lower default for non-Linux hosts > > either. 1 MB may still be a little too low, 4 MB (covers up to 32 GB) > > might be more adequate.

Re: [Qemu-devel] [PATCH v2] file-posix: Skip effectiveless OFD lock operations

2018-08-14 Thread Kevin Wolf
Am 14.08.2018 um 10:12 hat Fam Zheng geschrieben: > On Mon, 08/13 15:42, Kevin Wolf wrote: > > Am 13.08.2018 um 04:39 hat Fam Zheng geschrieben: > > > If we know we've already locked the bytes, don't do it again; similarly > > > don't unlock a byte if we haven't locked it. This doesn't change the >

Re: [Qemu-devel] [PATCH 41/56] json: Nicer recovery from invalid leading zero

2018-08-14 Thread Markus Armbruster
Eric Blake writes: > On 08/08/2018 07:03 AM, Markus Armbruster wrote: >> For input 0123, the lexer produces the tokens >> >> JSON_ERROR01 >> JSON_INTEGER 23 >> >> Reporting an error is correct; 0123 is invalid according to RFC 7159. >> But the error recovery isn't nice. >> >> Make

Re: [Qemu-devel] [PATCH] luks: Allow share-rw=on

2018-08-14 Thread Kevin Wolf
Am 14.08.2018 um 09:27 hat Daniel P. Berrangé geschrieben: > On Tue, Aug 14, 2018 at 03:25:51PM +0800, Fam Zheng wrote: > > Format drivers such as qcow2 don't allow sharing the same image between > > two QEMU instances in order to prevent image corruptions, because of > > metadata cache. LUKS drive

Re: [Qemu-devel] [PATCH v2] file-posix: Skip effectiveless OFD lock operations

2018-08-14 Thread Fam Zheng
On Tue, 08/14 10:22, Kevin Wolf wrote: > Am 14.08.2018 um 10:12 hat Fam Zheng geschrieben: > > On Mon, 08/13 15:42, Kevin Wolf wrote: > > > Am 13.08.2018 um 04:39 hat Fam Zheng geschrieben: > > > > If we know we've already locked the bytes, don't do it again; similarly > > > > don't unlock a byte i

Re: [Qemu-devel] [PATCH 0/4] target/arm: Fix int64_to_float16 double-rounding

2018-08-14 Thread Alex Bennée
Richard Henderson writes: > In 88808a022c0, I tried to fix an overflow problem that affected float16 > scaling by coverting first to float64 and then rounding after that. > > However, Laurent reported that -0x3ff401 converted to float16 > resulted in 0xfbfe instead of the expected 0xfbf

Re: [Qemu-devel] [PATCH] hw/pci: add pci capability to pci-pci bridge

2018-08-14 Thread Liu, Jing2
Hi Laszlo, Sorry for late reply. I missed these mails because of wrong filter. And thanks very much for comments. My reply as belows. On 8/7/2018 8:19 PM, Laszlo Ersek wrote: On 08/07/18 09:04, Jing Liu wrote: [...] @@ -46,6 +46,12 @@ struct PCIBridgeDev { uint32_t flags; OnOffA

Re: [Qemu-devel] [PATCH] qemu-img.c: increase spacing between commands in documentation

2018-08-14 Thread Kevin Wolf
Am 13.08.2018 um 20:19 hat Eric Blake geschrieben: > On 08/13/2018 11:56 AM, Max Reitz wrote: > > > > Ah, hm, so much for that. Hm... I don't quite know what to think of > > this. It does indeed improve legibility. But the question is whether > > --help should be as condensed as possible, and

Re: [Qemu-devel] [Bug 1785698] Re: Solaris build error: unknown type name ‘gcry_error_t’

2018-08-14 Thread Peter Maydell
On 13 August 2018 at 19:58, Michele Denber <1785...@bugs.launchpad.net> wrote: > I don't know why qemu is picky about > POSIX, but there you have it. We do assume a posix shell and that that shell is /bin/sh. We may have bugs where we assume non-posix behaviour from it, since almost all users are

Re: [Qemu-devel] [PATCH] virtio: add support for in-order feature

2018-08-14 Thread Ilya Maximets
On 13.08.2018 18:35, Michael S. Tsirkin wrote: > On Mon, Aug 13, 2018 at 06:28:06PM +0300, Ilya Maximets wrote: >> On 13.08.2018 12:56, Michael S. Tsirkin wrote: >>> On Mon, Aug 13, 2018 at 10:55:23AM +0300, Ilya Maximets wrote: On 10.08.2018 22:19, Michael S. Tsirkin wrote: > On Fri, Aug

Re: [Qemu-devel] [PATCH 3/5] block: Simplify bdrv_reopen_abort()

2018-08-14 Thread Kevin Wolf
Am 29.06.2018 um 13:37 hat Alberto Garcia geschrieben: > If a bdrv_reopen_multiple() call fails, then the explicit_options > QDict has to be deleted for every entry in the reopen queue. This must > happen regardless of whether that entry's bdrv_reopen_prepare() call > succeeded or not. > > This pa

Re: [Qemu-devel] [PATCH] hw/pci: add pci capability to pci-pci bridge

2018-08-14 Thread Liu, Jing2
Hi Marcel, On 8/12/2018 3:11 PM, Marcel Apfelbaum wrote: Hi Laszlo, [...]   hw/pci-bridge/pci_bridge_dev.c | 20   1 file changed, 20 insertions(+) +cap_error: +    msi_uninit(dev); (4) This error handler doesn't look entirely correct; we can reach it without having initi

Re: [Qemu-devel] [PATCH 5/5] block: Simplify append_open_options()

2018-08-14 Thread Kevin Wolf
Am 29.06.2018 um 13:37 hat Alberto Garcia geschrieben: > This function returns a BDS's driver-specific options, excluding also > those from its children. Since we have just removed all children > options from bs->options there's no need to do this last step. > > We allow references to children, th

Re: [Qemu-devel] [PATCH] hw/pci: add pci capability to pci-pci bridge

2018-08-14 Thread Liu, Jing2
On 8/12/2018 3:11 PM, Marcel Apfelbaum wrote: [...] I don't know what to suggest for the new capability's teardown, in pci_bridge_dev_exitfn()  -- should we just ignore it (as suggested by this patch)? No, we should remove it properly. I think it is not considered a "big" issue since addin

[Qemu-devel] [PATCH] qemu-img: fix regression copying secrets during convert

2018-08-14 Thread Daniel P . Berrangé
When the convert command is creating an output file that needs secrets, we need to ensure those secrets are passed to both the blk_new_open and bdrv_create API calls. This is done by qemu-img extracting all opts matching the name suffix "key-secret". Unfortunately the code doing this was run after

Re: [Qemu-devel] [PATCH 2/3] monitor: show sync profiling info with 'info sync'

2018-08-14 Thread Dr. David Alan Gilbert
* Emilio G. Cota (c...@braap.org) wrote: > Signed-off-by: Emilio G. Cota > --- > monitor.c| 7 +++ > hmp-commands-info.hx | 16 > 2 files changed, 23 insertions(+) > > diff --git a/monitor.c b/monitor.c > index 77861e96af..66d8d85b97 100644 > --- a/monitor.c > +

[Qemu-devel] [PATCH] mirror: Fail gracefully for source == target

2018-08-14 Thread Kevin Wolf
blockdev-mirror with the same node for source and target segfaults today: A node is in its own backing chain, so mirror_start_job() decides that this is an active commit. When adding the intermediate nodes with block_job_add_bdrv(), it starts the iteration through the subchain with the backing file

Re: [Qemu-devel] [PATCH v2 1/4] hw/char: Implement nRF51 SoC UART

2018-08-14 Thread Julia Suvorova via Qemu-devel
On 13.08.2018 12:47, Stefan Hajnoczi wrote: On Mon, Aug 13, 2018 at 10:08 AM Julia Suvorova wrote: On 10.08.2018 09:02, Stefan Hajnoczi wrote: On Wed, Aug 8, 2018 at 10:07 PM, Julia Suvorova wrote: +static uint64_t uart_read(void *opaque, hwaddr addr, unsigned int size) +{ +NRF51UARTStat

[Qemu-devel] [PATCH] hw/rdma: Abort send-op if fail to create addr handler

2018-08-14 Thread Yuval Shaia
Function create_ah might return NULL, let's exit with an error. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index 35726bda2e..59d02eb567 100644 --- a/hw/rdma/rdma_backend.c +++ b/hw/

Re: [Qemu-devel] [PATCH v9 6/6] tpm: add ACPI memory clear interface

2018-08-14 Thread Marc-André Lureau
Hi On Mon, Aug 13, 2018 at 11:09 AM Igor Mammedov wrote: > > On Fri, 10 Aug 2018 17:32:23 +0200 > Marc-André Lureau wrote: > > > This allows to pass the last failing test from the Windows HLK TPM 2.0 > > TCG PPI 1.3 tests. > > > > The interface is described in the "TCG Platform Reset Attack > > M

Re: [Qemu-devel] [PATCH v2 1/4] hw/char: Implement nRF51 SoC UART

2018-08-14 Thread Peter Maydell
On 13 August 2018 at 10:47, Stefan Hajnoczi wrote: > It's an assumption that on-board devices cannot be hot unplugged and > that the machine type stays alive until QEMU terminates. > > Making this assumption saves 1 call to qemu_chr_fe_set_handlers(). > The cost is that we cannot safely stop the s

Re: [Qemu-devel] [PATCH v3 3/3] Change other funcitons referring to feature_word_info[]

2018-08-14 Thread Robert Hoo
On Fri, 2018-08-10 at 10:17 -0500, Eric Blake wrote: > On 08/10/2018 09:06 AM, Robert Hoo wrote: > > In the subject: s/funcitons/functions/ > > Also, it may be worth using a topic prefix (most of our commit messages > resemble: > > topic: Description of patch > > to make it easier to spot patc

Re: [Qemu-devel] [PATCH] chardev: Add websocket support

2018-08-14 Thread Julia Suvorova via Qemu-devel
On 13.08.2018 15:02, Paolo Bonzini wrote: Thanks Julia, just a few cleanups to simplify the prototypes of some functions. Thanks for the review, I'll do the refactoring. Best regards, Julia Suvorova.

Re: [Qemu-devel] [PATCH 3/5] block: Simplify bdrv_reopen_abort()

2018-08-14 Thread Alberto Garcia
On Tue 14 Aug 2018 11:07:42 AM CEST, Kevin Wolf wrote: > Am 29.06.2018 um 13:37 hat Alberto Garcia geschrieben: >> If a bdrv_reopen_multiple() call fails, then the explicit_options >> QDict has to be deleted for every entry in the reopen queue. This must >> happen regardless of whether that entry's

Re: [Qemu-devel] [PATCH v4 00/14] fp-test + hardfloat

2018-08-14 Thread Alex Bennée
Emilio G. Cota writes: > On Mon, Jun 11, 2018 at 21:48:46 -0400, Emilio G. Cota wrote: >> Sending this respin (little more than a rebase) in case there's >> reviewer bandwidth available until the soft-freeze in 3 weeks. > > *ping* > > Would be great to get this in for 3.1. I would like this me

Re: [Qemu-devel] [PATCH] chardev: Add websocket support

2018-08-14 Thread Julia Suvorova via Qemu-devel
On 13.08.2018 15:21, Daniel P. Berrangé wrote: On Mon, Aug 13, 2018 at 01:20:37PM +0300, Julia Suvorova via Qemu-devel wrote: New option "websock" added to allow using websocket protocol for chardev socket backend. Example: -chardev socket,websock,id=... Signed-off-by: Julia Suvorova ---

[Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires

2018-08-14 Thread Jay Zhou
I got the following error when migrating a VM with watchdog device: {"timestamp": {"seconds": 1533884471, "microseconds": 668099}, "event": "WATCHDOG", "data": {"action": "reset"}} {"timestamp": {"seconds": 1533884471, "microseconds": 677658}, "event": "RESET", "data": {"guest": true}} {"timestamp

Re: [Qemu-devel] [PATCH 5/5] block: Simplify append_open_options()

2018-08-14 Thread Alberto Garcia
On Tue 14 Aug 2018 11:17:50 AM CEST, Kevin Wolf wrote: > Am 29.06.2018 um 13:37 hat Alberto Garcia geschrieben: >> This function returns a BDS's driver-specific options, excluding also >> those from its children. Since we have just removed all children >> options from bs->options there's no need to

Re: [Qemu-devel] [PATCH 3/5] block: Simplify bdrv_reopen_abort()

2018-08-14 Thread Kevin Wolf
Am 14.08.2018 um 12:15 hat Alberto Garcia geschrieben: > On Tue 14 Aug 2018 11:07:42 AM CEST, Kevin Wolf wrote: > > Am 29.06.2018 um 13:37 hat Alberto Garcia geschrieben: > >> If a bdrv_reopen_multiple() call fails, then the explicit_options > >> QDict has to be deleted for every entry in the reope

Re: [Qemu-devel] [PATCH v8 03/87] target/mips: Avoid case statements formulated by ranges - part 2

2018-08-14 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 13, 2018 7:52 PM > > Subject: [PATCH v8 03/87] target/mips: Avoid case statements formulated by > ranges - part 2 > > From: Aleksandar Rikalo > > Remove "range style" case statements to make code analysis easier. > This patch handles cases wh

Re: [Qemu-devel] [PATCH 5/5] block: Simplify append_open_options()

2018-08-14 Thread Kevin Wolf
Am 14.08.2018 um 12:52 hat Alberto Garcia geschrieben: > On Tue 14 Aug 2018 11:17:50 AM CEST, Kevin Wolf wrote: > > Am 29.06.2018 um 13:37 hat Alberto Garcia geschrieben: > >> This function returns a BDS's driver-specific options, excluding also > >> those from its children. Since we have just remo

Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires

2018-08-14 Thread Paolo Bonzini
On 14/08/2018 12:48, Jay Zhou wrote: > I got the following error when migrating a VM with watchdog > device: > > {"timestamp": {"seconds": 1533884471, "microseconds": 668099}, > "event": "WATCHDOG", "data": {"action": "reset"}} > {"timestamp": {"seconds": 1533884471, "microseconds": 677658}, > "ev

Re: [Qemu-devel] [PATCH v7 6/9] qcow2: Increase the default upper limit on the L2 cache size

2018-08-14 Thread Leonid Bloch
On 8/14/18 11:18 AM, Kevin Wolf wrote: Am 13.08.2018 um 18:42 hat Leonid Bloch geschrieben: I don't actually think it's so bad to keep the cache permanently allocated, but I wouldn't object to a lower default for non-Linux hosts either. 1 MB may still be a little too low, 4 MB (covers up to 32 G

Re: [Qemu-devel] [PATCH] qemu-img: fix regression copying secrets during convert

2018-08-14 Thread Kevin Wolf
Am 14.08.2018 um 11:35 hat Daniel P. Berrangé geschrieben: > When the convert command is creating an output file that needs > secrets, we need to ensure those secrets are passed to both the > blk_new_open and bdrv_create API calls. > > This is done by qemu-img extracting all opts matching the name

Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak

2018-08-14 Thread Juan Quintela
Paolo Bonzini wrote: > On 08/08/2018 13:48, Juan Quintela wrote: >> Signed-off-by: Juan Quintela >> --- >> default-configs/alpha-softmmu.mak | 2 -- >> default-configs/arm-softmmu.mak | 2 -- >> default-configs/hppa-softmmu.mak| 3 --- >> default-configs/i386-softmmu.mak

Re: [Qemu-devel] [PATCH v7 6/9] qcow2: Increase the default upper limit on the L2 cache size

2018-08-14 Thread Kevin Wolf
Am 14.08.2018 um 13:34 hat Leonid Bloch geschrieben: > On 8/14/18 11:18 AM, Kevin Wolf wrote: > > Am 13.08.2018 um 18:42 hat Leonid Bloch geschrieben: > > > > I don't actually think it's so bad to keep the cache permanently > > > > allocated, but I wouldn't object to a lower default for non-Linux h

Re: [Qemu-devel] [PATCH 5/5] block: Simplify append_open_options()

2018-08-14 Thread Alberto Garcia
On Tue 14 Aug 2018 01:14:42 PM CEST, Kevin Wolf wrote: >> The main difference is that if you set backing.node-name=foo then it >> means that 'node-name=foo' is an option of the child, the option >> doesn't belong in the parent at all. So once it's transferred to the >> child there's no reason why i

Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires

2018-08-14 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 14/08/2018 12:48, Jay Zhou wrote: > > I got the following error when migrating a VM with watchdog > > device: > > > > {"timestamp": {"seconds": 1533884471, "microseconds": 668099}, > > "event": "WATCHDOG", "data": {"action": "reset"}} > > {"timesta

Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak

2018-08-14 Thread Paolo Bonzini
On 14/08/2018 13:40, Juan Quintela wrote: >> CONFIG_SERIAL is a dependency of both CONFIG_SERIAL and >> CONFIG_SERIAL_PCI. > > I guess you here mean CONFIG_SERIAL_ISA or CONFIG_SERIAL_PCI. That is > not enough. CONFIG_SERIAL really means CONFIG_SERIAL_COMMON, and things > like riscv* require it

Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires

2018-08-14 Thread Paolo Bonzini
On 14/08/2018 13:52, Dr. David Alan Gilbert wrote: > a) Should the watchdog expire when the VM is stopped; I think it > shouldn't - hw/acpi/tco.c uses a virtual timer as does i6300esb; so > is the bug here that the watchdog being used didn't use a virtual > timer? All watchdogs do. > b) If the

Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak

2018-08-14 Thread Peter Maydell
On 14 August 2018 at 12:52, Paolo Bonzini wrote: > On 14/08/2018 13:40, Juan Quintela wrote: >>> CONFIG_SERIAL is a dependency of both CONFIG_SERIAL and >>> CONFIG_SERIAL_PCI. >> >> I guess you here mean CONFIG_SERIAL_ISA or CONFIG_SERIAL_PCI. That is >> not enough. CONFIG_SERIAL really means CO

Re: [Qemu-devel] [PATCH 5/5] block: Simplify append_open_options()

2018-08-14 Thread Kevin Wolf
Am 14.08.2018 um 13:48 hat Alberto Garcia geschrieben: > >> In the case of 'backing=foo' that's clearly an option of the parent, > >> there's no other place to put it. We could probably remove it as > >> well, but we have to see carefully that no parent needs to keep that > >> information. I think

[Qemu-devel] [PATCH v3 5/8] block/mirror: fix and improve do_sync_target_write

2018-08-14 Thread Vladimir Sementsov-Ogievskiy
Use bdrv_dirty_bitmap_next_dirty_area() instead of bdrv_dirty_iter_next_area(), because of the following problems of bdrv_dirty_iter_next_area(): 1. Using HBitmap iterators we should carefully handle unaligned offset, as first call to hbitmap_iter_next() may return a value less than original offse

[Qemu-devel] [PATCH v3 0/8] dirty-bitmap: rewrite bdrv_dirty_iter_next_area

2018-08-14 Thread Vladimir Sementsov-Ogievskiy
Hi all. 1. bdrv_dirty_iter_next_area don't use hbitmap_next_zero and uses inefficient loop instead. Let's improve it. 2. bdrv_dirty_iter_next_area don't handle unaligned offset and max_offset correctly. I'm not sure that it is a real bug. But if it is, we need these series in 3.0. Details are in

[Qemu-devel] [PATCH v3 6/8] Revert "block/dirty-bitmap: Add bdrv_dirty_iter_next_area"

2018-08-14 Thread Vladimir Sementsov-Ogievskiy
This reverts commit 72d10a94213a954ad569095cb4491f2ae0853c40. The function is unused now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 2 -- block/dirty-bitmap.c | 55 2 files changed, 57 deletions(-) diff

[Qemu-devel] [PATCH v3 7/8] Revert "test-hbitmap: Add non-advancing iter_next tests"

2018-08-14 Thread Vladimir Sementsov-Ogievskiy
This reverts commit 269576848ec3d57d2d958cf5ac69b08c44adf816. The functionality is unused. Drop tests. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/test-hbitmap.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/tests/test-hbitm

[Qemu-devel] [PATCH v3 1/8] dirty-bitmap: improve bdrv_dirty_bitmap_next_zero

2018-08-14 Thread Vladimir Sementsov-Ogievskiy
Add bytes parameter to the function, to limit searched range. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 3 ++- include/qemu/hbitmap.h | 10 -- block/backup.c | 2 +- block/dirty-bitmap.c | 5 +++-- nbd/server.c

[Qemu-devel] [PATCH v3 8/8] Revert "hbitmap: Add @advance param to hbitmap_iter_next()"

2018-08-14 Thread Vladimir Sementsov-Ogievskiy
This reverts commit a33fbb4f8b64226becf502a123733776ce319b24. The functionality is unused. Note: in addition to automatic revert, drop second parameter in hbitmap_iter_next() call from hbitmap_next_dirty_area() too. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/hbitmap.h | 5 +-

[Qemu-devel] [PATCH v3 4/8] tests: add tests for hbitmap_next_dirty_area

2018-08-14 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/test-hbitmap.c | 106 +++ 1 file changed, 106 insertions(+) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index dddb67c3c5..af5142b481 100644 --- a/tests/test-hbitmap.c +++ b/tests/te

[Qemu-devel] [PATCH v3 3/8] dirty-bitmap: add bdrv_dirty_bitmap_next_dirty_area

2018-08-14 Thread Vladimir Sementsov-Ogievskiy
The function alters bdrv_dirty_iter_next_area(), which is wrong and less efficient (see further commit "block/mirror: fix and improve do_sync_target_write" for description). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 3 +++ include/qemu/hbitmap.h | 15 +

[Qemu-devel] [PATCH v3 2/8] tests: add tests for hbitmap_next_zero with specified end parameter

2018-08-14 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/test-hbitmap.c | 32 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index 6b6a40bddd..dddb67c3c5 100644 --- a/tests/test-hbitmap.c +++ b/tests/test-hb

Re: [Qemu-devel] [PATCH v8 42/87] target/mips: Implement emulation of nanoMIPS LLWP/SCWP pair

2018-08-14 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 13, 2018 7:53 PM > > Subject: [PATCH v8 42/87] target/mips: Implement emulation of nanoMIPS > LLWP/SCWP > pair > > From: Aleksandar Rikalo > > Implement support for nanoMIPS LLWP/SCWP instruction pair. > > Signed-off-by: Dimitrije Nikolic >

Re: [Qemu-devel] [PATCH v8 08/87] target/mips: Add support for availability control via bit XNP

2018-08-14 Thread Aleksandar Markovic
> From: Aleksandar Markovic > Sent: Monday, August 13, 2018 7:52 PM > > Subject: [PATCH v8 08/87] target/mips: Add support for availability control > via bit XNP > > From: Aleksandar Rikalo > > Add a field in hflags for XNP bit, and a function check_xnp(). > > Signed-off-by: Aleksandar Marko

Re: [Qemu-devel] [PATCH v7 6/9] qcow2: Increase the default upper limit on the L2 cache size

2018-08-14 Thread Leonid Bloch
On 8/14/18 2:44 PM, Kevin Wolf wrote: Am 14.08.2018 um 13:34 hat Leonid Bloch geschrieben: On 8/14/18 11:18 AM, Kevin Wolf wrote: Am 13.08.2018 um 18:42 hat Leonid Bloch geschrieben: I don't actually think it's so bad to keep the cache permanently allocated, but I wouldn't object to a lower de

Re: [Qemu-devel] [PATCH] qemu-img: fix regression copying secrets during convert

2018-08-14 Thread Daniel P . Berrangé
On Tue, Aug 14, 2018 at 01:38:24PM +0200, Kevin Wolf wrote: > Am 14.08.2018 um 11:35 hat Daniel P. Berrangé geschrieben: > > When the convert command is creating an output file that needs > > secrets, we need to ensure those secrets are passed to both the > > blk_new_open and bdrv_create API calls.

[Qemu-devel] [PATCH v2] qemu-img: fix regression copying secrets during convert

2018-08-14 Thread Daniel P . Berrangé
When the convert command is creating an output file that needs secrets, we need to ensure those secrets are passed to both the blk_new_open and bdrv_create API calls. This is done by qemu-img extracting all opts matching the name suffix "key-secret". Unfortunately the code doing this was run after

[Qemu-devel] [PATCH 07/10] target/arm: Implement ESR_EL2/HSR for AArch32 and no-EL2

2018-08-14 Thread Peter Maydell
The AArch32 HSR is the equivalent of AArch64 ESR_EL2; we can implement it by marking our existing ESR_EL2 regdef as STATE_BOTH. It also needs to be "RES0 from EL3 if EL2 not implemented", so add the missing stanza to el3_no_el2_cp_reginfo. Signed-off-by: Peter Maydell --- target/arm/helper.c | 6

[Qemu-devel] [PATCH 00/10] target/arm: Some pieces of support for 32-bit Hyp mode

2018-08-14 Thread Peter Maydell
Now we have virtualization support in the GICv2 emulation, I thought I'd have a look at how much we were still missing for being able to enable EL2 support for AArch32. This set of patches fixes some minor missing pieces: * various small bugs in cp15 registers or places where we were missing th

[Qemu-devel] [PATCH 08/10] target/arm: Permit accesses to ELR_Hyp from Hyp mode via MSR/MRS (banked)

2018-08-14 Thread Peter Maydell
The MSR (banked) and MRS (banked) instructions allow accesses to ELR_Hyp from either Monitor or Hyp mode. Our translate time check was overly strict and only permitted access from Monitor mode. The runtime check wo do in msr_mrs_banked_exc_checks() had the correct code in it, but never got there b

[Qemu-devel] [PATCH 05/10] target/arm: Implement AArch32 HCR and HCR2

2018-08-14 Thread Peter Maydell
The AArch32 HCR and HCR2 registers alias HCR_EL2 bits [31:0] and [63:32]; implement them. Signed-off-by: Peter Maydell --- target/arm/helper.c | 39 +++ 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c in

[Qemu-devel] [PATCH 06/10] target/arm: Implement AArch32 Hyp FARs

2018-08-14 Thread Peter Maydell
The AArch32 virtualization extensions support these fault address registers: * HDFAR: aliased with AArch64 FAR_EL2[31:0] and AArch32 DFAR(S) * HIFAR: aliased with AArch64 FAR_EL2[63:32] and AArch32 IFAR(S) Implement the accessors for these. This fixes in passing a bug where we weren't implementi

[Qemu-devel] [PATCH 09/10] target/arm: Implement AArch32 ERET instruction

2018-08-14 Thread Peter Maydell
ARMv7VE introduced the ERET instruction, which is necessary to return from an exception taken to Hyp mode. Implement this. In A32 encoding it is a completely new encoding; in T32 it is an adjustment of the behaviour of the existing "SUBS PC, LR, #" instruction. Signed-off-by: Peter Maydell --- t

[Qemu-devel] [PATCH 03/10] target/arm: Implement RAZ/WI HACTLR2

2018-08-14 Thread Peter Maydell
The AArch32 HACTLR2 register maps to bits [63:32] of ACTLR_EL2. We implement ACTLR_EL2 as RAZ/WI, so make HACTLR2 also RAZ/WI. (We put the regdef next to ACTLR_EL2 as a reminder in case we ever make ACTLR_EL2 something other than RAZ/WI). Signed-off-by: Peter Maydell --- target/arm/helper.c | 5

[Qemu-devel] [PATCH 02/10] target/arm: Add missing .cp = 15 to HMAIR1 and HAMAIR1 regdefs

2018-08-14 Thread Peter Maydell
ARMCPRegInfo structs will not default to .cp = 15 if they are ARM_CP_STATE_BOTH, but not if they are ARM_CP_STATE_AA32 (because a coprocessor number of 0 is valid for AArch32). We forgot to explicitly set .cp = 15 for the HMAIR1 and HAMAIR1 regdefs, which meant they would UNDEF when the guest tried

[Qemu-devel] [PATCH 2/2] block: drop empty .bdrv_close handlers

2018-08-14 Thread Vladimir Sementsov-Ogievskiy
.bdrv_close handler is optional after previous commit, no needs to keep empty functions more. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/blkreplay.c| 5 - block/commit.c | 5 - block/copy-on-read.c | 6 -- block/mirror.c | 5 - block/null.c | 6

[Qemu-devel] [PATCH 04/10] target/arm: Implement AArch32 HVBAR

2018-08-14 Thread Peter Maydell
Implement the AArch32 HVBAR register; we can do this just by making the existing VBAR_EL2 regdefs be STATE_BOTH. Signed-off-by: Peter Maydell --- target/arm/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 14fd78f587

[Qemu-devel] [PATCH 10/10] target/arm: Implement support for taking exceptions to Hyp mode

2018-08-14 Thread Peter Maydell
Implement the necessary support code for taking exceptions to Hyp mode in AArch32. Signed-off-by: Peter Maydell --- target/arm/helper.c | 146 +--- 1 file changed, 123 insertions(+), 23 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c i

[Qemu-devel] [PATCH 01/10] target/arm: Correct typo in HAMAIR1 regdef name

2018-08-14 Thread Peter Maydell
We implement the HAMAIR1 register as RAZ/WI; we had a typo in the regdef, though, and were incorrectly naming it HMAIR1 (which is a different register which we also implement as RAZ/WI). Signed-off-by: Peter Maydell --- target/arm/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires

2018-08-14 Thread Zhoujian (jay)
> -Original Message- > From: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com] > Sent: Tuesday, August 14, 2018 7:52 PM > To: Paolo Bonzini > Cc: Zhoujian (jay) ; qemu-devel@nongnu.org; > quint...@redhat.com; wangxin (U) > Subject: Re: [RFC PATCH] vl: fix migration when watchdog expires

[Qemu-devel] [PATCH 0/2] block: make .bdrv_close optional

2018-08-14 Thread Vladimir Sementsov-Ogievskiy
Several block drivers have to define empty .bdrv_close handler. Let's instead make it optional. Vladimir Sementsov-Ogievskiy (2): block: make .bdrv_close optional block: drop empty .bdrv_close handlers block.c | 4 +++- block/blkreplay.c| 5 - block/commit.c | 5 --

[Qemu-devel] [PATCH 1/2] block: make .bdrv_close optional

2018-08-14 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 4 +++- block/snapshot.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 39f373e035..9694018a68 100644 --- a/block.c +++ b/block.c @@ -3349,7 +3349,9 @@ static void bdrv_close(Block

Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak

2018-08-14 Thread Paolo Bonzini
On 14/08/2018 14:06, Peter Maydell wrote: > On 14 August 2018 at 12:52, Paolo Bonzini wrote: >> On 14/08/2018 13:40, Juan Quintela wrote: CONFIG_SERIAL is a dependency of both CONFIG_SERIAL and CONFIG_SERIAL_PCI. >>> >>> I guess you here mean CONFIG_SERIAL_ISA or CONFIG_SERIAL_PCI. That

Re: [Qemu-devel] [PATCH] qemu-img.c: increase spacing between commands in documentation

2018-08-14 Thread Eric Blake
On 08/14/2018 03:40 AM, Kevin Wolf wrote: And I've already expressed my opinion that it is already rather long, where making it longer is not necessarily making it smarter. I think if we want to improve the help text, we should split it up. $ qemu-img --help qemu-img version 2.12.94 (v3.0.0-rc

Re: [Qemu-devel] [PATCH] mirror: Fail gracefully for source == target

2018-08-14 Thread Eric Blake
On 08/14/2018 04:58 AM, Kevin Wolf wrote: blockdev-mirror with the same node for source and target segfaults today: A node is in its own backing chain, so mirror_start_job() decides that this is an active commit. When adding the intermediate nodes with block_job_add_bdrv(), it starts the iteratio

Re: [Qemu-devel] [PATCH v2] qemu-img: fix regression copying secrets during convert

2018-08-14 Thread Kevin Wolf
Am 14.08.2018 um 14:39 hat Daniel P. Berrangé geschrieben: > When the convert command is creating an output file that needs > secrets, we need to ensure those secrets are passed to both the > blk_new_open and bdrv_create API calls. > > This is done by qemu-img extracting all opts matching the name

Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak

2018-08-14 Thread Peter Maydell
On 14 August 2018 at 13:56, Paolo Bonzini wrote: > On 14/08/2018 14:06, Peter Maydell wrote: >> What about the boards that use the serial.c code but do not >> have PCI, ISA or a superio chip? That is, all the boards/devices >> that call serial_mm_init() directly to create a memory-mapped >> 16550.

Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires

2018-08-14 Thread Zhoujian (jay)
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Tuesday, August 14, 2018 8:02 PM > To: Dr. David Alan Gilbert > Cc: Zhoujian (jay) ; qemu-devel@nongnu.org; > quint...@redhat.com; wangxin (U) > Subject: Re: [RFC PATCH] vl: fix migration when watchdog expires

Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak

2018-08-14 Thread Paolo Bonzini
On 14/08/2018 14:57, Peter Maydell wrote: > On 14 August 2018 at 13:56, Paolo Bonzini wrote: >> On 14/08/2018 14:06, Peter Maydell wrote: >>> What about the boards that use the serial.c code but do not >>> have PCI, ISA or a superio chip? That is, all the boards/devices >>> that call serial_mm_ini

Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires

2018-08-14 Thread Paolo Bonzini
On 14/08/2018 15:03, Zhoujian (jay) wrote: >> -Original Message- >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> Sent: Tuesday, August 14, 2018 8:02 PM >> To: Dr. David Alan Gilbert >> Cc: Zhoujian (jay) ; qemu-devel@nongnu.org; >> quint...@redhat.com; wangxin (U) >> Subject: Re: [

Re: [Qemu-devel] [PATCH v0 0/7] Background snapshots

2018-08-14 Thread Mike Rapoport
On Mon, Aug 13, 2018 at 08:00:19PM +0100, Dr. David Alan Gilbert wrote: > cc'ing in Mike*2 > * Denis Plotnikov (dplotni...@virtuozzo.com) wrote: > > > > > > On 26.07.2018 12:23, Peter Xu wrote: > > > On Thu, Jul 26, 2018 at 10:51:33AM +0200, Paolo Bonzini wrote: > > > > On 25/07/2018 22:04, Andre

Re: [Qemu-devel] [PATCH 41/56] json: Nicer recovery from invalid leading zero

2018-08-14 Thread Eric Blake
On 08/14/2018 03:24 AM, Markus Armbruster wrote: Should IN_BAD_ZERO also consume '.' and/or 'e' (after all, '01e2 is a valid C constant, but not a valid JSON literal)? But I think your choice here is fine (again, add too much, and then the lexer has to track a lot of state; whereas this minimal

Re: [Qemu-devel] [PATCH 5/5] block: Simplify append_open_options()

2018-08-14 Thread Alberto Garcia
On Tue 14 Aug 2018 02:08:26 PM CEST, Kevin Wolf wrote: >> > When you actually use that incorrect information, you've got a bug. >> > Reopen with file=bar doesn't have to check whether 'file=bar' is in >> > bs->options (because that may be outdated information), but whether >> > the BdrvChild with t

Re: [Qemu-devel] [PATCH 0/2] block: make .bdrv_close optional

2018-08-14 Thread Kevin Wolf
Am 14.08.2018 um 14:43 hat Vladimir Sementsov-Ogievskiy geschrieben: > Several block drivers have to define empty .bdrv_close handler. Let's > instead make it optional. Thanks, applied to the block branch. Kevin

Re: [Qemu-devel] [PATCH 43/56] qjson: Fix qobject_from_json() & friends for multiple values

2018-08-14 Thread Eric Blake
On 08/08/2018 07:03 AM, Markus Armbruster wrote: qobject_from_json() & friends use the consume_json() callback to receive either a value or an error from the parser. When they are fed a string that contains more than either one JSON value or one JSON syntax error, consume_json() gets called mult

Re: [Qemu-devel] [PATCH] hw/pci: add pci capability to pci-pci bridge

2018-08-14 Thread Laszlo Ersek
On 08/14/18 10:39, Liu, Jing2 wrote: > Hi Laszlo, > Sorry for late reply. I missed these mails because of wrong filter. > And thanks very much for comments. My reply as belows. > > On 8/7/2018 8:19 PM, Laszlo Ersek wrote: >> On 08/07/18 09:04, Jing Liu wrote: > [...] >>> @@ -46,6 +46,12 @@ struct

Re: [Qemu-devel] [PATCH v2 02/22] config: CONFIG_SERIAL* is already in pci.mak

2018-08-14 Thread Juan Quintela
Peter Maydell wrote: > On 14 August 2018 at 12:52, Paolo Bonzini wrote: >> On 14/08/2018 13:40, Juan Quintela wrote: CONFIG_SERIAL is a dependency of both CONFIG_SERIAL and CONFIG_SERIAL_PCI. >>> >>> I guess you here mean CONFIG_SERIAL_ISA or CONFIG_SERIAL_PCI. That is >>> not enough.

Re: [Qemu-devel] [RFC PATCH] vl: fix migration when watchdog expires

2018-08-14 Thread Zhoujian (jay)
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Tuesday, August 14, 2018 9:07 PM > To: Zhoujian (jay) ; Dr. David Alan Gilbert > > Cc: qemu-devel@nongnu.org; quint...@redhat.com; wangxin (U) > > Subject: Re: [RFC PATCH] vl: fix migration when watchdog expir

Re: [Qemu-devel] [PATCH 0/5] Some bs->options fixes

2018-08-14 Thread Kevin Wolf
Am 29.06.2018 um 13:36 hat Alberto Garcia geschrieben: > Hi everyone, > > this is part of the blockdev-reopen work that I'm doing, but since > I'll be away during most of July I thought that I could send already a > couple of patches that I think are ready and don't need anything else > from the r

[Qemu-devel] [PATCH v2] megasas: fix sglist leak

2018-08-14 Thread Marc-André Lureau
tests/cdrom-test -p /x86_64/cdrom/boot/megasas Produces the following ASAN leak. ==25700==ERROR: LeakSanitizer: detected memory leaks Direct leak of 16 byte(s) in 1 object(s) allocated from: #0 0x7f06f8faac48 in malloc (/lib64/libasan.so.5+0xeec48) #1 0x7f06f87a73c5 in g_malloc (/lib64/l

  1   2   3   4   >