cpumodel.diff
/var/lib/one/rpmbuild/diff/LibVirtDriverKVM.cc 2014-05-06 17:19:05.805999941 +1200 | ||
---|---|---|
97 | 97 |
string bootloader = ""; |
98 | 98 |
string arch = ""; |
99 | 99 |
string machine = ""; |
100 |
string cpumodel = ""; |
|
100 | 101 | |
101 | 102 |
vector<string> boots; |
102 | 103 | |
... | ... | |
251 | 252 |
bootloader = os->vector_value("BOOTLOADER"); |
252 | 253 |
arch = os->vector_value("ARCH"); |
253 | 254 |
machine = os->vector_value("MACHINE"); |
255 |
cpumodel = os->vector_value("CPUMODEL"); |
|
254 | 256 |
} |
255 | 257 |
} |
256 | 258 | |
... | ... | |
348 | 350 | |
349 | 351 |
file << "\t</os>" << endl; |
350 | 352 | |
353 |
if ( cpumodel.empty() ) |
|
354 |
{ |
|
355 |
get_default("OS", "CPUMODEL", cpumodel); |
|
356 |
} |
|
357 | ||
358 |
if ( ! cpumodel.empty() ) |
|
359 |
{ |
|
360 |
if ( cpumodel == "host" ) |
|
361 |
{ |
|
362 |
file << "\t<cpu mode='host-passthrough'/>" << endl; |
|
363 |
} else { |
|
364 |
file << "\t<cpu match='exact'>" << endl; |
|
365 |
file << "\t\t<model fallback='allow'>" << cpumodel << "</model>" << endl; |
|
366 |
file << "\t</cpu>" << endl; |
|
367 |
} |
|
368 |
} |
|
369 | ||
351 | 370 |
attrs.clear(); |
352 | 371 | |
353 | 372 |
// ------------------------------------------------------------------------ |