Re: [Qemu-devel] [PATCH v4 16/32] migration: new message MIG_RP_MSG_RECV_BITMAP

2017-11-30 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Introducing new return path message MIG_RP_MSG_RECV_BITMAP to send > received bitmap of ramblock back to source. > > This is the reply message of MIG_CMD_RECV_BITMAP, it contains not only > the header (including the ramblock name), and it was appended with

Re: [Qemu-devel] [PATCH] block: Formats don't need CONSISTENT_READ with NO_IO

2017-11-30 Thread Eric Blake
On 11/30/2017 10:44 AM, Kevin Wolf wrote: Commit 1f4ad7d fixed 'qemu-img info' for raw images that are currently in use as a mirror target. It is not enough for image formats, though, as these still unconditionally request BLK_PERM_CONSISTENT_READ. As this permission is meaningless unless you

Re: [Qemu-devel] [PATCH 4/3] checkpatch: Enforce proper do/while (0) style

2017-11-30 Thread Eric Blake
On 11/30/2017 08:01 AM, Eric Blake wrote: while (0) is only idiomatic in a macro definition, where the caller will be supplying the trailing ';'. Warn if the macro has a duplicate. Signed-off-by: Eric Blake --- scripts/checkpatch.pl | 5 + 1 file changed, 5

Re: [Qemu-devel] [RFC 0/7] Rework vhost memory region updates

2017-11-30 Thread Greg Kurz
On Thu, 30 Nov 2017 16:08:44 +0100 Igor Mammedov wrote: [...] > > (The logic in vhost_verify_ring_mappings doesn't make sense > > to me either though; if vhost_verify_ring_part_mapping returns 0 > > on success, why is it doing if (!r) { break; } surely it > > should be if

Re: [Qemu-devel] [PATCH qemu] vfio: Allow configuration without INTx

2017-11-30 Thread Alex Williamson
On Thu, 30 Nov 2017 13:08:17 +1100 Alexey Kardashevskiy wrote: > On 30/11/17 02:33, Alex Williamson wrote: > > On Wed, 22 Nov 2017 16:16:49 +1100 > > Alexey Kardashevskiy wrote: > > > >> On some platforms INTx may not be enabled on a KVM host (one such > >>

Re: [Qemu-devel] [PATCH v3 for-2.12 00/16] s390x/tcg: cleanup and fix program interrupts

2017-11-30 Thread Cornelia Huck
On Thu, 30 Nov 2017 17:27:28 +0100 David Hildenbrand wrote: > I have quite some patches on my queue for 2.12. (booting Fedora 26/27 > guests, floating interrupts, machine checks, missing instructions ...) > > So let's start slowly This series gets rid of program_interrupt()

[Qemu-devel] [PATCH] block: Formats don't need CONSISTENT_READ with NO_IO

2017-11-30 Thread Kevin Wolf
Commit 1f4ad7d fixed 'qemu-img info' for raw images that are currently in use as a mirror target. It is not enough for image formats, though, as these still unconditionally request BLK_PERM_CONSISTENT_READ. As this permission is meaningless unless you do actual I/O on the image, drop the

[Qemu-devel] [PATCH v3 for-2.12 16/16] s390x/tcg: drop potential_page_fault()

2017-11-30 Thread David Hildenbrand
Only one user left, get rid of it so we don't get any new users. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/translate.c | 9 ++--- 1 file changed, 2

[Qemu-devel] [PATCH v3 for-2.12 13/16] s390x/tcg: use s390_program_interrupt() in SACF

2017-11-30 Thread David Hildenbrand
Convert this user, too. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/cc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH] target/s390x: nuke DPRINTF in helper.c

2017-11-30 Thread Cornelia Huck
On Thu, 30 Nov 2017 15:05:36 +0100 Cornelia Huck wrote: > It is not used anywhere. > > Signed-off-by: Cornelia Huck > --- > target/s390x/helper.c | 18 -- > 1 file changed, 18 deletions(-) > > diff --git a/target/s390x/helper.c

[Qemu-devel] [PATCH v3 for-2.12 10/16] s390x/tcg: use s390_program_interrupt() in SCLP Service Call

2017-11-30 Thread David Hildenbrand
Now we can drop potential_page_fault(). While at it, move the unlock further up, looks cleaner. Signed-off-by: David Hildenbrand --- target/s390x/misc_helper.c | 5 ++--- target/s390x/translate.c | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH v3 for-2.12 14/16] s390x/tcg: use s390_program_interrupt() in STSI

2017-11-30 Thread David Hildenbrand
STSI needs some more love, but let's do one step at a time. We can now drop potential_page_fault(). Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/misc_helper.c | 2 +-

[Qemu-devel] [PATCH v3 for-2.12 08/16] s390x/tcg: don't exit the cpu loop in s390_cpu_virt_mem_rw()

2017-11-30 Thread David Hildenbrand
s390_cpu_virt_mem_rw() must always return, so callers can react on an exception (e.g. see ioinst_handle_stcrw()). Therefore, using program_interrupt() is wrong. Fix that up. Signed-off-by: David Hildenbrand --- target/s390x/mmu_helper.c | 9 ++--- 1 file changed, 6

[Qemu-devel] [PATCH v3 for-2.12 15/16] s390x/tcg: drop program_interrupt()

2017-11-30 Thread David Hildenbrand
All users are gone, we can finally drop it and make sure that all new program interrupt injections are reminded of the retaddr - as they have to use s390_program_interrupt() now. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth

[Qemu-devel] [PATCH v3 for-2.12 12/16] s390x/tcg: use s390_program_interrupt() in per_check_exception()

2017-11-30 Thread David Hildenbrand
We can now drop updating the cc. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/misc_helper.c | 2 +- target/s390x/translate.c | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH v3 for-2.12 06/16] s390x/diag: pass the retaddr into handle_diag_308()

2017-11-30 Thread David Hildenbrand
Needed to later drop potential_page_fault() from the diag TCG translate function. Convert program_interrupt() to s390_program_interrupt() directly, making use of the passed address. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand

[Qemu-devel] [PATCH v3 for-2.12 11/16] s390x/tcg: use s390_program_interrupt() in DIAG

2017-11-30 Thread David Hildenbrand
Now we can drop the two save statements in the translate function. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/misc_helper.c | 2 +- target/s390x/translate.c | 3 --- 2 files changed, 1 insertion(+), 4

[Qemu-devel] [PATCH v3 for-2.12 04/16] s390x/ioinst: pass the retaddr to all IO instructions

2017-11-30 Thread David Hildenbrand
TCG needs the retaddr when injecting an interrupt. Let's just pass it along and use RA_IGNORED for KVM. The value will be completely ignored for KVM. Convert program_interrupt() to s390_program_interrupt() directly, making use of the passed address. Reviewed-by: Richard Henderson

[Qemu-devel] [PATCH v3 for-2.12 07/16] s390x: handle exceptions during s390_cpu_virt_mem_rw() correctly (TCG)

2017-11-30 Thread David Hildenbrand
s390_cpu_virt_mem_rw() must always return, so callers can react on an exception (e.g. see ioinst_handle_stcrw()). However, for TCG we always have to exit the cpu loop (and restore the cpu state before that) if we injected a program interrupt. So let's introduce and use

[Qemu-devel] [PATCH v3 for-2.12 09/16] s390x/tcg: io instructions don't need potential_page_fault()

2017-11-30 Thread David Hildenbrand
As we handle the retaddr in all cases properly now, we can drop it. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/translate.c | 10 -- 1 file changed, 10

[Qemu-devel] [PATCH v3 for-2.12 03/16] s390x/tcg: rip out dead tpi code

2017-11-30 Thread David Hildenbrand
It is broken and not even wired up. We'll add a new handler soon, but that will live somewhere else. Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- hw/s390x/css.c | 6

[Qemu-devel] [PATCH v3 for-2.12 02/16] s390x/tcg: get rid of runtime_exception()

2017-11-30 Thread David Hildenbrand
Let's use s390_program_interrupt() instead. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- target/s390x/fpu_helper.c | 2 +- target/s390x/int_helper.c | 14 +++---

[Qemu-devel] [PATCH v3 for-2.12 05/16] s390x/pci: pass the retaddr to all PCI instructions

2017-11-30 Thread David Hildenbrand
Once we wire up TCG, we will need the retaddr to correctly inject program interrupts. As we want to get rid of the function program_interrupt(), convert PCI code too. For KVM, we can simply use RA_IGNORED. Convert program_interrupt() to s390_program_interrupt() directly, making use of the passed

[Qemu-devel] [PATCH v3 for-2.12 00/16] s390x/tcg: cleanup and fix program interrupts

2017-11-30 Thread David Hildenbrand
I have quite some patches on my queue for 2.12. (booting Fedora 26/27 guests, floating interrupts, machine checks, missing instructions ...) So let's start slowly This series gets rid of program_interrupt() and potential_page_fault(). We now always properly restore the cpu state when

[Qemu-devel] [PATCH v3 for-2.12 01/16] s390x/tcg: introduce and use s390_program_interrupt()

2017-11-30 Thread David Hildenbrand
Allows to easily convert more callers of program_interrupt() and to easily introduce new exceptions without forgetting about the cpu state reset. Use s390_program_interrupt() in places where we already had the same pattern. We will later get rid of program_interrupt(). RA != 0 checks are already

Re: [Qemu-devel] [PATCH v18 07/10] virtio-balloon: VIRTIO_BALLOON_F_SG

2017-11-30 Thread Wang, Wei W
On Thursday, November 30, 2017 6:36 PM, Tetsuo Handa wrote: > Wei Wang wrote: > > +static inline int xb_set_page(struct virtio_balloon *vb, > > + struct page *page, > > + unsigned long *pfn_min, > > + unsigned long

Re: [Qemu-devel] [PATCH 15/25] spapr: notify the CPU when the XIVE interrupt priority is more privileged

2017-11-30 Thread Cédric Le Goater
On 11/30/2017 05:00 AM, David Gibson wrote: > On Thu, Nov 23, 2017 at 02:29:45PM +0100, Cédric Le Goater wrote: >> The Pending Interrupt Priority Register (PIPR) contains the priority >> of the most favored pending notification. It is calculated from the >> Interrupt Pending Buffer (IPB) which

Re: [Qemu-devel] [PATCH 1/3] net: Drop unusual use of do { } while (0);

2017-11-30 Thread Thomas Huth
On 30.11.2017 14:41, Eric Blake wrote: > For a couple of macros in pcnet.c, we have to provide a new scope > to avoid compiler warnings about declarations in the middle of a > switch statement that aren't in a sub-scope. But use of > 'do { ... } while (0);' merely to provide that new scope is

Re: [Qemu-devel] [PATCH 10/25] spapr: add MMIO handlers for the XIVE interrupt sources

2017-11-30 Thread Cédric Le Goater
On 11/30/2017 04:28 AM, David Gibson wrote: > On Wed, Nov 29, 2017 at 05:23:25PM +0100, Cédric Le Goater wrote: >> On 11/29/2017 02:56 PM, Cédric Le Goater wrote: >>> +switch (offset) { >>> +case 0: >>> +spapr_xive_source_eoi(xive, lisn); >> >> Hrm. I don't

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 3/5] s390-ccw: parse and set boot menu options

2017-11-30 Thread Cornelia Huck
On Thu, 30 Nov 2017 16:52:37 +0100 David Hildenbrand wrote: > On 29.11.2017 23:33, Collin L. Walling wrote: > > On 11/29/2017 05:28 PM, David Hildenbrand wrote: > >> On 27.11.2017 21:55, Collin L. Walling wrote: > >>> Set boot menu options for an s390 guest and store them

Re: [Qemu-devel] [PATCH RFC 0/9] block: Rewrite block drain begin/end

2017-11-30 Thread Paolo Bonzini
On 30/11/2017 16:10, Kevin Wolf wrote: >> Yes, I agree, but that (using CoMutex around graph change) requires >> everything, especially the defer_to_main_loop_bh, runs in a coroutine >> context, which is exactly what I mean by "introducing 'ubiquitous >> coroutines'", because currently we don't

Re: [Qemu-devel] RFC: Let NBD client request read-only mode

2017-11-30 Thread Eric Blake
On 11/30/2017 09:32 AM, Wouter Verhelst wrote: A client that wants to be read-only, but which does not see server support (in idea 1, the server did not advertise the bit; in idea 2, the server replies with NBD_REP_ERR_UNSUP), does not have to do anything special (it is always possible to do

Re: [Qemu-devel] [qemu-s390x] [PATCH v2 for-2.12 02/16] s390x/tcg: get rid of runtime_exception()

2017-11-30 Thread David Hildenbrand
On 30.11.2017 10:10, Thomas Huth wrote: > On 29.11.2017 21:26, David Hildenbrand wrote: >> Let's use s390_program_interrupt() instead. >> >> Reviewed-by: Richard Henderson >> Signed-off-by: David Hildenbrand >> --- >> target/s390x/fpu_helper.c |

Re: [Qemu-devel] [qemu-s390x] [PATCH v1 3/5] s390-ccw: parse and set boot menu options

2017-11-30 Thread David Hildenbrand
On 29.11.2017 23:33, Collin L. Walling wrote: > On 11/29/2017 05:28 PM, David Hildenbrand wrote: >> On 27.11.2017 21:55, Collin L. Walling wrote: >>> Set boot menu options for an s390 guest and store them in >>> the iplb. These options are set via the QEMU command line >>> option: >>> >>>

Re: [Qemu-devel] [PATCH] target/s390x: nuke DPRINTF in helper.c

2017-11-30 Thread Thomas Huth
On 30.11.2017 15:29, David Hildenbrand wrote: > On 30.11.2017 15:05, Cornelia Huck wrote: >> It is not used anywhere. Right, looks like I move the last user of this macro away during the --disable-tcg rework. Reviewed-by: Thomas Huth

Re: [Qemu-devel] [RFC 3/7] vhost: New memory update functions

2017-11-30 Thread Igor Mammedov
On Wed, 29 Nov 2017 18:50:22 + "Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > vhost_update_mem will replace the existing update mechanism. > They make use of the Flatview we have now to make the update simpler. > This

Re: [Qemu-devel] [PATCH 06/17] iotests: Drop format-specific in _filter_img_info

2017-11-30 Thread Eric Blake
On 11/22/2017 08:08 PM, Max Reitz wrote: _filter_img_info should remove format-specific information, too. We already have such a filter in _img_info, and it is very useful for query-block-named-block-nodes (etc.), too. However, in 198 we need that information (but we still want the rest of the

Re: [Qemu-devel] [PATCH 06/17] iotests: Drop format-specific in _filter_img_info

2017-11-30 Thread Eric Blake
On 11/29/2017 09:16 PM, Fam Zheng wrote: On Thu, 11/23 03:08, Max Reitz wrote: _filter_img_info should remove format-specific information, too. We already have such a filter in _img_info, and it is very useful for query-block-named-block-nodes (etc.), too. However, in 198 we need that

Re: [Qemu-devel] [RFC 0/7] Rework vhost memory region updates

2017-11-30 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Thu, 30 Nov 2017 15:18:55 + > "Dr. David Alan Gilbert" wrote: > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > On Thu, 30 Nov 2017 13:06:29 + > > > "Dr. David Alan Gilbert" wrote: > > >

Re: [Qemu-devel] [PATCH 10/25] spapr: add MMIO handlers for the XIVE interrupt sources

2017-11-30 Thread Cédric Le Goater
On 11/30/2017 04:26 AM, David Gibson wrote: > On Wed, Nov 29, 2017 at 02:56:39PM +0100, Cédric Le Goater wrote: >> +switch (offset) { >> +case 0: >> +spapr_xive_source_eoi(xive, lisn); > > Hrm. I don't love that you're dealing with clearing that LSI bit >

Re: [Qemu-devel] [PATCH 17/25] spapr: add a sPAPRXive object to the machine

2017-11-30 Thread Cédric Le Goater
>> +} else { >> +/* XIVE uses the full range of IRQ numbers. The CPU IPIs will >> + * use the range below XICS_IRQ_BASE, which is unused by XICS. */ >> +spapr->xive = spapr_xive_create(spapr, XICS_IRQ_BASE + >> XICS_IRQS_SPAPR, >> +

Re: [Qemu-devel] [PATCH 03/17] block/qcow: Add blkdebug events

2017-11-30 Thread Eric Blake
On 11/22/2017 08:08 PM, Max Reitz wrote: This is not necessarily complete, but it should include the most important places. Signed-off-by: Max Reitz --- block/qcow.c | 16 1 file changed, 16 insertions(+) Looks reasonable; it doesn't hurt anything, and

Re: [Qemu-devel] [PATCH v4 00/20] add byte-based block_status driver callbacks

2017-11-30 Thread Eric Blake
On 11/30/2017 07:04 AM, Vladimir Sementsov-Ogievskiy wrote: Most of conversions looks fine, but it is not simple to prove the correctness, because we start to use internal driver logic on offsets and lengths, not aligned to sectors. The block layer guarantees that it will not pass unaligned

Re: [Qemu-devel] [PATCH 2/3] mips: Tweak location of ';' in macros

2017-11-30 Thread Philippe Mathieu-Daudé
On 11/30/2017 10:41 AM, Eric Blake wrote: > It is more typical to provide the ';' by the caller of a macro > than to embed it in the macro itself; this is because syntax > highlight engines can get confused if a macro is called without > a semicolon before the closing '}'. > > Signed-off-by: Eric

Re: [Qemu-devel] RFC: Let NBD client request read-only mode

2017-11-30 Thread Wouter Verhelst
On Wed, Nov 29, 2017 at 08:57:20AM -0600, Eric Blake wrote: > Right now, only the server can choose whether an export is read-only. A > client can always treat an export as read-only by not sending any writes, > but a server has no guarantee that a client will behave that way, and must > assume

Re: [Qemu-devel] [RFC 0/7] Rework vhost memory region updates

2017-11-30 Thread Igor Mammedov
On Thu, 30 Nov 2017 15:18:55 + "Dr. David Alan Gilbert" wrote: > * Igor Mammedov (imamm...@redhat.com) wrote: > > On Thu, 30 Nov 2017 13:06:29 + > > "Dr. David Alan Gilbert" wrote: > > > > > * Igor Mammedov (imamm...@redhat.com) wrote: > >

Re: [Qemu-devel] [RFC 0/7] Rework vhost memory region updates

2017-11-30 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Thu, 30 Nov 2017 13:06:29 + > "Dr. David Alan Gilbert" wrote: > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > On Thu, 30 Nov 2017 12:47:20 + > > > "Dr. David Alan Gilbert" wrote: > > >

Re: [Qemu-devel] [PATCH 17/25] spapr: add a sPAPRXive object to the machine

2017-11-30 Thread Cédric Le Goater
On 11/30/2017 05:55 AM, David Gibson wrote: > On Thu, Nov 23, 2017 at 02:29:47PM +0100, Cédric Le Goater wrote: >> The XIVE object is designed to be always available, so it is created >> unconditionally on newer machines. > > There doesn't actually seem to be anything dependent on machine >

Re: [Qemu-devel] [PATCH RFC 0/9] block: Rewrite block drain begin/end

2017-11-30 Thread Kevin Wolf
Am 30.11.2017 um 15:34 hat Fam Zheng geschrieben: > On Thu, 11/30 11:31, Kevin Wolf wrote: > > What you really mean is probably connected components in the graph, but > > do we really want to manage merging and splitting object representing > > connected components when a node is added or removed

Re: [Qemu-devel] [RFC 0/7] Rework vhost memory region updates

2017-11-30 Thread Igor Mammedov
On Thu, 30 Nov 2017 13:06:29 + "Dr. David Alan Gilbert" wrote: > * Igor Mammedov (imamm...@redhat.com) wrote: > > On Thu, 30 Nov 2017 12:47:20 + > > "Dr. David Alan Gilbert" wrote: > > > > > * Igor Mammedov (imamm...@redhat.com) wrote: > >

Re: [Qemu-devel] [PATCH 3/3] maint: Fix macros with broken 'do/while(0); ' usage

2017-11-30 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > The point of writing a macro embedded in a 'do { ... } while (0)' > loop is so that the macro can be used as a drop-in statement with > the caller supplying the trailing ';'. Although our coding style > frowns on brace-less 'if': > if (cond) >

Re: [Qemu-devel] [PATCH 3/3] maint: Fix macros with broken 'do/while(0); ' usage

2017-11-30 Thread Eric Blake
On 11/30/2017 08:43 AM, Michael S. Tsirkin wrote: On Thu, Nov 30, 2017 at 07:41:59AM -0600, Eric Blake wrote: The point of writing a macro embedded in a 'do { ... } while (0)' loop is so that the macro can be used as a drop-in statement with the caller supplying the trailing ';'. Although our

Re: [Qemu-devel] [PATCH v4 0/2] check VirtiQueue Vring objects

2017-11-30 Thread Stefan Hajnoczi
On Wed, Nov 29, 2017 at 11:14:26PM +0530, P J P wrote: > From: Prasad J Pandit Michael is the virtio maintainer. I have added him to this email thread so the patch series can be merged. > > Hello, > > A guest could attempt to use an uninitialised VirtQueue object > or

Re: [Qemu-devel] [PATCH for-2.11 1/1] blockjob: Make block_job_pause_all() keep a reference to the jobs

2017-11-30 Thread Jeff Cody
On Thu, Nov 30, 2017 at 03:43:35PM +0100, Kevin Wolf wrote: > Am 30.11.2017 um 15:35 hat Alberto Garcia geschrieben: > > On Thu 30 Nov 2017 01:27:32 PM CET, Kevin Wolf wrote: > > > > >> Destroying a paused block job during bdrv_reopen_multiple() has two > > >> consequences: > > >> > > >>1)

Re: [Qemu-devel] [PATCH v4 0/2] check VirtiQueue Vring objects

2017-11-30 Thread Stefan Hajnoczi
On Wed, Nov 29, 2017 at 11:14:26PM +0530, P J P wrote: > From: Prasad J Pandit > > Hello, > > A guest could attempt to use an uninitialised VirtQueue object > or set Vring object with undue values, raising an unexpected > exception in Qemu. This patch set fixes this

Re: [Qemu-devel] [PATCH for-2.11 1/1] blockjob: Make block_job_pause_all() keep a reference to the jobs

2017-11-30 Thread Kevin Wolf
Am 30.11.2017 um 15:35 hat Alberto Garcia geschrieben: > On Thu 30 Nov 2017 01:27:32 PM CET, Kevin Wolf wrote: > > >> Destroying a paused block job during bdrv_reopen_multiple() has two > >> consequences: > >> > >>1) The references to the nodes involved in the job are released, > >>

Re: [Qemu-devel] [PATCH 3/3] maint: Fix macros with broken 'do/while(0); ' usage

2017-11-30 Thread Michael S. Tsirkin
On Thu, Nov 30, 2017 at 07:41:59AM -0600, Eric Blake wrote: > The point of writing a macro embedded in a 'do { ... } while (0)' > loop is so that the macro can be used as a drop-in statement with > the caller supplying the trailing ';'. Although our coding style > frowns on brace-less 'if': >

Re: [Qemu-devel] [PATCH v18 05/10] xbitmap: add more operations

2017-11-30 Thread Matthew Wilcox
On Thu, Nov 30, 2017 at 10:35:03PM +0900, Tetsuo Handa wrote: > According to xb_set_bit(), it seems to me that we are trying to avoid memory > allocation > for "struct ida_bitmap" when all set bits within a 1024-bits bitmap reside in > the first > 61 bits. > > But does such saving help? Is

Re: [Qemu-devel] [PATCH RFC 0/9] block: Rewrite block drain begin/end

2017-11-30 Thread Fam Zheng
On Thu, 11/30 11:31, Kevin Wolf wrote: > What you really mean is probably connected components in the graph, but > do we really want to manage merging and splitting object representing > connected components when a node is added or removed from the graph? > Especially when that graph change occurs

Re: [Qemu-devel] [PATCH for-2.11 1/1] blockjob: Make block_job_pause_all() keep a reference to the jobs

2017-11-30 Thread Alberto Garcia
On Thu 30 Nov 2017 01:27:32 PM CET, Kevin Wolf wrote: >> Destroying a paused block job during bdrv_reopen_multiple() has two >> consequences: >> >>1) The references to the nodes involved in the job are released, >> possibly destroying some of them. If those nodes were in the >>

Re: [Qemu-devel] export root node for write through NBD

2017-11-30 Thread Kevin Wolf
Am 30.11.2017 um 15:21 hat Max Reitz geschrieben: > On 2017-11-30 08:47, Vladimir Sementsov-Ogievskiy wrote: > > Hi all. > > > > We need the following option: start vm in stopped mode (-S) and write > > it's disk before start through NBD. > > It should be absolutely safe, but unfortunately it is

Re: [Qemu-devel] [PATCH] target/s390x: nuke DPRINTF in helper.c

2017-11-30 Thread David Hildenbrand
On 30.11.2017 15:05, Cornelia Huck wrote: > It is not used anywhere. > > Signed-off-by: Cornelia Huck > --- > target/s390x/helper.c | 18 -- > 1 file changed, 18 deletions(-) > > diff --git a/target/s390x/helper.c b/target/s390x/helper.c > index

Re: [Qemu-devel] [PATCH] target/s390x: nuke DPRINTF in helper.c

2017-11-30 Thread Eric Blake
On 11/30/2017 08:05 AM, Cornelia Huck wrote: It is not used anywhere. Signed-off-by: Cornelia Huck --- target/s390x/helper.c | 18 -- 1 file changed, 18 deletions(-) Yay! One less spot for bit-rotten debug. Reviewed-by: Eric Blake

Re: [Qemu-devel] export root node for write through NBD

2017-11-30 Thread Max Reitz
On 2017-11-30 08:47, Vladimir Sementsov-Ogievskiy wrote: > Hi all. > > We need the following option: start vm in stopped mode (-S) and write > it's disk before start through NBD. > It should be absolutely safe, but unfortunately it is disallowed by root > role of the disk. > Is there any

Re: [Qemu-devel] Block layer complexity: what to do to keep it under control?

2017-11-30 Thread Stefan Hajnoczi
On Thu, Nov 30, 2017 at 05:47:09PM +0800, Fam Zheng wrote: > On Wed, 11/29 12:00, Stefan Hajnoczi wrote: > > On Wed, Nov 29, 2017 at 11:55:02AM +0800, Fam Zheng wrote: > > > > Event loops and coroutines are good but they should not be used directly > > by block drivers and block jobs. We need

Re: [Qemu-devel] [PATCH 14/25] spapr: push the XIVE EQ data in OS event queue

2017-11-30 Thread Cédric Le Goater
On 11/30/2017 04:49 AM, David Gibson wrote: > On Thu, Nov 23, 2017 at 02:29:44PM +0100, Cédric Le Goater wrote: >> If a triggered event is let through, the Event Queue data defined in the >> associated IVE is pushed in the in-memory event queue. The latter is a >> circular buffer provided by the

Re: [Qemu-devel] [PATCH 13/25] spapr: introduce the XIVE Event Queues

2017-11-30 Thread Cédric Le Goater
On 11/30/2017 04:38 AM, David Gibson wrote: > On Thu, Nov 23, 2017 at 02:29:43PM +0100, Cédric Le Goater wrote: >> The Event Queue Descriptor (EQD) table, also known as Event Notification >> Descriptor (END), is one of the internal tables the XIVE interrupt >> controller uses to redirect exception

[Qemu-devel] [PATCH] target/s390x: nuke DPRINTF in helper.c

2017-11-30 Thread Cornelia Huck
It is not used anywhere. Signed-off-by: Cornelia Huck --- target/s390x/helper.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 246ba20f0d..35d9741918 100644 --- a/target/s390x/helper.c +++

[Qemu-devel] [PATCH 4/3] checkpatch: Enforce proper do/while (0) style

2017-11-30 Thread Eric Blake
while (0) is only idiomatic in a macro definition, where the caller will be supplying the trailing ';'. Warn if the macro has a duplicate. Signed-off-by: Eric Blake --- scripts/checkpatch.pl | 5 + 1 file changed, 5 insertions(+) diff --git a/scripts/checkpatch.pl

Re: [Qemu-devel] [PATCH 3/3] maint: Fix macros with broken 'do/while(0); ' usage

2017-11-30 Thread Cornelia Huck
On Thu, 30 Nov 2017 07:41:59 -0600 Eric Blake wrote: > The point of writing a macro embedded in a 'do { ... } while (0)' > loop is so that the macro can be used as a drop-in statement with > the caller supplying the trailing ';'. Although our coding style > frowns on

Re: [Qemu-devel] [PATCH] qga-win: VSS: Handle VSS_E_PROVIDER_ALREADY_REGISTERED error

2017-11-30 Thread Sameeh Jubran
On Wed, Nov 29, 2017 at 1:17 AM, Michael Roth wrote: > Quoting Sameeh Jubran (2017-11-22 05:30:14) > > From: Sameeh Jubran > > > > We can get VSS_E_PROVIDER_ALREADY_REGISTERED error if for some > > reason the uninstall of qemu-ga didn't complete

Re: [Qemu-devel] [PATCH 12/25] spapr: introduce a XIVE interrupt presenter model

2017-11-30 Thread Cédric Le Goater
On 11/30/2017 04:06 AM, David Gibson wrote: > On Wed, Nov 29, 2017 at 10:55:34AM +0100, Cédric Le Goater wrote: >> On 11/29/2017 06:11 AM, David Gibson wrote: >>> On Thu, Nov 23, 2017 at 02:29:42PM +0100, Cédric Le Goater wrote: The XIVE interrupt presenter exposes a set of rings, also called

Re: [Qemu-devel] [PATCH v18 05/10] xbitmap: add more operations

2017-11-30 Thread Tetsuo Handa
Tetsuo Handa wrote: > > + > > + if (ebit >= BITS_PER_LONG) > > + continue; > > (I don't understand how radix tree works, but generally this patchset looks > fuzzy > to me about boundary cases. Thus, I want to confirm that this is not an > overlook.) >

[Qemu-devel] [PATCH 1/3] net: Drop unusual use of do { } while (0);

2017-11-30 Thread Eric Blake
For a couple of macros in pcnet.c, we have to provide a new scope to avoid compiler warnings about declarations in the middle of a switch statement that aren't in a sub-scope. But use of 'do { ... } while (0);' merely to provide that new scope is arcane overkill, compared to just using '{ ... }'.

[Qemu-devel] [PATCH 3/3] maint: Fix macros with broken 'do/while(0); ' usage

2017-11-30 Thread Eric Blake
The point of writing a macro embedded in a 'do { ... } while (0)' loop is so that the macro can be used as a drop-in statement with the caller supplying the trailing ';'. Although our coding style frowns on brace-less 'if': if (cond) statement; else something else; the use of do/while

[Qemu-devel] [PATCH 2/3] mips: Tweak location of ';' in macros

2017-11-30 Thread Eric Blake
It is more typical to provide the ';' by the caller of a macro than to embed it in the macro itself; this is because syntax highlight engines can get confused if a macro is called without a semicolon before the closing '}'. Signed-off-by: Eric Blake ---

[Qemu-devel] [PATCH 0/3] macro do/while (0) cleanup

2017-11-30 Thread Eric Blake
Noticed this by chance in the tests/ directory, so I broadened it to a grep of the entire code base. I suspect many of the bad macros were the victims of copy-and-paste from some other bad location (particularly given how many bit-rotten debug print macros were involved).

Re: [Qemu-devel] [RFC PATCH v2 1/1] s390x/css: unrestrict cssids

2017-11-30 Thread Cornelia Huck
On Thu, 30 Nov 2017 13:32:12 +0100 Halil Pasic wrote: (...) Before I spend way too much time on this: Is the proposed machine-property interface usable from a libvirt POV? IOW, can we go with this now and fix the ugliness later (probably via a generic overhaul of the

Re: [Qemu-devel] [PATCH 08/17] iotests: Skip 103 for refcount_bits=1

2017-11-30 Thread Max Reitz
On 2017-11-30 04:18, Fam Zheng wrote: > On Thu, 11/23 03:08, Max Reitz wrote: >> Signed-off-by: Max Reitz >> --- >> tests/qemu-iotests/103 | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/tests/qemu-iotests/103 b/tests/qemu-iotests/103 >> index

Re: [Qemu-devel] [PATCH 06/17] iotests: Drop format-specific in _filter_img_info

2017-11-30 Thread Max Reitz
On 2017-11-30 04:16, Fam Zheng wrote: > On Thu, 11/23 03:08, Max Reitz wrote: >> _filter_img_info should remove format-specific information, too. We >> already have such a filter in _img_info, and it is very useful for >> query-block-named-block-nodes (etc.), too. >> >> However, in 198 we need

Re: [Qemu-devel] [RFC 0/7] Rework vhost memory region updates

2017-11-30 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Thu, 30 Nov 2017 12:47:20 + > "Dr. David Alan Gilbert" wrote: > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > On Thu, 30 Nov 2017 12:08:06 + > > > "Dr. David Alan Gilbert" wrote: > > >

Re: [Qemu-devel] [PATCH v4 00/20] add byte-based block_status driver callbacks

2017-11-30 Thread Vladimir Sementsov-Ogievskiy
Most of conversions looks fine, but it is not simple to prove the correctness, because we start to use internal driver logic on offsets and lengths, not aligned to sectors. And we can't imagine the consequences (at least, I can't and my r-b doesn't give the guarantee) of such change. It is like

Re: [Qemu-devel] [PATCH for-2.12 3/7] tests/boot-serial-test: Add support for the mcf5208evb board

2017-11-30 Thread Paolo Bonzini
On 30/11/2017 13:51, Thomas Huth wrote: > The two micrablaze data arrays are completely different, since one is > big endian, the other is little, so I'd need to byte-swap the whole > array on the fly, too. Not sure whether it makes sense to add such > complex code just to safe 16 bytes of blob

Re: [Qemu-devel] [PATCH for-2.12 3/7] tests/boot-serial-test: Add support for the mcf5208evb board

2017-11-30 Thread Paolo Bonzini
On 30/11/2017 13:51, Peter Maydell wrote: > On 30 November 2017 at 12:40, Paolo Bonzini wrote: >> On 30/11/2017 13:14, Peter Maydell wrote: >>> On 30 November 2017 at 08:53, Thomas Huth wrote: +static const uint8_t kernel_mcf5208[] = { +0x41,

[Qemu-devel] [PATCH v4 5/7] s390x/pci: move the memory region read from pcilg

2017-11-30 Thread Pierre Morel
Let's move the memory region read from pcilg into a dedicated function. This allows us to prepare a later patch. Signed-off-by: Pierre Morel Reviewed-by: Yi Min Zhao Reviewed-by: Thomas Huth --- hw/s390x/s390-pci-inst.c |

[Qemu-devel] [PATCH v4 7/7] s390x/pci: search for subregion inside the BARs

2017-11-30 Thread Pierre Morel
When dispatching memory access to PCI BAR region, we must look for possible subregions, used by the PCI device to map different memory areas inside the same PCI BAR. Since the data offset we received is calculated starting at the region start address we need to adjust the offset for the

[Qemu-devel] [PATCH v4 2/7] s390x/pci: rework PCI STORE

2017-11-30 Thread Pierre Morel
Enhance the fault detection, correction of the fault reporting. Signed-off-by: Pierre Morel Reviewed-by: Yi Min Zhao --- hw/s390x/s390-pci-inst.c | 42 +- hw/s390x/s390-pci-inst.h | 4 2 files

[Qemu-devel] [PATCH v4 4/7] s390x/pci: rework PCI STORE BLOCK

2017-11-30 Thread Pierre Morel
Enhance the fault detection. Fixup the precedence to check the destination path existance before checking for the source accessibility. Add the maxstbl entry to both the Query PCI Function Group response and the PCIBusDevice structure. Initialize the maxstbl to 128 per default until we get the

Re: [Qemu-devel] [RFC 0/7] Rework vhost memory region updates

2017-11-30 Thread Igor Mammedov
On Thu, 30 Nov 2017 12:47:20 + "Dr. David Alan Gilbert" wrote: > * Igor Mammedov (imamm...@redhat.com) wrote: > > On Thu, 30 Nov 2017 12:08:06 + > > "Dr. David Alan Gilbert" wrote: > > > > > * Igor Mammedov (imamm...@redhat.com) wrote: > >

[Qemu-devel] [PATCH v4 6/7] s390x/pci: move the memory region write from pcistg

2017-11-30 Thread Pierre Morel
Let's move the memory region write from pcistg into a dedicated function. This allows us to prepare a later patch searching for subregions inside of the memory region. Signed-off-by: Pierre Morel Reviewed-by: Yi Min Zhao Reviewed-by: Thomas

[Qemu-devel] [PATCH v4 1/7] s390x/pci: factor out endianess conversion

2017-11-30 Thread Pierre Morel
There are two places where the same endianness conversion is done. Let's factor this out into a static function. Note that the conversion must always be done for data in a register: The S390 BE guest converted date to le before issuing the instruction. After interception in a BE host: ZPCI VFIO

[Qemu-devel] [PATCH v4 3/7] s390x/pci: rework PCI LOAD

2017-11-30 Thread Pierre Morel
Enhance the fault detection, correction of the fault reporting. Signed-off-by: Pierre Morel Reviewed-by: Yi Min Zhao --- hw/s390x/s390-pci-inst.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git

[Qemu-devel] [PATCH v4 0/7] s390x/pci: Improve zPCI to cover more cases

2017-11-30 Thread Pierre Morel
This patch fixes the following BUG: Even a guest is able to detect virtio_pci device, the init function the Linux virtio_pci driver will hang because zPCI does not support the subregions used by virtio_pci. It follows that right now the PCI support is very limited (e.g. pass through of a host

Re: [Qemu-devel] [PATCH for-2.12 3/7] tests/boot-serial-test: Add support for the mcf5208evb board

2017-11-30 Thread Peter Maydell
On 30 November 2017 at 12:40, Paolo Bonzini wrote: > On 30/11/2017 13:14, Peter Maydell wrote: >> On 30 November 2017 at 08:53, Thomas Huth wrote: >>> +static const uint8_t kernel_mcf5208[] = { >>> +0x41, 0xf9, 0xfc, 0x06, 0x00, 0x00, /* lea

Re: [Qemu-devel] [PATCH for-2.12 3/7] tests/boot-serial-test: Add support for the mcf5208evb board

2017-11-30 Thread Thomas Huth
On 30.11.2017 13:40, Paolo Bonzini wrote: > On 30/11/2017 13:14, Peter Maydell wrote: >> On 30 November 2017 at 08:53, Thomas Huth wrote: >>> +static const uint8_t kernel_mcf5208[] = { >>> +0x41, 0xf9, 0xfc, 0x06, 0x00, 0x00, /* lea 0xfc06,%a0 */ >>> +0x10, 0x3c,

Re: [Qemu-devel] [RFC 0/7] Rework vhost memory region updates

2017-11-30 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Thu, 30 Nov 2017 12:08:06 + > "Dr. David Alan Gilbert" wrote: > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > On Wed, 29 Nov 2017 18:50:19 + > > > "Dr. David Alan Gilbert (git)" wrote: >

Re: [Qemu-devel] [Bug 1735384] Re: OpenJDK JVM segfaults on qemu-sh4 (regression)

2017-11-30 Thread John Paul Adrian Glaubitz
On 11/30/2017 01:19 PM, Peter Maydell wrote: > This sounds like it may be the bug fixed by this patchset: > https://lists.gnu.org/archive/html/qemu-devel/2017-11/msg05067.html Unfortunately not. I will upload a prepared chroot for testing later and link it in this bug report. Adrian -- .''`.

Re: [Qemu-devel] [PATCH for-2.12 3/7] tests/boot-serial-test: Add support for the mcf5208evb board

2017-11-30 Thread Paolo Bonzini
On 30/11/2017 13:14, Peter Maydell wrote: > On 30 November 2017 at 08:53, Thomas Huth wrote: >> +static const uint8_t kernel_mcf5208[] = { >> +0x41, 0xf9, 0xfc, 0x06, 0x00, 0x00, /* lea 0xfc06,%a0 */ >> +0x10, 0x3c, 0x00, 0x54, /* move.b #'T',%d0

Re: [Qemu-devel] [RFC 0/7] Rework vhost memory region updates

2017-11-30 Thread Igor Mammedov
On Thu, 30 Nov 2017 12:08:06 + "Dr. David Alan Gilbert" wrote: > * Igor Mammedov (imamm...@redhat.com) wrote: > > On Wed, 29 Nov 2017 18:50:19 + > > "Dr. David Alan Gilbert (git)" wrote: > > > > > From: "Dr. David Alan Gilbert"

Re: [Qemu-devel] [PATCH for-2.12 3/7] tests/boot-serial-test: Add support for the mcf5208evb board

2017-11-30 Thread Thomas Huth
On 30.11.2017 13:14, Peter Maydell wrote: > On 30 November 2017 at 08:53, Thomas Huth wrote: >> We can output a character quite easily here with some few lines of >> assembly that we provide as a mini-kernel for this board. >> >> Signed-off-by: Thomas Huth >>

  1   2   >