qemu: capabilities: Export functions necessary for probing machine types

Upcoming patch will re-probe machines from the current qemu instance to
populate the private copy of qemuCaps after reconnecting to a running
instance. This is needed to be able to access the machine type data,
while storing them in the status XML seems to be an overkill, for
information which can be easily reprobed.

Export 'virQEMUCapsInitQMPArch' needed to populate the 'arch' field and
'virQEMUCapsProbeQMPMachineTypes'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2023-08-28 12:56:40 +02:00
parent c7a0a0fe11
commit e0a5787bff
2 changed files with 12 additions and 3 deletions

View File

@ -2797,7 +2797,7 @@ virQEMUCapsHasMachines(virQEMUCaps *qemuCaps)
}
static int
int
virQEMUCapsProbeQMPMachineTypes(virQEMUCaps *qemuCaps,
virDomainVirtType virtType,
qemuMonitor *mon)
@ -5391,9 +5391,9 @@ virQEMUCapsIsValid(void *data,
*
* Returns: 0 on success, <0 on failure
*/
static int
int
virQEMUCapsInitQMPArch(virQEMUCaps *qemuCaps,
qemuMonitor *mon)
qemuMonitor *mon)
{
g_autofree char *archstr = NULL;

View File

@ -895,3 +895,12 @@ virQEMUCapsProbeHVF(virQEMUCaps *qemuCaps) G_NO_INLINE;
virArch virQEMUCapsArchFromString(const char *arch);
const char *virQEMUCapsArchToString(virArch arch);
int
virQEMUCapsInitQMPArch(virQEMUCaps *qemuCaps,
qemuMonitor *mon);
int
virQEMUCapsProbeQMPMachineTypes(virQEMUCaps *qemuCaps,
virDomainVirtType virtType,
qemuMonitor *mon);