- 09 10月, 2019 1 次提交
-
-
由 Jiri Denemark 提交于
This reverts commit 2d8721e2. This fix was both incomplete and too general. It only fixed domain startup, but libvirt would still report empty list of supported CPU models with recent QEMU for ppc64. On the other hand, while ppc64 QEMU ignores case when looking up CPU model names, x86_64 QEMU does case sensitive lookup. Without reverting this patch, libvirt could happily accept CPU model names which are not supported by QEMU. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 07 8月, 2019 3 次提交
-
-
由 Cole Robinson 提交于
The qemu driver already does some <rng> model validation, based on qemuCaps. However, the logic for exposing <rng> model values in domcaps is basically identical. This drops the qemuCaps checking and compares against the domCaps data directly. This approach makes it basically impossible to add a new <rng> model to the qemu driver without extending domcaps. The validation can also be shared with other drivers eventually. Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
This is an entrypoint to validate a virDomainDeviceDef against values filled into virDomainCaps. Currently it's just a stub Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
This adds device <rng> reporting. Example output: <rng supported='yes'> <enum name='model'> <value>virtio</value> <value>virtio-transitional</value> <value>virtio-non-transitional</value> </enum> <enum name='backendModel'> <value>random</value> <value>egd</value> </enum> </rng> Reviewed-by: NReviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 12 4月, 2019 1 次提交
-
-
由 Cole Robinson 提交于
Standardize on putting the _LAST enum value on the second line of VIR_ENUM_IMPL invocations. Later patches that add string labels to VIR_ENUM_IMPL will push most of these to the second line anyways, so this saves some noise. Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 10 4月, 2019 1 次提交
-
-
由 Michal Privoznik 提交于
If a management application wants to use firmware auto selection feature it can't currently know if the libvirtd it's talking to support is or not. Moreover, it doesn't know which values that are accepted for the @firmware attribute of <os/> when parsing will allow successful start of the domain later, i.e. if the mgmt application wants to use 'bios' whether there exists a FW descriptor in the system that describes bios. This commit then adds 'firmware' enum to <os/> element in <domainCapabilities/> XML like this: <enum name='firmware'> <value>bios</value> <value>efi</value> </enum> We can see both 'bios' and 'efi' listed which means that there are descriptors for both found in the system (matched with the machine type and architecture reported in the domain capabilities earlier and not shown here). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Acked-by: NLaszlo Ersek <lersek@redhat.com>
-
- 18 3月, 2019 4 次提交
-
-
由 Cole Robinson 提交于
After this, newly added enums will not automatically show up in driver output unless the driver code specifically sets report=true Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Change domcaps to skip formatting XML if the default TRISTATE_BOOL_ABSENT is found. Now when domcaps is extended, driver XML output won't change until an explicit TRISTATE_BOOL value is set in driver code. Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Switch most 'supported' handling to use virTristateBool, so eventually we can handle the ABSENT state. For now the XML formatter treats ABSENT the same as FALSE, so there's no functional output change. This will be addressed in later patches Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Similar to the macros we have for formatting enums, add a macro to simplify formatting the pattern: <FOO supported='yes|no'/> Acked-by: NMichal Privoznik <mprivozn@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 05 3月, 2019 1 次提交
-
-
由 Cole Robinson 提交于
This generates new XML like: <disk> <enum name='model'> <value>virtio</value> <value>virtio-transitional</value> <value>virtio-non-transitional</value> </enum> </disk> Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 04 2月, 2019 2 次提交
-
-
由 Cole Robinson 提交于
Missing semicolon at the end of macros can confuse some analyzers (like cppcheck <filename>). VIR_ONCE_GLOBAL_INIT is almost exclusively called without an ending semicolon, but let's standardize on using one like the other macros. Add a dummy struct definition at the end of the macro, so the compiler will require callers to add a semicolon. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Cole Robinson 提交于
Missing semicolon at the end of macros can confuse some analyzers (like cppcheck <filename>), and we have a mix of semicolon and non-semicolon usage through the code. Let's standardize on using a semicolon for VIR_ENUM_IMPL calls. Move the verify() statement to the end of the macro and drop the semicolon, so the compiler will require callers to add a semicolon. While we are touching these call sites, standardize on putting the closing parenth on its own line, as discussed here: https://www.redhat.com/archives/libvir-list/2019-January/msg00750.htmlReviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 14 12月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
In many files there are header comments that contain an Author: statement, supposedly reflecting who originally wrote the code. In a large collaborative project like libvirt, any non-trivial file will have been modified by a large number of different contributors. IOW, the Author: comments are quickly out of date, omitting people who have made significant contribitions. In some places Author: lines have been added despite the person merely being responsible for creating the file by moving existing code out of another file. IOW, the Author: lines give an incorrect record of authorship. With this all in mind, the comments are useless as a means to identify who to talk to about code in a particular file. Contributors will always be better off using 'git log' and 'git blame' if they need to find the author of a particular bit of code. This commit thus deletes all Author: comments from the source and adds a rule to prevent them reappearing. The Copyright headers are similarly misleading and inaccurate, however, we cannot delete these as they have legal meaning, despite being largely inaccurate. In addition only the copyright holder is permitted to change their respective copyright statement. Reviewed-by: NErik Skultety <eskultet@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 17 9月, 2018 1 次提交
-
-
由 Shi Lei 提交于
Signed-off-by: NShi Lei <shi_lei@massclouds.com>
-
- 15 6月, 2018 1 次提交
-
-
由 Erik Skultety 提交于
We only formatted the <sev> element when QEMU supported the feature when in fact we should always format the element to make clear that libvirt knows about the feature and the fact whether it is or isn't supported depends on QEMU version, in other words if QEMU doesn't support the feature we're going to format the following into the domain capabilities XML: <sev supported='no'/> This patch also adjusts the RNG schema accordingly in order to reflect the proposed change. Signed-off-by: NErik Skultety <eskultet@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
-
- 13 6月, 2018 1 次提交
-
-
由 Ján Tomko 提交于
We have enough elements using underscores instead of camelCase, do not bring dashes into the mix. Signed-off-by: NJán Tomko <jtomko@redhat.com> Reviewed-by: NBrijesh Singh <brijesh.singh@amd.com> Tested-by: NBrijesh Singh <brijesh.singh@amd.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 12 6月, 2018 2 次提交
-
-
由 Brijesh Singh 提交于
Extend hypervisor capabilities to include sev feature. When available, hypervisor supports launching an encrypted VM on AMD platform. The sev feature tag provides additional details like Platform Diffie-Hellman (PDH) key and certificate chain which can be used by the guest owner to establish a cryptographic session with the SEV firmware to negotiate keys used for attestation or to provide secret during launch. Signed-off-by: NBrijesh Singh <brijesh.singh@amd.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
由 Brijesh Singh 提交于
QEMU version >= 2.12 provides support for launching an encrypted VMs on AMD x86 platform using Secure Encrypted Virtualization (SEV) feature. This patch adds support to query the SEV capability from the qemu. Signed-off-by: NBrijesh Singh <brijesh.singh@amd.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 25 5月, 2018 1 次提交
-
-
由 John Ferlan 提交于
Report domaincaps <features><genid supported='yes'/> if the guest config accepts <genid/> or <genid>$GUID</genid>. Signed-off-by: NJohn Ferlan <jferlan@redhat.com> ACKed-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 04 5月, 2018 2 次提交
-
-
由 Cole Robinson 提交于
Report <features><vmcoreinfo supported='yes'/> if the guest config accepts <features><vmcoreinfo state='on'/> Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 18 4月, 2018 1 次提交
-
-
由 Michal Privoznik 提交于
So far we are repeating the following lines over and over: if (!(virSomeObjectClass = virClassNew(virClassForObject(), "virSomeObject", sizeof(virSomeObject), virSomeObjectDispose))) return -1; While this works, it is impossible to do some checking. Firstly, the class name (the 2nd argument) doesn't match the name in the code in all cases (the 3rd argument). Secondly, the current style is needlessly verbose. This commit turns example into following: if (!(VIR_CLASS_NEW(virSomeObject, virClassForObject))) return -1; Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 12 1月, 2018 1 次提交
-
-
由 Scott Garfinkle 提交于
Qemu 2.11 allows case-insensitive specification of CPU models. This patch fixes the resulting problems on (at least) POWER arch machines so that Power8 and POWER8 are not different. Signed-off-by: NScott Garfinkle <scottgar@linux.vnet.ibm.com>
-
- 03 11月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
Right-aligning backslashes when defining macros or using complex commands in Makefiles looks cute, but as soon as any changes is required to the code you end up with either distractingly broken alignment or unnecessarily big diffs where most of the changes are just pushing all backslashes a few characters to one side. Generated using $ git grep -El '[[:blank:]][[:blank:]]\\$' | \ grep -E '*\.([chx]|am|mk)$$' | \ while read f; do \ sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \ done Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 26 10月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
When adding CPU usability blockers I forgot to properly free them when in virDomainCapsCPUModelsDispose. Reported-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 16 10月, 2017 2 次提交
-
-
由 Jiri Denemark 提交于
This internal API can be used to find a specific CPU model in virDomainCapsCPUModels list. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Jiri Denemark 提交于
When a hypervisor marks a CPU model as unusable on the current host, it may also give us a list of features which prevent the model from being usable. Storing this list in virDomainCapsCPUModel will help the CPU driver with creating a host-model CPU configuration. Signed-off-by: NJiri Denemark <jdenemar@redhat.com> Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
-
- 21 9月, 2017 1 次提交
-
-
由 Jiri Denemark 提交于
In the past we updated host-model CPUs with host CPU data by adding a model and features, but keeping the host-model mode. And since the CPU model is not normally formatted for host-model CPU defs, we had to pass the updateCPU flag to the formatting code to be able to properly output updated host-model CPUs. Libvirt doesn't do this anymore, host-model CPUs are turned into custom mode CPUs once updated with host CPU data and thus there's no reason for keeping the hacks inside CPU XML formatters. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 29 8月, 2017 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 11 4月, 2017 1 次提交
-
-
由 Pavel Hrdina 提交于
Commit 14319c81 introduced CPU host model in domain capabilities and the *hostmodel* variable is always filled by virCPUDefCopy() and needs to be freed. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 22 3月, 2017 1 次提交
-
-
由 Michal Privoznik 提交于
For some drivers the domain's machine type makes no sense. They just don't use it. A great example is bhyve driver. Therefore it makes very less sense to report machine in domain capabilities XML. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 26 11月, 2016 1 次提交
-
-
由 Jiri Denemark 提交于
"host" CPU model is supported by a special host-passthrough CPU mode and users is not allowed to specify this model directly with custom mode. Thus we should not advertise "host" CPU model in domain capabilities. This worked well on architectures for which libvirt provides a list of supported CPU models in cpu_map.xml (since "host" is not in the list). But we need to explicitly filter "host" model out for all other architectures. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 25 11月, 2016 1 次提交
-
-
由 Michal Privoznik 提交于
We have couple of functions that operate over NULL terminated lits of strings. However, our naming sucks: virStringJoin virStringFreeList virStringFreeListCount virStringArrayHasString virStringGetFirstWithPrefix We can do better: virStringListJoin virStringListFree virStringListFreeCount virStringListHasString virStringListGetFirstWithPrefix Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 22 9月, 2016 4 次提交
-
-
由 Jiri Denemark 提交于
The domain capabilities XML is capable of showing whether each guest CPU mode is supported or not with a possibility to provide additional details. This patch enhances host-model capability to advertise the exact CPU model which will be used as a host-model: <cpu> ... <mode name='host-model' supported='yes'> <model fallback='allow'>Broadwell</model> <vendor>Intel</vendor> <feature policy='disable' name='aes'/> <feature policy='require' name='vmx'/> </mode> ... </cpu> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
In case a hypervisor is able to tell us a list of supported CPU models and whether each CPU models can be used on the current host, we can propagate this to domain capabilities. This is a better alternative to calling virConnectCompareCPU for each supported CPU model. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Listing all CPU models supported by QEMU in domain capabilities makes little sense when libvirt will refuse any model it doesn't know about. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
The patch adds <cpu> element to domain capabilities XML: <cpu> <mode name='host-passthrough' supported='yes'/> <mode name='host-model' supported='yes'/> <mode name='custom' supported='yes'> <model>Broadwell</model> <model>Broadwell-noTSX</model> ... </mode> </cpu> Applications can use it to inspect what CPU configuration modes are supported for a specific combination of domain type, emulator binary, guest architecture and machine type. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 10 5月, 2016 2 次提交
-
-
由 Cole Robinson 提交于
Requires adding the plumbing for <device><video> The value is <enum name='modelType'> to match the associated domain XML of <video><model type='XXX'/> Wire it up for qemu too
-
由 Cole Robinson 提交于
Requires adding the plumbing for <device><graphics> Wire it up for qemu too
-