On Mon, Aug 29, 2016 at 17:59:02 -0400, John Ferlan wrote:
On 08/12/2016 09:33 AM, Jiri Denemark wrote:
> Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
> ---
> src/qemu/qemu_capabilities.c | 24 +-
> src/qemu/qemu_capabilities.h | 3 +-
> src/qemu/qemu_driver.c | 7 +-
> tests/domaincapsschemadata/qemu_1.7.0.x86_64.xml | 31 +-
> .../qemu_2.6.0-gicv2-virt.aarch64.xml | 37 +-
> .../qemu_2.6.0-gicv3-virt.aarch64.xml | 37 +-
> tests/domaincapsschemadata/qemu_2.6.0.aarch64.xml | 37 +-
> tests/domaincapsschemadata/qemu_2.6.0.ppc64le.xml | 437 ++++++++++++++++++++-
> tests/domaincapsschemadata/qemu_2.6.0.x86_64.xml | 35 +-
> tests/domaincapstest.c | 56 ++-
> 10 files changed, 682 insertions(+), 22 deletions(-)
>
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index aeea3a3..7a7ddb8 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -4194,6 +4194,26 @@ virQEMUCapsFillDomainOSCaps(virDomainCapsOSPtr os,
>
>
> static int
> +virQEMUCapsFillDomainCPUCaps(virCapsPtr caps,
> + virQEMUCapsPtr qemuCaps,
> + virDomainCapsPtr domCaps)
> +{
> +
> + if (domCaps->virttype == VIR_DOMAIN_VIRT_KVM &&
> + virQEMUCapsGuestIsNative(caps->host.arch, qemuCaps->arch))
^^^^
Can caps be NULL?
> + domCaps->cpu.hostPassthrough = true;
> +
> + if (qemuCaps->cpuDefinitions && caps && caps->host.cpu)
^^^^
Since you check here
No, caps cannot be NULL and the code will go away completely in patch 28
in this series. I fixed it anyway.
Jirka