On 02/13/2018 01:43 PM, Daniel P. Berrangé wrote:
> GCC8 identified a critical flaw in the QEMU post-parse callback
How does it differentiate between this and the myriad of other places
that we are typecasting an int to an enum when writing a switch
statement? Try this for examples:
grep 'swit
- Original Message -
> From: "Bjoern Walk"
> To: "Daniel P. Berrangé"
> Cc: "Chris Venteicher" , libvir-list@redhat.com
> Sent: Tuesday, February 13, 2018 5:03:40 AM
> Subject: Re: [libvirt] [PATCHv2 1/1] include: function parameter names same
> in declaration
>
> Daniel P. Berrangé
GCC8 identified a critical flaw in the QEMU post-parse callback
They switch() based on the virDomainControllDef 'model', carefully
listing every single enum case. but no default statement.
Unfortunately it is valid for "model" to have the valid "-1"
which does not map to any enum constant. So
On Tue, Feb 13, 2018 at 04:57:06PM +, Daniel P. Berrangé wrote:
> GCC 8 became more fussy/clear about detecting switch
> fallthroughs. First it doesn't like it if you have
> a fallthrough attribute that is not before a case
> statement. e.g.
>
>FOO:
>BAR:
>WIZZ:
> ATTRIBUTE_F
On Tue, Feb 13, 2018 at 12:34:54PM -0500, John Ferlan wrote:
>
>
> On 02/09/2018 12:24 PM, Daniel P. Berrangé wrote:
> > Rather than expecting callers to pass a virConnectPtr into the
> > virDomainDiskTranslateSourcePool() method, just acquire a connection
> > to the storage driver when needed.
>
On 02/09/2018 12:24 PM, Daniel P. Berrangé wrote:
> When setting up graphics, we sometimes need to resolve networks,
> requiring the caller to pass in a virConnectPtr, except sometimes they
> pass in NULL. Use virGetConnectNetwork() to acquire the connection to
> the network driver when it is nee
On 02/09/2018 12:24 PM, Daniel P. Berrangé wrote:
> Rather than expecting callers to pass a virConnectPtr into the
> virDomainDiskTranslateSourcePool() method, just acquire a connection
> to the storage driver when needed.
>
> Signed-off-by: Daniel P. Berrangé
> ---
> src/conf/domain_conf.c |
On 02/09/2018 12:24 PM, Daniel P. Berrangé wrote:
> During domain startup there are many places where we need to acquire
> secrets. Currently code passes around a virConnectPtr, except in the
> places where we pass in NULL. So there are a few codepaths where ability
> to start guests using secret
GCC 8 became more fussy/clear about detecting switch
fallthroughs. First it doesn't like it if you have
a fallthrough attribute that is not before a case
statement. e.g.
FOO:
BAR:
WIZZ:
ATTRIBUTE_FALLTHROUGH;
Is unacceptable as there's no final case statement,
so while FOO & BAR ar
On 02/09/2018 12:24 PM, Daniel P. Berrangé wrote:
> There is a long standing hack to pass a virConnectPtr into the
> qemuMonitorStartCPUs method, so that when the text monitor prompts
> for a disk password, we can lookup virSecretPtr objects. This causes
> us to have to pass a virConnectPtr aroun
The -Wextra flag bundle gained a new warning -Wcast-function-type.
This complains if you cast between two function prototypes where
the number of parameters or their data types are not compatible.
Unfortunately we need such "bad" function casts for our event
callbacks. It is possible to silence the
In this second version I enable -Wswitch-enum to strongly validate
all switches cover all enum cases.
Daniel P. Berrangé (3):
Turn on -Wswitch-enum and fix all problems it identifies
Fix more switch fallthrough identified by gcc8
Disable gcc8 -Wcast-function-type warnings from -Wextra
m4/v
As a general rule any time we switch() on something that is an enum, we
want to have a case for every enum constant. The -Wswitch warning will
report any switch where we've violated this rule, except if that switch
has a default case.
Unfortunately it is reasonable to want to list all enum constan
On Thu, Feb 08, 2018 at 09:20:40AM +0530, Deepti S wrote:
Hi,
I have a couple of questions.
- I am a new libvirt code developer. I have just cloned the repo and I am
looking for a suitable debugger/IDE which will help me debug the code.
- I work in developing and creating virtual printers wi
On 02/09/2018 12:24 PM, Daniel P. Berrangé wrote:
> Now that we have the ability to easily open connections to secondary
> drivers, eg network:///system, it is possible to reimplement the
> virDomainNetResolveActualType method in terms of the public API. This
> avoids the need to have the networ
On Mon, Feb 12, 2018 at 04:21:00PM +0100, Peter Krempa wrote:
The array indexes are formatted if the JSON->commandline translator is
translating an array type. It does not at all depend on this function.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_block.c | 5 -
1 file changed, 5 deletions
On Mon, Feb 12, 2018 at 04:20:59PM +0100, Peter Krempa wrote:
Use the new syntax which uses the 'UnixSocket' type in qemu.
Signed-off-by: Peter Krempa
---
tests/virstoragetest.c | 9 +
1 file changed, 9 insertions(+)
ACK
Jan
signature.asc
Description: Digital signature
--
libvir-li
On Mon, Feb 12, 2018 at 04:20:58PM +0100, Peter Krempa wrote:
The documentation for the JSON/qapi type 'UnixSocketAddress' states that
the unix socket path field is named 'path'. We used 'socket' by
mistake. Fix both the formatter and parser and test suite.
Resolves: https://bugzilla.redhat.com/
On 02/08/2018 03:58 PM, Marek Marczykowski-Górecki wrote:
This change make libvirt XML with plain element invalid for libxl,
which affect not only upcoming CPUID support, but also NUMA. In fact,
default mode 'custom' does not match what the driver actually does, so
it was a bug. Adjust xenconfig
John Ferlan [2018-02-13, 10:32AM -0500]:
>
>
> On 02/08/2018 07:38 AM, Bjoern Walk wrote:
> > virshtest execves the virsh binary. Make sure that it finds the binary's
> > location independent of the current working directory by specifying the
> > absolute path as determined by the build environm
On 02/08/2018 07:38 AM, Bjoern Walk wrote:
> virshtest execves the virsh binary. Make sure that it finds the binary's
> location independent of the current working directory by specifying the
> absolute path as determined by the build environment.
>
> Reviewed-by: Marc Hartmayer
> Reviewed-by:
On 02/08/2018 02:05 AM, Zhuangyanying wrote:
> From: Zhuang Yanying
>
> Some applications inside VM need to access SMBIOS Chassis Asset Tag,
> which should be emulated. It has already been realized in qemu,
>
> SMBIOS: Build aggregate smbios tables and entry point
> https://git.qemu.org/?p=qem
On Tue, 2018-02-13 at 09:34 -0500, John Ferlan wrote:
> On 02/13/2018 08:46 AM, Andrea Bolognani wrote:
> > [...] Should I
> > send out a v2, or should I just go ahead and push the series given
> > the minor nature of the adjustments?
>
> I see no need for a v2 since the adjustments were essential
On 02/13/2018 08:46 AM, Andrea Bolognani wrote:
> On Tue, 2018-02-13 at 07:22 -0500, John Ferlan wrote:
>>> Another approach, which didn't make it to the list for some reason,
>>> was to end the comment with
>>>
>>> [...] and so on. See virDomainDefFeaturesCheckABIStability() for
>>> more det
On Tue, 2018-02-13 at 07:22 -0500, John Ferlan wrote:
> > Another approach, which didn't make it to the list for some reason,
> > was to end the comment with
> >
> > [...] and so on. See virDomainDefFeaturesCheckABIStability() for
> > more details.
> >
> > That seems like a better way to hand
On Tue, 2018-02-13 at 12:21 +, Daniel P. Berrangé wrote:
> @@ -175,9 +175,9 @@ qemuDomainAsyncJobPhaseToString(qemuDomainAsyncJob job,
> case QEMU_ASYNC_JOB_NONE:
> case QEMU_ASYNC_JOB_LAST:
> ATTRIBUTE_FALLTHROUGH;
> +default:
> +return "none";
> }
> -
> -
On Tue, Feb 13, 2018 at 01:58:44PM +0100, Jiri Denemark wrote:
> On Tue, Feb 13, 2018 at 12:21:11 +, Daniel P. Berrangé wrote:
> > GCC 8 added a -Wcast-function-type warning to -Wextra by
> > default. This complains if you try to explicitly cast
> > one function signature to another function si
On 02/06/2018 05:59 AM, Michal Privoznik wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1515533
>
> We're already checking if IPv4 prefix isn't too long. But we are
> not checking if it isn't too short. QEMU supports prefixes longer
> than 4 (including). I haven't find anything similar rel
On Tue, Feb 13, 2018 at 12:21:11 +, Daniel P. Berrangé wrote:
> GCC 8 added a -Wcast-function-type warning to -Wextra by
> default. This complains if you try to explicitly cast
> one function signature to another function signature
> with incompatible args. This is something we do many
> times
On 02/13/2018 04:40 AM, Andrea Bolognani wrote:
> On Mon, 2018-02-12 at 16:59 -0500, John Ferlan wrote:
>>> @@ -19224,14 +19224,13 @@ virDomainDefParseXML(xmlDocPtr xml,
>>> tmp = virXMLPropString(nodes[i], "driver");
>>> if (tmp) {
>>> int value = virDo
GCC 8 added a -Wcast-function-type warning to -Wextra by
default. This complains if you try to explicitly cast
one function signature to another function signature
with incompatible args. This is something we do many
times in libvirt especially with event callbacks. The
hack to silence the warning
Daniel P. Berrangé [2018-02-13, 09:47AM +]:
> On Mon, Feb 12, 2018 at 03:24:03PM -0600, Chris Venteicher wrote:
> > Headers use same function parameter names as definition code.
> >
> > In some cases in libvirt-domain and libvirt-network an established
> > naming pattern in the header files w
On Mon, Feb 12, 2018 at 03:24:03PM -0600, Chris Venteicher wrote:
> Headers use same function parameter names as definition code.
>
> In some cases in libvirt-domain and libvirt-network an established
> naming pattern in the header files was more consistent and informative
> in which case the impl
On Mon, Feb 12, 2018 at 06:35:45PM +, Daniel P. Berrangé wrote:
> On Mon, Feb 12, 2018 at 12:20:55PM -0600, Chris Venteicher wrote:
> > Headers use same function parameter names as definition code.
> > ---
> > include/libvirt/libvirt-domain.h| 26 +-
> > include/lib
On Mon, 2018-02-12 at 16:59 -0500, John Ferlan wrote:
> > @@ -19224,14 +19224,13 @@ virDomainDefParseXML(xmlDocPtr xml,
> > tmp = virXMLPropString(nodes[i], "driver");
> > if (tmp) {
> > int value = virDomainIOAPICTypeFromString(tmp);
> > -
On Mon, 2018-02-12 at 16:05 -0500, John Ferlan wrote:
> > qemuDomainDefEnableDefaultFeatures(virDomainDefPtr def,
> > virQEMUCapsPtr qemuCaps)
> > {
> > -virGICVersion version;
> > -
> > -/* The virt machine type always uses GIC: if the relevant element
On Mon, 2018-02-12 at 15:18 -0500, John Ferlan wrote:
> > +case VIR_DOMAIN_FEATURE_CAPABILITIES:
> > +if (src->features[i] != dst->features[i]) {
> > +virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> > + _("State of feature '%s:%s' diffe
On Mon, 2018-02-12 at 14:59 -0500, John Ferlan wrote:
> > @@ -3252,6 +3252,16 @@ qemuDomainDefValidateFeatures(const virDomainDef
> > *def)
> > }
> > break;
> >
> > +case VIR_DOMAIN_FEATURE_GIC:
> > +if (def->features[i] == VIR_TRISTATE_SWITCH_ON &&
ping
On 02/07/2018 05:49 PM, Edgar Kaziakhmedov wrote:
Predefine hints for all parameters possible to avoid wrong type
convert.
Signed-off-by: Edgar Kaziakhmedov
---
libvirt-override.c | 128 +++--
1 file changed, 124 insertions(+), 4 deletio
39 matches
Mail list logo