|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86: cpu{id,}_policy_updated() can be static
commit 741599fa521fbbb4cf71a98d7ec22ba5f4671cfa
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed Apr 19 11:01:29 2023 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Apr 19 11:01:29 2023 +0200
x86: cpu{id,}_policy_updated() can be static
The function merely needs moving earlier in the file to avoid the need
for a forward declaration. While moving it, also rename it following the
recent folding of CPUID and MSR policies.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/arch/x86/domain.c | 24 ++++++++++++------------
xen/arch/x86/include/asm/domain.h | 2 --
2 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index 596233418a..39c2153165 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -281,6 +281,16 @@ void update_guest_memory_policy(struct vcpu *v,
}
}
+/*
+ * Called during vcpu construction, and each time the toolstack changes the
+ * CPU policy configuration for the domain.
+ */
+static void cpu_policy_updated(struct vcpu *v)
+{
+ if ( is_hvm_vcpu(v) )
+ hvm_cpuid_policy_changed(v);
+}
+
void domain_cpu_policy_changed(struct domain *d)
{
const struct cpu_policy *p = d->arch.cpu_policy;
@@ -439,7 +449,7 @@ void domain_cpu_policy_changed(struct domain *d)
for_each_vcpu ( d, v )
{
- cpuid_policy_updated(v);
+ cpu_policy_updated(v);
/* If PMU version is zero then the guest doesn't have VPMU */
if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL &&
@@ -584,7 +594,7 @@ int arch_vcpu_create(struct vcpu *v)
{
vpmu_initialise(v);
- cpuid_policy_updated(v);
+ cpu_policy_updated(v);
}
return rc;
@@ -2413,16 +2423,6 @@ int domain_relinquish_resources(struct domain *d)
return 0;
}
-/*
- * Called during vcpu construction, and each time the toolstack changes the
- * CPUID configuration for the domain.
- */
-void cpuid_policy_updated(struct vcpu *v)
-{
- if ( is_hvm_vcpu(v) )
- hvm_cpuid_policy_changed(v);
-}
-
void arch_dump_domain_info(struct domain *d)
{
paging_dump_domain_info(d);
diff --git a/xen/arch/x86/include/asm/domain.h
b/xen/arch/x86/include/asm/domain.h
index 899ca7f70f..ad5729d5c2 100644
--- a/xen/arch/x86/include/asm/domain.h
+++ b/xen/arch/x86/include/asm/domain.h
@@ -83,8 +83,6 @@ void toggle_guest_mode(struct vcpu *);
/* x86/64: toggle guest page tables between kernel and user modes. */
void toggle_guest_pt(struct vcpu *);
-void cpuid_policy_updated(struct vcpu *v);
-
/*
* Initialise a hypercall-transfer page. The given pointer must be mapped
* in Xen virtual address space (accesses are not validated or checked).
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |