Skip to content
Snippets Groups Projects
Commit 2dd9d8cf authored by Gerd Hoffmann's avatar Gerd Hoffmann
Browse files

s390x: add have_virtio_ccw


Introduce a symbol which can be used to prevent ccw modules
being loaded into system emulators without ccw support.

Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarHalil Pasic <pasic@linux.ibm.com>
Tested-by: default avatarHalil Pasic <pasic@linux.ibm.com>
Message-Id: <20210317095622.2839895-3-kraxel@redhat.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent d4c603d7
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@
#define NR_CLASSIC_INDICATOR_BITS 64
bool have_virtio_ccw = true;
static int virtio_ccw_dev_post_load(void *opaque, int version_id)
{
VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(opaque);
......
......@@ -63,6 +63,11 @@ typedef struct VirtioBusClass VirtioCcwBusClass;
DECLARE_OBJ_CHECKERS(VirtioCcwBusState, VirtioCcwBusClass,
VIRTIO_CCW_BUS, TYPE_VIRTIO_CCW_BUS)
/*
* modules can reference this symbol to avoid being loaded
* into system emulators without ccw support
*/
extern bool have_virtio_ccw;
struct VirtIOCCWDeviceClass {
CCWDeviceClass parent_class;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment