1 From 1332407a0739b26d664428f5d3c1e7bc1161d7e2 Mon Sep 17 00:00:00 2001
2 From: Dan McDonald <danmcd@omniti.com>
3 Date: Fri, 8 May 2015 09:50:27 -0400
4 Subject: [PATCH] Revert "HVM-797 Vanquish Banquo's ghost"
6 This reverts commit 43aa6602f0d68ff7e032aad06645e34e9921d976.
8 kvm.c | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10 2 files changed, 58 insertions(+)
12 diff --git a/kvm.c b/kvm.c
13 index 6e136ac..1a55f49 100644
16 @@ -2634,6 +2634,63 @@ kvm_ioctl(dev_t dev, int cmd, intptr_t arg, int md, cred_t *cr, int *rv)
17 rval = kvm_vcpu_ioctl_nmi(ksp->kds_vcpu);
20 + case KVM_NET_QUEUE: {
23 + struct stroptions *stropt;
32 + ASSERT(fp->f_vnode);
34 + if (fp->f_vnode->v_stream == NULL) {
40 + mp = allocb(sizeof (struct stroptions), BPRI_LO);
47 + * This really just shouldn't need to exist, etc. and we
48 + * should really get the hiwat value more intelligently at least
49 + * a #define or a tunable god forbid. Oh well, as bmc said
51 + * "I am in blood steeped in so far that I wade no more.
52 + * Returning were as tedious as go o'er.
54 + * We'd love to just putmsg on RD(fp->f_vnode->v_stream->sd_wq)
55 + * however that would be the stream head. Instead, we need to
56 + * get the write version and then go to the next one and then
57 + * the opposite end. The doctor may hemorrhage before the
60 + * Banquo's ghost is waiting to pop up
62 + mp->b_datap->db_type = M_SETOPTS;
63 + stropt = (struct stroptions *)mp->b_rptr;
64 + stropt->so_flags = SO_HIWAT;
65 + stropt->so_hiwat = kvm_hiwat;
66 + q = WR(fp->f_vnode->v_stream->sd_wrq);
78 KVM_TRACE1(bad__ioctl, int, cmd);
79 rval = EINVAL; /* x64, others may do other things... */
80 diff --git a/kvm.h b/kvm.h
81 index 7211b55..874c701 100644
84 @@ -288,6 +288,7 @@ typedef struct kvm_guest_debug {
85 #define KVM_CREATE_VM _IO(KVMIO, 0x01) /* returns a VM fd */
86 #define KVM_GET_MSR_INDEX_LIST _IOWR(KVMIO, 0x02, struct kvm_msr_list)
87 #define KVM_CLONE _IO(KVMIO, 0x20)
88 +#define KVM_NET_QUEUE _IO(KVMIO, 0x21)
91 * Check if a kvm extension is available. Argument is extension number,