<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 24/11/22 5:40 pm, Jiri Denemark
wrote:<br>
</div>
<blockquote type="cite" cite="mid:Y39fJrv3tQ1uU9Zq@orkuz.int.mamuti.net">
<pre class="moz-quote-pre" wrap="">On Wed, Nov 23, 2022 at 18:34:38 +0530, manish.mishra wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">oh i see you meant something like this,
<cpu mode='custom' match='exact' check='none'>
<numa>
<cell id='0' cpus='0-239' memory='8388608' unit='KiB' memAccess='shared'/>
</numa>
</cpu>
<qemu:commandline>
<qemu:arg value='-cpu'/>
<qemu:arg value='enforce,Icelake-v4,x2apic=on,hv-time,kvm-pv-eoi=on'/>
</qemu:commandline>
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
This won't work as libvirt should add a default CPU model there and
replace check='none' with check='full' once the domain starts.
But we actually have a way to do what you need even without any change
in libvirt:
<cpu mode='host-passthrough' check='none'>
<topology .../>
<numa>
...
</numa>
...
</cpu>
<qemu:commandline>
<qemu:arg value='-cpu'/>
<qemu:arg value='Icelake-Server-v4,enforce,x2apic=on,hv-time,kvm-pv-eoi=on'/>
</qemu:commandline>
This will result in
-cpu host,migratable=on
...
-cpu Icelake-Server-v4,enforce,x2apic=on,hv-time,kvm-pv-eoi=on
and libvirt will not touch the check='none' attribute once the domain
starts and it would not complain about any unknown CPU features or
models as there's nothing to check in <cpu/>.
That is, there's no need to come up with anything special to support
passing arbitrary options to -cpu.
Jirka</pre>
</blockquote>
<p><br>
</p>
<p>Thank you so much Jirka, let me give this a try with few
different cases. I will let you know how this goes <span style="font-size:13.999999999999998pt;font-family:Arial;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;" id="docs-internal-guid-55ae7445-7fff-c8ce-cc06-186ab7c3f11a">or if we need anything extra.</span></p>
<p><span style="font-size:13.999999999999998pt;font-family:Arial;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;" id="docs-internal-guid-55ae7445-7fff-c8ce-cc06-186ab7c3f11a">Thanks</span></p>
<p><span style="font-size:13.999999999999998pt;font-family:Arial;color:#434343;background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre;white-space:pre-wrap;" id="docs-internal-guid-55ae7445-7fff-c8ce-cc06-186ab7c3f11a">Manish Mishra
</span></p>
<blockquote type="cite" cite="mid:Y39fJrv3tQ1uU9Zq@orkuz.int.mamuti.net">
<pre class="moz-quote-pre" wrap="">
</pre>
</blockquote>
</body>
</html>