s390x/css: ccw translation infrastructure

Implement a basic infrastructure of handling channel I/O instruction
interception for passed through subchannels:
1. Branch the code path of instruction interception handling by
   SubChannel type.
2. For a passed-through subchannel, issue the ORB to kernel to do ccw
   translation and perform an I/O operation.
3. Assign different condition code based on the I/O result, or
   trigger a program check.

Signed-off-by: Xiao Feng Ren <renxiaof@linux.vnet.ibm.com>
Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Message-Id: <20170517004813.58227-12-bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
Xiao Feng Ren 2017-05-17 02:48:11 +02:00 committed by Cornelia Huck
parent 8ca2b376b4
commit bab482d740
5 changed files with 109 additions and 6 deletions

View file

@ -91,6 +91,7 @@ struct SubchDev {
/* transport-provided data: */
int (*ccw_cb) (SubchDev *, CCW1);
void (*disable_cb)(SubchDev *);
int (*do_subchannel_work) (SubchDev *, ORB *);
SenseId id;
void *driver_data;
};
@ -148,6 +149,9 @@ void css_generate_chp_crws(uint8_t cssid, uint8_t chpid);
void css_generate_css_crws(uint8_t cssid);
void css_clear_sei_pending(void);
void css_adapter_interrupt(uint8_t isc);
int s390_ccw_cmd_request(ORB *orb, SCSW *scsw, void *data);
int do_subchannel_work_virtual(SubchDev *sub, ORB *orb);
int do_subchannel_work_passthrough(SubchDev *sub, ORB *orb);
typedef enum {
CSS_IO_ADAPTER_VIRTIO = 0,