#include <config.h>
+#include "logging.h"
#include "memory.h"
#include "xml.h"
#include "cpu.h"
virCPUDefPtr cpu = NULL;
virCPUCompareResult ret = VIR_CPU_COMPARE_ERROR;
+ VIR_DEBUG("host=%p, xml=%s", host, NULLSTR(xml));
+
if (!(doc = virXMLParseString(xml, "cpu.xml")))
goto cleanup;
{
struct cpuArchDriver *driver;
+ VIR_DEBUG("host=%p, cpu=%p", host, cpu);
+
if ((driver = cpuGetSubDriver(host->arch)) == NULL)
return VIR_CPU_COMPARE_ERROR;
{
struct cpuArchDriver *driver;
+ VIR_DEBUG("cpu=%p, data=%p, nmodels=%u", cpu, data, nmodels);
+ if (models) {
+ unsigned int i;
+ for (i = 0; i < nmodels; i++)
+ VIR_DEBUG("models[%u]=%s", i, NULLSTR(models[i]));
+ }
+
if (models == NULL && nmodels != 0) {
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("nonzero nmodels doesn't match with NULL models"));
{
struct cpuArchDriver *driver;
+ VIR_DEBUG("arch=%s, cpu=%p, forced=%p, required=%p, "
+ "optional=%p, disabled=%p, forbidden=%p",
+ NULLSTR(arch), cpu, forced, required,
+ optional, disabled, forbidden);
+
if ((driver = cpuGetSubDriver(arch)) == NULL)
return -1;
{
struct cpuArchDriver *driver;
+ VIR_DEBUG("arch=%s, data=%p", NULLSTR(arch), data);
+
if (data == NULL)
return;
{
struct cpuArchDriver *driver;
+ VIR_DEBUG("arch=%s", NULLSTR(arch));
+
if ((driver = cpuGetSubDriver(arch)) == NULL)
return NULL;
{
struct cpuArchDriver *driver;
+ VIR_DEBUG("host=%p, guest=%p, data=%p", host, guest, data);
+
if ((driver = cpuGetSubDriver(host->arch)) == NULL)
return VIR_CPU_COMPARE_ERROR;
char *cpustr;
unsigned int i;
+ VIR_DEBUG("ncpus=%u, nmodels=%u", ncpus, nmodels);
+ if (xmlCPUs) {
+ for (i = 0; i < ncpus; i++)
+ VIR_DEBUG("xmlCPUs[%u]=%s", i, NULLSTR(xmlCPUs[i]));
+ }
+ if (models) {
+ for (i = 0; i < nmodels; i++)
+ VIR_DEBUG("models[%u]=%s", i, NULLSTR(models[i]));
+ }
+
if (xmlCPUs == NULL && ncpus != 0) {
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("nonzero ncpus doesn't match with NULL xmlCPUs"));
{
struct cpuArchDriver *driver;
virCPUDefPtr cpu;
+ unsigned int i;
+
+ VIR_DEBUG("ncpus=%u, nmodels=%u", ncpus, nmodels);
+ if (cpus) {
+ for (i = 0; i < ncpus; i++)
+ VIR_DEBUG("cpus[%u]=%p", i, cpus[i]);
+ }
+ if (models) {
+ for (i = 0; i < nmodels; i++)
+ VIR_DEBUG("models[%u]=%s", i, NULLSTR(models[i]));
+ }
if (cpus == NULL && ncpus != 0) {
virCPUReportError(VIR_ERR_INTERNAL_ERROR,
}
if ((cpu = driver->baseline(cpus, ncpus, models, nmodels))) {
- int i;
-
cpu->type = VIR_CPU_TYPE_GUEST;
cpu->match = VIR_CPU_MATCH_EXACT;
VIR_FREE(cpu->arch);