From: Brian Woods <brian.woods@amd.com>
To: xen-devel@lists.xen.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Brian Woods <brian.woods@amd.com>,
Jan Beulich <jbeulich@suse.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: [PATCH 2/2] x86/svm: enable pause filtering threshold
Date: Tue, 20 Feb 2018 18:12:33 -0600 [thread overview]
Message-ID: <20180221001233.62644-3-brian.woods@amd.com> (raw)
In-Reply-To: <20180221001233.62644-1-brian.woods@amd.com>
If available, enable the pause filtering threshold feature. See the
previous commit for more information.
Signed-off-by: Brian Woods <brian.woods@amd.com>
---
xen/arch/x86/hvm/svm/svm.c | 1 +
xen/arch/x86/hvm/svm/vmcb.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index 9f58afc2d8..b6b92365bf 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1694,6 +1694,7 @@ const struct hvm_function_table * __init start_svm(void)
P(cpu_has_svm_vloadsave, "Virtual VMLOAD/VMSAVE");
P(cpu_has_svm_vgif, "Virtual GIF");
P(cpu_has_pause_filter, "Pause-Intercept Filter");
+ P(cpu_has_pause_thresh, "Pause-Intercept Filter Threshold");
P(cpu_has_tsc_ratio, "TSC Rate MSR");
#undef P
diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c
index 0e6cba5b7b..ebe6f0c751 100644
--- a/xen/arch/x86/hvm/svm/vmcb.c
+++ b/xen/arch/x86/hvm/svm/vmcb.c
@@ -227,6 +227,9 @@ static int construct_vmcb(struct vcpu *v)
{
vmcb->_pause_filter_count = SVM_PAUSEFILTER_INIT;
vmcb->_general1_intercepts |= GENERAL1_INTERCEPT_PAUSE;
+
+ if ( cpu_has_pause_thresh )
+ vmcb->_pause_filter_thresh = SVM_PAUSETHRESH_INIT;
}
vmcb->cleanbits.bytes = 0;
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-02-21 0:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 0:12 [PATCH 0/2] x86/svm: add pause filtering threshold for SVM Brian Woods
2018-02-21 0:12 ` [PATCH 1/2] x86/svm: add support for pause filtering threshold Brian Woods
2018-02-21 17:36 ` Moger, Babu
2018-02-23 9:44 ` Jan Beulich
2018-02-21 0:12 ` Brian Woods [this message]
2018-02-21 17:36 ` [PATCH 2/2] x86/svm: enable " Moger, Babu
2018-02-21 0:17 ` [PATCH 0/2] x86/svm: add pause filtering threshold for SVM Brian Woods
2018-02-21 23:30 ` Boris Ostrovsky
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=20180221001233.62644-3-brian.woods@amd.com \
--to=brian.woods@amd.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jbeulich@suse.com \
--cc=suravee.suthikulpanit@amd.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.