[libvirt] a libvirt event question

Chen, Xiaogang Xiaogang.Chen at amd.com
Mon Jan 22 21:07:36 UTC 2018


We found the causes for this issue:  QEMU does not connect the socket for sending event until enters into its main_loop if libvirt uses "nowait" to create the chardev for monitor; And qemu cannot send event until it receives the first qmp cmd: qmp_capabilities. So We cannot send event from qemu before these conditions met.

To overcome these restrictions I think we either:

1: Change qemu implementation to send the event after receives qmp_capabilities cmd and socket connection is setup. This will require some major changes on qemu.


2: Implement a new qmp cmd that libvirt will use to query sev_measurement from qemu after issues qmp_capabilities cmd, but before resume VM. Sev_measurement value will be sent back from qemu as response for this new qmp cmd.

We would like to know what do you think about these two methods? Which method do you prefer? Thank you.


From: Chen, Xiaogang
Sent: Thursday, January 18, 2018 2:01 PM
To: 'libvir-list at redhat.com' <libvir-list at redhat.com>
Cc: Singh, Brijesh <brijesh.singh at amd.com>; Lendacky, Thomas <Thomas.Lendacky at amd.com>
Subject: a libvirt event question


We are adding libvirt functions to launch SEV VM. When start VM I put it at "pause" state. During that time qemu sends an event "sev_measurement". We hope libvirtd  get this event before we resume VM. But I did not see libvirtd receive it. If I send this event at  qemu during resume time libvirtd can get this event successfully. I traced qemuMonitorJSONIOProcessEvent function for events received, did not see any event coming before resume VM.

Is there something I missed to get this event during pause state? Thank you for your help.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180122/681fc77c/attachment-0001.htm>

More information about the libvir-list mailing list