lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220513135333.7424c1c8@canb.auug.org.au>
Date:   Fri, 13 May 2022 13:53:33 +1000
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Paolo Bonzini <pbonzini@...hat.com>, KVM <kvm@...r.kernel.org>
Cc:     Like Xu <like.xu@...ux.intel.com>, Like Xu <likexu@...cent.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: linux-next: manual merge of the kvm tree with Linus' tree

Hi all,

Today's linux-next merge of the kvm tree got a conflict in:

  arch/x86/kvm/pmu.h

between commit:

  75189d1de1b3 ("KVM: x86/pmu: Update AMD PMC sample period to fix guest NMI-watchdog")

from Linus' tree and commits:

  a10cabf6815c ("KVM: x86/pmu: Move pmc_speculative_in_use() to arch/x86/kvm/pmu.h")
  8eeac7e999e8 ("KVM: x86/pmu: Add kvm_pmu_cap to optimize perf_get_x86_pmu_capability")

from the kvm tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/kvm/pmu.h
index 22992b049d38,dbf4c83519a4..000000000000
--- a/arch/x86/kvm/pmu.h
+++ b/arch/x86/kvm/pmu.h
@@@ -138,15 -143,35 +143,44 @@@ static inline u64 get_sample_period(str
  	return sample_period;
  }
  
 +static inline void pmc_update_sample_period(struct kvm_pmc *pmc)
 +{
 +	if (!pmc->perf_event || pmc->is_paused)
 +		return;
 +
 +	perf_event_period(pmc->perf_event,
 +			  get_sample_period(pmc, pmc->counter));
 +}
 +
+ static inline bool pmc_speculative_in_use(struct kvm_pmc *pmc)
+ {
+ 	struct kvm_pmu *pmu = pmc_to_pmu(pmc);
+ 
+ 	if (pmc_is_fixed(pmc))
+ 		return fixed_ctrl_field(pmu->fixed_ctr_ctrl,
+ 					pmc->idx - INTEL_PMC_IDX_FIXED) & 0x3;
+ 
+ 	return pmc->eventsel & ARCH_PERFMON_EVENTSEL_ENABLE;
+ }
+ 
+ extern struct x86_pmu_capability kvm_pmu_cap;
+ 
+ static inline void kvm_init_pmu_capability(void)
+ {
+ 	perf_get_x86_pmu_capability(&kvm_pmu_cap);
+ 
+ 	/*
+ 	 * Only support guest architectural pmu on
+ 	 * a host with architectural pmu.
+ 	 */
+ 	if (!kvm_pmu_cap.version)
+ 		memset(&kvm_pmu_cap, 0, sizeof(kvm_pmu_cap));
+ 
+ 	kvm_pmu_cap.version = min(kvm_pmu_cap.version, 2);
+ 	kvm_pmu_cap.num_counters_fixed = min(kvm_pmu_cap.num_counters_fixed,
+ 					     KVM_PMC_MAX_FIXED);
+ }
+ 
  void reprogram_gp_counter(struct kvm_pmc *pmc, u64 eventsel);
  void reprogram_fixed_counter(struct kvm_pmc *pmc, u8 ctrl, int fixed_idx);
  void reprogram_counter(struct kvm_pmu *pmu, int pmc_idx);

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ