spapr/xive: Convert KVM device fd checks to assert()
commita4907119348d928e8b72e2d3b7566e50f272fa09
authorGreg Kurz <groug@kaod.org>
Fri, 7 Aug 2020 11:32:21 +0000 (7 13:32 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 13 Aug 2020 10:58:52 +0000 (13 20:58 +1000)
treec8232a41fbff07d31b00a2375a5c42acc954f915
parente519cdd9bc02990bddd395656bdaec821c94c8fe
spapr/xive: Convert KVM device fd checks to assert()

All callers guard these functions with an xive_in_kernel() helper. Make
it clear that they are only to be called when the KVM XIVE device exists.

Note that the check on xive is dropped in kvmppc_xive_disconnect(). It
really cannot be NULL since it comes from set_active_intc() which only
passes pointers to allocated objects.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <159679994169.876294.11026653581505077112.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/intc/spapr_xive_kvm.c