hw/arm/xlnx-zynqmp: Remove obsolete 'has_rpu' property
[qemu/ar7.git] / include / hw / misc / vmcoreinfo.h
blob0b7b55d400a009c535eb8887526efd9f7c58260e
1 /*
2 * Virtual Machine coreinfo device
4 * Copyright (C) 2017 Red Hat, Inc.
6 * Authors: Marc-André Lureau <marcandre.lureau@redhat.com>
8 * This work is licensed under the terms of the GNU GPL, version 2 or later.
9 * See the COPYING file in the top-level directory.
12 #ifndef VMCOREINFO_H
13 #define VMCOREINFO_H
15 #include "hw/qdev-core.h"
16 #include "standard-headers/linux/qemu_fw_cfg.h"
17 #include "qom/object.h"
19 #define VMCOREINFO_DEVICE "vmcoreinfo"
20 typedef struct VMCoreInfoState VMCoreInfoState;
21 DECLARE_INSTANCE_CHECKER(VMCoreInfoState, VMCOREINFO,
22 VMCOREINFO_DEVICE)
24 typedef struct fw_cfg_vmcoreinfo FWCfgVMCoreInfo;
26 struct VMCoreInfoState {
27 DeviceState parent_obj;
29 bool has_vmcoreinfo;
30 FWCfgVMCoreInfo vmcoreinfo;
33 /* returns NULL unless there is exactly one device */
34 static inline VMCoreInfoState *vmcoreinfo_find(void)
36 Object *o = object_resolve_path_type("", VMCOREINFO_DEVICE, NULL);
38 return o ? VMCOREINFO(o) : NULL;
41 #endif