[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v4 00/10] Prevent one cause of "MP-BIOS bug: 8254 timer"... message from linux



Changes v2 to v3:

  Drop v3 patch #8 "hvm/hpet: Use signed divide in hpet_get_comparator."
    Either v3 patch #11 "hvm/hpet: handle 1st period special" or
    v4 patch #10 "hvm/hpet: Detect comparator values in the past" make
    this patch not needed.

  Replace v3 patch #11 "hvm/hpet: handle 1st period special" with
    v4 patch #10 "hvm/hpet: Detect comparator values in the past"

  My changes:

    #1 "hvm/hpet: Add manual unit test code."
       Run the unit test in many modes by default.
       Add new skip_error_on_load and debug flag 0x0100
         because patch #10 "hvm/hpet: Detect comparator values in the past"
         does not handle the 63 bit boundary case.
    #7 "hvm/hpet: Init comparator64 like comparator."
       Added paragraph starting "A disabled hpet" to commit message.

  Jan Beulich:
    #1 "hvm/hpet: Add manual unit test code."
       Use make shortcuts.
    #2 "hvm/hpet: Only call guest_time_hpet(h) one time per"
       Reviewed-by
    #3 "hvm/hpet: Only set comparator or period not both."
       Reviewed-by
    #4 "hvm/hpet: Correctly limit period to a maximum."
       Reviewed-by
    #5 "hvm/hpet: In hpet_save, correctly compute mc64."
       Reviewed-by
    #6 "hvm/hpet: In hpet_save, call hpet_get_comparator"
       Correctly set guest_time.
       Fix formatting of comments.
    #8 "hvm/hpet: comparator can only change when master"
       Acked-by

  Tim Deegan:
    #10 "hvm/hpet: Detect comparator values in the past"
        Acked-by


Changes v2 to v3:

  Add new patch #8 "hvm/hpet: Use signed divide in hpet_get_comparator."

  Re-order to group changes in the same area:

  #5, #6 are both about hpet_save

  #8, #9, #10, and #11 are all about corner cases of the lines in
  hpet_get_comparator():

     elapsed = master clock ...
     comparator += (elapsed / period) * period

  #4 "hvm/hpet: Correctly limit period to a maximum."
     was v2 #9
  #5 "hvm/hpet: In hpet_save, correctly compute mc64."
     was v2 #4
  #6 "hvm/hpet: In hpet_save, call hpet_get_comparator."
     was v2 #7 "hvm/hpet: Call hpet_get_comparator during hpet_save."
  #7 "hvm/hpet: Init comparator64 like comparator."
     was v2 #5
  #9 "hvm/hpet: comparator can only change when master"
     was v2 #6
  #10 "hvm/hpet: Prevent master clock equal to comparator"
      was v2 #8
  #11 "hvm/hpet: handle 1st period special"
      was v2 #10


  My changes:
    #1 "hvm/hpet: Add manual unit test code.":
       Make it optional.
       Add hpet_check_stopped() testing.
       Adjust print_error messages.
    #6 "hvm/hpet: In hpet_save, call hpet_get_comparator.":
        Reword subject from "hvm/hpet: Call hpet_get_comparator during 
hpet_save."
    #11 "hvm/hpet: handle 1st period special":
        More setting of first_mc64 & first_enabled when needed.
        Switch to bool_t.

  Jan Beulich:
    #1 "hvm/hpet: Add manual unit test code.":
       Add Makefile.
       Better commit message.
    #2 "hvm/hpet: Only call guest_time_hpet(h) one time per":
       Did not add Reviewed-by do to amount of change
       Added passing of guest_time to hpet_read64() and
         hpet_stop_timer().
       Dropped mc_starting.
    #3 "hvm/hpet: Only set comparator or period not both.":
       Only have 2 blocks of code.
       Set comparator64 before truncation
    #6 "hvm/hpet: In hpet_save, call hpet_get_comparator.":
       Better commit message.
    #9 "hvm/hpet: comparator can only change when master":
       Better commit message.
    #11 "hvm/hpet: handle 1st period special":
        Better commit message.



Changes v1 to v2:

  Drop the patch "hpet: Act more like real hardware" from v1 for
  several reasons:

    1) Only "fixes" less then 50% of the problem: diff < 0 or
       diff > too many periods.

    2) I have a better fix in #2 "hvm/hpet: Only call
       guest_time_hpet(h) one time per action."

    3) Reverts a previous bug fix.

  So all these patches are new and fix various bugs.

  #1 "hvm/hpet: Add manual unit test code.":
     Is optional.  I used it to validate the changes did what I expected.

v1: info that still applies

Based on the proposed fix in QEMU:

http://marc.info/?l=qemu-devel&m=139304386331192&w=2

That was provided for:

http://marc.info/?l=qemu-devel&m=139295851107140&w=2

Which is very close to a bug I have been looking into and asked some
questions about in:

http://lists.xen.org/archives/html/xen-devel/2014-02/msg01787.html


Don Slutz (10):
  hvm/hpet: Add manual unit test code.
  hvm/hpet: Only call guest_time_hpet(h) one time per action.
  hvm/hpet: Only set comparator or period not both.
  hvm/hpet: Correctly limit period to a maximum.
  hvm/hpet: In hpet_save, correctly compute mc64.
  hvm/hpet: In hpet_save, call hpet_get_comparator.
  hvm/hpet: Init comparator64 like comparator.
  hvm/hpet: comparator can only change when master clock is enabled.
  hvm/hpet: Prevent master clock equal to comparator while enabled
  hvm/hpet: Detect comparator values in the past

 tools/tests/vhpet/.gitignore |   4 +
 tools/tests/vhpet/Makefile   |  36 ++
 tools/tests/vhpet/emul.h     | 416 +++++++++++++++++++++++
 tools/tests/vhpet/main.c     | 776 +++++++++++++++++++++++++++++++++++++++++++
 xen/arch/x86/hvm/hpet.c      | 124 ++++---
 5 files changed, 1313 insertions(+), 43 deletions(-)
 create mode 100644 tools/tests/vhpet/.gitignore
 create mode 100644 tools/tests/vhpet/Makefile
 create mode 100644 tools/tests/vhpet/emul.h
 create mode 100644 tools/tests/vhpet/main.c

-- 
1.8.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.