[libvirt] [Qemu-devel] [PATCHv2 3/4] qemu: fix RTC_CHANGE event for <clock offset='variable' basis='utc'/>

Eric Blake eblake at redhat.com
Fri May 23 14:04:45 UTC 2014


On 05/23/2014 07:48 AM, Marcelo Tosatti wrote:

> This also seems pretty harmful wrt losing events:
> 
> /* Global, one-time initializer to configure the rate limiting
>  * and initialize state */
> static void monitor_protocol_event_init(void)
> {
>     /* Limit RTC & BALLOON events to 1 per second */
>     monitor_protocol_event_throttle(QEVENT_RTC_CHANGE, 1000);
> 
> Better remove it.

No, this throttling MUST be present to avoid a guest-triggered
denial-of-service attack (otherwise the guest could trigger RTC change
events fast enough to starve the host in dealing with them).  Again,
lost events are expected.  What is important is that when throttling,
and event is guaranteed to be sent at the end of the throttling period
so that libvirt will always eventually get an event with the latest
state (even if intermediate events were lost) with no more latency than
the throttling period; and either the event caries the current state
(and not something that needs accumulation), or the event is a witness
that libvirt needs to do an additional query- command to learn the
current state.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140523/6babb256/attachment-0001.sig>


More information about the libvir-list mailing list