On 16.12.2013, at 22:42, Alexander Graf <ag...@suse.de> wrote: > > On 16.12.2013, at 21:51, Matthew Rosato <mjros...@linux.vnet.ibm.com> wrote: >
[...] > >> + } >> + } >> + } >> + sccb->h.response_code = cpu_to_be16(SCLP_RC_NORMAL_COMPLETION); >> +} >> + >> static void sclp_execute(SCCB *sccb, uint64_t code) >> { >> S390SCLPDevice *sdev = get_event_facility(); >> @@ -50,6 +255,22 @@ static void sclp_execute(SCCB *sccb, uint64_t code) >> case SCLP_CMDW_READ_SCP_INFO_FORCED: >> read_SCP_info(sccb); >> break; >> + case SCLP_READ_STORAGE_ELEMENT_INFO: >> + if (code & 0xff00) { >> + read_storage_element1_info(sccb); >> + } else { >> + read_storage_element0_info(sccb); >> + } >> + break; >> + case SCLP_ATTACH_STORAGE_ELEMENT: >> + attach_storage_element(sccb, (code & 0xff00) >> 8); >> + break; >> + case SCLP_ASSIGN_STORAGE: >> + assign_storage(sccb); >> + break; >> + case SCLP_UNASSIGN_STORAGE: >> + unassign_storage(sccb); >> + break; > > Do you think it'd be possible to model this whole thing as a device that has > its own state? That's where you could keep the bitmap for example. You'd only > need some callback mechanism to hook into the SCLP calls, but the PPC guys > already have something similar with their hypercalls. Speaking of state - in the current model the "is standby storage active" bitmap doesn't get migrated, no? Alex