FEMU  原版 master 7e238cc
FEMU: Accurate, Scalable and Extensible NVMe SSD Emulator (FAST'18)
femu.c 文件参考
#include "qemu/osdep.h"
#include "hw/qdev-properties.h"
#include "./nvme.h"
femu.c 的引用(Include)关系图:

宏定义

#define NVME_SPEC_VER   (0x00010400)
 

函数

static void nvme_clear_ctrl (FemuCtrl *n, bool shutdown)
 
static int nvme_start_ctrl (FemuCtrl *n)
 
static void nvme_write_bar (FemuCtrl *n, hwaddr offset, uint64_t data, unsigned size)
 
static uint64_t nvme_mmio_read (void *opaque, hwaddr addr, unsigned size)
 
static void nvme_process_db_admin (FemuCtrl *n, hwaddr addr, int val)
 
static void nvme_process_db_io (FemuCtrl *n, hwaddr addr, int val)
 
static void nvme_mmio_write (void *opaque, hwaddr addr, uint64_t data, unsigned size)
 
static void nvme_cmb_write (void *opaque, hwaddr addr, uint64_t data, unsigned size)
 
static uint64_t nvme_cmb_read (void *opaque, hwaddr addr, unsigned size)
 
static int nvme_check_constraints (FemuCtrl *n)
 
static void nvme_ns_init_identify (FemuCtrl *n, NvmeIdNs *id_ns)
 
static int nvme_init_namespace (FemuCtrl *n, NvmeNamespace *ns, Error **errp)
 
static int nvme_init_namespaces (FemuCtrl *n, Error **errp)
 
static void nvme_init_ctrl (FemuCtrl *n)
 
static void nvme_init_cmb (FemuCtrl *n)
 
static void nvme_init_pci (FemuCtrl *n)
 
static int nvme_register_extensions (FemuCtrl *n)
 注册NOSSD/BBSSD/ZNSSD/OCSSD 更多...
 
static void femu_realize (PCIDevice *pci_dev, Error **errp)
 femu初始化,分配空间 更多...
 
static void nvme_destroy_poller (FemuCtrl *n)
 
static void femu_exit (PCIDevice *pci_dev)
 
static void femu_class_init (ObjectClass *oc, void *data)
 femu启动 更多...
 
static void femu_register_types (void)
 

变量

static const MemoryRegionOps nvme_cmb_ops
 
static const MemoryRegionOps nvme_mmio_ops
 
static Property femu_props []
 
static const VMStateDescription femu_vmstate
 
static const TypeInfo femu_info
 

宏定义说明

◆ NVME_SPEC_VER

#define NVME_SPEC_VER   (0x00010400)

函数说明

◆ femu_class_init()

static void femu_class_init ( ObjectClass *  oc,
void *  data 
)
static

femu启动

参数
oc
data
函数调用图:

◆ femu_exit()

static void femu_exit ( PCIDevice *  pci_dev)
static
函数调用图:
这是这个函数的调用关系图:

◆ femu_realize()

static void femu_realize ( PCIDevice *  pci_dev,
Error **  errp 
)
static

femu初始化,分配空间

参数
pci_dev
errp

初始化相应模式ssd

函数调用图:
这是这个函数的调用关系图:

◆ femu_register_types()

static void femu_register_types ( void  )
static

◆ nvme_check_constraints()

static int nvme_check_constraints ( FemuCtrl n)
static
这是这个函数的调用关系图:

◆ nvme_clear_ctrl()

static void nvme_clear_ctrl ( FemuCtrl n,
bool  shutdown 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_cmb_read()

static uint64_t nvme_cmb_read ( void *  opaque,
hwaddr  addr,
unsigned  size 
)
static

◆ nvme_cmb_write()

static void nvme_cmb_write ( void *  opaque,
hwaddr  addr,
uint64_t  data,
unsigned  size 
)
static

◆ nvme_destroy_poller()

static void nvme_destroy_poller ( FemuCtrl n)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_init_cmb()

static void nvme_init_cmb ( FemuCtrl n)
static
这是这个函数的调用关系图:

◆ nvme_init_ctrl()

static void nvme_init_ctrl ( FemuCtrl n)
static
这是这个函数的调用关系图:

◆ nvme_init_namespace()

static int nvme_init_namespace ( FemuCtrl n,
NvmeNamespace ns,
Error **  errp 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_init_namespaces()

static int nvme_init_namespaces ( FemuCtrl n,
Error **  errp 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_init_pci()

static void nvme_init_pci ( FemuCtrl n)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_mmio_read()

static uint64_t nvme_mmio_read ( void *  opaque,
hwaddr  addr,
unsigned  size 
)
static

◆ nvme_mmio_write()

static void nvme_mmio_write ( void *  opaque,
hwaddr  addr,
uint64_t  data,
unsigned  size 
)
static
函数调用图:

◆ nvme_ns_init_identify()

static void nvme_ns_init_identify ( FemuCtrl n,
NvmeIdNs id_ns 
)
static
这是这个函数的调用关系图:

◆ nvme_process_db_admin()

static void nvme_process_db_admin ( FemuCtrl n,
hwaddr  addr,
int  val 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_process_db_io()

static void nvme_process_db_io ( FemuCtrl n,
hwaddr  addr,
int  val 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_register_extensions()

static int nvme_register_extensions ( FemuCtrl n)
static

注册NOSSD/BBSSD/ZNSSD/OCSSD

参数
n
返回
int
函数调用图:
这是这个函数的调用关系图:

◆ nvme_start_ctrl()

static int nvme_start_ctrl ( FemuCtrl n)
static
函数调用图:
这是这个函数的调用关系图:

◆ nvme_write_bar()

static void nvme_write_bar ( FemuCtrl n,
hwaddr  offset,
uint64_t  data,
unsigned  size 
)
static
函数调用图:
这是这个函数的调用关系图:

变量说明

◆ femu_info

const TypeInfo femu_info
static
初始值:
= {
.name = "femu",
.parent = TYPE_PCI_DEVICE,
.instance_size = sizeof(FemuCtrl),
.class_init = femu_class_init,
.interfaces = (InterfaceInfo[]) {
{ INTERFACE_PCIE_DEVICE },
{ }
},
}

◆ femu_props

Property femu_props[]
static

◆ femu_vmstate

const VMStateDescription femu_vmstate
static
初始值:
= {
.name = "femu",
.unmigratable = 1,
}

◆ nvme_cmb_ops

const MemoryRegionOps nvme_cmb_ops
static
初始值:
= {
.read = nvme_cmb_read,
.write = nvme_cmb_write,
.endianness = DEVICE_LITTLE_ENDIAN,
.impl = {
.min_access_size = 2,
.max_access_size = 8,
},
}

◆ nvme_mmio_ops

const MemoryRegionOps nvme_mmio_ops
static
初始值:
= {
.read = nvme_mmio_read,
.write = nvme_mmio_write,
.endianness = DEVICE_LITTLE_ENDIAN,
.impl = {
.min_access_size = 2,
.max_access_size = 8,
},
}
FemuCtrl
struct FemuCtrl FemuCtrl
femu相关控制参数和数据成员
nvme_mmio_read
static uint64_t nvme_mmio_read(void *opaque, hwaddr addr, unsigned size)
Definition: femu.c:133
nvme_cmb_read
static uint64_t nvme_cmb_read(void *opaque, hwaddr addr, unsigned size)
Definition: femu.c:256
nvme_cmb_write
static void nvme_cmb_write(void *opaque, hwaddr addr, uint64_t data, unsigned size)
Definition: femu.c:249
nvme_mmio_write
static void nvme_mmio_write(void *opaque, hwaddr addr, uint64_t data, unsigned size)
Definition: femu.c:237
femu_class_init
static void femu_class_init(ObjectClass *oc, void *data)
femu启动
Definition: femu.c:677