On Tue, Mar 09, 2021 at 17:44:16 +, Daniel Berrange wrote:
> One of the conventions we have had since the early days of libvirt is
> that every struct typedef, has a corresponding "Ptr" typedef too.
>
> For example
>
> typedef struct _virDomainDef virDomainDef;
> typedef virDomainDef
Switch to using the 'g_auto*' helpers.
Signed-off-by: Yi Li
---
src/qemu/qemu_capabilities.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 790375ac38..447cf77875 100644
---
On Tue, Mar 09, 2021 at 17:44:16 +, Daniel P. Berrangé wrote:
...
> We can't do anything about the use "Ptr" in the include/ files because
> that is public ABI. We can potentially eliminate "Ptr" types everywhere
> else in the codebase, even the src/libvirt*.c files corresponding to
> the
On 3/9/21 1:23 PM, Andrea Bolognani wrote:
On Tue, 2021-03-09 at 17:44 +, Daniel P. Berrangé wrote:
One of the conventions we have had since the early days of libvirt is
that every struct typedef, has a corresponding "Ptr" typedef too.
For example
typedef struct _virDomainDef
On a Tuesday in 2021, Peter Krempa wrote:
Use g_strsplit to split the string and avoid use of stack'd strings.
Signed-off-by: Peter Krempa
---
src/libxl/xen_common.c | 136 ++---
1 file changed, 46 insertions(+), 90 deletions(-)
diff --git
On a Tuesday in 2021, Daniel P. Berrangé wrote:
One of the conventions we have had since the early days of libvirt is
that every struct typedef, has a corresponding "Ptr" typedef too.
For example
typedef struct _virDomainDef virDomainDef;
typedef virDomainDef *virDomainDefPtr;
On Tue, Mar 09, 2021 at 07:23:15PM +0100, Andrea Bolognani wrote:
> On Tue, 2021-03-09 at 17:44 +, Daniel P. Berrangé wrote:
> > One of the conventions we have had since the early days of libvirt is
> > that every struct typedef, has a corresponding "Ptr" typedef too.
> >
> > For example
> >
On 3/9/21 8:12 AM, Markus Armbruster wrote:
@@ -2565,6 +2551,7 @@ static void fdctrl_realize_common(DeviceState *dev,
FDCtrl *fdctrl,
Error **errp)
{
int i, j;
+FDrive *drive;
static int command_tables_inited = 0;
if
On Tue, 2021-03-09 at 17:44 +, Daniel P. Berrangé wrote:
> One of the conventions we have had since the early days of libvirt is
> that every struct typedef, has a corresponding "Ptr" typedef too.
>
> For example
>
> typedef struct _virDomainDef virDomainDef;
> typedef virDomainDef
On Tue, Mar 09, 2021 at 04:30:15PM +0100, Michal Privoznik wrote:
> On 3/3/21 7:18 PM, Daniel P. Berrangé wrote:
> > The -audiodev argument is replacing the QEMU_AUDIO_DRV env variable (and
> > its relations).
> >
> > Sadly we still have to use the SDL_AUDIODRIVER env variable because that
> >
On Tue, Mar 09, 2021 at 04:30:18PM +0100, Michal Privoznik wrote:
> On 3/3/21 7:18 PM, Daniel P. Berrangé wrote:
> > To prepare for the introduction for more backend specific audio options,
> > move the OSS options into a dedicated struct and introduce separate
> > helper methods for
One of the conventions we have had since the early days of libvirt is
that every struct typedef, has a corresponding "Ptr" typedef too.
For example
typedef struct _virDomainDef virDomainDef;
typedef virDomainDef *virDomainDefPtr;
Periodically someone has questioned what the purpose of
On Tue, Mar 09, 2021 at 05:12:13PM +0100, Markus Armbruster wrote:
> Drop the crap deprecated in commit a1b40bda08 "blockdev: Deprecate
> -drive with bogus interface type" (v5.1.0).
>
> Signed-off-by: Markus Armbruster
> ---
> docs/system/deprecated.rst | 7 --
>
On Tue, Mar 09, 2021 at 05:12:12PM +0100, Markus Armbruster wrote:
> The previous commit rendered the name fdctrl_connect_drives() somewhat
> misleading. Get rid of it by inlining the (now pretty simple)
> function into its only caller.
>
> Signed-off-by: Markus Armbruster
> ---
>
On Tue, Mar 09, 2021 at 05:12:11PM +0100, Markus Armbruster wrote:
> Drop the crap deprecated in commit 4a27a638e7 "fdc: Deprecate
> configuring floppies with -global isa-fdc" (v5.1.0).
>
> Signed-off-by: Markus Armbruster
> ---
> docs/system/deprecated.rst | 49 ---
>
On Tue, Mar 09, 2021 at 05:12:10PM +0100, Markus Armbruster wrote:
> Commit 4a27a638e7 "fdc: Deprecate configuring floppies with -global
> isa-fdc" actually deprecated any use of floppy controller driver
> properties, not just with -global. Correct the deprecation note
> accordingly.
>
> Fixes:
Commit 4a27a638e7 "fdc: Deprecate configuring floppies with -global
isa-fdc" actually deprecated any use of floppy controller driver
properties, not just with -global. Correct the deprecation note
accordingly.
Fixes: 4a27a638e718b445648de6b27c709353551d9b44
Signed-off-by: Markus Armbruster
---
Drop the crap deprecated in commit 4a27a638e7 "fdc: Deprecate
configuring floppies with -global isa-fdc" (v5.1.0).
Signed-off-by: Markus Armbruster
---
docs/system/deprecated.rst | 49 ---
docs/system/removed-features.rst | 49 +++
hw/block/fdc.c | 54 +--
The previous commit rendered the name fdctrl_connect_drives() somewhat
misleading. Get rid of it by inlining the (now pretty simple)
function into its only caller.
Signed-off-by: Markus Armbruster
---
hw/block/fdc.c | 23 ---
1 file changed, 8 insertions(+), 15 deletions(-)
Drop the crap deprecated in commit a1b40bda08 "blockdev: Deprecate
-drive with bogus interface type" (v5.1.0).
Signed-off-by: Markus Armbruster
---
docs/system/deprecated.rst | 7 --
docs/system/removed-features.rst | 7 ++
include/sysemu/blockdev.h| 1 -
blockdev.c
v3:
* PATCH 1: New [Daniel]
v2:
* Rebased, straightforward conflict with commit f5d33dd51f
"hw/block/fdc: Remove the check_media_rate property" resolved
* PATCH 2: Commit message fixed [Kevin]
Markus Armbruster (3):
fdc: Drop deprecated floppy configuration
fdc: Inline
Supporting '0x20M' looks odd, particularly since we have a 'B' suffix
that is ambiguous for bytes, as well as a less-frequently-used 'E'
suffix for extremely large exibytes. In practice, people using hex
inputs are specifying values in bytes (and would have written
0x200, or possibly relied
On 3/9/21 3:56 PM, Daniel P. Berrangé wrote:
On Tue, Mar 09, 2021 at 03:26:22PM +0100, Michal Privoznik wrote:
The qemu_shim (compiled into virt-qemu-run-binary) reads several
files provided by user (XML definition of secret, value of the
secret, XML definition of domain) and it does so using
On 3/3/21 7:18 PM, Daniel P. Berrangé wrote:
Historically we've done almost nothing with audio backend
configuration. In QEMU we merely set QEMU_AUDIO_DRV to one
of sdl, spice, none depending on . We also have
the somewhat crazy ability to let QEMU inherit the
QEMU_AUDIO_DRV env variable from
On 3/3/21 7:18 PM, Daniel P. Berrangé wrote:
The -audiodev argument is replacing the QEMU_AUDIO_DRV env variable (and
its relations).
Sadly we still have to use the SDL_AUDIODRIVER env variable because that
wasn't mapped into QAPI schema.
Signed-off-by: Daniel P. Berrangé
---
Don't forget
On 3/3/21 7:18 PM, Daniel P. Berrangé wrote:
To prepare for the introduction for more backend specific audio options,
move the OSS options into a dedicated struct and introduce separate
helper methods for parse/format/free.
Signed-off-by: Daniel P. Berrangé
---
docs/schemas/domaincommon.rng
On Tue, Mar 09, 2021 at 03:26:22PM +0100, Michal Privoznik wrote:
> The qemu_shim (compiled into virt-qemu-run-binary) reads several
> files provided by user (XML definition of secret, value of the
> secret, XML definition of domain) and it does so using
> g_file_get_contents(). This is
Unfortunately, not all GLib functions provide the level of
security we want, or behave how we want. So far,
g_file_get_contents() and g_get_host_name() have been identified.
Signed-off-by: Michal Privoznik
---
docs/glib-adoption.rst | 17 +
1 file changed, 17 insertions(+)
diff
The only place where gethostname() is acceptable is in
virGetHostnameImpl() which lives in src/util/virutil.c.
Reflect this in the list of exceptions for the syntax-check rule.
Signed-off-by: Michal Privoznik
---
build-aux/syntax-check.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
See 4/4 for the list and explanation.
Michal Prívozník (4):
qemu_shim: Replace g_file_get_contents() with virFileReadAll()
virutil: Do not use g_get_host_name() to obtain hostname
syntax-check: Update list of gethostname exceptions
docs: Discourage use of some glib functions
The qemu_shim (compiled into virt-qemu-run-binary) reads several
files provided by user (XML definition of secret, value of the
secret, XML definition of domain) and it does so using
g_file_get_contents(). This is potentially dangerous, because
there is no limit on the size of files/buffers.
The problem is that g_get_host_name() caches the hostname in a
thread local variable. Therefore, it doesn't reflect any
subsequent hostname changes. While this might be acceptable for
logs where the hostname is printed exactly once when the libvirtd
starts up, it is not optimal for
Calling prlimit() requires elevated privileges, specifically
CAP_SYS_RESOURCE, and getrlimit() only works for the current
process which is too limiting for our needs; /proc/$pid/limits,
on the other hand, can be read by any process, so implement
parsing that file as a fallback for when prlimit()
Store the current memory locking limit and the desired one
separately, which will help with later changes.
Signed-off-by: Andrea Bolognani
Reviewed-by: Michal Privoznik
---
src/qemu/qemu_domain.c | 20 +++-
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git
Attempting to set the memlock limit might fail if we're running
in a containerized environment where CAP_SYS_RESOURCE is not
available, and if the limit is already high enough there's no
point in trying to raise anyway.
https://bugzilla.redhat.com/show_bug.cgi?id=1916346
Signed-off-by: Andrea
Now that we've implemented a fallback for the function that
obtains the information from /proc, there is no reason we would
get a failure unless there's something seriously wrong with the
environment we're running in, in which case we're better off
reporting the issue to the user rather than
This feature has been requested by KubeVirt developers and will make
it possible for them to make some VFIO-related features, such as
migration and hotplug, work correctly.
https://bugzilla.redhat.com/show_bug.cgi?id=1916346
Changes from [v1]:
* prep patches have been pushed;
* parsing
вт, 9 мар. 2021 г. в 15:35, Michal Privoznik :
> On 2/19/21 9:08 PM, Aleksei Zakharov wrote:
> > This patch adds delay time (steal time inside guest) to libvirt
> > domain per-vcpu stats. Delay time is an important performance metric.
> > It is a consequence of the overloaded CPU. Knowledge of
On Tue, 2021-03-09 at 12:43 +0100, Michal Privoznik wrote:
> On 3/5/21 8:13 PM, Andrea Bolognani wrote:
> > +if (!g_file_get_contents(procfile, , , NULL))
> > +return -1;
>
> I did not spot this yesterday, but now I'm working on a something else
> and have to read a contents of a
On 2/19/21 9:08 PM, Aleksei Zakharov wrote:
This patch adds delay time (steal time inside guest) to libvirt
domain per-vcpu stats. Delay time is an important performance metric.
It is a consequence of the overloaded CPU. Knowledge of the delay
time of a virtual machine helps to understand if it
On Tue, Mar 09, 2021 at 12:54:55 +0100, Peter Krempa wrote:
> The value is used as return value for the process itself.
>
> Signed-off-by: Peter Krempa
> ---
> tests/domaincapstest.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/domaincapstest.c
On Tue, Mar 09, 2021 at 12:51:04 +0100, Peter Krempa wrote:
> Failure of 'qemuMigrationSetDBusVMState' would jump to 'exit_monitor'
> but the function isn't called inside of the monitor context.
>
> Signed-off-by: Peter Krempa
> ---
> src/qemu/qemu_migration.c | 2 +-
> 1 file changed, 1
The value is used as return value for the process itself.
Signed-off-by: Peter Krempa
---
tests/domaincapstest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c
index 7a082705c6..65d9f4c635 100644
--- a/tests/domaincapstest.c
Failure of 'qemuMigrationSetDBusVMState' would jump to 'exit_monitor'
but the function isn't called inside of the monitor context.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_migration.c
On 3/5/21 8:13 PM, Andrea Bolognani wrote:
Calling prlimit() requires elevated privileges, specifically
CAP_SYS_RESOURCE, and getrlimit() only works for the current
process which is too limiting for our needs; /proc/$pid/limits,
on the other hand, can be read by any process, so implement
parsing
ср, 3 мар. 2021 г. в 17:06, Peter Krempa :
> On Mon, Jan 11, 2021 at 12:50:09 +0300, Nikolay Shirokovskiy wrote:
> > At first glance we don't get much win because of introduction of
> > virDomainBlockIoTuneFieldNames and virDomainBlockIoTuneFields. But we
> are going
> > to use these two in other
On Mon, Mar 08, 2021 at 14:40:42 +0100, Peter Krempa wrote:
> On Wed, Feb 24, 2021 at 16:57:54 +0100, Peter Krempa wrote:
> > QEMU plans to QAPIfy object add. This series prepares for the API change
> > (drop of 'props' wrapper for the object) and adds testing based on our
> > qemuxml2argv test
On 3/4/21 12:33 PM, Daniel Henrique Barboza wrote:
On 2/26/21 4:11 PM, Chris Mayo wrote:
Allow the directory to be chosen at installation time, to support local
conventions e.g. versioning.
Signed-off-by: Chris Mayo
---
Reviewed-by: Daniel Henrique Barboza
Pushed. Congratulations on
On 3/9/21 11:22 AM, Andrea Bolognani wrote:
The preprocessor macro we use to check whether we're on Linux
has not been spelled properly, and so we will always report the
error message intended for other platforms.
Fixes: 879bcee08ce0f91f556fddfe452c3fbed5318468
Signed-off-by: Andrea Bolognani
On 2/24/21 4:35 AM, Laine Stump wrote:
Some SRIOV PFs don't have a netdev associated with them (the spec
apparently doesn't require it). In most cases when libvirt is dealing
with an SRIOV VF, that VF must have a PF, and the PF *must* have an
associated netdev (the only way to set the MAC
On Tue, Mar 09, 2021 at 10:38:36 +0300, Nikolay Shirokovskiy wrote:
> ср, 3 мар. 2021 г. в 17:06, Peter Krempa :
>
> > On Mon, Jan 11, 2021 at 12:50:09 +0300, Nikolay Shirokovskiy wrote:
> > > At first glance we don't get much win because of introduction of
> > > virDomainBlockIoTuneFieldNames
On Tue, Mar 09, 2021 at 10:38:36 +0300, Nikolay Shirokovskiy wrote:
> ср, 3 мар. 2021 г. в 17:06, Peter Krempa :
>
> > On Mon, Jan 11, 2021 at 12:50:09 +0300, Nikolay Shirokovskiy wrote:
> > > At first glance we don't get much win because of introduction of
> > > virDomainBlockIoTuneFieldNames
The preprocessor macro we use to check whether we're on Linux
has not been spelled properly, and so we will always report the
error message intended for other platforms.
Fixes: 879bcee08ce0f91f556fddfe452c3fbed5318468
Signed-off-by: Andrea Bolognani
---
src/util/virnetlink.c | 2 +-
1 file
On Mon, Mar 08, 2021 at 05:54:20PM +0100, Kevin Wolf wrote:
> This adds a QAPI schema for the properties of the tls-* objects.
>
> The 'loaded' property doesn't seem to make sense as an external
> interface: It is automatically set to true in ucc->complete, and
> explicitly setting it to true
On Mon, Mar 08, 2021 at 05:54:19PM +0100, Kevin Wolf wrote:
> This adds a QAPI schema for the properties of the secret* objects.
>
> The 'loaded' property doesn't seem to make sense as an external
> interface: It is automatically set to true in ucc->complete, and
> explicitly setting it to true
On Mon, Mar 08, 2021 at 05:54:13PM +0100, Kevin Wolf wrote:
> This adds a QAPI schema for the properties of the authz-* objects.
>
> Signed-off-by: Kevin Wolf
> Acked-by: Peter Krempa
> Reviewed-by: Eric Blake
> ---
> qapi/authz.json | 61 +---
>
56 matches
Mail list logo