xen-bus: Avoid rewriting identical values to xenstore
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 23 Aug 2019 10:15:34 +0000 (11:15 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Tue, 27 Aug 2019 13:18:28 +0000 (14:18 +0100)
commit705be570941b38cd1cbebc68f7f671ce7532ecb0
treecd0383fd2ad62e8e46a39b17164989b83508e733
parentcb3231460747552d70af9d546dc53d8195bcb796
xen-bus: Avoid rewriting identical values to xenstore

When QEMU receives a xenstore watch event suggesting that the "state"
of the frontend changed, it records this in its own state but it also
re-write the value back into xenstore even so there were no change.
This triggers an unnecessary xenstore watch event which QEMU will
process again (and maybe the frontend as well). Also QEMU could
potentially write an already old value.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Message-Id: <20190823101534.465-3-anthony.perard@citrix.com>
hw/xen/xen-bus.c