render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
c480ed
From 161668ec1a5e6b5cba0136ef50926b5c53802941 Mon Sep 17 00:00:00 2001
c480ed
Message-Id: <161668ec1a5e6b5cba0136ef50926b5c53802941@dist-git>
c480ed
From: Jiri Denemark <jdenemar@redhat.com>
c480ed
Date: Fri, 21 Jun 2019 09:25:04 +0200
c480ed
Subject: [PATCH] qemu_capabilities: Introduce virQEMUCapsGetCPUModelInfo
c480ed
MIME-Version: 1.0
c480ed
Content-Type: text/plain; charset=UTF-8
c480ed
Content-Transfer-Encoding: 8bit
c480ed
c480ed
This is a simple wrapper around virQEMUCapsGetHostCPUData usable in
c480ed
tests for getting qemuMonitorCPUModelInfoPtr from QEMU caps.
c480ed
c480ed
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
(cherry picked from commit 8aa47cc072fb9a3a8e8b15c6509aae648f5c24e0)
c480ed
c480ed
https://bugzilla.redhat.com/show_bug.cgi?id=1686895
c480ed
c480ed
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c480ed
Message-Id: <4e467c308f24313e69e21c637663f6744482b266.1561068591.git.jdenemar@redhat.com>
c480ed
Reviewed-by: Ján Tomko <jtomko@redhat.com>
c480ed
---
c480ed
 src/qemu/qemu_capabilities.c | 10 ++++++++++
c480ed
 src/qemu/qemu_capspriv.h     |  4 ++++
c480ed
 2 files changed, 14 insertions(+)
c480ed
c480ed
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
c480ed
index 5a7160d02e..942cbf272d 100644
c480ed
--- a/src/qemu/qemu_capabilities.c
c480ed
+++ b/src/qemu/qemu_capabilities.c
c480ed
@@ -3049,6 +3049,16 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
c480ed
 }
c480ed
 
c480ed
 
c480ed
+qemuMonitorCPUModelInfoPtr
c480ed
+virQEMUCapsGetCPUModelInfo(virQEMUCapsPtr qemuCaps,
c480ed
+                           virDomainVirtType type)
c480ed
+{
c480ed
+    virQEMUCapsHostCPUDataPtr cpuData = virQEMUCapsGetHostCPUData(qemuCaps, type);
c480ed
+
c480ed
+    return cpuData->info;
c480ed
+}
c480ed
+
c480ed
+
c480ed
 void
c480ed
 virQEMUCapsSetCPUModelInfo(virQEMUCapsPtr qemuCaps,
c480ed
                            virDomainVirtType type,
c480ed
diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h
c480ed
index 70cdbbc504..c3b7f934a9 100644
c480ed
--- a/src/qemu/qemu_capspriv.h
c480ed
+++ b/src/qemu/qemu_capspriv.h
c480ed
@@ -75,6 +75,10 @@ virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps,
c480ed
 void
c480ed
 virQEMUCapsInitQMPBasicArch(virQEMUCapsPtr qemuCaps);
c480ed
 
c480ed
+qemuMonitorCPUModelInfoPtr
c480ed
+virQEMUCapsGetCPUModelInfo(virQEMUCapsPtr qemuCaps,
c480ed
+                           virDomainVirtType type);
c480ed
+
c480ed
 void
c480ed
 virQEMUCapsSetCPUModelInfo(virQEMUCapsPtr qemuCaps,
c480ed
                            virDomainVirtType type,
c480ed
-- 
c480ed
2.22.0
c480ed