Re: [PATCH v3 01/34] xics: Minor fixes for XICSFabric interface

2019-10-01 Thread Greg Kurz
On Wed, 2 Oct 2019 15:55:51 +1000 David Gibson wrote: > On Wed, Oct 02, 2019 at 07:51:45AM +0200, Cédric Le Goater wrote: > > On 02/10/2019 04:51, David Gibson wrote: > > > Interface instances should never be directly dereferenced. So, the common > > > practice is to make them incomplete types t

Re: [PATCH v3 22/34] spapr, xics, xive: Move cpu_intc_create from SpaprIrq to SpaprInterruptController

2019-10-01 Thread David Gibson
On Wed, Oct 02, 2019 at 08:13:55AM +0200, Cédric Le Goater wrote: > >> @@ -527,6 +471,30 @@ static int spapr_irq_check(SpaprMachineState *spapr, > >> Error **errp) > >> /* > >> * sPAPR IRQ frontend routines for devices > >> */ > >> +#define ALL_INTCS(spapr_) \ > >> +{ SPAPR_INTC((spapr_)-

Re: [PATCH v3 23/34] spapr, xics, xive: Move irq claim and free from SpaprIrq to SpaprInterruptController

2019-10-01 Thread David Gibson
On Wed, Oct 02, 2019 at 08:10:33AM +0200, Cédric Le Goater wrote: > On 02/10/2019 04:51, David Gibson wrote: > > These methods, like cpu_intc_create, really belong to the interrupt > > controller, but need to be called on all possible intcs. > > > > Like cpu_intc_create, therefore, make them metho

Re: [PATCH v2 1/2] qapi: Add feature flags to commands in qapi introspection

2019-10-01 Thread Markus Armbruster
Markus Armbruster writes: > Peter Krempa writes: > >> Similarly to features for struct types introduce the feature flags also >> for commands. This will allow notifying management layers of fixes and >> compatible changes in the behaviour of a command which may not be >> detectable any other way

Re: [PATCH v3 22/34] spapr, xics, xive: Move cpu_intc_create from SpaprIrq to SpaprInterruptController

2019-10-01 Thread Cédric Le Goater
>> @@ -527,6 +471,30 @@ static int spapr_irq_check(SpaprMachineState *spapr, >> Error **errp) >> /* >> * sPAPR IRQ frontend routines for devices >> */ >> +#define ALL_INTCS(spapr_) \ >> +{ SPAPR_INTC((spapr_)->ics), SPAPR_INTC((spapr_)->xive), } > > I would have expected this array to be

Re: [PATCH v3 23/34] spapr, xics, xive: Move irq claim and free from SpaprIrq to SpaprInterruptController

2019-10-01 Thread Cédric Le Goater
On 02/10/2019 04:51, David Gibson wrote: > These methods, like cpu_intc_create, really belong to the interrupt > controller, but need to be called on all possible intcs. > > Like cpu_intc_create, therefore, make them methods on the intc and > always call it for all existing intcs. > > Signed-off-

Re: [PATCH v3 22/34] spapr, xics, xive: Move cpu_intc_create from SpaprIrq to SpaprInterruptController

2019-10-01 Thread David Gibson
On Wed, Oct 02, 2019 at 08:06:59AM +0200, Cédric Le Goater wrote: > On 02/10/2019 04:51, David Gibson wrote: > > This method essentially represents code which belongs to the interrupt > > controller, but needs to be called on all possible intcs, rather than > > just the currently active one. The "

Re: [PATCH v3 19/34] spapr: Add return value to spapr_irq_check()

2019-10-01 Thread Greg Kurz
On Wed, 2 Oct 2019 12:51:53 +1000 David Gibson wrote: > Explicitly return success or failure, rather than just relying on the > Error ** parameter. This makes handling it less verbose in the caller. > > Signed-off-by: David Gibson > --- Reviewed-by: Greg Kurz > hw/ppc/spapr_irq.c | 15 +++

Re: [PATCH v3 22/34] spapr, xics, xive: Move cpu_intc_create from SpaprIrq to SpaprInterruptController

2019-10-01 Thread Cédric Le Goater
On 02/10/2019 04:51, David Gibson wrote: > This method essentially represents code which belongs to the interrupt > controller, but needs to be called on all possible intcs, rather than > just the currently active one. The "dual" version therefore calls > into the xics and xive versions confusingl

Re: [PATCH v3 09/34] spapr: Clarify and fix handling of nr_irqs

2019-10-01 Thread Cédric Le Goater
On 02/10/2019 04:51, David Gibson wrote: > Both the XICS and XIVE interrupt backends have a "nr-irqs" property, but > it means slightly different things. For XICS (or, strictly, the ICS) it > indicates the number of "real" external IRQs. Those start at XICS_IRQ_BASE > (0x1000) and don't include t

Re: [PATCH v3 19/34] spapr: Add return value to spapr_irq_check()

2019-10-01 Thread Cédric Le Goater
On 02/10/2019 04:51, David Gibson wrote: > Explicitly return success or failure, rather than just relying on the > Error ** parameter. This makes handling it less verbose in the caller. > > Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater > --- > hw/ppc/spapr_irq.c | 15 +++-

Re: [PATCH v3 15/34] spapr: Handle freeing of multiple irqs in frontend only

2019-10-01 Thread Cédric Le Goater
On 02/10/2019 04:51, David Gibson wrote: > spapr_irq_free() can be used to free multiple irqs at once. That's useful > for its callers, but there's no need to make the individual backend hooks > handle this. We can loop across the irqs in spapr_irq_free() itself and > have the hooks just do one at

Re: [PATCH v3 01/34] xics: Minor fixes for XICSFabric interface

2019-10-01 Thread David Gibson
On Wed, Oct 02, 2019 at 07:51:45AM +0200, Cédric Le Goater wrote: > On 02/10/2019 04:51, David Gibson wrote: > > Interface instances should never be directly dereferenced. So, the common > > practice is to make them incomplete types to make sure no-one does that. > > XICSFrabric, however, had a du

Re: [PATCH v3 01/34] xics: Minor fixes for XICSFabric interface

2019-10-01 Thread Cédric Le Goater
On 02/10/2019 07:51, Cédric Le Goater wrote: > On 02/10/2019 04:51, David Gibson wrote: >> Interface instances should never be directly dereferenced. So, the common >> practice is to make them incomplete types to make sure no-one does that. >> XICSFrabric, however, had a dummy type which is less s

Re: [PULL 0/8] Ide patches

2019-10-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191001235552.17790-1-js...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20191001235552.17790-1-js...@redhat.com Subject: [PULL 0/8] Ide patches === TEST SCRIPT BEGI

Re: [PATCH v3 01/34] xics: Minor fixes for XICSFabric interface

2019-10-01 Thread Cédric Le Goater
On 02/10/2019 04:51, David Gibson wrote: > Interface instances should never be directly dereferenced. So, the common > practice is to make them incomplete types to make sure no-one does that. > XICSFrabric, however, had a dummy type which is less safe. > > We were also using OBJECT_CHECK() where

Re: [PATCH v3 15/34] spapr: Handle freeing of multiple irqs in frontend only

2019-10-01 Thread Greg Kurz
On Wed, 2 Oct 2019 12:51:49 +1000 David Gibson wrote: > spapr_irq_free() can be used to free multiple irqs at once. That's useful > for its callers, but there's no need to make the individual backend hooks > handle this. We can loop across the irqs in spapr_irq_free() itself and > have the hook

Re: [PATCH v5 1/5] iotests: remove 'linux' from default supported platforms

2019-10-01 Thread Thomas Huth
On 01/10/2019 20.44, Max Reitz wrote: [...] > As I have said, the conceptual problem is that the iotests now run as > part of make check. As such, allowing auto tests to run on non-Linux > platforms may introduce build failures that I cannot do anything about. Well, simply run "make vm-build-open

Re: [PATCH 00/97] Patch Round-up for stable 4.0.1, freeze on 2019-10-10

2019-10-01 Thread Thomas Huth
On 02/10/2019 01.44, Michael Roth wrote: > Hi everyone, > > > The following new patches are queued for QEMU stable v4.0.1: > > https://github.com/mdroth/qemu/commits/stable-4.0-staging > > The releas

[PATCH v3 30/34] spapr, xics, xive: Move SpaprIrq::reset hook logic into activate/deactivate

2019-10-01 Thread David Gibson
It turns out that all the logic in the SpaprIrq::reset hooks (and some in the SpaprIrq::post_load hooks) isn't really related to resetting the irq backend (that's handled by the backends' own reset routines). Rather its about getting the backend ready to be the active interrupt controller or stopp

[PATCH v3 29/34] spapr: Remove SpaprIrq::init_kvm hook

2019-10-01 Thread David Gibson
This hook is a bit odd. The only caller is spapr_irq_init_kvm(), but it explicitly takes an SpaprIrq *, so it's never really called through the current SpaprIrq. Essentially this is just a way of passing through a function pointer so that spapr_irq_init_kvm() can handle some configuration and err

[PATCH v3 28/34] spapr, xics, xive: Match signatures for XICS and XIVE KVM connect routines

2019-10-01 Thread David Gibson
Both XICS and XIVE have routines to connect and disconnect KVM with similar but not identical signatures. This adjusts them to match exactly, which will be useful for further cleanups later. While we're there, we add an explicit return value to the connect path to streamline error reporting in th

[PATCH v3 27/34] spapr, xics, xive: Move dt_populate from SpaprIrq to SpaprInterruptController

2019-10-01 Thread David Gibson
This method depends only on the active irq controller. Now that we've formalized the notion of active controller we can dispatch directly through that, rather than dispatching via SpaprIrq with the dual version having to do a second conditional dispatch. Signed-off-by: David Gibson Reviewed-by:

Re: [PATCH v4 00/31] error: auto propagated local_err

2019-10-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191001155319.8066-1-vsement...@virtuozzo.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20191001155319.8066-1-vsement...@virtuozzo.com Subject: [PATCH v4 00/31] error: auto

[PATCH v3 32/34] spapr: Remove SpaprIrq::nr_msis

2019-10-01 Thread David Gibson
The nr_msis value we use here has to line up with whether we're using legacy or modern irq allocation. Therefore it's safer to derive it based on legacy_irq_allocation rather than having SpaprIrq contain a canned value. Signed-off-by: David Gibson Reviewed-by: Greg Kurz --- hw/ppc/spapr.c

[PATCH v3 22/34] spapr, xics, xive: Move cpu_intc_create from SpaprIrq to SpaprInterruptController

2019-10-01 Thread David Gibson
This method essentially represents code which belongs to the interrupt controller, but needs to be called on all possible intcs, rather than just the currently active one. The "dual" version therefore calls into the xics and xive versions confusingly. Handle this more directly, by making it inste

[PATCH v3 26/34] spapr, xics, xive: Move print_info from SpaprIrq to SpaprInterruptController

2019-10-01 Thread David Gibson
This method depends only on the active irq controller. Now that we've formalized the notion of active controller we can dispatch directly through that, rather than dispatching via SpaprIrq with the dual version having to do a second conditional dispatch. Signed-off-by: David Gibson Reviewed-by:

[PATCH v3 18/34] spapr: Use less cryptic representation of which irq backends are supported

2019-10-01 Thread David Gibson
SpaprIrq::ov5 stores the value for a particular byte in PAPR option vector 5 which indicates whether XICS, XIVE or both interrupt controllers are available. As usual for PAPR, the encoding is kind of overly complicated and confusing (though to be fair there are some backwards compat things it has

[PATCH v3 25/34] spapr, xics, xive: Move set_irq from SpaprIrq to SpaprInterruptController

2019-10-01 Thread David Gibson
This method depends only on the active irq controller. Now that we've formalized the notion of active controller we can dispatch directly through that, rather than dispatching via SpaprIrq with the dual version having to do a second conditional dispatch. Signed-off-by: David Gibson Reviewed-by:

[PATCH v3 13/34] spapr: Eliminate SpaprIrq:get_nodename method

2019-10-01 Thread David Gibson
This method is used to determine the name of the irq backend's node in the device tree, so that we can find its phandle (after SLOF may have modified it from the phandle we initially gave it). But, in the two cases the only difference between the node name is the presence of a unit address. Searc

[PATCH v3 33/34] spapr: Move SpaprIrq::nr_xirqs to SpaprMachineClass

2019-10-01 Thread David Gibson
For the benefit of peripheral device allocation, the number of available irqs really wants to be the same on a given machine type version, regardless of what irq backends we are using. That's the case now, but only because we make sure the different SpaprIrq instances have the same value except fo

[PATCH v3 19/34] spapr: Add return value to spapr_irq_check()

2019-10-01 Thread David Gibson
Explicitly return success or failure, rather than just relying on the Error ** parameter. This makes handling it less verbose in the caller. Signed-off-by: David Gibson --- hw/ppc/spapr_irq.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/ppc/spapr_irq.c

[PATCH v3 23/34] spapr, xics, xive: Move irq claim and free from SpaprIrq to SpaprInterruptController

2019-10-01 Thread David Gibson
These methods, like cpu_intc_create, really belong to the interrupt controller, but need to be called on all possible intcs. Like cpu_intc_create, therefore, make them methods on the intc and always call it for all existing intcs. Signed-off-by: David Gibson --- hw/intc/spapr_xive.c| 7

[PATCH v3 09/34] spapr: Clarify and fix handling of nr_irqs

2019-10-01 Thread David Gibson
Both the XICS and XIVE interrupt backends have a "nr-irqs" property, but it means slightly different things. For XICS (or, strictly, the ICS) it indicates the number of "real" external IRQs. Those start at XICS_IRQ_BASE (0x1000) and don't include the special IPI vector. For XIVE, however, it inc

[PATCH v3 17/34] xive: Improve irq claim/free path

2019-10-01 Thread David Gibson
spapr_xive_irq_claim() returns a bool to indicate if it succeeded. But most of the callers and one callee use int return values and/or an Error * with more information instead. In any case, ints are a more common idiom for success/failure states than bools (one never knows what sense they'll be in

[PATCH v3 24/34] spapr: Formalize notion of active interrupt controller

2019-10-01 Thread David Gibson
spapr now has the mechanism of constructing both XICS and XIVE instances of the SpaprInterruptController interface. However, only one of the interrupt controllers will actually be active at any given time, depending on feature negotiation with the guest. This is handled in the current code via sp

[PATCH v3 10/34] spapr: Eliminate nr_irqs parameter to SpaprIrq::init

2019-10-01 Thread David Gibson
The only reason this parameter was needed was to work around the inconsistent meaning of nr_irqs between xics and xive. Now that we've fixed that, we can consistently use the number directly in the SpaprIrq configuration. Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater Reviewed-by: Gr

[PATCH v3 14/34] spapr: Remove unhelpful tracepoints from spapr_irq_free_xics()

2019-10-01 Thread David Gibson
These traces contain some useless information (the always-0 source#) and have no equivalents for XIVE mode. For now just remove them, and we can put back something more sensible if and when we need it. Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz Reviewed-by

[PATCH v3 21/34] spapr, xics, xive: Introduce SpaprInterruptController QOM interface

2019-10-01 Thread David Gibson
The SpaprIrq structure is used to represent ths spapr machine's irq backend. Except that it kind of conflates two concepts: one is the backend proper - a specific interrupt controller that we might or might not be using, the other is the irq configuration which covers the layout of irq space and w

[PATCH v3 34/34] spapr: Remove last pieces of SpaprIrq

2019-10-01 Thread David Gibson
The only thing remaining in this structure are the flags to allow either XICS or XIVE to be present. These actually make more sense as spapr capabilities - that way they can take advantage of the existing infrastructure to sanity check capability states across migration and so forth. Signed-off-b

[PATCH v3 31/34] spapr, xics, xive: Move SpaprIrq::post_load hook to backends

2019-10-01 Thread David Gibson
The remaining logic in the post_load hook really belongs to the interrupt controller backends, and just needs to be called on the active controller (after the active controller is set to the right thing based on the incoming migration in the generic spapr_irq_post_load() logic). Signed-off-by: Dav

[PATCH v3 15/34] spapr: Handle freeing of multiple irqs in frontend only

2019-10-01 Thread David Gibson
spapr_irq_free() can be used to free multiple irqs at once. That's useful for its callers, but there's no need to make the individual backend hooks handle this. We can loop across the irqs in spapr_irq_free() itself and have the hooks just do one at time. Signed-off-by: David Gibson --- hw/ppc/

[PATCH v3 16/34] spapr, xics, xive: Better use of assert()s on irq claim/free paths

2019-10-01 Thread David Gibson
The irq claim and free paths for both XICS and XIVE check for some validity conditions. Some of these represent genuine runtime failures, however others - particularly checking that the basic irq number is in a sane range - could only fail in the case of bugs in the callin code. Therefore use asse

[PATCH v3 08/34] spapr: Replace spapr_vio_qirq() helper with spapr_vio_irq_pulse() helper

2019-10-01 Thread David Gibson
Every caller of spapr_vio_qirq() immediately calls qemu_irq_pulse() with the result, so we might as well just fold that into the helper. Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daudé --- hw/char/spapr_vty.c| 3 +--

[PATCH v3 20/34] spapr: Eliminate SpaprIrq::init hook

2019-10-01 Thread David Gibson
This method is used to set up the interrupt backends for the current configuration. However, this means some confusing redirection between the "dual" mode init and the init hooks for xics only and xive only modes. Since we now have simple flags indicating whether XICS and/or XIVE are supported, i

[PATCH v3 01/34] xics: Minor fixes for XICSFabric interface

2019-10-01 Thread David Gibson
Interface instances should never be directly dereferenced. So, the common practice is to make them incomplete types to make sure no-one does that. XICSFrabric, however, had a dummy type which is less safe. We were also using OBJECT_CHECK() where we should have been using INTERFACE_CHECK(). Signe

[PATCH v3 11/34] spapr: Fix indexing of XICS irqs

2019-10-01 Thread David Gibson
spapr global irq numbers are different from the source numbers on the ICS when using XICS - they're offset by XICS_IRQ_BASE (0x1000). But spapr_irq_set_irq_xics() was passing through the global irq number to the ICS code unmodified. We only got away with this because of a counteracting bug - we w

[PATCH v3 12/34] spapr: Simplify spapr_qirq() handling

2019-10-01 Thread David Gibson
Currently spapr_qirq(), whic is used to find the qemu_irq for an spapr global irq number, redirects through the SpaprIrq::qirq method. But the array of qemu_irqs is allocated in the PAPR layer, not the backends, and so the method implementations all return the same thing, just differing in the pre

[PATCH v3 06/34] xics: Create sPAPR specific ICS subtype

2019-10-01 Thread David Gibson
We create a subtype of TYPE_ICS specifically for sPAPR. For now all this does is move the setup of the PAPR specific hcalls and RTAS calls to the realize() function for this, rather than requiring the PAPR code to explicitly call xics_spapr_init(). In future it will have some more function. Sign

[PATCH v3 03/34] xics: Rename misleading ics_simple_*() functions

2019-10-01 Thread David Gibson
There are a number of ics_simple_*() functions that aren't actually specific to TYPE_XICS_SIMPLE at all, and are equally valid on TYPE_XICS_BASE. Rename them to ics_*() accordingly. Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz --- hw/intc/trace-events | 6

[PATCH v3 05/34] xics: Merge TYPE_ICS_BASE and TYPE_ICS_SIMPLE classes

2019-10-01 Thread David Gibson
TYPE_ICS_SIMPLE is the only subtype of TYPE_ICS_BASE that's ever instantiated. The existence of different classes is mostly a hang over from when we (misguidedly) had separate subtypes for the KVM and non-KVM version of the device. There could be some call for an abstract base type for ICS varian

[PATCH v3 02/34] xics: Eliminate 'reject', 'resend' and 'eoi' class hooks

2019-10-01 Thread David Gibson
Currently ics_reject(), ics_resend() and ics_eoi() indirect through class methods. But there's only one implementation of each method, the one in TYPE_ICS_SIMPLE. TYPE_ICS_BASE has no implementation, but it's never instantiated, and has no other subtypes. So clean up by eliminating the method an

[PATCH v3 00/34] spapr: IRQ subsystem cleanup

2019-10-01 Thread David Gibson
This is a substantial rework to clean up the handling of IRQs in spapr. It includes some cleanups to both the XICS and XIVE interrupt controller backends, as well as more to the common spapr irq handling infrastructure. Changes since v2: * Fixed a bug where the "move handling multiple irq frees"

[PATCH v3 07/34] spapr: Fold spapr_phb_lsi_qirq() into its single caller

2019-10-01 Thread David Gibson
No point having a two-line helper that's used exactly once, and not likely to be used anywhere else in future. Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daudé --- hw/ppc/spapr_pci.c | 3 ++- include/hw/pci-host/spap

[PATCH v3 04/34] xics: Eliminate reset hook

2019-10-01 Thread David Gibson
Currently TYPE_XICS_BASE and TYPE_XICS_SIMPLE have their own reset methods, using the standard technique for having the subtype call the supertype's methods before doing its own thing. But TYPE_XICS_SIMPLE is the only subtype of TYPE_XICS_BASE ever instantiated, so there's no point having the spli

Re: [PATCH 0/6] qcow2: advanced compression options

2019-10-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1569958040-697220-1-git-send-email-andrey.shinkev...@virtuozzo.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. =

Re: [PATCH 0/6] qcow2: advanced compression options

2019-10-01 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1569958040-697220-1-git-send-email-andrey.shinkev...@virtuozzo.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.

[PULL 8/8] hd-geo-test: Add tests for lchs override

2019-10-01 Thread John Snow
From: Sam Eiderman Add QTest tests to check the logical geometry override option. The tests in hd-geo-test are out of date - they only test IDE and do not test interesting MBRs. I added a few helper functions which will make adding more tests easier. QTest's fw_cfg helper functions support onl

[PULL 6/8] bootdevice: Refactor get_boot_devices_list

2019-10-01 Thread John Snow
From: Sam Eiderman Move device name construction to a separate function. We will reuse this function in the following commit to pass logical CHS parameters through fw_cfg much like we currently pass bootindex. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman Mes

[PULL 2/8] block: Support providing LCHS from user

2019-10-01 Thread John Snow
From: Sam Eiderman Add logical geometry variables to BlockConf. A user can now supply "lcyls", "lheads" & "lsecs" for any HD device that supports CHS ("cyls", "heads", "secs"). These devices include: * ide-hd * scsi-hd * virtio-blk-pci In future commits we will use the provided LCH

Re: [PATCH v2 21/33] spapr, xics, xive: Move cpu_intc_create from SpaprIrq to SpaprInterruptController

2019-10-01 Thread David Gibson
On Tue, Oct 01, 2019 at 01:43:12PM +0200, Cédric Le Goater wrote: > On 01/10/2019 10:11, David Gibson wrote: > > On Tue, Oct 01, 2019 at 09:41:27AM +0200, Cédric Le Goater wrote: > >> On 01/10/2019 08:47, David Gibson wrote: > >>> On Tue, Oct 01, 2019 at 07:43:51AM +0200, Cédric Le Goater wrote: >

[PATCH 06/97] block: Fix AioContext switch for bs->drv == NULL

2019-10-01 Thread Michael Roth
From: Kevin Wolf Even for block nodes with bs->drv == NULL, we can't just ignore a bdrv_set_aio_context() call. Leaving the node in its old context can mean that it's still in an iothread context in bdrv_close_all() during shutdown, resulting in an attempted unlock of the AioContext lock which we

[ANNOUNCE] QEMU 3.1.1.1 Stable released

2019-10-01 Thread Michael Roth
Hi everyone, I am pleased to announce that the QEMU v3.1.1.1 stable release is now available: You can grab the tarball from our download page here: https://www.qemu.org/download/#source v3.1.1.1 is now tagged in the official qemu.git repository, and the stable-3.1 branch has been updated acco

[PATCH 63/97] backup: Copy only dirty areas

2019-10-01 Thread Michael Roth
From: Max Reitz The backup job must only copy areas that the copy_bitmap reports as dirty. This is always the case when using traditional non-offloading backup, because it copies each cluster separately. When offloading the copy operation, we sometimes copy more than one cluster at a time, but

Re: Is kexec supported in QEMU for ARM64 (qemu-system-aarch64) with arm-trusted-firmware, optee, and u-boot.

2019-10-01 Thread Lakshmi Ramasubramanian
On 10/1/19 9:30 AM, Ard Biesheuvel wrote: kexec is a linux concept, so whether it is supported should not depend on the secure world firmware or the underlying host. I agree Ard. When I don't use ATF I am able to do kexec in QEMU and successfully boot into the new kernel. Is the following e

[PULL 5/8] bootdevice: Gather LCHS from all relevant devices

2019-10-01 Thread John Snow
From: Sam Eiderman Relevant devices are: * ide-hd (and ide-cd, ide-drive) * scsi-hd (and scsi-cd, scsi-disk, scsi-block) * virtio-blk-pci We do not call del_boot_device_lchs() for ide-* since we don't need to - IDE block devices do not support unplugging. Signed-off-by: Sam Eiderman

[PATCH 74/97] xen-bus: Fix backend state transition on device reset

2019-10-01 Thread Michael Roth
From: Anthony PERARD When a frontend wants to reset its state and the backend one, it starts with setting "Closing", then waits for the backend (QEMU) to do the same. But when QEMU is setting "Closing" to its state, it triggers an event (xenstore watch) that re-execute xen_device_backend_changed

[PULL 7/8] bootdevice: FW_CFG interface for LCHS values

2019-10-01 Thread John Snow
From: Sam Eiderman Using fw_cfg, supply logical CHS values directly from QEMU to the BIOS. Non-standard logical geometries break under QEMU. A virtual disk which contains an operating system which depends on logical geometries (consistent values being reported from BIOS INT13 AH=08) will most l

[PULL 4/8] scsi: Propagate unrealize() callback to scsi-hd

2019-10-01 Thread John Snow
From: Sam Eiderman We will need to add LCHS removal logic to scsi-hd's unrealize() in the next commit. Signed-off-by: Sam Eiderman Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman Message-id: 20190925110639.100699-5-sam...@google.com Signed-off-by: John Snow --

[PULL 1/8] block: Refactor macros - fix tabbing

2019-10-01 Thread John Snow
From: Sam Eiderman Fixing tabbing in block related macros. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman Message-id: 20190925110639.100699-2-sam...@google.com Signed-off-by: John Snow --- include/hw/block/block.h | 16 hw/ide/qdev.c

Re: [PATCH] spapr/xive: skip partially initialized vCPUs in presenter

2019-10-01 Thread David Gibson
On Tue, Oct 01, 2019 at 06:56:28PM +0200, Greg Kurz wrote: > On Tue, 1 Oct 2019 13:56:10 +0200 > Cédric Le Goater wrote: > > > On 01/10/2019 13:06, Greg Kurz wrote: > > > On Tue, 1 Oct 2019 10:57:22 +0200 > > > Cédric Le Goater wrote: > > > > > >> When vCPUs are hotplugged, they are added to t

[PATCH 79/97] iotests: Restrict file Python tests to file

2019-10-01 Thread Michael Roth
From: Max Reitz Most of our Python unittest-style tests only support the file protocol. You can run them with any other protocol, but the test will simply ignore your choice and use file anyway. We should let them signal that they require the file protocol so they are skipped when you want to te

[PATCH 86/97] curl: Keep pointer to the CURLState in CURLSocket

2019-10-01 Thread Michael Roth
From: Max Reitz A follow-up patch will make curl_multi_do() and curl_multi_read() take a CURLSocket instead of the CURLState. They still need the latter, though, so add a pointer to it to the former. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz Reviewed-by: John Snow Message-id: 201909

[PATCH 23/97] iotests: add iotest 256 for testing blockdev-backup across iothread contexts

2019-10-01 Thread Michael Roth
From: John Snow Signed-off-by: John Snow Message-id: 20190523170643.20794-6-js...@redhat.com Reviewed-by: Max Reitz [mreitz: Moved from 250 to 256] Signed-off-by: Max Reitz (cherry picked from commit ba7704f2228f16ed61b9903801e28e17666c7e38) Signed-off-by: Michael Roth --- tests/qemu-iotests

[PULL 0/8] Ide patches

2019-10-01 Thread John Snow
The following changes since commit 7f21573c822805a8e6be379d9bcf3ad9effef3dc: Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-10-01' into staging (2019-10-01 13:13:38 +0100) are available in the Git repository at: https://github.com/jnsnow/qemu.git tags/ide-pull-req

[PULL 3/8] bootdevice: Add interface to gather LCHS

2019-10-01 Thread John Snow
From: Sam Eiderman Add an interface to provide direct logical CHS values for boot devices. We will use this interface in the next commits. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman Message-id: 20190925110639.100699-4-sam...@google.com Signed-off-by: John S

[PATCH 19/97] iotests.py: do not use infinite waits

2019-10-01 Thread Michael Roth
From: John Snow Cap waits to 60 seconds so that iotests can fail gracefully if something goes wrong. Signed-off-by: John Snow Message-id: 20190523170643.20794-3-js...@redhat.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz (cherry picked from commit 8b6f5f8b9f3bec5cbeebefab34bae0102a2581b3

[PATCH 57/97] tpm_emulator: Translate TPM error codes to strings

2019-10-01 Thread Michael Roth
From: Stefan Berger Implement a function to translate TPM error codes to strings so that at least the most common error codes can be translated to human readable strings. Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau (cherry picked from commit 7e095e84ba0b7c0a1ac45bc6824dace2fd35

[PATCH 93/97] slirp: Fix heap overflow in ip_reass on big packet input

2019-10-01 Thread Michael Roth
When the first fragment does not fit in the preallocated buffer, q will already be pointing to the ext buffer, so we mustn't try to update it. Signed-off-by: Samuel Thibault (from libslirp.git commit 126c04acbabd7ad32c2b018fe10dfac2a3bc1210) (from libslirp.git commit e0be80430c390bce181ea04dfcdd6

[PATCH 87/97] curl: Keep *socket until the end of curl_sock_cb()

2019-10-01 Thread Michael Roth
From: Max Reitz This does not really change anything, but it makes the code a bit easier to follow once we use @socket as the opaque pointer for aio_set_fd_handler(). Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz Message-id: 20190910124136.10565-3-mre...@redhat.com Reviewed-by: Maxim Levi

[PATCH 09/97] docs/interop/bitmaps: rewrite and modernize doc

2019-10-01 Thread Michael Roth
From: John Snow This just about rewrites the entirety of the bitmaps.rst document to make it consistent with the 4.0 release. I have added new features seen in the 4.0 release, as well as tried to clarify some points that keep coming up when discussing this feature both in-house and upstream. It

[PATCH 75/97] pr-manager: Fix invalid g_free() crash bug

2019-10-01 Thread Michael Roth
From: Markus Armbruster pr_manager_worker() passes its @opaque argument to g_free(). Wrong; it points to pr_manager_worker()'s automatic @data. Broken when commit 2f3a7ab39be converted @data from heap- to stack-allocated. Fix by deleting the g_free(). Fixes: 2f3a7ab39bec4ba8022dc4d42ea641165b

[PATCH 10/97] spapr/xive: fix EQ page addresses above 64GB

2019-10-01 Thread Michael Roth
From: Cédric Le Goater The high order bits of the address of the OS event queue is stored in bits [4-31] of word2 of the XIVE END internal structures and the low order bits in word3. This structure is using Big Endian ordering and computing the value requires some simple arithmetic which happens

[PATCH 85/97] blockjob: update nodes head while removing all bdrv

2019-10-01 Thread Michael Roth
From: Sergio Lopez block_job_remove_all_bdrv() iterates through job->nodes, calling bdrv_root_unref_child() for each entry. The call to the latter may reach child_job_[can_]set_aio_ctx(), which will also attempt to traverse job->nodes, potentially finding entries that where freed on previous iter

[PATCH 96/97] hw/core/loader: Fix possible crash in rom_copy()

2019-10-01 Thread Michael Roth
From: Thomas Huth Both, "rom->addr" and "addr" are derived from the binary image that can be loaded with the "-kernel" paramer. The code in rom_copy() then calculates: d = dest + (rom->addr - addr); and uses "d" as destination in a memcpy() some lines later. Now with bad kernel images, it i

[PATCH 94/97] slirp: ip_reass: Fix use after free

2019-10-01 Thread Michael Roth
Using ip_deq after m_free might read pointers from an allocation reuse. This would be difficult to exploit, but that is still related with CVE-2019-14378 which generates fragmented IP packets that would trigger this issue and at least produce a DoS. Signed-off-by: Samuel Thibault (from libslirp.

[PATCH 82/97] libvhost-user: fix SLAVE_SEND_FD handling

2019-10-01 Thread Michael Roth
From: Johannes Berg It doesn't look like this could possibly work properly since VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD is defined to 10, but the dev->protocol_features has a bitmap. I suppose the peer this was tested with also supported VHOST_USER_PROTOCOL_F_LOG_SHMFD, in which case the test would

[PATCH 95/97] s390: PCI: fix IOMMU region init

2019-10-01 Thread Michael Roth
From: Matthew Rosato The fix in dbe9cf606c shrinks the IOMMU memory region to a size that seems reasonable on the surface, however is actually too small as it is based against a 0-mapped address space. This causes breakage with small guests as they can overrun the IOMMU window. Let's go back to

[PATCH 17/97] block: Drain source node in bdrv_replace_node()

2019-10-01 Thread Michael Roth
From: Kevin Wolf Instead of just asserting that no requests are in flight in bdrv_replace_node(), which is a requirement that most callers ignore, we can just drain the source node right there. This fixes at least starting a commit job while I/O is active on the backing chain, but probably other

[PATCH 61/97] block/backup: unify different modes code path

2019-10-01 Thread Michael Roth
From: Vladimir Sementsov-Ogievskiy Do full, top and incremental mode copying all in one place. This unifies the code path and helps further improvements. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20190429090842.57910-5-vsement...@virtuozzo.com Signed-off-by

[PATCH 73/97] target/arm: Don't abort on M-profile exception return in linux-user mode

2019-10-01 Thread Michael Roth
From: Peter Maydell An attempt to do an exception-return (branch to one of the magic addresses) in linux-user mode for M-profile should behave like a normal branch, because linux-user mode is always going to be in 'handler' mode. This used to work, but we broke it when we added support for the M-

[PATCH 92/97] curl: Check curl_multi_add_handle()'s return code

2019-10-01 Thread Michael Roth
From: Max Reitz If we had done that all along, debugging would have been much simpler. (Also, I/O errors are better than hangs.) Signed-off-by: Max Reitz Message-id: 20190910124136.10565-8-mre...@redhat.com Reviewed-by: Maxim Levitsky Reviewed-by: John Snow Signed-off-by: Max Reitz (cherry p

[PATCH 07/97] cutils: Fix size_to_str() on 32-bit platforms

2019-10-01 Thread Michael Roth
From: Eric Blake When extracting a human-readable size formatter, we changed 'uint64_t div' pre-patch to 'unsigned long div' post-patch. Which breaks on 32-bit platforms, resulting in 'inf' instead of intended values larger than 999GB. Fixes: 22951aaa CC: qemu-sta...@nongnu.org Reported-by: Max

[PATCH 90/97] curl: Report only ready sockets

2019-10-01 Thread Michael Roth
From: Max Reitz Instead of reporting all sockets to cURL, only report the one that has caused curl_multi_do_locked() to be called. This lets us get rid of the QLIST_FOREACH_SAFE() list, which was actually wrong: SAFE foreaches are only safe when the current element is removed in each iteration.

[PATCH 97/97] scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

2019-10-01 Thread Michael Roth
From: Paolo Bonzini When executing script in lsi_execute_script(), the LSI scsi adapter emulator advances 's->dsp' index to read next opcode. This can lead to an infinite loop if the next opcode is empty. Move the existing loop exit after 10k iterations so that it covers no-op opcodes as well. R

[PATCH 59/97] block/backup: move to copy_bitmap with granularity

2019-10-01 Thread Michael Roth
From: Vladimir Sementsov-Ogievskiy We are going to share this bitmap between backup and backup-top filter driver, so let's share something more meaningful. It also simplifies some calculations. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz Message-id: 20190429090842.57910-

[PATCH 81/97] iotests: Test blockdev-create for vpc

2019-10-01 Thread Michael Roth
From: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf (cherry picked from commit cb73747e1a47b93d3dfdc3f769c576b053916938) Conflicts: tests/qemu-iotests/group *drop context dep. on tests not in 4.0 Signed-off-by: Michael Roth --- tests/qemu-iotests/266 | 153

[PATCH 71/97] qcow2: Fix the calculation of the maximum L2 cache size

2019-10-01 Thread Michael Roth
From: Alberto Garcia The size of the qcow2 L2 cache defaults to 32 MB, which can be easily larger than the maximum amount of L2 metadata that the image can have. For example: with 64 KB clusters the user would need a qcow2 image with a virtual size of 256 GB in order to have 32 MB of L2 metadata.

[PATCH 84/97] block/nfs: tear down aio before nfs_close

2019-10-01 Thread Michael Roth
From: Peter Lieven nfs_close is a sync call from libnfs and has its own event handler polling on the nfs FD. Avoid that both QEMU and libnfs are intefering here. CC: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven Signed-off-by: Kevin Wolf (cherry picked from commit 601dc6559725f7a614b6f893

[PATCH 60/97] block/backup: refactor and tolerate unallocated cluster skipping

2019-10-01 Thread Michael Roth
From: Vladimir Sementsov-Ogievskiy Split allocation checking to separate function and reduce nesting. Consider bdrv_is_allocated() fail as allocated area, as copying more than needed is not wrong (and we do it anyway) and seems better than fail the whole job. And, most probably we will fail on th

  1   2   3   4   5   6   >