Bug 1559832

Summary: [RFE] Fine-grained API to validate if a given CPU model and flags are supported by QEMU / KVM
Product: [Community] Virtualization Tools Reporter: Kashyap Chamarthy <kchamart>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jdenemar, libvirt-maint, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-4.4.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1559835 (view as bug list) Environment:
Last Closed: 2018-05-29 07:02:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1559835    

Description Kashyap Chamarthy 2018-03-23 11:36:50 UTC
There is no existing way (near as I know) way to validate if a given libvirt CPU model and a set of extra CPU flags (e.g. IvyBridge with 'pcid' and 'pdpe1gb') are supported by KVM and a given specific QEMU binary.

This is an RFC requesting to add such an API.


Additional info:
----------------

However, what does exist today is a way to check if a given CPU + extra CPU feature flags are supported by the *host* CPU via the libvirt API virConnectCompareCPU().

Comment 1 Jiri Denemark 2018-05-16 09:50:45 UTC
Patches sent upstream for review: https://www.redhat.com/archives/libvir-list/2018-May/msg01204.html

Comment 2 Jiri Denemark 2018-05-28 14:33:14 UTC
This API is now implemented upstream by a series of patches ending with

commit 75e7ab1ef5f391252685f7a7a0da324f6e2a2ebd
Refs: 4.3.0-356-g75e7ab1ef5
Author:     Jiri Denemark <jdenemar>
AuthorDate: Wed May 16 10:05:57 2018 +0200
Commit:     Jiri Denemark <jdenemar>
CommitDate: Mon May 28 16:00:20 2018 +0200

    news: Mention new CPU related APIs

    Signed-off-by: Jiri Denemark <jdenemar>
    Reviewed-by: Ján Tomko <jtomko>