diff options
author | Ben Herrenschmidt <benh@kernel.crashing.org> | 2011-04-01 15:15:30 +1100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2011-04-01 18:34:56 +0200 |
commit | b45d63b62f0c05eb54bba0fafaf29b9b3f4dd99a (patch) | |
tree | d4361d808e7a29cb99e1fed95637ba7dc8a24445 /hw/spapr_vio.h | |
parent | 8d90ad900507e373a7aa26daacd51e0474760425 (diff) |
Implement PAPR CRQ hypercalls
This patch implements the infrastructure and hypercalls necessary for the
PAPR specified CRQ (Command Request Queue) mechanism. This general
request queueing system is used by many of the PAPR virtual IO devices,
including the virtual scsi adapter.
Signed-off-by: Ben Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/spapr_vio.h')
-rw-r--r-- | hw/spapr_vio.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hw/spapr_vio.h b/hw/spapr_vio.h index 4cfaf55bd8..ba16795c37 100644 --- a/hw/spapr_vio.h +++ b/hw/spapr_vio.h @@ -32,10 +32,19 @@ enum VIOsPAPR_TCEAccess { SPAPR_TCE_RW = 3, }; +struct VIOsPAPRDevice; + typedef struct VIOsPAPR_RTCE { uint64_t tce; } VIOsPAPR_RTCE; +typedef struct VIOsPAPR_CRQ { + uint64_t qladdr; + uint32_t qsize; + uint32_t qnext; + int(*SendFunc)(struct VIOsPAPRDevice *vdev, uint8_t *crq); +} VIOsPAPR_CRQ; + typedef struct VIOsPAPRDevice { DeviceState qdev; uint32_t reg; @@ -44,6 +53,7 @@ typedef struct VIOsPAPRDevice { target_ulong signal_state; uint32_t rtce_window_size; VIOsPAPR_RTCE *rtce_table; + VIOsPAPR_CRQ crq; } VIOsPAPRDevice; typedef struct VIOsPAPRBus { @@ -81,6 +91,8 @@ void stw_tce(VIOsPAPRDevice *dev, uint64_t taddr, uint32_t val); void stq_tce(VIOsPAPRDevice *dev, uint64_t taddr, uint64_t val); uint64_t ldq_tce(VIOsPAPRDevice *dev, uint64_t taddr); +int spapr_vio_send_crq(VIOsPAPRDevice *dev, uint8_t *crq); + void vty_putchars(VIOsPAPRDevice *sdev, uint8_t *buf, int len); void spapr_vty_create(VIOsPAPRBus *bus, uint32_t reg, CharDriverState *chardev, |