public ulong this[int index] { get { ulong output; if (!Ioctls.VcpuGetOneReg(Handle, new KvmOneReg { Id = Base + (ulong)index * Stride, Addr = (ulong)&output })) { throw new KvmException("Could not get register"); } return(output); } set { if (!Ioctls.VcpuSetOneReg(Handle, new KvmOneReg { Id = Base + (ulong)index * Stride, Addr = (ulong)&value })) { throw new KvmException("Could not set register"); } } }
protected override bool ReleaseHandle() => Ioctls.Close(handle) != -1;