  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Sun Nov 26 17:52:27 EST 2000
    Urgent fix to nexus-mode.c.  Was using pointers from wrong space!
      If you ran a version recently, make sure to do the following:

        - Reboot you system.  You may have stepped on random memory addresses.
        - 'make clean; make' from the top.

    I'm going to give QNX a spin again after this fix.
    If the recent mods broke something for you, give it a try again.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Sun Nov 26 00:16:11 EST 2000
    Optimization: prescan() returns -1 if the very first instruction
      has already been prescanned, and is virtualized.  Since this
      instruction must be emulated, flagging this condition allows
      us to eliminate unnecessary exception processing.  Pretty cool,
      just a few lines of code eliminated about 5% of execution time
      in plex86.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Sat Nov 25 23:22:53 EST 2000
    Implemented IO instructions which were bombing Debian rescue floppy.
    Fixed mode handling of monitor running guest code in v86 mode.
    I booted the Debian rescue floppy image (2.2.17 kernel).  The
      root floppy seemed to mount OK, but I didn't have the patience
      to continue the boot process.  Let me know if you test this.
    Added 'createdisk.sh' & 'createdisk.README' to the misc/ dir,
      from Eric Laberge.  These are scripts to create empty hard disk
      images.  I haven't tried them.
    Also reran Prama Linux (2.0.33 kernel), FreeDOS, and Win95.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Fri Nov 24 16:29:41 EST 2000
    Integrated small bug fix from Robert Fitzsimons for plex86.c for
      processing of command args.
    Created REQUIREMENTS file, which lists CPUs that plex86 will work on.
      This list was generated some time ago from the TLB test program.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Fri Nov 24 14:18:59 EST 2000
    Integrated small floppy.cc patch from Hanish Menon.  If you specify
      a floppy A or B as the boot device, but don't provide a valid
      file/device, a panic will be generated.  The BIOS still needs to
      be fixed to detect if you do provide a floppy but it is not bootable.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Fri Nov 24 10:38:25 EST 2000
    Fixed problem with FreeDOS mini boot floppy image EIP > limit.
      I forgot that (floppy) DMA transfers are writing to memory mapped
      guest memory, so the prescan cache was not being invalidated.
      Added an ioctl to invalidate the cache, and works fine again.
      This may fix problems with other boot floppies not working.
      BTW, the FreeDOS beta5 mini.bin image is not good.  I got it from:
      
        http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/beta5/mini/mini.bin

      Execution gets "sent into the weeds".  After some time debugging
      it, I popped it in a real PC, and it hangs on that too.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Thu Nov 23 21:28:30 EST 2000
    Replaced C structure copy with a call to our helper function
      copy_memory() in nexus-prescan.c.  User reported undef'd memcpy
      without this.
    Rehashed plex86.c options handling.  You can pass all the config
      file options on the command line now.  Just use -o "option line".
      Make sure to quote the text of the option if it has spaces or
      magic characters, as each argument is passed to the config
      option parser as it where an entire line in the config file.
      You can also use multiple config files, or no config files at all,
      though some options have to be set to do anything useful.  Options
      and config files are processed in the order in which they are
      passed.  You can now do things like:

        ./plex86 -o "memory=4" -f ../conf/freedos -o "db_syntax = at&t"
        ./plex86 -f /tmp/conf1 -f /tmp/conf2 -o "..."
        ./plex86 -o "..." -o "..." -o "..."
        ./plex86 -f ../conf/freedos

    Added intelligent error reporting for options from command line
      and/or config files.  Exact line and character of errors are
      reported to user, along with a message.
    Config file option "load-rom" now has a colon following it, and
      a comma delimiting options, for example:
      "load-rom: file=../bios/BIOS-plex86-2000_0817a, address=0xf0000"
    Config file option "prescan_depth" was replaced by:
      "prescan: depth = N, ring3 = {on,off,auto}"
      The "ring3" clause is not used yet, but will ultimately modify
      the behaviour of SBE on ring3 code, according to your preference:
        on   = always control execution of ring3 code with SBE. (current)
        auto = turn off SBE intervention when conditions look reasonable.
        off  = always turn off SBE intervention of ring3 code.
    Some other cosmetics.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Wed Nov 22 14:55:57 EST 2000
    Integrated small curses GUI patch from Josh Wilmes.
    Integrated small load_module.sh patch from Mark Zealey.
    Implemented INSB_YbDX instruction.
    Small hacks to dma.cc to allow word read.
    Use different virtualization opcode map when running guest in
      v86 mode.  This allows natural execution of instructions which
      read selectors or reload segment registers.  I notice this shaved
      about 15% off the boot time for FreeDOS.  Protected mode code
      won't benefit from this mod.
    Commented panic which was causing Windows to panic when you fired
      up the Settings or Programs menu.  Should handle cross dword boundary
      memory mapped IO better in case it matters for a device in the
      future.  Anyways, I was able to start the Control Panel, and
      shutdown Windows all the way to the final "OK to shutdown" screen.
    Added docs/txt/DOS622.HOWTO from Michael Madore's email.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Tue Nov 21 14:33:14 EST 2000
    Integrated patches for color text handling in curses GUI from
      Josh Wilmes.
    Converted all C++ comments to C for files in kernel space.
      There's only a couple more straight C files in user space left to go.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Tue Nov 21 00:49:47 EST 2000
    Added a bogus RDTSC instruction, implemented RETfar32_Iw and
      defined bits in CR4 to get QNX to boot quite a ways.  Panics
      on use of PCD/PWT bits in PTE.  Probably harmless.  Will
      try to update handling and re-run later.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Mon Nov 20 22:25:53 EST 2000
    Bug fixes and recoding of mon-paging.c.  Some of the comments
      for the mods need to be changed.  I'll do that next.
    Added an acceleration for INSW, transfer is done in user space
      potentially in blocks of words direct to guest memory.  I notice
      FreeDOS boots from the disk image file in only a few seconds
      after this mod.  :^)  This only helps if you do a REP INSW, which
      the BIOS does.  Could extend this method to other instructions.
      Gives us an idea what special data transfer can do for performance.
      This should model the kinds of gains we can get with special
        guest OS device drivers.
    VCode cache entries are invalidated individually.  Before I was
      dumping the whole set when one got stepped on.


  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Sun Nov 19 16:04:40 EST 2000
    Implemented WBINVD instruction.  Ingnored for now.  This was
      tripping up some people's attempts to install/boot OSes.
    Moved part of mon-prescan.c to host-prescan.c.  This will eventually
      contain multiple maps, one for each of various CPU modes.  The
      current map is used for all modes, which is very inefficient, since
      in v86 mode, there is no need to monitor segment loads or selector
      reads etc.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Sun Nov 19 12:51:38 EST 2000
    Integrated patches from Josh Wilmes for gui/curses.cc.
    Integrated/completed code cache patches from Ramon van Handel.
      There are now N code cache pages, rather than 1.  We'll need
      to look at various page algorithms to figure out which pages
      to kick out of the cache when a new one is needed.  For now,
      ICACHE_PAGES pages is hardwired in kernel/include/monitor.h
      Keep in mind there is one meta page and one vcode page for each
      virtualized code page, thus we consume 2*ICACHE_PAGES.  I have
      this set to 64 pages which is 2*64*4096 = 512KB total.
    Reworked mon-paging.c a little.
    Bug fixed of macro LOG_BUFF_SIZE:
      from (LOG_BUFF_PAGES*512) to ((LOG_BUFF_PAGES)*4096)
    Single word disk IO is still dragging down performance.  Need to
      handle disk IO in blocks.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Thu Nov 16 02:27:24 EST 2000
    Changed use of macro current_got_fatal_signal() to
      signal_pending(current), for Linux2.4.0-test10, as
      per suggestion from Eric Warmenhoven.  That macro was in
      wrapper.h and went away with test10.
    Fixes to emulation/fpu.c.  Had '&&' instead of '||'.
    Renamed files in kernel/.  Files starting with 'host-' contain
      code existing in host space.  Files starting with 'mon-' contain
      code existing in monitor space.  And files starting with 'nexus-'
      contain code existing in nexus space (access to both spaces).
      This way routines can be coded to access memory in a particular
      space more efficiently, without extra pointer dereferencing.
    Added support of the A20 Enable line.
    Many changes regarding handling of various guest CPU modes, and
      the modes they are 'monitored' in.
    Implemented more protected mode instructions and control transfer
      logic.
    Support guest v86 mode.
    Handle legacy protected mode values in descriptor caches, after
      transitioning to real mode, using virtualized segments and running
      guest code in protected mode.
    There are many #warning directives.  Excuse the mess for now,
      there is much to clean up.
      

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Thu Nov  2 16:56:09 EST 2000
    Redirect memory mapped IO addresses in the VGA framebuffer,
      to the VGA emulation.  Took out hack to periodically copy
      physical guest memory to VGA framebuffer.  VGA graphics
      modes should be enabled now.
    Added an abort_code to the vm_t so we can tell where a panic
      happened, if it is not safe to print a message.  (for example
      in the exception handler)

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Tue Oct 31 17:45:07 EST 2000
    Filled in a little more emulation of task switches
      and interrupt handling.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Sun Oct 29 21:28:04 EST 2000
    Linux kernel 2.4 works as a host now.  (I used linux-2.4.0-test9).
      There is a bug as of that version in the Linux kernel header
      file 'include/linux/wrapper.h'.  Macros mem_map_reserve()
      and mem_map_unreserve() do not use the proper parenthesis.
      They are listed as:

        #define mem_map_reserve(p) set_bit(PG_reserved, &p->flags)
        #define mem_map_unreserve(p) clear_bit(PG_reserved, &p->flags)

      ...but should be:

        #define mem_map_reserve(p) set_bit(PG_reserved, &((p)->flags))
        #define mem_map_unreserve(p) clear_bit(PG_reserved, &((p)->flags))

      I just used set_bit() and clear_bit() directly to get around using
      these macros.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Fri Oct 27 14:58:38 EDT 2000
    Added toplevel files 'TODO' and 'PERFORMANCE'.  These describe
      general stuff to-do and performance to-dos respectively.
    Integrated patches from Jeff Dubrule:
      user/user.c: also try opening /dev/misc/plex86.
      kernel/monprint.c: get rid of varargs warning.
    Couple small hacks to avoid panics in harddrv.cc for Tom's root-boot.
      Search in that file for tomsrtbt, and uncomment the hacks.  I
      don't want to have these hacks in the code normally yet.


  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Thu Oct 26 23:17:55 EDT 2000
    Integrated DevFS support patches from Jeff Dubrule


  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Thu Oct 26 12:55:59 EDT 2000
    Linux 2.0.31 boots!  (Used a disk image file from bochs with
      Linux already installed)
    Added RTEMS to GUESTS file
    Moved guest_context_t to kernel space.  User code now interfaces
      with monitor via guest_cpu_t.  Got rid of set_guest_context()
      and get_guest_context().  This broke the ICE plugin, which
      I have commented out temporarily in the Makefile.
    Monitor can now handle running guest in 3 modes:
      1) Execution as normal (SBE controlled)
      2) Execution by breakpointing (setting TF and run guest for
         duration of one instruction at a time.
      3) Emulation.  Monitor keeps in an emulation loop.
    Monitor print output is now channeled to user space program,
      rather than system log.  Mapped the 4k monitor print buffer
      to user space for efficiency.  Still have to clean up the
      print code.
    Fixed bug Ramon found in handle_fault, where 'from =' code was
      evaluated too soon, possibly before a guest mode transition
      resulting from emulation of a guest system instruction.
    Lot's of #warning directives in C files to remind myself things
      that need to be cleaned up.  :^)
    Fixed bug in kernel/prescan.c.  If a branch instruction was found
      at the maximum level of prescan recursion, then it would not
      be virtualized.
    Updated the paging code, both in kernel/vpaging.c and
      emulation/paging.c.  It now accurately handles error codes
      and A&D bit updates in the page dir/table entries.
    Changed the delivery of guest execution times and user space
      periodic callbacks to the user code.  Some stuff is hacky
      and needs to be reworked.
    Turned SBE on for real mode code (run in monitor as v86 code).
      This will slow FreeDOS down until I optimize things.
    SBE still only is dealing with one page at a time.  This I
      will change very soon.  This rev will be very slow because
      of this.  Picture that every out of page branch dumps the
      virtualized code cache.  Ouch!
    I think tomorrow, I can put a preinstalled Linux disk image file
      on the 'net for developer to try.  It's 126Meg file generated
      some time ago with bochs.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Fri Sep  8 09:05:49 EDT 2000
    Added FWAIT to list of instructions to virtualize
    Coded POPAD32.
    Filled out a little more of jump_protected
    Created a suite of tests to examine updates of A&D bits in
      PDE/PTE, test various paging permission handling, and
      error reporting on real processor.  Updated paging.c accordingly.
    The virtualized paging in the monitor (vpaging.c) needs to be
      synchronized with the emulation paging facility.  Also, A&D
      bits from the actual monitor page tables and the guest's page
      tables need to be synchronized.  (Same deal for the A bit of
      data segment descriptors)
    Need to detect case where guest code is modifying the page directory,
      or the page table of the currently executing code.  On a processor,
      the TLB cache will be used until reloaded.  Since plex86 is
      dumping the page tables and rebuilding upon a write, this can
      cause problems, and send guest code "into the weeds".
    I'm also occasionally preparing some tests to throw into a test
      suite for plex86, to validate the virtualization/emulation.
      Think I'll make a separate validation module for the plex86
      CVS tree.  This well let people interested in being "testers"
      help out more.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Mon Sep  4 16:53:14 EDT 2000
    In special cosimulation mode, plex86 boots Linux!
    Fixes to virtualized paging; CR2 was not being set
    More emulation of instructions which require virtualization.
    Mods to paging code.
    Created kernel/vsegment_nexus.c.  Moved stuff here that needs to
      be accessed from either host or monitor space.
    Fixed some handling of segment/virtualized-segment synchronicity.
    Fixed error handling init_module().  Must unregister services if
      an error is returned, otherwise kernel goes unstable.  Also
      return negative error now.
    Added emulation of hardware tasking.
    Increased PLEX86_MAX_MONITOR_PAGES so bigger monitor will fit.
    Fixed a bunch of inline assembly statements, so they explicitly
      request 8-bit registers when necessary.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Thu Aug 31 20:33:04 EDT 2000
    Implemented OUTS instruction.
    Fixed inline asms for some 8-bit instructions - added directives
      to force compiler to use 8-bit capable registers, where
      appropriate.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Thu Aug 31 15:37:01 EDT 2000
    Finished emulation of user-level integer instructions.  The rest of
      the instructions can be added as they are encountered.  That
      was a lot of typing.  Anyways, I tried to implement emulation in
      terms of inlined assembly use of the native instruction, whenever
      possible for speed.
    Now back to virtualization framework hacking, while booting
      Linux/Windows in plex86...

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Wed Aug 30 17:03:40 EDT 2000
    Added emulation of more user level integer-oriented instructions.
      Only a few more to go...  Then on to running Linux/Windows in the VM.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Mon Aug 28 14:39:23 EDT 2000
    Added emulation of a bunch more instructions.  I'm working towards
      being able to emulate all integer unit instructions.  There's
      another batch to do.  Soon, I'll move on to getting Linux and
      Windows running in plex86.  Note that a lot of the emulation
      isn't regularly used, but it will eliminate future panics
      when a virtualization condition hits a random instruction.
      It is also very useful for cosimulating against bochs and
      debugging.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Mon Aug 21 13:17:05 EDT 2000
    Changes from Ramon:
      BOCHS plugin now recognises the vga_update_interval
        setting correctly.
      Reduced the user executable size from approx 1.4MB
        to 0.1MB.
      Removed the superfluous --with-sdl command from
        configure.in.  {I generated a new configure (KPL)}

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Thu Aug 17 00:55:17 EDT 2000
    Added SDL code from Martin Garton (untested)
    System BIOS now scans for additional ROMs, and calls the initialization
      routine in them, if they exist.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Mon Aug 14 14:04:16 EDT 2000
    Bugfix to kernel/emulation/fetchdecode.c.  Not all prefixes would
      be handled properly with respect to page boundaries.
    Moved plex86.conf.* files to a newly created top-level 'conf' dir.
    Added VGABIOS-elpin-LICENSE file.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Sun Aug 13 17:31:04 EDT 2000
    Tagged last version with 'plex86-0_1_0'

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>:
    Plex86 now boots FreeDOS!  Some real base instructions in
      README.DOS
    VGA BIOS from Elpin Systems, Inc, is now licensed for use with
      plex86, courtesy of MandrakeSoft.  It's in bios/VGABIOS-elpin-2.40.
    Implemented emulation of a bunch of 16-bit instructions in
      case virtualization conditions necessitate them.
    Add ioctl calls to set/get complete guest CPU state.
    Debug information now displays correct disassembly information for
      real-mode, and protected-mode with segment bases not 0.
    Converted C++ to C comments for files in the kernel/ tree
      and top level of the user/ directory.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Thu Aug  3 13:14:16 EDT 2000
    Integrated patches from Ramon.  He coded a new and more efficient
      IO redirection service for routing IO requests from the VM
      to the proper user space handler.
    Integrated patches from Josh Wilmes.  Minor error reporting on
      failed open()/fstat() calls, and a wait option before terminating
      program execution.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Wed Aug  2 15:30:46 EDT 2000
    DOS 6.22 boots from floppy and disk image file.  Anything other
      than booting and typing 'DIR' will likely resulting in a panic,
      since I only implemented enough instruction to get there.
    Added running real-mode guest code capability to the VM.  Code
      is run in v86 mode in the VM.  Modified the guest_context
      stack frame conventions a little to accommodate the extra
      data seg selector pushes in v86 mode.
    Added more emulation of instructions.
    Rearranged the user/plugin code to add more flexibility to
      the plex86.conf initialization.
    Plex86.conf can now pass bochs options to the bochs plugins.
    Moved the BIOS over from bochs.  A precompiled BIOS is available
      in bios/BIOS-plex86-*.  Added instructions to the toplevel README
      on how to compile your own.
    You can now load a system BIOS and VGA BIOS into memory.  If
      you load a VGA BIOS, then you don't need to use the replay_io
      plugin.
    Hacks:
      Int 0x15, AH=0x87 is hacked in kernel/emulation/soft_int.c to
        return CF=1 (error).  This is because I don't support a
        transition to PM yet from RM, necessary for extended memory
        BIOS operations.
      SBE is effectively disabled for running RM guest code.  In
        kernel/fault.c, there is a goto hack.  I will take this
        out at some point, after I get more instructions emulated,
        so that SBE works.
      In user/plugin.c, there are hacks to inport and output routines
        for port 0x01f0 (hard disk).

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Sat Jul 22 12:26:15 EDT 2000
    prescan() is passed a linear address to read from instead of opening
      a guest phy page.  This is more efficient as the guest addr has
      to be mapped in anyways.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Sat Jul 22 12:26:15 EDT 2000
    Added all the remaining devices from bochs to plex86: CDROM,
      CMOS, floppy, ...
    Moved x86 instruction emulation code to kernel/emulation.
      Corresponding header info was moved to kernel/include/emulation.h.
      Emulation files are compile with -DEMULATION; emulation.h
      exports only a few features to the monitor without this defined.
    Linux as a guest partially boots.  You will need 'initrd.img' and
      'linux.img' if you want to play with this.  These are the initial
      ramdisk and kernel image files.  Should panic with a HLT with IF==0.
      The VGA text framebuffer at the time of panic is dumped to the
      system log.  Grab these files from the ftp site.
    Fixed some bugs.
    Added extra options to plex86.conf and code to be able to load
      Linux into memory and set up the environment as it were loaded by
      a real boot-loader.
    Rehashed the way time events are delivered.  This is unfinished.
      Eventually there will be both a wall-clock time reference for
      things like GUI updates, and a VM time reference.  Will fix this.
      VGA updates will be slow for now.  Don't worry about this for now.
    Added a macro ANAL_CHECKS to config.h.in.  By default it's on.  Some
      extra safety checks are made or debugging purposes.
    There is now a bios directory.  This will ultimately contain the sytem
      ROM BIOS.  For now, it's a null BIOS.  I changed the way the kernel
      image loading was hooked with the BIOS.  It is independent now.
    VGA IO event replaying behaves like it did previously.  Events are
      read from a file.
    Implemented a setjmp/longjmp for use with guest excepion handling.
      In the file kernel/include/vmsetjmp.h, you can also use the gcc
      builtin ones as well.  These calls are bracketed with CLI/STI
      instructions because I was debugging stuff, and I just realized
      now that I left them in there.
    Need to move 'user/plugins/bios' to something more suitable like
      'user/plugins/load-kernel'.
    Other stuff that I forgot about.  Also, there might be some legacy
      debug stuff in there that I forgot about.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: Thu Jun 29 01:25:34 EDT 2000
    Bios plugin no longer loads the kernel image.  This is done
      separately now, by 'load-kernel.so'.
    Added 'replay_io.so' in lieu of the vga.S file.
      It replays the IO trace file 'misc/vga_io.log' to the vga
      emulation.  This is more efficient, and allowed for separation
      of the BIOS functionality.  This is in a new plugin directory 'misc'.
    Added 'load-rom.so' which does nothing effectively, since we
      don't have a ROM BIOS yet, but will load one when we do.
    I changed plugin_load() so it adds modules to the end of the list.
      This way, they are added in the order in which they are
      used in the 'plex86.conf' file.
    Created a new toplevel dir 'bios' which will ultimately hold
      our ROM BIOS.
    Stack_address is now a parameter to the kernel loader plugin.
    Added line continuation character to plex86.conf for readability.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>:
    Incoporated fix from Ulrich for broken logic in fetchdecode.c.
    Added support for monitor interruptibility.  Interrupts
      disabled dwell time is really short.  This version should
      be a lot nicer to your host OS.
    Fixed bug in sbe(); for guest CR0.PG==1, getting address of
      monitor page table was wrong.
    Fixed bug in get_cpu_capability(); added ecx and edx to list
      of registers 'touched' by cpuid instruction for eax==1 case.
    Split vm->state into vm->mon_state and vm->mon_request, to
      keep things sane for an interruptible monitor.  Because even
      a HW interrupt needs to call sbe() after it's done, even the
      end of the HW interrupt handler has to be interruptible
      (the sbe() function can be long).  Thus, HW int redirection
      does not step on the vm->mon_state.
    I added some extra push/pops to the transition code.  Not sure
      if all of it was needed.  Will look into eliminating code
      not needed.  But, I wanted to quickly get a release out
      that had the above fixes in int.
    Please try all 3 guests: cooperative, preemptible, paging on
      your machine and report.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>:
    Added prescan_depth option to plex86.conf, and corresponding
      ioctl kernel code so this parameter is now configurable.
    Filled out some support for a guest with paging enabled.
    The 'paging' guest now works!
    Added a function to grok the CPUID instruction for feature
      support.
    Changed use of KERNEL_VERSION() to VERSION_CODE() in host-linux.
      That wasn't defined on a lesser kernel.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Minor simplicfication of SBE logic.
    Various interface cleanups.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: (plex86-2000_0618g)
    Removed user/{emulation.c,emulation.h}; no longer needed.  This
      stuff is all done in the monitor now.
    Abstracted a lot of the host-linux.c code to host-all.c.  This
      is a first step in making porting to other platforms easier.
    Reworked some framework so that supporting a guest that uses
      paging will be easier.
    Renabled passing interrupts from user code to monitor.
    The 'preemptive' guest works again.
    Page tables are built dynamically.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>: (plex86-2000_0605b)
    Added monitor log facility to use (printk like) to print
      debug messages in either host or monitor space.  Text
      is redirected to the host kernel print facility.
    Changed nexus functions to switch from host<-->monitor,
      rather than host<-->guest.  This gives us flexibility to
      return to monitor code anywhere, including in the middle
      of emulating an instruction.
    Moved some fields out of nexus.  Only data needed to
      transition between host<-->monitor/guest context should be
      in nexus.  All other fields are easily accessible from either
      space and should be in VM structure proper.
    kernel/emulation.c now uses same fetchdecode function as
      prescan code.
    Totally recoded emulation.c, and split out emulation of
      many functions into *.c files, which strangely mirror
      the names of files in bochs. :^)  Sorry, this helped
      me keep things straight.
    Added segmentation protection checks to data accesses,
      control transfers, etc, in instruction emulation.
    Added much protection model framework to instruction
      emulation.
    Paged guests are not supported yet, though much of the
      new framework has been thought out with that in mind.
    Likely only the cooperative guest works so far, as that's
      the only one I've been working with, and I implemented
      just enough to get it going.
    Changed the user<-->host<-->monitor interface.  The user
      code does not participate in the emulation of instructions
      any more, except to serve IO and other hardware requests.
    SBE (Scan Before Execute = Prescan) logic is now an integral
      part of plex86.  In fact, both ring0 and ring3 code are
      currently always controlled by SBE.  Much thought went into
      structuring the code, so that we can make a dynamic decision
      to switch SBE off when running ring3 code, yet the emulation
      functions will still work.
    Lots of other doings...
    NOTE: Things should and do run a _lot_ slower for the moment,
      as everything is being controlled by SBE, and I'm not doing
      some things very optimally.  Things will speed up greatly
      in the future.

  - "Edouard G. Parmelan" <Edouard.Parmelan@quadratec.fr>:
    Add module option to choose static device major number.

  - "Jens Nerche" <jn4@os.inf.tu-dresden.de>:
    Support for multiboot guest kernels.
    Add shadow descriptors after LGDT.  
    Add ljmp emulation.

  - "Ramon van Handel" <vhandel@chem.vu.nl>:
    Added BIOS plugin; moved guest loading and VGA init there.
    Port I/O dispatching fixes.
    Don't call X routines from within signal handler.
    Some coding style clean-up.
   
  - "Bryan Meredith" <bryan@bear-mountain.demon.co.uk>:
    Use dynamically allocated /dev/plex86 major number.

  - "Edouard G. Parmelan" <Edouard.Parmelan@quadratec.fr>:
    Fix incorrect plex86_proc_entry.namelen.
    Fix OOPS in host2guest when compiled without SBE.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Automatically choose appropriate warning level when using gcc.
    configure.linux removed.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Removed some more references to FreeMWare or FMW.

  - "Edouard G. Parmelan" <Edouard.Parmelan@quadratec.fr>:
    Fixed Makefiles to allow build in separate directory.
    Added --with-linux-source= configure option.

  - "C Hanish Menon" <hanish@innomedia.soft.net>:
    Don't load guest code beyond available guest memory.
    Removed data / bss offsets.

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>:
    Mapped VM (vm_t) structure into monitor space.
    Rehashed the vm_t structure and other framework so that
      we can access VM fields from either host or guest address
      spaces.  If you stick to accessing VM fields using only
      pointers in the 'common' substructure, code will work in
      either space.  The 'addr' field is actually just a pointer
      which is changed during a space transition, to point to
      set of pointers for that space.  This way, general code
      doesn't need to know or care what space it executes in.
    Functions in kernel/fault.c now pass the 'vm' pointer on
      to functions in kernel/emulate.c.  Also, all functions in
      kernel/emulate.c pass the vm pointer.  These functions should
      execute in either space now.
    Moved vm_nexus() from kernel/include/monitor.c to kernel/fault.c
      so it won't be used outside of these functions.  It is space
      dependent, and shouldn't be used outside of this file anymore.
      It is used to grab the vm pointer from the nexus upon fault,
      and is not needed thereafter during the fault handling.

  - "Janek Hiis" <janekh@math.ut.ee>
    Added #ifdef in kernel/host-linux.c for move of i_mmap field,
      in newer Linux kernels.  2.3.99?

  - "Kevin P. Lawton" <kevin@mandrakesoft.com>:
    Integrated scan-before-execute (prescan) code into main
      source tree.  (It was previously developed independently)
    Integrated split I&D TLB code into main source tree.  (It
      was previously implemented only in a small test program)
    The above components are not fully operational yet.  They
      are not used by default.  To try them, after typing
      configure.linux, modify the kernel/Makefile CFLAGS
      variable as per the commented line, then compile.
      Otherwise they are not used, and things should function
      as per previous revs.
    Changed references to FreeMWare to plex86.
    Added checks to return value of retrieve_vm_pages() calls
      in kernel/host-linux.c.  Also fixed one minor flaw there.
    Created a docs/ directory structure.  Moved the public paper
      and memory address space graphic there.

  - "Nick Bastin" <nbastin@mil3.com>:
    Partially converted public paper to sgml/DocBook format.
    Added new output targets to docs Makefile system.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Initial import of freemware-20000213 into plex86.
    FreeMWare ChangeLog file is appended.

 ==========================================================================

  - "Ramon van Handel" <vhandel@chem.vu.nl>:
    New guest vs. monitor eflags handling.
    IOPL dependent behaviour of STI/CLI/IRET.
    Bugfix: correct limit handling for big segments.
    Added new 'paging' guest kernel.

  - "Ramon van Handel" <vhandel@chem.vu.nl>:
    Added interrupt interception to kernel module and plugin interface.
    Moved IF handling to kernel-side, using a VIF/VIP mechanism.
    Various fixes/cleanups for the ICE plugin.
    Use US keyboard map in virtcode.

  - "Ramon van Handel" <vhandel@chem.vu.nl>:
    Added VGA font and updated README accordingly.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Simplified loading of guest kernel.
    Store page numbers instead of addresses in VM data structure.
    Removed all dependecies on host.h from non-OS specific files.
    Moved freemware.h to root, don't include kernel headers from user.
    Removed unnecessary #include directives.
    Removed Bochs macintosh GUI.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Removed the 'NT-flag hack'; instead set all but current code segment
    descriptors to type 'data' to make iret trap.  This allows to run the
    *unmodified* cooperative and preemptive kernels.

  - "Ramon van Handel" <vhandel@chem.vu.nl>:
    Clean up: split user.c into multiple files.
    Main executable renamed to 'freemware'.
    Added emulation for ins/outs instructions (including rep variants).
      [partially based on a patch due to Jens Nerche] 
    Added emulation of int3 instruction.
    Always use 'bx_printf' for Bochs debug output.

  - "Josh Wilmes"  <josh@hitchhiker.org>:
    Added curses UI for bochs plugin.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Added support for raising hardware interrupts to kernel module.
    Added INTR interface between user and plugins.
    Added PIC/PIT hardware models from Bochs.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Cleaned up user/kernel interface a bit.
    General clean up: CFLAGS simplified, compiler warnings fixed.

  - "Jens Nerche" <jn4@os.inf.tu-dresden.de>:
    Added emulation for more instructions.
    Updated 'virtcode' app to include minishell.

  - "Ramon van Handel" <vhandel@chem.vu.nl>:
    Miscellaneous bugfixes.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Simplified user mode instruction emulation interface.
    Increased Bochs timer update frequency.

  - "Ramon van Handel" <vhandel@chem.vu.nl>:
    Resource allocation and event handling for plugins.
    user.c reorganization / cleanup.
    Added I/O emulation plugin interface to Bochs.
    Updated 'virtcode' app to test keyboard input.

  - "Jens Nerche" <jn4@os.inf.tu-dresden.de>:
    Added support for in/out instruction emulation.
    Fixed and improved VM dump.

  - "Ramon van Handel" <vhandel@chem.vu.nl>:
    Fixed AT&T syntax suffixes.
    Added gdb remote protocol documentation.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Allow to change 'safe' guest flags from user mode.

  - "Ramon van Handel" <vhandel@chem.vu.nl>:
    Bugfix to 'mywait'.  Make VGA timer handler restartable.
    Fixed 'Power' button.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Removed .bin guest kernels (always use ELF).
    Compile shared libraries with -fPIC.
    Compile everything except kernel with debug symbols.
    Fixed memory overwrite bug in plugin handling.

  - "Oleg Drokin" <green@crimea.edu>:
    Disable VGA timer handler before unmapping guest memory.

  - "Ramon van Handel" <vhandel@chem.vu.nl>:
    Added support for plugins.  
    Make Bochs device emulation framework a plugin.
    Added ICE plugin for remote GDB debugger support.
    Added AT&T syntax instruction decoding to decode.c.
    Removed timeout handling; general clean-up of user.c.

  - "Kevin P. Lawton" <kevin@bochs.com>
    Integrated VGA, keyboard and certain IO device emulation framework
    from bochs into FreeMWare.  Writes to the text video memory
    are now displayed in an X window via the VGA emulation.  The
    cooperative kernel was tested and displays fine.
    Added periodic timer signal handler to user code, so it can
    drive updates in the IO device emulation.
    Expanded copyrights in user/ from 1999 to 1999-2000.

  - "Ramon van Handel" <vhandel@chem.vu.nl>:
    Updated README file.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Bugfix: return modified guest_context on EINTR.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Bugfix: monitor_pages should contain virtual, not physical addresses.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Removed linker script; retrieve module address range from kernel data.
    Use standard 'current_got_fatal_signal()' test.
    Return -EINTR instead of -ERESTARTSYS.
    Added some missing .globl definitions in nexus.S.
    Added NT flag hack to preemptive kernel as well.
    Bugfix: do *not* allow direct I/O access to guest!

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Added emulation for lgdt/lidt/lldt/ltr/int/iret instructions.
    Activated nexus selector migration (after lgdt).
    Hack: set NT flag during guest execution so that iret traps.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Improved/fixed kernel emulation operand decoding.
    Added decoding of some more instructions.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Separated monitor from guest initialization code.
    Prepared for monitor/nexus linear address / selector migration.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Made transition code more self-contained; don't rely on host 
    parameters not changing over time.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Map module pages into guest at arbitrary linear adresses
    by shifting the monitor segment bases accordingly. 
    Re-enabled monitor-side fault handlers.

  - "Kevin P. Lawton" <kevin@bochs.com>:
    Simplified nexus access via C structure.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Support for multiple VMs on the host (Linux) side.

  - "Kevin P. Lawton" <kevin@bochs.com>:
    Implemented transition into guest space using 'nexus' page.
    Prepared for managing multiple VMs.

  - <beef@niggard.org>:
    Fixed some warnings.

  - "Ben" <ben@comp.uark.edu>:
    Portability fixes for Linux versions >= 2.3.25.

  - "Todd T. Fries" <toddf@acm.org>:
    Portability fixes.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Fixed incorrect decoding of some instructions (user).
    Added effective address decoding to kernel emulator.

  - "Jens Nerche" <jn4@os.inf.tu-dresden.de>:
    Added beginnings of emulation framework.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Added Intel instruction decoder to 'user'.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Bug fix: run guest at IOPL 0, not IOPL 3.

  - "Oleg Drokin" <green@crimea.edu>:
    Fix signal handling on glibc systems.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Pass guest context from/to user space on FMWRUNGUEST ioctl.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Removed 'quanta' argument to FMWRUNGUEST ioctl.
    Replaced 'quanta' handling in 'user' by SIGALRM-based timeout mechanism.

  - "Jens Nerche" <jn4@os.inf.tu-dresden.de>:
    here comes the patch for loading ELF binaries. I enhanced
    the config file: text address, data address, stack address
    and bss address are new options, and user.c undertands -d
    for debugging messages now.
    If the file is in ELF format, the text address is taken from
    file, if it is a pure binary it's taken from config file.
    data address and bss address are still unused.

  - "Love" <lha@stacken.kth.se>:
    Adapted Makefiles to allow build outside the source-tree.

  - "Jens Nerche" <jn4@os.inf.tu-dresden.de>:
    Command line parameters and config file for 'user'.

  - "Ulrich Weigand" <weigand@informatik.uni-erlangen.de>:
    Created 'guest' directory to contain various test guest kernels.
    Moved dummy virtcode to guest/virtcode.
    Added Ramon's nullkernel as guest/cooperative and guest/preemptive.
    Made guest kernel to load a command line parameter to 'user'.
    Reorganized interrupt/exception handling in kernel module.

  - "Kevin P. Lawton" <kevin@bochs.com>:
    Fixed soft_int macro.


fmw-19990826a:

  - (UW) [host-linux.c] [host-linux.h]
    Added check to prevent the guest physical memory from being
    freed while still mapped to user space.
    Added check to prevent duplicate allocation (memory leak!).
    Use 'mem_map_(un)reserve' macros instead of manipulating page
    flags directly.

  - (UW) [user.c]
    Unmap guest physical memory before freeing it.


fmw-19990825a:

  [patch1 from UW]
  - Use some linker/ELF magic to retrieve the linear address space
    occupied by the kernel module at runtime.

  - Walk the host page tables to retrieve a list of all physical pages
    underlying the kernel module's code and data sections.

  - Allocate memory for the monitor page tables, and set them up as follows:
    * An identity mapping of the complete guest physical memory (at address 0)
    * A mapping of the kernel module's code/data pages at the same
      linear address as in the host space.

  - Remove the dynamic allocation of interrupt reflection stubs
    (sorry Ramon :-/).
    These stubs are called in the guest VM, so using kmalloc() -- which
    returns some arbitrary address inside host physical memory -- to
    allocate them is not a real good idea ;-)   I've moved them to memory
    inside the module's data pages.

  - Add the actual PDBR reloading.

  [patch2 from UW]
  - The do_nothing task is removed from the kernel module.
    Instead, it is built as standalone executable 'virtcode.bin',
    which gets loaded by the user app into the guest memory.

  - The kernel module, on initial switch to the monitor, starts
    executing the guest code in ring-3.

  - A nasty problem with the mmap() implementation appeared:
    It seems that Linux doesn't like if we map normal memory
    pages using remap_page_range; apparently you are only allowed
    to map 'hardware' pages.  While it did seem to work, what
    actually happened was that remap_page_range recognized the
    page as normal memory page, and decided to map in an anonymous
    page instead.  Thus, the guest could access the mapped memory
    perfectly well --- the only problem is that is accessed completely
    different pages, which were mapped in by the standard nopage
    handler :-/

    This patch circumvent the problem by a very ugly hack:  it
    simply sets the PG_reserved bit of all those pages used for
    guest memory, thereby declaring them as 'hardware range' ;-)
    This works fine on my system (2.0.36), but I'm not at all sure
    that it will work on other versions ...

    Anyway, this needs to be fixed correctly, of course.  I'll be
    looking into this problem.  For now, we need the hack, because
    otherwise the user app is unable to load the guest code in ...

fmw-19990822b:

  - (KPL) Converted to using GNU autoconf for easier configuration
    on multiple host OS platforms.  You only have to run autoconf
    if you change the configure.in file.  Otherwise, re-run
    configure.  To make things simple, and so that it's easy
    to run configure with known flags etc, run ./configure.hostos,
    where hostos is your host OS.  I made one for Linux and
    BeOS, though the BeOS one may be broken.

  - (KPL) Integrated patch from Ulrich regarding looking for
    signals in kernel module before looping on running guest OS.

  - (KPL) Moved sti() call in host-linux.c into soft_int macro.
    The IF change will not be recognised until after the INT
    instruction, in this case, so there is no chance of an
    interrupt intervening.

  - (KPL) Created a NEED_RESCHED macro, so we can compile
    for various Linux kernel versions.  I don't know when the
    change was made to put need_resched in the "current" structure.
    I guessed 2.2.0.  If this is not right, please let us know
    when the change occurred.

  - (KPL) added inline function pending_signals() to host-linux.c.
    Please also fix the version number code that controls which
    method to use to access the signals field in the "current"
    structure.  This was a small fix to get Ramon's changes
    to compile on my 2.2.5 kernel.  I'm not sure if the signals
    > 31 are interesting to us.  If not, we don't need the loop
    code I put in the inline function.
    

fmw-19990821a:

  - (RvH) I cleaned up all of the code, giving it bigger indents
    and converting to C-style comments whenever things got really
    ugly.  It's still not the clearest code I've ever seen but it'll
    do for now.  I also moved the virtualised test code into a
    separate file, virtcode.c.

  - (RvH) I changed host-linux.c so that it takes the amount of
    quanta to run as an argument to ioctl().  Now it doesn't trap
    back to the user application on ever quantum.  Question:
    on 2.2 we use current->need_resched, but is this true for
    2.0 too, or does it have need_resched as a global variable ?

  - (RvH) I integrated Ulrich's mmap() code into the module, and
    fixed it so that it compiles on 2.2 kernels.

  - (RvH) I changed the way interrupts are allocated.  Now, the
    host code needs to call init_reflect() (in monitor.c) after
    init_monitor() for every interrupt that needs to be reflected
    back to the host OS.  The monitor.c code then dynamically
    generates and relocates a correct interrupt stub.  The host
    code is responsible for allocating/freeing memory for the
    stubs.

  - (RvH) I fixed up the interrupts so that the code works on my
    SMP machine.  I still have 2.0 code in there too, but I can't
    test that --- can anybody test this on a 2.0 SMP box ?
    2.2 SMP is rather annoying because it allocates lots of IPIs,
    and most of them aren't fixed (2.2 SMP does not use the 0x20-
    0x2f mapping for the PIC, but has everything go through the
    I/O APIC with rather weird interrupt mappings).  In order to
    allocate the correct interrupts I need access to a kernel
    array called irq_vector[], which unfortunately is not exported
    to modules.  Thus you need to patch the linux kernel if you
    want to run this code on a 2.2 SMP box.  The patch is simple:
    put the following code in linux/arch/i386/kernel/i386_ksyms.c:

        #ifdef __SMP__
        #include "irq.h"
        EXPORT_SYMBOL(irq_vector);
        #endif

    and everything will work just beautifully (or anyway, that's
    what it looks like.)

fmw-990817c:

  - (KPL) I added irq16 vector to the init_monitor() call.
    If you pass a 0, no irq16 redirect handler is installed.
    Irq16 is the APIC IPI interrupt, which is used on multiple
    processor compiles of Linux (SMP).  The code is untested.
    In kernel/include/host-linux.h, I do this:

    #ifdef __SMP__
    #  define IRQ16_BASE_VECTOR 0x30  // IPI vector
    #else
    #  define IRQ16_BASE_VECTOR 0     // IPI not used on non-SMP
    #endif

    Let me know if this makes this code work on your SMP
    Linux machine.

  - (KPL) Fixed the previous interrupt bug, thanks to a find
    by Ulrich and Ramon.

fmw-990817b:
  - (KPL) Initial release.  Has interrupt bug.
