Until now there has been an extra bit of code in
qemuDomainDeviceCalculatePCIConnectFlag() (one of the two callers of
virPCIDeviceIsPCIExpress()) that tries to determine if a device is
PCIe by looking at the *length* of its sysfs config file; it only does
this when libvirt is running as a non-root
Previously there was no way to differentiate between this function 1)
encountering an error while reading the pci config, and 2) determining
that the device in question is a conventional PCI device, and so has
no Express Capabilities.
The difference between these two conditions is important,
The new message is more verbose/useful, but only logged at debug level
instead of as a warning (since it could easily happen in a non-error
situation).
Signed-off-by: Laine Stump
---
src/util/virpci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/virpci.c
Now that virPCIDeviceIsPCIExpress() checks the length of the file when
the process lacks sufficient privilege to read the entire PCI config
file in sysfs, we can remove the open-coding for that case from its
consumer.
Signed-off-by: Laine Stump
---
src/qemu/qemu_domain_address.c | 38
This function returned an int, and that int was being checked for < 0
in its solitary caller, but within the function it would only ever
return 0 or 1. Change the function itself to return a bool, and the
caller to just directly set the flag in the virPCIDevice.
Signed-off-by: Laine Stump
---
The one instance of a virPCIDevice in
qemuDomainDeviceCalculatePCIConnectFlags() needs to be converted to
use g_autoptr as a prerequisite for a bugfix. It's in this patch by
itself (rather than in a patch converting all virPCIDevice usages to
g_autoptr) to simplify any backport of said bugfix.
This function returned an int, but would only return 0 or 1, and the
one place it was called would just use !! to convert that value to a
bool. Change the function to directly return bool instead.
Signed-off-by: Laine Stump
---
src/util/virpci.c | 8
1 file changed, 4 insertions(+), 4
I think there's an adequate description in patch 6 (and maybe in the
bugzilla record: https://bugzilla.redhat.com/1901685). I already typed
a long description once, and git send-email failed due to network
problems and threw away everything I typed. I don't feel like typing
it again.
Laine Stump
On Thu, Dec 3, 2020 at 4:47 AM Yifei Jiang wrote:
>
> Only support supervisor external interrupt currently.
>
> Signed-off-by: Yifei Jiang
> Signed-off-by: Yipeng Yin
> ---
> hw/intc/sifive_plic.c| 31 ++-
> target/riscv/kvm.c | 19 +++
>
On Thu, Dec 3, 2020 at 4:57 AM Yifei Jiang wrote:
>
> Currently, time base frequency was fixed as SIFIVE_CLINT_TIMEBASE_FREQ.
> Here introduce "time-frequency" property to set time base frequency
> dynamically
> of which default value is still SIFIVE_CLINT_TIMEBASE_FREQ. The virt machine
> uses
On Thu, Dec 3, 2020 at 4:55 AM Yifei Jiang wrote:
>
> Currently, host cpu is inherited simply.
>
> Signed-off-by: Yifei Jiang
> Signed-off-by: Yipeng Yin
> ---
> target/riscv/cpu.c | 6 ++
> target/riscv/cpu.h | 1 +
> 2 files changed, 7 insertions(+)
>
> diff --git a/target/riscv/cpu.c
virDomainControllerDefParseXML() does a lot of checks with
virDomainPCIControllerOpts parameters that can be moved to
virDomainControllerDefValidate, sharing the logic with other use
cases that does not rely on XML parsing.
'pseries-default-phb-numa-node' parse error was changed to reflect
the
Move this check to a new virDomainDefTunablesValidate(), which
is called by virDomainDefValidateInternal().
Reviewed-by: Michal Privoznik
Signed-off-by: Daniel Henrique Barboza
---
src/conf/domain_conf.c | 14 --
src/conf/domain_validate.c | 21 +
Create a new function called virDomainDefIdMapValidate() and
use it to move these checks out of virDomainIdmapDefParseXML()
and virDomainDefParseXML().
Reviewed-by: Michal Privoznik
Signed-off-by: Daniel Henrique Barboza
---
src/conf/domain_conf.c | 19 +++
Reviewed-by: Michal Privoznik
Signed-off-by: Daniel Henrique Barboza
---
src/conf/domain_conf.c | 6 --
src/conf/domain_validate.c | 10 ++
tests/qemuxml2argvdata/pci-root-address.err | 2 +-
3 files changed, 11 insertions(+), 7 deletions(-)
Next patch will add more validations to this function. Let's move
it to domain_validate.c beforehand.
Signed-off-by: Daniel Henrique Barboza
---
src/conf/domain_conf.c | 37 -
src/conf/domain_validate.c | 37 +
The function isn't doing XML validation of any sort. Rename it to
be compatible with its actual use.
While we're at it, change the VIR_ERR_XML_ERROR error being thrown
in the function to VIR_ERR_CONFIG_UNSUPPORTED.
Signed-off-by: Daniel Henrique Barboza
---
src/conf/domain_conf.c | 8
This check is not tied to XML parsing and can be moved to
virDomainSmartcardDefValidate().
Reviewed-by: Michal Privoznik
Signed-off-by: Daniel Henrique Barboza
---
src/conf/domain_conf.c | 7 ---
src/conf/domain_validate.c | 7 +++
2 files changed, 7 insertions(+), 7 deletions(-)
Next patch will move a validation to virDomainSmartcardDefValidate(),
but this function can't be moved alone to domain_validate.c without
making virDomainChrSourceDefValidate(), from domain_conf.c, public.
Given that the idea is to eventually move all validations to domain_validate.c
anyways,
These checks are not related to XML parsing and can be moved to the
validate callback. Errors were changed from VIR_ERR_XML_ERROR to
VIR_ERR_CONFIG_UNSUPPORTED.
Reviewed-by: Michal Privoznik
Signed-off-by: Daniel Henrique Barboza
---
src/conf/domain_conf.c | 15 ---
The 'tray' check isn't a XML parse specific code and can be pushed
to the validate callback, in virDomainDiskDefValidate().
'vendor' and 'product' string sizes are already checked by the
domaincommon.rng schema, but can be of use in the validate callback
since not all scenarios will go through
We'll add more video validations into the function in the next
patch. Let's move it beforehand to domain_validate.c.
Signed-off-by: Daniel Henrique Barboza
---
src/conf/domain_conf.c | 57 --
src/conf/domain_validate.c | 57
Next patch will add more validations to the function. Let's move
it beforehand to domain_validate.c.
virSecurityDeviceLabelDefValidateXML() is still used inside
domain_conf.c, so make it public for now until its current
caller (virDomainChrSourceDefValidate()) is also moved to
domain_validate.c.
This patch creates a new function, virDomainDefBootValidate(), to host
the validation of boot menu timeout and rebootTimeout outside of parse
time. The checks in virDomainDefParseBootXML() were changed to throw
VIR_ERR_XML_ERROR in case of parse error of those values.
In an attempt to alleviate
This check isn't exclusive to XML parsing. Let's move it to
virDomainDefVideoValidate() in domain_validate.c
We don't have a failure test for this scenario, so a new test called
'video-multiple-primaries' was added to test this failure case.
Reviewed-by: Michal Privoznik
Signed-off-by: Daniel
This is the v3 of
https://www.redhat.com/archives/libvir-list/2020-December/msg00419.html
Michal mentioned in his v2 review that we should move these validations
out of domain_conf.c to a new file. Let's create a new file called
domain_validate.c and start move the validations done in v2 into it,
On Thu, Dec 3, 2020 at 4:58 AM Yifei Jiang wrote:
>
> Get kernel and fdt start address in virt.c, and pass them to KVM
> when cpu reset. In addition, add kvm_riscv.h to place riscv specific
> interface.
This doesn't seem right. Why do we need to do this? Other
architectures don't seem to do
On Thu, Dec 3, 2020 at 4:55 AM Yifei Jiang wrote:
>
> Get isa info from kvm while kvm init.
>
> Signed-off-by: Yifei Jiang
> Signed-off-by: Yipeng Yin
> ---
> target/riscv/kvm.c | 27 ++-
> 1 file changed, 26 insertions(+), 1 deletion(-)
>
> diff --git
On 12/8/20 4:58 PM, Michal Privoznik wrote:
On 12/8/20 6:45 PM, Daniel Henrique Barboza wrote:
On 12/8/20 7:22 AM, Michal Privoznik wrote:
But since we are splitting parsing and validation code can we use this chance
and move validators out of domain_conf.c allowing it to be smaller
On 12/8/20 6:45 PM, Daniel Henrique Barboza wrote:
On 12/8/20 7:22 AM, Michal Privoznik wrote:
But since we are splitting parsing and validation code can we use this
chance and move validators out of domain_conf.c allowing it to be
smaller in size?
Makes sense. I can create a
On 12/8/20 7:22 AM, Michal Privoznik wrote:
On 12/7/20 2:54 PM, Daniel Henrique Barboza wrote:
Hi,
This is the respin of [1] after the reviews from Michal.
Although we're pushing code to validate callbacks instead of
post parse functions, the idea and motivation is still in line
with [2].
On Tue, Dec 01, 2020 at 03:26:46PM +, Daniel P. Berrangé wrote:
> This syncs with latest state of libvirt-ci.git
If you push this, it'll fix the pipeline failure [1] because the centos
registry is older than docker, so I'll have to adjust my workaround that I'll
propose for libvirt-ci. Unless
We decided to not do metadata-less checkpoints and checking whether the
metadata is consistent is done once the data is actually needed. Remove
the comment.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_driver.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/src/qemu/qemu_driver.c
The alignment step is not really necessary once we've done it already
since we fully populate the definition. In case of checkpoints it was a
relic necessary for populating the 'idx' to match checkpoint disk to
definition disk, but that was already removed.
Signed-off-by: Peter Krempa
---
Peter Krempa (2):
qemuDomainCheckpointLoad: Don't align disks when restoring config from
disk
qemuDomainCheckpointLoad: Remove stale comment
src/qemu/qemu_driver.c | 22 --
1 file changed, 4 insertions(+), 18 deletions(-)
--
2.29.2
On 12/8/20 4:20 PM, Peter Krempa wrote:
On Tue, Dec 08, 2020 at 16:09:07 +0100, Michal Privoznik wrote:
On 12/8/20 3:01 PM, Peter Krempa wrote:
The validation callback always fetched a fresh copy of 'qemuCaps' to use
for validation which is wrong in cases when the VM is already running,
such
On Tue, Dec 08, 2020 at 16:09:07 +0100, Michal Privoznik wrote:
> On 12/8/20 3:01 PM, Peter Krempa wrote:
> > The validation callback always fetched a fresh copy of 'qemuCaps' to use
> > for validation which is wrong in cases when the VM is already running,
> > such as device hotplug. The
On 12/8/20 3:01 PM, Peter Krempa wrote:
The validation callback always fetched a fresh copy of 'qemuCaps' to use
for validation which is wrong in cases when the VM is already running,
such as device hotplug. The newly-fetched qemuCaps may contain flags
which weren't originally in use when
On 12/8/20 4:19 AM, Daniel P. Berrangé wrote:
On Mon, Dec 07, 2020 at 05:54:51PM -0500, Laine Stump wrote:
On 11/22/20 10:28 PM, Shi Lei wrote:
When netlink is supported, use netlink to create veth device pair
rather than 'ip link' command.
Signed-off-by: Shi Lei
---
On a Tuesday in 2020, Peter Krempa wrote:
See patch 4/4 for the justification.
CI run:
https://gitlab.com/pipo.sk/libvirt/-/pipelines/226815271
since the series is modifying stuff I don't compile usually.
Peter Krempa (4):
virDomainDefValidate: Add per-run 'opaque' data
qemu: validate:
See patch 4/4 for the justification.
CI run:
https://gitlab.com/pipo.sk/libvirt/-/pipelines/226815271
since the series is modifying stuff I don't compile usually.
Peter Krempa (4):
virDomainDefValidate: Add per-run 'opaque' data
qemu: validate: Don't check that qemuCaps is non-NULL
The validation callback always fetched a fresh copy of 'qemuCaps' to use
for validation which is wrong in cases when the VM is already running,
such as device hotplug. The newly-fetched qemuCaps may contain flags
which weren't originally in use when starting the VM e.g. on a libvirtd
upgrade.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_validate.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 81a9c9d45b..cb0f830cf1 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -3997,8 +3997,7
virDomainDefPostParse infrastructure has apart from the global opaque
data also per-run data, but this was not duplicated into the validation
callbacks.
This is important when drivers want to use correct run-state for the
validation.
Signed-off-by: Peter Krempa
---
src/bhyve/bhyve_domain.c |
The validation callbacks always fetch latest qemuCaps so it won't ever
be NULL. Remove the tautological conditions.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_validate.c | 103 +++
1 file changed, 49 insertions(+), 54 deletions(-)
diff --git
On a Tuesday in 2020, Michal Privoznik wrote:
The first patch is a bug fix, the second is an improvement.
Michal PrÃvoznÃk (2):
virsh: Fix logical error in cmdSetUserSSHKeys()
virsh: cmdSetUserSSHKeys: Error early if the file doesn't contain any
keys
tools/virsh-domain.c | 25
When removing SSH keys via set-user-sshkeys virsh command, then
files to remove are read from passed file. But when
experimenting, I've passed /dev/null as the file which resulted
in API checks which caught that @keys argument of
virDomainAuthorizedSSHKeysSet() can't be NULL. This is because if
In v6.10.0-rc1~104 I've added a virsh command that exposes
virDomainAuthorizedSSHKeysSet() API under "set-user-sshkeys"
command. The command accepts mutually exclusive "--reset" and
"--remove" options (among others). While the former controls the
VIR_DOMAIN_AUTHORIZED_SSH_KEYS_SET_APPEND flag, the
The first patch is a bug fix, the second is an improvement.
Michal Prívozník (2):
virsh: Fix logical error in cmdSetUserSSHKeys()
virsh: cmdSetUserSSHKeys: Error early if the file doesn't contain any
keys
tools/virsh-domain.c | 25 +++--
1 file changed, 15
On a Monday in 2020, Peter Krempa wrote:
Peter Krempa (8):
qemuDomainDiskLookupByNodename: Simplify node name lookup
qemuDomainGetStorageSourceByDevstr: Use virDomainDiskByTarget
qemuDomainGetStorageSourceByDevstr: Avoid logged errors
backup: Move file format check from parser to qemu driver
On Tue, Dec 08, 2020 at 09:27:39 +, Daniel P. Berrangé wrote:
> On Tue, Dec 08, 2020 at 10:06:25AM +0800, zhukeqian wrote:
> >
> > On 2020/12/7 18:38, Daniel P. Berrangé wrote:
> > > On Mon, Dec 07, 2020 at 09:55:53AM +0800, zhukeqian wrote:
> > >> Hi Daniel,
> > >>
> > >> On 2020/12/4
On 12/7/20 2:54 PM, Daniel Henrique Barboza wrote:
Hi,
This is the respin of [1] after the reviews from Michal.
Although we're pushing code to validate callbacks instead of
post parse functions, the idea and motivation is still in line
with [2].
[1]
On 12/7/20 6:07 PM, Peter Krempa wrote:
Test slices on top of nvme-backed disks.
Note that the changes in seemingly irrelevant parts of the output are
due to re-naming the nodenames.
Signed-off-by: Peter Krempa
---
.../disk-slices.x86_64-latest.args| 63 ---
On 12/7/20 5:57 PM, Peter Krempa wrote:
Commit f5e8715a8b4 added logic which adds some fake job info when qemu
didn't return anything but in such case the job type would not be set.
Since we already have the proper job type recorded in qemuBlockJobDataPtr
which the caller fetched, we can use
We previous added code for passing FDs which was explicitly derived from
gnulib's passfd code:
commit 17460825f3c78e1635f2beb0165c5a19e3b09f7d
Author: Daniel P. Berrangé
Date: Fri Jan 17 11:57:17 2020 +
src: implement APIs for passing FDs over UNIX sockets
This is a
On Tue, Dec 08, 2020 at 10:06:25AM +0800, zhukeqian wrote:
>
> On 2020/12/7 18:38, Daniel P. Berrangé wrote:
> > On Mon, Dec 07, 2020 at 09:55:53AM +0800, zhukeqian wrote:
> >> Hi Daniel,
> >>
> >> On 2020/12/4 22:42, Daniel Henrique Barboza wrote:
> >>>
> >>>
> >>> On 12/4/20 5:12 AM, zhukeqian
On Mon, Dec 07, 2020 at 05:54:51PM -0500, Laine Stump wrote:
> On 11/22/20 10:28 PM, Shi Lei wrote:
> > When netlink is supported, use netlink to create veth device pair
> > rather than 'ip link' command.
> >
> > Signed-off-by: Shi Lei
> > ---
> > src/util/virnetdevveth.c | 85
On Tue, Dec 08, 2020 at 11:13:07 +0300, Roman Bolshakov wrote:
> On Mon, Dec 07, 2020 at 06:50:07PM +0100, Peter Krempa wrote:
> > On Mon, Dec 07, 2020 at 12:38:49 -0500, Eduardo Habkost wrote:
> > > On Mon, Dec 07, 2020 at 11:46:22AM +0300, Roman Bolshakov wrote:
> > > > There's no generic way to
On Mon, Dec 07, 2020 at 06:50:07PM +0100, Peter Krempa wrote:
> On Mon, Dec 07, 2020 at 12:38:49 -0500, Eduardo Habkost wrote:
> > On Mon, Dec 07, 2020 at 11:46:22AM +0300, Roman Bolshakov wrote:
> > > There's no generic way to query current accel and its properties via QOM
> > > because there's
On Mon, Dec 07, 2020 at 12:38:49PM -0500, Eduardo Habkost wrote:
> On Mon, Dec 07, 2020 at 11:46:22AM +0300, Roman Bolshakov wrote:
> > There's no generic way to query current accel and its properties via QOM
> > because there's no link between an accel and current machine.
> >
> > The change
60 matches
Mail list logo