[libvirt PATCH 0/6] libxl: remove enum libxlHwcapVersion

Ján Tomko posted 6 patches 2 weeks, 5 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1630939770.git.jtomko@redhat.com
src/libxl/libxl_capabilities.c | 119 ++++++++++-----------------------
1 file changed, 37 insertions(+), 82 deletions(-)

[libvirt PATCH 0/6] libxl: remove enum libxlHwcapVersion

Posted by Ján Tomko 2 weeks, 5 days ago
While looking at users of virCPU.*Free, I found some code
that is supposed to deal with Xen < 4.7.
The minimum version is 4.9 since the following commit:

commit 68940b3fb3c43b8aa03cb6fd2f1d00b1737c9b2c
Author:     Jim Fehlig <jfehlig@suse.com>
CommitDate: 2021-06-17 10:11:56 -0600

    Xen: Bump minimum supported Xen version to 4.9

Remove the code dealing with the old version and use g_auto moer.

Ján Tomko (6):
  libxl: capabilities: assume Xen version >= 4.7
  libxl: remove enum libxlHwcapVersion
  libxl: capsInitCPU: fail if we can't initialize host features
  libxl: refactor libxlCapsInitCPU
  libxl: use g_auto in libxlCapsNodeData
  libxl: use g_auto in libxlDomainGetEmulatorType

 src/libxl/libxl_capabilities.c | 119 ++++++++++-----------------------
 1 file changed, 37 insertions(+), 82 deletions(-)

-- 
2.31.1

Re: [libvirt PATCH 0/6] libxl: remove enum libxlHwcapVersion

Posted by Jim Fehlig 2 weeks, 3 days ago
On 9/6/21 08:58, Ján Tomko wrote:
> While looking at users of virCPU.*Free, I found some code
> that is supposed to deal with Xen < 4.7.
> The minimum version is 4.9 since the following commit:
> 
> commit 68940b3fb3c43b8aa03cb6fd2f1d00b1737c9b2c
> Author:     Jim Fehlig <jfehlig@suse.com>
> CommitDate: 2021-06-17 10:11:56 -0600
> 
>      Xen: Bump minimum supported Xen version to 4.9
> 
> Remove the code dealing with the old version and use g_auto moer.
> 
> Ján Tomko (6):
>    libxl: capabilities: assume Xen version >= 4.7
>    libxl: remove enum libxlHwcapVersion
>    libxl: capsInitCPU: fail if we can't initialize host features
>    libxl: refactor libxlCapsInitCPU
>    libxl: use g_auto in libxlCapsNodeData
>    libxl: use g_auto in libxlDomainGetEmulatorType
> 
>   src/libxl/libxl_capabilities.c | 119 ++++++++++-----------------------
>   1 file changed, 37 insertions(+), 82 deletions(-)

Reviewed-by: Jim Fehlig <jfehlig@suse.com>

Unrelated to anything in this series, but while testing the patches I noticed 
odd values for the 'die_id' attribute in 'virsh capabilities'

   <cpus num='24'>
     <cpu id='0' socket_id='0' die_id='0' core_id='0' siblings='0-1'/>
     <cpu id='1' socket_id='0' die_id='-1073069552' core_id='0' siblings='0-1'/>
     <cpu id='2' socket_id='0' die_id='-1073741696' core_id='1' siblings='2-3'/>
     <cpu id='3' socket_id='0' die_id='-1073317232' core_id='1' siblings='2-3'/>
     <cpu id='4' socket_id='0' die_id='0' core_id='2' siblings='4-5'/>
     ...
   </cpus>

I see commit 7b79ee2f78b uses /sys/devices/system/cpu/cpu$num/topology/die_id to 
determine the value. On my test machine, all 
/sys/devices/system/cpu/cpu$num/topology/die_id files contain 0. I'll need to 
dig a little deeper to determine why this doesn't work on xen.

Regards,
Jim