[libvirt] [PATCH v3 1/9] qemu: provide support to query the SEV capability

Andrea Bolognani abologna at redhat.com
Mon Mar 26 14:32:18 UTC 2018


On Mon, 2018-03-26 at 08:52 -0500, Brijesh Singh wrote:
> > I tried applying just this patch, but kept getting:
> > 
> > 29) caps_2.12.0(x86_64)
> > ... libvirt: QEMU Driver error : internal error: query-cpu-definitions
> > reply data was not an array
> > 
> > a small bit of debugging found that qemuMonitorJSONGetCPUDefinitions was
> > returning NULL for @data after/when the "query-sev-capabilities".
> > 
> > I narrowed it down into the virQEMUCapsInitQMPMonitor when run during
> > qemucapabilitiestest (see [1])
> 
> I have not tried latest libvirt yet, I will try this today and debug to 
> see what we are missing. I did the 'make check' before submitting the 
> patch but at that time QEMU 2.12 was not available and we did not had 
> updated caps_2.12.0.x86_64.xml and caps_2.12.0.x86_64.replies.

I thought the lack of churn in tests/qemucapabilitiesdata/ was
weird, but thanks to your explanation it makes perfect sense now.

Your code adds a call to query-sev-capabilities, but the replies
file doesn't contain the corresponding return data, which makes
the parser go out of sync.

You're going to have to either fetch capabilities from your own
QEMU 2.12 binary or hack it up by adding the return data in the
right spot and call tests/qemucapsfixreplies to re-align the ids.

I think you can get away with the latter, as we're going to want
to refresh the replies files once 2.12 is released anyway.

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list