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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1320676467.18053.43.camel@twins>
Date:	Mon, 07 Nov 2011 15:34:27 +0100
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Gleb Natapov <gleb@...hat.com>
Cc:	kvm@...r.kernel.org, avi@...hat.com, mtosatti@...hat.com,
	linux-kernel@...r.kernel.org, mingo@...e.hu,
	acme@...stprotocols.net
Subject: Re: [PATCHv2 2/9] KVM: Expose a version 2 architectural PMU to a
 guests

On Thu, 2011-11-03 at 14:33 +0200, Gleb Natapov wrote:
> +static void kvm_perf_overflow_intr(struct perf_event *perf_event,
> +               struct perf_sample_data *data, struct pt_regs *regs)
> +{
> +       struct kvm_pmc *pmc = perf_event->overflow_handler_context;
> +       struct kvm_pmu *pmu = &pmc->vcpu->arch.pmu;
> +       if (!test_and_set_bit(pmc->idx, (unsigned long *)&pmu->reprogram_pmi)) {
> +               kvm_perf_overflow(perf_event, data, regs);
> +               kvm_make_request(KVM_REQ_PMU, pmc->vcpu);
> +               /*
> +                * Inject PMI. If vcpu was in a guest mode during NMI PMI
> +                * can be ejected on a guest mode re-entry. Otherwise we can't
> +                * be sure that vcpu is not halted, so we should kick it, but
> +                * this is impossible from NMI context. Do it from irq work
> +                * instead.
> +                */
> +               if (!kvm_is_in_guest())
> +                       irq_work_queue(&pmc->vcpu->arch.pmu.irq_work);
> +               else
> +                       kvm_make_request(KVM_REQ_PMI, pmc->vcpu);
> +       }
> +} 

I'm not sure I get this, since the counters are vcpu task bound and only
count while the guest is running as per (144d31e6f19) how can we get an
NMI outside of guest context with the vcpu not halted?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ