[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/msr: Drop {pv, hvm}_max_vcpu_msrs objects
commit 310c32faab7024d121047d36bc5a32a6764df089 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Mon Feb 24 13:52:24 2020 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Mon Feb 24 15:50:56 2020 +0000 x86/msr: Drop {pv,hvm}_max_vcpu_msrs objects It turns out that these are unused, and we dup a type-dependent block of zeros. Use xzalloc() instead. Read/write MSRs typically default 0, and non-zero defaults would need dealing with at suitable INIT/RESET points (e.g. arch_vcpu_regs_init). Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/x86/msr.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/xen/arch/x86/msr.c b/xen/arch/x86/msr.c index dd26c87758..e39bb6dce4 100644 --- a/xen/arch/x86/msr.c +++ b/xen/arch/x86/msr.c @@ -35,9 +35,6 @@ struct msr_policy __read_mostly raw_msr_policy, __read_mostly hvm_max_msr_policy, __read_mostly pv_max_msr_policy; -struct vcpu_msrs __read_mostly hvm_max_vcpu_msrs, - __read_mostly pv_max_vcpu_msrs; - static void __init calculate_raw_policy(void) { /* 0x000000ce MSR_INTEL_PLATFORM_INFO */ @@ -103,10 +100,7 @@ int init_domain_msr_policy(struct domain *d) int init_vcpu_msr_policy(struct vcpu *v) { - struct domain *d = v->domain; - struct vcpu_msrs *msrs = - xmemdup(is_pv_domain(d) ? &pv_max_vcpu_msrs - : &hvm_max_vcpu_msrs); + struct vcpu_msrs *msrs = xzalloc(struct vcpu_msrs); if ( !msrs ) return -ENOMEM; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |