xen-bus: only set the xen device frontend state if it is missing
authorMark Syms <mark.syms@citrix.com>
Wed, 18 Sep 2019 11:57:44 +0000 (12:57 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Tue, 24 Sep 2019 11:21:29 +0000 (12:21 +0100)
commit6bd6b955c0b2666263700d39db153ab43c5e0c9e
tree09419547ab286e039381c1865a77196d7f3a3e5e
parentef916ab3ec570eac799be540e499d0123fe61899
xen-bus: only set the xen device frontend state if it is missing

Some toolstack implementations will set the frontend xenstore
keys to Initialising which will then trigger the in guest PV
drivers to begin initialising and some implementations will
then set their state to Closing. If this has occurred then
device realize must not overwrite the frontend keys as then
the handshake will stall.

Signed-off-by: Mark Syms <mark.syms@citrix.com>
Also avoid creating the frontend area if it already exists.

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