xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Don Slutz <dslutz@verizon.com>
To: xen-devel@lists.xen.org
Cc: Keir Fraser <keir@xen.org>, Don Slutz <dslutz@verizon.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: [PATCH v3 00/11] Prevent one cause of "MP-BIOS bug: 8254 timer"... message from linux
Date: Thu, 17 Apr 2014 13:42:54 -0400	[thread overview]
Message-ID: <1397756585-27091-1-git-send-email-dslutz@verizon.com> (raw)

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 (11):
  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: Use signed divide in hpet_get_comparator.
  hvm/hpet: comparator can only change when master clock is enabled.
  hvm/hpet: Prevent master clock equal to comparator while enabled
  hvm/hpet: handle 1st period special

 tools/tests/vhpet/.gitignore  |   4 +
 tools/tests/vhpet/Makefile    |  28 ++
 tools/tests/vhpet/emul.h      | 416 +++++++++++++++++++++++
 tools/tests/vhpet/main.c      | 768 ++++++++++++++++++++++++++++++++++++++++++
 xen/arch/x86/hvm/hpet.c       | 192 ++++++++---
 xen/include/asm-x86/hvm/vpt.h |   2 +
 6 files changed, 1359 insertions(+), 51 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

             reply	other threads:[~2014-04-17 17:42 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-17 17:42 Don Slutz [this message]
2014-04-17 17:42 ` [optional PATCH v3 01/11] hvm/hpet: Add manual unit test code Don Slutz
2014-04-23 14:41   ` Jan Beulich
2014-04-25 21:26     ` Don Slutz
2014-04-17 17:42 ` [PATCH v3 02/11] hvm/hpet: Only call guest_time_hpet(h) one time per action Don Slutz
2014-04-23 15:07   ` Jan Beulich
2014-04-23 15:42     ` Don Slutz
2014-04-23 15:54       ` Jan Beulich
2014-04-17 17:42 ` [PATCH v3 03/11] hvm/hpet: Only set comparator or period not both Don Slutz
2014-04-23 15:10   ` Jan Beulich
2014-04-17 17:42 ` [PATCH v3 04/11] hvm/hpet: Correctly limit period to a maximum Don Slutz
2014-04-23 15:11   ` Jan Beulich
2014-04-17 17:42 ` [PATCH v3 05/11] hvm/hpet: In hpet_save, correctly compute mc64 Don Slutz
2014-04-23 15:12   ` Jan Beulich
2014-04-17 17:43 ` [PATCH v3 06/11] hvm/hpet: In hpet_save, call hpet_get_comparator Don Slutz
2014-04-23 15:21   ` Jan Beulich
2014-04-25 21:42     ` Don Slutz
2014-04-17 17:43 ` [PATCH v3 07/11] hvm/hpet: Init comparator64 like comparator Don Slutz
2014-04-23 15:23   ` Jan Beulich
2014-04-25 22:00     ` Don Slutz
2014-04-17 17:43 ` [PATCH v3 08/11] hvm/hpet: Use signed divide in hpet_get_comparator Don Slutz
2014-04-23 15:45   ` Jan Beulich
2014-04-26  1:52     ` Slutz, Donald Christopher
2014-04-17 17:43 ` [PATCH v3 09/11] hvm/hpet: comparator can only change when master clock is enabled Don Slutz
2014-04-25 12:23   ` Jan Beulich
2014-04-17 17:43 ` [PATCH v3 10/11] hvm/hpet: Prevent master clock equal to comparator while enabled Don Slutz
2014-04-25 12:25   ` Jan Beulich
2014-04-26  1:50     ` Slutz, Donald Christopher
2014-04-17 17:43 ` [PATCH v3 11/11] hvm/hpet: handle 1st period special Don Slutz
2014-04-25 12:32   ` Jan Beulich
2014-04-26 14:10     ` Slutz, Donald Christopher
2014-05-01 10:31     ` Tim Deegan
2014-05-01 20:19       ` Don Slutz
2014-05-02 13:19         ` Tim Deegan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1397756585-27091-1-git-send-email-dslutz@verizon.com \
    --to=dslutz@verizon.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).