rtl8139: fix possible out of bound access
[qemu/ar7.git] / include / hw / vfio / vfio-amd-xgbe.h
blob9fff65e99d480988bac4ca6f21cfc18f19a36032
1 /*
2 * VFIO AMD XGBE device
4 * Copyright Linaro Limited, 2015
6 * Authors:
7 * Eric Auger <eric.auger@linaro.org>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
14 #ifndef HW_VFIO_VFIO_AMD_XGBE_H
15 #define HW_VFIO_VFIO_AMD_XGBE_H
17 #include "hw/vfio/vfio-platform.h"
19 #define TYPE_VFIO_AMD_XGBE "vfio-amd-xgbe"
21 /**
22 * This device exposes:
23 * - 5 MMIO regions: MAC, PCS, SerDes Rx/Tx regs,
24 SerDes Integration Registers 1/2 & 2/2
25 * - 2 level sensitive IRQs and optional DMA channel IRQs
27 struct VFIOAmdXgbeDevice {
28 VFIOPlatformDevice vdev;
31 typedef struct VFIOAmdXgbeDevice VFIOAmdXgbeDevice;
33 struct VFIOAmdXgbeDeviceClass {
34 /*< private >*/
35 VFIOPlatformDeviceClass parent_class;
36 /*< public >*/
37 DeviceRealize parent_realize;
40 typedef struct VFIOAmdXgbeDeviceClass VFIOAmdXgbeDeviceClass;
42 #define VFIO_AMD_XGBE_DEVICE(obj) \
43 OBJECT_CHECK(VFIOAmdXgbeDevice, (obj), TYPE_VFIO_AMD_XGBE)
44 #define VFIO_AMD_XGBE_DEVICE_CLASS(klass) \
45 OBJECT_CLASS_CHECK(VFIOAmdXgbeDeviceClass, (klass), \
46 TYPE_VFIO_AMD_XGBE)
47 #define VFIO_AMD_XGBE_DEVICE_GET_CLASS(obj) \
48 OBJECT_GET_CLASS(VFIOAmdXgbeDeviceClass, (obj), \
49 TYPE_VFIO_AMD_XGBE)
51 #endif