- 29 6月, 2020 1 次提交
-
-
由 Michal Privoznik 提交于
In 07659100 a validation code was added to virDomainDeviceInfoFormat() which reports an error if zPCI address entered in was incomplete. But, there are two problems with this approach. The first problem is the placement of the code - it doesn't belong into XML formatter rather than XML validator. The second one is that at the point of formatting XML the post parse callback has run and thus filled in required info. Therefore this check can never do something useful and instead of moving it into validator, it's removed completely. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 27 6月, 2020 4 次提交
-
-
由 Daniel Henrique Barboza 提交于
Commit 07659100 ("conf: fix zPCI address auto-generation on s390") is doing a check for virZPCIDeviceAddressIsIncomplete() prior to checking if the device has a ZPCI address at all. This results in errors like these when starting libvirt: error : virDomainDeviceInfoFormat:7527 : internal error: Missing uid or fid attribute of zPCI address Fix it by moving virZPCIDeviceAddressIsIncomplete() after the check done by virZPCIDeviceAddressIsPresent(). Fixes: 07659100Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
The ZPCI device validation is specific to qemu. So, let us move the ZPCI uid validation out of domain xml parsing into qemu domain device validation. Signed-off-by: NShalini Chellathurai Saroja <shalini@linux.ibm.com> Reviewed-by: NBjoern Walk <bwalk@linux.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
Let us fix the issues with zPCI address validation and auto-generation on s390. Currently, there are two issues with handling the ZPCI address extension. Firstly, when the uid is to be auto-generated with a specified fid, .i.e.: ... <address type='pci'> <zpci fid='0x0000001f'/> </address> ... we expect uid='0x0001' (or the next available uid for the domain). However, we get a parsing error: $ virsh define zpci.xml error: XML error: Invalid PCI address uid='0x0000', must be > 0x0000 and <= 0xffff Secondly, when the uid is specified explicitly with the invalid numerical value '0x0000', we actually expect the parsing error above. However, the domain is being defined and the uid value is silently changed to a valid value. The first issue is a bug and the second one is undesired behaviour, and both issues are related to how we (in-band) signal invalid values for uid and fid. So let's fix the XML parsing to do validation based on what is actually specified in the XML. The first issue is also related to the current code behaviour, which is, if either uid or fid is specified by the user, it is incorrectly assumed that both uid and fid are specified. This bug is fixed by identifying when the user specified ZPCI address is incomplete and auto-generating the missing ZPCI address. Signed-off-by: NBjoern Walk <bwalk@linux.ibm.com> Signed-off-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Signed-off-by: NShalini Chellathurai Saroja <shalini@linux.ibm.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
Signed-off-by: NBjoern Walk <bwalk@linux.ibm.com> Signed-off-by: NShalini Chellathurai Saroja <shalini@linux.ibm.com> Reviewed-by: NBoris Fiuczynski <fiuczy@linux.ibm.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
-
- 24 6月, 2020 1 次提交
-
-
由 Jonathon Jongsma 提交于
It's possible to use ramfb as the boot display of an assigned vgpu device. This was introduced in 4b95738c, but unfortunately the attribute was not formatted into the xml output for such a device. This patch fixes that oversight and adds a xml2xml test to verify proper behavior. https://bugzilla.redhat.com/show_bug.cgi?id=1847791Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 23 6月, 2020 2 次提交
-
-
由 Daniel Henrique Barboza 提交于
A TPM Proxy device can coexist with a regular TPM, but the current domain definition supports only a single TPM device in the 'tpm' pointer. This patch replaces this existing pointer in the domain definition to an array of TPM devices. All files that references the old pointer were adapted to handle the new array instead. virDomainDefParseXML() TPM related code was adapted to handle the parsing of an extra TPM device. TPM validations after this new scenario will be updated in the next patch. Tested-by: NSatheesh Rajendran <sathnaga@linux.vnet.ibm.com> Reviewed-by: NStefan Berger <stefanb@linux.ibm.com> Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
由 Menno Lageman 提交于
Add a new aw_bits attribute to the iommu device to control the address width of the intel-iommu Signed-off-by Menno Lageman <menno.lageman@oracle.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 22 6月, 2020 1 次提交
-
-
由 Peter Krempa 提交于
In preparation to allow heterogenous backups store the 'incremental' field per-disk and fill it by default from the per-backup field. Having this will be important once we'll want to allow incremental backup working while hotplugging a new disk. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
- 19 6月, 2020 4 次提交
-
-
由 Jonathon Jongsma 提交于
With recent additions to the node device xml schema, an xml schema can now describe a mdev device sufficiently for libvirt to create and start the device using the mdevctl utility. Note that some of the the configuration for a mediated device must be passed to mdevctl as a JSON-formatted file. In order to avoid creating and cleaning up temporary files, the JSON is instead fed to stdin and we pass the filename /dev/stdin to mdevctl. While this may not be portable, neither are mediated devices, so I don't believe it should cause any problems. Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jonathon Jongsma 提交于
In order to allow libvirt to create and start new mediated devices, we need to be able to verify that the device has been started. In order to do this, we'll need to save the UUID of newly-discovered devices within the virNodeDevCapMdev structure. This allows us to search the device list by UUID and verify whether the expected device has been started. Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jonathon Jongsma 提交于
Mediated devices support arbitrary vendor-specific attributes that can be attached to a mediated device. These attributes are ordered, and are written to sysfs in order after a device is created. This patch adds support for these attributes to the mdev data types and XML schema. Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jonathon Jongsma 提交于
When parsing a nodedev xml file, the iommuGroup element should be optional. This element should be read-only and is determined by the device driver. While this is a change to existing behavior, it doesn't break backwards-compatibility because it makes the parser less strict. Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 18 6月, 2020 1 次提交
-
-
由 Daniel Henrique Barboza 提交于
These helpers will be used in an auto-fill feature for incomplete NUMA topologies in the next patch. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 16 6月, 2020 5 次提交
-
-
由 John Ferlan 提交于
Since a08669c3, @tsc is not automatically free'd by any g_auto* method. Found by Coverity. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> Reviewed-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Jiri Denemark 提交于
Domains are now allowed to be pinned to host CPUs with IDs up to 16383. The new limit is as arbitrary as the old one. It's just bigger. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Laine Stump 提交于
Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Laine Stump 提交于
This was mostly boilerplate conversion, but in one case I needed to define several differently named char* to take the place of a single char *tmp that was re-used multiple times, and in another place there was a single char* that was used at the toplevel of the function, and then later used repeatedly inside a for loop, so I defined a new separate char* inside the loop. Signed-off-by: NLaine Stump <laine@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Daniel P. Berrangé 提交于
Historically IPv6 did not support NAT, so when IPv6 was added to libvirt's virtual networks, when requesting <forward mode="nat"/> libvirt will NOT apply NAT to IPv6 traffic, only IPv4 traffic. This is an annoying historical design decision as it means we cannot enable IPv6 automatically. We thus need to introduce a new attribute <forward mode="nat"> <nat ipv6="yes"/> </forward> Reviewed-by: NLaine Stump <laine@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 11 6月, 2020 1 次提交
-
-
由 Yi Li 提交于
Signed-off-by: NYi Li <yili@winhong.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 10 6月, 2020 4 次提交
-
-
由 Michal Privoznik 提交于
QEMU has -fw_cfg which allows users to tweak how firmware configures itself and/or provide new configuration blobs. Introduce new <sysinfo/> type "fwcfg" that will hold these new blobs. It's possible to either specify new value as a string or provide a filename which contents then serve as the value. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
The attribute is only allowed for host-passthrough CPUs and it can be used to request only migratable or all supported features to be enabled in the virtual CPU. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 09 6月, 2020 2 次提交
-
-
由 Michal Privoznik 提交于
There's no need to set ctxt->node outside of the function. The function can set it itself - it has all the info needed. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
I think that since <qemu:commandline/> is kind of a hack, it doesn't deserve place in the front row. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 04 6月, 2020 3 次提交
-
-
由 Daniel P. Berrangé 提交于
The previous fix accidentally picked up a debug change that put alignment back at 4, not 8, bytes as it claimed: commit 37ae0426 Author: Daniel P. Berrangé <berrange@redhat.com> Date: Wed Jun 3 11:18:23 2020 +0100 conf: force 8 byte alignment for virObjectEvent Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
We need to be able to cast from virObjectEventPtr to one of its many subclasses. Some of these subclasses have 8 byte alignment on 32-bit platforms, but virObjectEventPtr only has 4 byte alignment. Previously the virObject base class had 8 byte alignment but this dropped to 4 byte when converted to inherit from GObject. This introduces cast alignment warnings on 32-bit: ../../src/conf/domain_event.c: In function 'virDomainEventDispatchDefaultFunc': ../../src/conf/domain_event.c:1656:30: error: cast increases required alignment of target type [-Werror=cast-align] 1656 | rtcChangeEvent = (virDomainEventRTCChangePtr)event; | ^ ../../src/conf/domain_event.c:1785:34: error: cast increases required alignment of target type [-Werror=cast-align] 1785 | balloonChangeEvent = (virDomainEventBalloonChangePtr)event; | ^ ../../src/conf/domain_event.c:1896:35: error: cast increases required alignment of target type [-Werror=cast-align] 1896 | blockThresholdEvent = (virDomainEventBlockThresholdPtr)event; | ^ ../../src/conf/domain_event.c: In function 'virDomainQemuMonitorEventDispatchFunc': ../../src/conf/domain_event.c:1974:24: error: cast increases required alignment of target type [-Werror=cast-align] 1974 | qemuMonitorEvent = (virDomainQemuMonitorEventPtr)event; | ^ ../../src/conf/domain_event.c: In function 'virDomainQemuMonitorEventFilter': ../../src/conf/domain_event.c:2179:20: error: cast increases required alignment of target type [-Werror=cast-align] 2179 | monitorEvent = (virDomainQemuMonitorEventPtr) event; | ^ Forcing 8-byte alignment on virObjectEventPtr removes the alignment increase during casts to subclasses. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
This is convenience macro, use it more. This commit was generated using the following spatch: @@ symbol node; identifier old; identifier ctxt; type xmlNodePtr; @@ - xmlNodePtr old; + VIR_XPATH_NODE_AUTORESTORE(ctxt); ... - old = ctxt->node; ... when != old - ctxt->node = old; @@ symbol node; identifier old; identifier ctxt; type xmlNodePtr; @@ - xmlNodePtr old = ctxt->node; + VIR_XPATH_NODE_AUTORESTORE(ctxt); ... when != old - ctxt->node = old; Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 26 5月, 2020 1 次提交
-
-
由 Chen Hanxiao 提交于
https://gitlab.com/libvirt/libvirt/-/issues/13 Add support for downscript: <interface type='ethernet'> <mac address='00:11:22:33:44:55'/> <script path='/etc/qemu-ifup'/> <downscript path='/path/to/my/downscript'/> </interface> Signed-off-by: NChen Hanxiao <chen_han_xiao@126.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 25 5月, 2020 1 次提交
-
-
由 Daniel Henrique Barboza 提交于
Use automatic cleanup of variables. Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20200522195620.3843442-2-danielhb413@gmail.com> Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
-
- 18 5月, 2020 1 次提交
-
-
由 Yi Li 提交于
Use g_new0 to allocate and remove NULL checks from callers and the lock will release properly Signed-off-by: NYi Li <yili@winhong.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 12 5月, 2020 2 次提交
-
-
由 Peter Krempa 提交于
Remember the preferred placement of <auth> and <encryption> for a disk source across libvirtd restarts. Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Peter Krempa 提交于
Modern way to store <auth> and <encryption> of a <disk> is under <source>. This was added to mirror how <backingStore> handles these and in fact they are relevant to the source rather than to any other part of the disk. Historically we allowed them to be directly under <disk> and we need to keep compatibility. This wasn't a problem until introduction of -blockdev in qemu using of <auth> or <encryption> plainly wouldn't work with backing chains. Now that it works in backing chains and can be moved back and forth using snapshots/block-commit we need to ensure that the original placement is properly kept even if the source changes. To achieve the above semantics we need to store the preferred placement with the disk definition rather than the storage source definitions and also ensure that the modern way is chosen when the VM started with <source/encryption> only in the backing store. https://bugzilla.redhat.com/show_bug.cgi?id=1822878Signed-off-by: NPeter Krempa <pkrempa@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 05 5月, 2020 2 次提交
-
-
由 Michal Privoznik 提交于
In a few places we use 0 and false, or 1 and true interchangeably even though the variable or return type in question is boolean. Fix those places. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
Instead of the following pattern: type ret; ... ret = func(); return ret; we can use: return func() directly. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 27 4月, 2020 4 次提交
-
-
由 Daniel Henrique Barboza 提交于
This patch adds the implementation of the IBS pSeries feature, using the QEMU_CAPS_MACHINE_PSERIES_CAP_IBS capability added in the previous patch. IBS can have the following values: "broken", "workaround", "fixed-ibs", "fixed-ccd" and "fixed-na". This is the XML format for the cap: <features> <ibs value='fixed-ibs'/> </features> Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel Henrique Barboza 提交于
This patch adds the implementation of the SBBC pSeries feature, using the QEMU_CAPS_MACHINE_PSERIES_CAP_SBBC capability added in the previous patch. Like the previously added CFPC feature, SBBC can have the values "broken", "workaround" or "fixed". Extra code is required to handle it since it's not a regular tristate capability. This is the XML format for the cap: <features> <sbbc value='workaround'/> </features> Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Daniel Henrique Barboza 提交于
This patch adds the implementation of the CFPC pSeries feature, using the QEMU_CAPS_MACHINE_PSERIES_CAP_CFPC capability added in the previous patch. CPFC can have the values "broken", "workaround" or "fixed". Extra code is required to handle it since it's not a regular tristate capability. This is the XML format for the cap: <features> <cfpc value='workaround'/> </features> Signed-off-by: NDaniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Julio Faracco 提交于
This commit fix a wrong variable initialization. There is a variable called `new_lease` which is being initialized with the content of parameter `lease`. To avoid memory leak, the proper way is initialize with NULL first. This wrong statement was added by commit 97a0aa24. There are some other improvements also. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
-