Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 295030 Details for
Bug 430938
RHEL5.2: Improved Power Now! in Xen support on 2nd generation Opteron systems
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
xen change freq hypercall
RHEL5.2_Xen_change_freq_hypercall.patch (text/plain), 1.94 KB, created by
Bhavna Sarathy
on 2008-02-15 18:41:41 UTC
(
hide
)
Description:
xen change freq hypercall
Filename:
MIME Type:
Creator:
Bhavna Sarathy
Created:
2008-02-15 18:41:41 UTC
Size:
1.94 KB
patch
obsolete
>Resolves BZ 430938 > >Fix XENPF_change_freq hypercall to not dereference a non-existent >stack variable. Also sanity check (slightly) the frequency argument to >cpu_frequency_change(). > >--- xen/arch/x86/platform_hypercall.c.fixhypercallorig 2008-02-06 16:48:46.000000000 -0500 >+++ xen/arch/x86/platform_hypercall.c 2008-02-06 16:49:17.000000000 -0500 >@@ -40,9 +40,11 @@ DEFINE_SPINLOCK(xenpf_lock); > extern spinlock_t xenpf_lock; > #endif > >+static DEFINE_PER_CPU(uint64_t, freq); >+ > static long cpu_frequency_change_helper(void *data) > { >- return cpu_frequency_change(*(uint64_t *)data); >+ return cpu_frequency_change(this_cpu(freq)); > } > > ret_t do_platform_op(XEN_GUEST_HANDLE(xen_platform_op_t) u_xenpf_op) >@@ -270,11 +272,12 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe > if ( cpufreq_controller != FREQCTL_dom0_kernel ) > break; > ret = -EINVAL; >- if ( op->u.change_freq.flags != 0 ) >+ if ( op->u.change_freq.flags || !cpu_online(op->u.change_freq.cpu) ) > break; >+ per_cpu(freq, op->u.change_freq.cpu) = op->u.change_freq.freq; > ret = continue_hypercall_on_cpu(op->u.change_freq.cpu, > cpu_frequency_change_helper, >- &op->u.change_freq.freq); >+ NULL); > break; > > case XENPF_getidletime: >--- xen/arch/x86/time.c.fixhypercallorig 2008-02-06 16:49:02.000000000 -0500 >+++ xen/arch/x86/time.c 2008-02-06 16:49:17.000000000 -0500 >@@ -730,6 +730,14 @@ int cpu_frequency_change(u64 freq) > struct cpu_time *t = &this_cpu(cpu_time); > u64 curr_tsc; > >+ /* Sanity check: CPU frequency allegedly dropping below 1MHz? */ >+ if ( freq < 1000000u ) >+ { >+ gdprintk(XENLOG_WARNING, "Rejecting CPU frequency change " >+ "to %"PRIu64" Hz.\n", freq); >+ return -EINVAL; >+ } >+ > local_irq_disable(); > rdtscll(curr_tsc); > t->local_tsc_stamp = curr_tsc;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 430938
:
295028
|
295029
| 295030 |
295031