From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: keir@xen.org, suravee.suthikulpanit@amd.com,
andrew.cooper3@citrix.com, eddie.dong@intel.com,
dietmar.hahn@ts.fujitsu.com, xen-devel@lists.xen.org,
jun.nakajima@intel.com
Subject: Re: [PATCH v3 15/16] x86/VPMU: NMI-based VPMU support
Date: Thu, 16 Jan 2014 10:13:32 -0500 [thread overview]
Message-ID: <52D7F71C.4010303@oracle.com> (raw)
In-Reply-To: <52D7B60002000078001142A2@nat28.tlf.novell.com>
On 01/16/2014 04:35 AM, Jan Beulich wrote:
>
>> +/* Process the softirq set by PMU NMI handler */
>> +static void pmu_softnmi(void)
>> +{
>> + struct cpu_user_regs *regs;
>> + struct vcpu *v, *sampled = per_cpu(sampled_vcpu, smp_processor_id());
>> +
>> + if ( vpmu_mode & XENPMU_MODE_PRIV ||
>> + sampled->domain->domain_id >= DOMID_FIRST_RESERVED )
>> + v = dom0->vcpu[smp_processor_id()];
>> + else
>> + v = sampled;
>> +
>> + regs = &v->arch.vpmu.xenpmu_data->pmu.regs;
>> + if ( is_hvm_domain(sampled->domain) )
>> + {
>> + struct segment_register cs;
>> +
>> + hvm_get_segment_register(sampled, x86_seg_cs, &cs);
>> + regs->cs = cs.attr.fields.dpl;
>> + }
>> +
>> + send_guest_vcpu_virq(v, VIRQ_XENPMU);
>> +}
> Perhaps I should have asked this on an earlier patch already:
> How is this supposed to work for a 32-bit HVM guest?
> struct cpu_user_regs is clearly different for it than what the
> hypervisor or a 64-bit HVM guest would use.
Right, I need to XLAT_cpu_user_regs() for 32-bit HVM guest in
vpmu_interrupt() (I already do it for a PV guest).
Thanks.
-boris
next prev parent reply other threads:[~2014-01-16 15:13 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 19:24 [PATCH v3 00/16] x86/PMU: Xen PMU PV support Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 01/16] common/symbols: Export hypervisor symbols to PV guest Boris Ostrovsky
2014-01-10 17:01 ` Jan Beulich
2014-01-13 15:00 ` Boris Ostrovsky
2014-01-13 15:07 ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 02/16] x86/VPMU: Stop AMD counters when called from vpmu_save_force() Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 03/16] x86/VPMU: Minor VPMU cleanup Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 04/16] intel/VPMU: Clean up Intel VPMU code Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 05/16] x86/VPMU: Handle APIC_LVTPC accesses Boris Ostrovsky
2014-01-13 13:28 ` Jan Beulich
2014-01-13 15:04 ` Boris Ostrovsky
2014-01-13 15:08 ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 06/16] intel/VPMU: MSR_CORE_PERF_GLOBAL_CTRL should be initialized to zero Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 07/16] x86/VPMU: Add public xenpmu.h Boris Ostrovsky
2014-01-13 13:39 ` Jan Beulich
2014-01-13 15:23 ` Boris Ostrovsky
2014-01-13 15:38 ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 08/16] x86/VPMU: Make vpmu not HVM-specific Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 09/16] x86/VPMU: Interface for setting PMU mode and flags Boris Ostrovsky
2014-01-13 14:02 ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 10/16] x86/VPMU: Initialize PMU for PV guests Boris Ostrovsky
2014-01-13 14:04 ` Jan Beulich
2014-01-13 15:25 ` Boris Ostrovsky
2014-01-13 14:05 ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 11/16] x86/VPMU: Add support for PMU register handling on " Boris Ostrovsky
2014-01-13 14:12 ` Jan Beulich
2014-01-13 15:44 ` Boris Ostrovsky
2014-01-13 15:58 ` Jan Beulich
2014-01-13 16:20 ` Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 12/16] x86/VPMU: Handle PMU interrupts for " Boris Ostrovsky
2014-01-16 9:15 ` Jan Beulich
2014-01-16 14:58 ` Boris Ostrovsky
2014-01-16 15:48 ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 13/16] x86/VPMU: Add privileged PMU mode Boris Ostrovsky
2014-01-06 19:24 ` [PATCH v3 14/16] x86/VPMU: Save VPMU state for PV guests during context switch Boris Ostrovsky
2014-01-16 9:27 ` Jan Beulich
2014-01-06 19:24 ` [PATCH v3 15/16] x86/VPMU: NMI-based VPMU support Boris Ostrovsky
2014-01-16 9:35 ` Jan Beulich
2014-01-16 15:13 ` Boris Ostrovsky [this message]
2014-01-06 19:24 ` [PATCH v3 16/16] x86/VPMU: Move VPMU files up from hvm/ directory Boris Ostrovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D7F71C.4010303@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=dietmar.hahn@ts.fujitsu.com \
--cc=eddie.dong@intel.com \
--cc=jun.nakajima@intel.com \
--cc=keir@xen.org \
--cc=suravee.suthikulpanit@amd.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.