Re: [Patch] (big) real mode emulation - jmp rel

Avi Kivity
2007-08-16T10:25:20Z

Nitin A Kamble wrote:
> Hi Avi,
> I modified the patch as per your suggestions. Attached is the update
> patch for the "jmp rel" instruction. Also the "jmp rel short" patch
> would go on top of it.
>
>

> + inline void jmp_rel(int rel)
> + {
> + _eip += (int)(rel);
> + _eip = ((op_bytes == 2) ? (uint16_t)_eip : (uint32_t)_eip);
> + };
> +

This is a nested function which we don't use (in the kernel or userspace).

It needs to be a file-scope function (static, too).

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.