Bug 209001 - XEN: AMD-V HVM windows guest boot menu timer issue
XEN: AMD-V HVM windows guest boot menu timer issue
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel-xen (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Steven Rostedt
: 209002 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2006-10-02 17:34 EDT by Tom Woller
Modified: 2007-11-30 17:07 EST (History)
4 users (show)

See Also:
Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-11-28 16:42:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
export of c/s 11679 from xen-unstable.hg repository (1.48 KB, patch)
2006-10-02 17:34 EDT, Tom Woller
no flags Details | Diff
first patch to resolve issue, applies to 3.0.3 base. (2.49 KB, patch)
2006-10-17 14:55 EDT, Tom Woller
no flags Details | Diff
2/2 patch to resolve issue, applies to 3.0.3. (3.26 KB, patch)
2006-10-17 14:58 EDT, Tom Woller
no flags Details | Diff

  None (edit)
Description Tom Woller 2006-10-02 17:34:41 EDT
Description of problem:
[HVM][SVM] Do not delay ExtInt event injection if RFLAGS.IF==0.

AMD-V does not require the delaying of interrupt injection if the guest
IF_FLAG disallows interrupts.  Remove the code in svm_intr_assist()
that was checking the guest IF in eflags.

This patch fixes the problem with HVM Windows guests, with observing a
very slow timer countdown on the initial boot menu, when there is more
than one boot option.  Kbd response in this same Windows boot menu is
also acceptably responsive with this patch.

Version-Release number of selected component (if applicable):
the patch is from xen-unstable.hg repository changeset 11679
the patch is also attached in the below info field.

How reproducible:

Steps to Reproduce:
1. start up HVM windows XP SP2 guest with >1 boot menu options
2. observe the timer on the boot menu

Actual results:
1. boot menu timer will display approximately 1 sec per 10 realtime seconds
2. kdb will be not very responsive

Expected results:
1. timer will display approximately 1 sec per 1 realtime seconds
2. kdb will be responsive

Additional info:
This patch is a safe patch to apply.  The removed code was tested on 32bit, 
64bit and 32bit-pae hypervisors.

Signed-off-by: Tom Woller <thomas.woller@amd.com>=20

diff -r 9977b8785570 -r a949bd6ceb85 xen/arch/x86/hvm/svm/intr.c
--- a/xen/arch/x86/hvm/svm/intr.c	Fri Sep 29 18:12:15 2006
+++ b/xen/arch/x86/hvm/svm/intr.c	Sat Sep 30 09:49:08 2006
@@ -74,7 +74,6 @@
     int intr_type = APIC_DM_EXTINT;
     int intr_vector = -1;
     int re_injecting = 0;
-    unsigned long rflags;
@@ -87,14 +86,6 @@
         re_injecting = 1;
-    /* Guest's interrputs masked? */
-    rflags = vmcb->rflags;
-    if (irq_masked(rflags)) {
-        HVM_DBG_LOG(DBG_LEVEL_1, "Guest IRQs masked: rflags: %lx", rflags);
-        /* bail out, we won't be injecting an interrupt this time */
-        return;
-    }
     /* Previous interrupt still pending? */
     if (vmcb->vintr.fields.irq) {
 //        printk("Re-injecting IRQ from Vintr\n");
Comment 1 Tom Woller 2006-10-02 17:34:42 EDT
Created attachment 137601 [details]
export of c/s 11679 from xen-unstable.hg repository
Comment 2 Jeff Needle 2006-10-06 11:56:33 EDT
*** Bug 209002 has been marked as a duplicate of this bug. ***
Comment 3 Bhavna Sarathy 2006-10-06 12:35:57 EDT
Please hold of on applying this patch as the Xen team is seeing some problems on
Linux.   There is a workaround whihc is being testing and the bugzilla will
updated in a few days.
Comment 4 Tom Woller 2006-10-17 14:55:04 EDT
Created attachment 138706 [details]
first patch to resolve issue, applies to 3.0.3 base.
Comment 5 Tom Woller 2006-10-17 14:58:19 EDT
Created attachment 138708 [details]
2/2 patch to resolve issue, applies to 3.0.3.
Comment 6 Tom Woller 2006-10-17 15:00:30 EDT
The 2 attached patches have been tested at XenSources and internally at AMD. 
These patches have been incorporated into the xen enterprise code base, but 
have not been pushed into xen-unstable.hg to-date.
the patches resolve the windows timer issue(s) but have not seen any negative 
affects for other HVM guests.
Comment 7 Rik van Riel 2006-10-19 13:33:11 EDT
Please test tomorrow's milestone beta and let us know if the issue persists.
Comment 8 Bhavna Sarathy 2006-10-25 08:45:01 EDT
AMD has the latest test build (2.6.18-1.2736) but would like to know exactly
what is fixed that makes Red Hat feel that the issue might go away on it's own.
 That's statement by itself is frankly confusing.  Please commit the two patches
that are attched to this bugzilla so that we can test milestone 7 "with" these
Comment 9 Brian Stein 2006-10-25 08:52:27 EDT
Are these patches merged into -unstable yet?
Comment 10 Bhavna Sarathy 2006-10-25 08:57:35 EDT
Yes, both VINTR intercept signal and Delay ExtInt Injection patches are in
Comment 11 RHEL Product and Program Management 2006-10-25 10:45:30 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux release.  Product Management has requested further review
of this request by Red Hat Engineering.  This request is not yet committed for
inclusion in release.
Comment 12 Peter Martuccelli 2006-10-25 13:01:45 EDT
Bhavana will be posting the patches to RHKL shortly.
Comment 13 Jay Turner 2006-10-25 16:29:24 EDT
QE ack for RHEL5B2
Comment 14 Don Zickus 2006-10-25 18:24:29 EDT
in kernel-2.6.18-1.2737.el5

Note You need to log in before you can comment on or make changes to this bug.