2017-03-08 12:32:46 +00:00
|
|
|
/*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2017-07-21 12:24:51 +00:00
|
|
|
|
|
|
|
#include "conf/cpu_conf.h"
|
|
|
|
#include "cpu/cpu.h"
|
2017-03-08 12:32:46 +00:00
|
|
|
#include "qemu/qemu_capabilities.h"
|
2017-03-22 15:22:15 +00:00
|
|
|
#define __QEMU_CAPSPRIV_H_ALLOW__
|
2017-03-08 12:32:46 +00:00
|
|
|
#include "qemu/qemu_capspriv.h"
|
2017-03-22 15:22:15 +00:00
|
|
|
#undef __QEMU_CAPSPRIV_H_ALLOW__
|
2017-07-21 12:24:51 +00:00
|
|
|
#include "testutilshostcpus.h"
|
2017-07-21 13:09:54 +00:00
|
|
|
#include "virarch.h"
|
2017-03-08 12:32:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
virCPUDefPtr
|
2017-07-21 13:09:54 +00:00
|
|
|
virQEMUCapsProbeHostCPUForEmulator(virArch hostArch ATTRIBUTE_UNUSED,
|
2017-03-08 12:32:46 +00:00
|
|
|
virQEMUCapsPtr qemuCaps ATTRIBUTE_UNUSED,
|
|
|
|
virDomainVirtType type ATTRIBUTE_UNUSED)
|
|
|
|
{
|
2017-07-21 12:24:51 +00:00
|
|
|
const char *model = getenv("VIR_TEST_MOCK_FAKE_HOST_CPU");
|
2017-03-08 12:32:46 +00:00
|
|
|
|
2017-07-21 12:24:51 +00:00
|
|
|
return testUtilsHostCpusGetDefForModel(model);
|
2017-03-08 12:32:46 +00:00
|
|
|
}
|