Mercurial > hvf > hvf-old
changeset 611:106a5decf8da
cp/guest: queue up a Channel Report Word after a device is attached
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Sun, 11 Dec 2011 21:49:25 -0500 |
parents | c93853ed5dff |
children | b040de574c4e |
files | cp/guest/attach.c |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/cp/guest/attach.c Sun Dec 11 21:48:25 2011 -0500 +++ b/cp/guest/attach.c Sun Dec 11 21:49:25 2011 -0500 @@ -7,6 +7,12 @@ #include <vcpu.h> #include <guest.h> +#include <sclp.h> + +static void guest_append_crw(struct virt_sys *sys, struct crw *crw) +{ + sclp_msg("FIXME: guest CRW was not queued"); +} int guest_attach(struct virt_sys *sys, u64 rdev, u64 vdev) { @@ -16,6 +22,7 @@ .u.dedicate.rdev = rdev, }; struct virt_device *cur; + struct crw crw; int found; int ret; u64 sch; @@ -63,9 +70,17 @@ if (found) goto out_err; + memset(&crw, 0, sizeof(struct crw)); + crw.rsc = 0x3; + crw.erc = 0x4; + crw.id = sch & ~0x10000; + /* add the device */ ret = alloc_virt_dev(sys, &dv, sch); + if (!ret) + guest_append_crw(sys, &crw); + mutex_unlock(&sys->virt_devs_lock); return ret;