- 22 2月, 2018 21 次提交
-
-
由 Daniel P. Berrangé 提交于
The THREADS.txt describes the way threading worked in libvirtd many many years ago, long before even the RPC code was modularized. Things have evolved significantly since then, so delete this potentially misleading doc. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Remove lots of duplication in the sysconfig file handling, so we can add more conf files without modifying so many places. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Remove lots of duplication in the sysv init file handling, so we can add more init files without modifying so many places. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Remove lots of duplication in the systemd unit file handling, so we can add more unit files without modifying so many places. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Address warning from -Wswitch-enum by adding missing cases for graphics listen types that are not supported. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Jim Fehlig 提交于
libxl supports setting the domain real time clock to local time or UTC via the localtime field of libxl_domain_build_info. Adjustment of the clock is also supported via the rtc_timeoffset field. The libvirt libxl driver has never supported these settings, instead relying on libxl's default of a UTC real time clock with adjustment set to 0. There is at least one user that would like the ability to change the defaults https://www.redhat.com/archives/libvirt-users/2018-February/msg00059.html Add support for specifying a local time clock and for specifying an adjustment for both local time and UTC clocks. Add a test case to verify the XML to libxl_domain_config conversion. Local time clock and clock adjustment is already supported by the XML <-> xl.cfg converter. What is missing is an explicit test for the conversion. There are plenty of existing tests that all use UTC with 0 adjustment. Hijack test-fullvirt-tsc-timer to test a local time clock with 1 hour adjustment. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Ján Tomko 提交于
Commit 9275def5 reduced the if block to one line without removing the braces. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Daniel P. Berrangé 提交于
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 constants *and* also have a default case. To get a warning in that scenario requires that we turn on -Wswitch-enum. In a few cases where we explicitly don't want to list all enum cases, we can discard the enum type checking by casting the value to a plain int. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Cast away enum type in places where we don't wish to cover all cases. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements, or cast away enum type in places where we don't wish to cover all cases. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements, or cast away enum type in places where we don't wish to cover all cases. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements, or cast away enum type in places where we don't wish to cover all cases. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Cast away enum type for libxl scheduler constants since we don't want to cover all of them and don't want build to break when new ones are added. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements. This improves debug logging integration with openwsman. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements, or explicitly cast away enum type where we don't want to list all cases. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
Ensure all enum cases are listed in switch statements. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
To ensure we have standardized error messages when reporting problems with enum values being out of a range, add virReportEnumRangeError(). virReportEnumRangeError(virDomainState, 34); results in a message "internal error: Unexpected enum value 34 for virDomainState" Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 21 2月, 2018 2 次提交
-
-
由 Daniel P. Berrangé 提交于
Currently building --without-libvirtd causes a failure to link the node device driver: node_device/.libs/libvirt_driver_nodedev_la-node_device_driver.o: In function `nodedevRegister': /home/berrange/src/virt/libvirt/src/node_device/node_device_driver.c:649: undefined reference to `udevNodeRegister' collect2: error: ld returned 1 exit status because it causes us to build the core nodedev driver, but then skip the implementations, despite udev being available. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Laine Stump 提交于
These two objects are used to access fields in actual ethernet packets captures with libpcap, so it's essential that they don't change size for any reason. This patch uses gnulib's verify() macro to make sure their sizes don't change. Signed-off-by: NLaine Stump <laine@laine.org> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 20 2月, 2018 12 次提交
-
-
由 Daniel P. Berrangé 提交于
GCC 8 became more fussy 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 are falling through, WIZZ is not falling through. IOW, GCC wants us to write FOO: BAR: ATTRIBUTE_FALLTHROUGH; WIZZ: Second, it will report risk of fallthrough even if you have a case statement for every single enum value, but only if the switch is nested inside another switch and the outer case statement has no final break. This is is arguably valid because despite the fact that we have cast from "int" to the enum typedef, nothing guarantees that the variable we're switching on only contains values that have corresponding switch labels. e.g. int domstate = 87539319; switch ((virDomainState)domstate) { ... } will not match enum value, but also not raise any kind of compiler warning. So it is right to complain about risk of fallthrough if no default: is present. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The controller model is slightly unusual in that the default value is -1, not 0. As a result the default value is not covered by any of the existing enum cases. This in turn means that any switch() statements that think they have covered all cases, will in fact not match the default value at all. In the qemuDomainDeviceCalculatePCIConnectFlags() method this has caused a serious mistake where we fallthrough from the SCSI controller case, to the VirtioSerial controller case, and from the USB controller case to the IDE controller case. By adding explicit enum constant starting at -1, we can ensure switches remember to handle the default case. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
There's no need to perform checks before conversion, we can just call virDomainControllerPCIModelNameTypeToString() and check the results later on. Since the variables involved are only used for PCI controllers, we can declare them in the 'case' scope rather than in the function scope to make everything a bit nicer while at it. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
Performing the skip earlier will help us making the function nicer later on. We also make the condition for the skip a bit more precise, though that'a more for self-documenting purposes and doesn't change anything in practice. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Andrea Bolognani 提交于
Even when we skip part of the processing, we still want error checking on the buffer. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Michal Privoznik 提交于
This function returns nothing but zero. Therefore it makes no sense to have it returning an integer. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Michal Privoznik 提交于
If formatting of storage encryption or private data fails we must jump to the error label instead of returning immediately otherwise @attrBuf and @childBuf might be leaked. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The src/Makefile.am rules all re-generate the RPC dispatch code whenever the Makefile.am changes, so for consistency do that for daemon/Makefile.am too. Reviewed-by: NPavel Hrdina <phrdina@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Andrea Bolognani 提交于
When you add a bunch of pcie-root-port controllers to a q35 guest in order to have hotplug capabilities, you also need to make sure you're adding the pcie-root controller at the same time or you will get an error. Document this fact. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Laine Stump 提交于
This file was modified in an editor buffer but not saved prior to commit e62cb4a9 (which removed virMacAddr::generated), so the bhyve build would fail. Signed-off-by: NLaine Stump <laine@laine.org>
-
由 Laine Stump 提交于
Commit 7e62c4cd (first appearing in libvirt-3.9.0 as a resolution to rhbz #1343919) added a "generated" attribute to virMacAddr that was set whenever a mac address was auto-generated by libvirt. This knowledge was used in a single place - when trying to match a NetDef from the Domain to Delete with user-provided XML. Since the XML parser always auto-generates a MAC address for NetDefs when none is provided, it was previously impossible to make a search where the MAC address isn't significant, but the addition of the "generated" attribute made it possible for the search function to ignore auto-generated MACs. This implementation had a problem though - it was adding a field to a "low level" struct - virMacAddr - which is used in other places with the assumption that it contains exactly a 6 byte MAC address and nothing else. In particular, virNWFilterSnoopEthHdr uses virMacAddr as part of the definition of an ethernet packet header, whose layout must of course match an actual ethernet packet. Adding the extra bools into virNWFilterSnoopEthHdr caused the nwfilter driver's "IP discovery via DHCP packet snooping" functionality to mysteriously stop working. In order to fix that behavior, and prevent potential future similar odd behavior, this patch moves the "generated" member out of virMacAddr (so that it is again really is just a MAC address) into virDomainNetDef, and sets it only when virDomainNetGenerateMAC() is called from virDomainNetDefParseXML() (which is the only time we care about it). Resolves: https://bugzilla.redhat.com/1529338 (It should also be applied to any maintenance branch that applies commit 7e62c4cd and friends to resolve https://bugzilla.redhat.com/1343919) Signed-off-by: NLaine Stump <laine@laine.org>
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 19 2月, 2018 5 次提交
-
-
由 Daniel P. Berrangé 提交于
It is very difficult while reading the migration code trying to understand whether a particular function is being called on the src side or the dst side, or either. Putting "Src" or "Dst" in the method names will make this much more obvious. "Any" is used in a few helpers which can be called from both sides. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Peter Krempa 提交于
QEMU code does not work well with too big numbers on the JSON monitor so our monitor code supports sending only numbers up to LLONG_MAX. Avoid a weird error message by limiting the size of the 'bandwidth' parameter for block copy. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1532542Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Peter Krempa 提交于
The variable names for the options and information about a command should have an underscore in places where the virsh command has a hyphen. The function callback name should capitalize the letter after the hyphen. This was not used in 'blockcommit', 'blockcopy', 'blockjob', 'blockpull', and 'blockresize' commands. Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
-
由 Andrea Bolognani 提交于
Commit 2d43f0a2 dropped virDomainDiskTranslateSourcePool()'s first argument but failed to update callers in the bhyve driver. Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Daniel P. Berrangé 提交于
Further cleanup from commit 0c63c117 Author: Daniel P. Berrangé <berrange@redhat.com> Date: Fri Feb 9 15:08:53 2018 +0000 conf: reimplement virDomainNetResolveActualType in terms of public API Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-