]> xenbits.xensource.com Git - libvirt.git/commit
qemu: caps: Format SEV platform data into qemuCaps cache
authorErik Skultety <eskultet@redhat.com>
Thu, 9 Aug 2018 13:27:26 +0000 (15:27 +0200)
committerErik Skultety <eskultet@redhat.com>
Mon, 20 Aug 2018 05:18:21 +0000 (07:18 +0200)
commit77f51ab52049734d80a8ccb79b80189c7fb95c41
treecd41f2a2f25d88507b58d9e4e645036255625703
parent764491c9dddf063292adf1433769ccccb1a50db6
qemu: caps: Format SEV platform data into qemuCaps cache

Since we're not saving the platform-specific data into a cache, we're
not going to populate the structure, which in turn will cause a crash
upon calling virNodeGetSEVInfo because of a NULL pointer dereference.
Ultimately, we should start caching this data along with host-specific
capabilities like NUMA and SELinux stuff into a separate cache, but for
the time being, this is a semi-proper fix for a potential crash.

Backtrace (requires libvirtd restart to load qemu caps from cache):
    #0 qemuGetSEVInfoToParams
    #1 qemuNodeGetSEVInfo
    #2 virNodeGetSEVInfo
    #3 remoteDispatchNodeGetSevInfo
    #4 remoteDispatchNodeGetSevInfoHelper
    #5 virNetServerProgramDispatchCall
    #6 virNetServerProgramDispatch
    #7 virNetServerProcessMsg
    #8 virNetServerHandleJob
    #9 virThreadPoolWorker
    #10 virThreadHelper

https: //bugzilla.redhat.com/show_bug.cgi?id=1612009
Signed-off-by: Erik Skultety <eskultet@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
Tested-by: Brijesh Singh <brijesh.singh@amd.com>
src/qemu/qemu_capabilities.c
tests/domaincapsschemadata/qemu_2.12.0.x86_64.xml
tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml