2015-09-09 14:03:14 +00:00
|
|
|
/*
|
|
|
|
* qemu_capspriv.h: private declarations for QEMU capabilities generation
|
|
|
|
*
|
|
|
|
* Copyright (C) 2015 Samsung Electronics Co. Ltd
|
|
|
|
* Copyright (C) 2015 Pavel Fedin
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Author: Pavel Fedin <p.fedin@samsung.com>
|
|
|
|
*/
|
|
|
|
|
2017-03-22 15:22:15 +00:00
|
|
|
#ifndef __QEMU_CAPSPRIV_H_ALLOW__
|
2015-09-09 14:03:14 +00:00
|
|
|
# error "qemu_capspriv.h may only be included by qemu_capabilities.c or test suites"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef __QEMU_CAPSPRIV_H__
|
|
|
|
# define __QEMU_CAPSPRIV_H__
|
|
|
|
|
|
|
|
struct _virQEMUCapsCache {
|
|
|
|
virMutex lock;
|
|
|
|
virHashTablePtr binaries;
|
|
|
|
char *libDir;
|
|
|
|
char *cacheDir;
|
|
|
|
uid_t runUid;
|
|
|
|
gid_t runGid;
|
|
|
|
};
|
|
|
|
|
2016-08-04 20:43:22 +00:00
|
|
|
virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps);
|
|
|
|
|
2016-04-26 13:03:06 +00:00
|
|
|
virQEMUCapsPtr
|
2016-06-15 11:48:19 +00:00
|
|
|
virQEMUCapsNewForBinaryInternal(virCapsPtr caps,
|
|
|
|
const char *binary,
|
2016-04-26 13:03:06 +00:00
|
|
|
const char *libDir,
|
|
|
|
const char *cacheDir,
|
|
|
|
uid_t runUid,
|
|
|
|
gid_t runGid,
|
|
|
|
bool qmpOnly);
|
|
|
|
|
2016-06-15 12:35:18 +00:00
|
|
|
int virQEMUCapsLoadCache(virCapsPtr caps,
|
|
|
|
virQEMUCapsPtr qemuCaps,
|
2016-04-28 13:01:02 +00:00
|
|
|
const char *filename,
|
|
|
|
time_t *selfctime,
|
|
|
|
unsigned long *selfvers);
|
|
|
|
char *virQEMUCapsFormatCache(virQEMUCapsPtr qemuCaps,
|
|
|
|
time_t selfCTime,
|
|
|
|
unsigned long selfVersion);
|
|
|
|
|
2016-06-10 15:16:21 +00:00
|
|
|
int
|
|
|
|
virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
|
|
|
|
qemuMonitorPtr mon);
|
|
|
|
|
|
|
|
int
|
|
|
|
virQEMUCapsInitQMPMonitorTCG(virQEMUCapsPtr qemuCaps,
|
|
|
|
qemuMonitorPtr mon);
|
|
|
|
|
2016-08-03 10:26:41 +00:00
|
|
|
void
|
|
|
|
virQEMUCapsSetArch(virQEMUCapsPtr qemuCaps,
|
|
|
|
virArch arch);
|
2016-06-15 12:35:18 +00:00
|
|
|
|
2017-03-02 14:51:44 +00:00
|
|
|
void
|
|
|
|
virQEMUCapsSetVersion(virQEMUCapsPtr qemuCaps,
|
|
|
|
unsigned int version);
|
|
|
|
|
2016-06-15 12:35:18 +00:00
|
|
|
void
|
|
|
|
virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
|
2017-02-22 15:51:50 +00:00
|
|
|
virCapsPtr caps,
|
|
|
|
virDomainVirtType type);
|
2017-02-23 13:31:23 +00:00
|
|
|
|
|
|
|
int
|
|
|
|
virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps,
|
|
|
|
virDomainVirtType type,
|
2017-03-29 11:33:50 +00:00
|
|
|
virCPUDefPtr cpu,
|
|
|
|
bool migratable);
|
2017-02-23 13:31:23 +00:00
|
|
|
|
2017-04-05 13:38:37 +00:00
|
|
|
void
|
|
|
|
virQEMUCapsInitQMPBasicArch(virQEMUCapsPtr qemuCaps);
|
|
|
|
|
2017-02-23 13:31:23 +00:00
|
|
|
void
|
|
|
|
virQEMUCapsSetCPUModelInfo(virQEMUCapsPtr qemuCaps,
|
|
|
|
virDomainVirtType type,
|
|
|
|
qemuMonitorCPUModelInfoPtr modelInfo);
|
2017-03-08 12:32:46 +00:00
|
|
|
|
|
|
|
virCPUDefPtr
|
|
|
|
virQEMUCapsProbeHostCPUForEmulator(virCapsPtr caps,
|
|
|
|
virQEMUCapsPtr qemuCaps,
|
2017-04-07 14:07:49 +00:00
|
|
|
virDomainVirtType type) ATTRIBUTE_NOINLINE;
|
2017-04-05 13:38:37 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
virQEMUCapsSetGICCapabilities(virQEMUCapsPtr qemuCaps,
|
|
|
|
virGICCapability *capabilities,
|
|
|
|
size_t ncapabilities);
|
|
|
|
|
|
|
|
int
|
|
|
|
virQEMUCapsParseHelpStr(const char *qemu,
|
|
|
|
const char *str,
|
|
|
|
virQEMUCapsPtr qemuCaps,
|
|
|
|
unsigned int *version,
|
|
|
|
bool *is_kvm,
|
|
|
|
unsigned int *kvm_version,
|
|
|
|
bool check_yajl,
|
|
|
|
const char *qmperr);
|
|
|
|
|
|
|
|
int
|
|
|
|
virQEMUCapsParseDeviceStr(virQEMUCapsPtr qemuCaps,
|
|
|
|
const char *str);
|
2015-09-09 14:03:14 +00:00
|
|
|
#endif
|