Re: [RFC] vPMU support for AMD system

2014-10-06 Thread Wei Huang
This On 10/4/14 2:00 AM, Gleb Natapov wrote: Hi, On Tue, Sep 30, 2014 at 09:07:22PM -0500, Wei Huang wrote: Hi Paolo and Gleb, The attached file is a preliminary version of AMD vPMU support for KVM. Currently I am working on a formal patch set; but realized that there are some design choice

Re: [RFC] vPMU support for AMD system

2014-10-04 Thread Gleb Natapov
Hi, On Tue, Sep 30, 2014 at 09:07:22PM -0500, Wei Huang wrote: Hi Paolo and Gleb, The attached file is a preliminary version of AMD vPMU support for KVM. Currently I am working on a formal patch set; but realized that there are some design choice to make (see below). I thought it is better

Re: [RFC] vPMU support for AMD system

2014-10-02 Thread Radim Krčmář
2014-09-30 21:07-0500, Wei Huang: Hi Paolo and Gleb, 2. CURRENT DESIGN The design is similar to existing vPMU support. Many data structures such as struct kvm_pmc and struct kvm_pmu are re-used for this design. Original pmu.c code was designed with Intel PMU in mind. To avoid the

Re: [RFC] vPMU support for AMD system

2014-10-02 Thread Wei Huang
(if-else forest is daunting.) I think this approach is quite acceptable, except that there will be many if-else in the code. Not clean enough. (b) Convert intel-pmu.c = vmx.c and convert amd-pmu.c = svm.c * PMU function pointers will be created in kvm_x86_ops; * The entry functions will be

[RFC] vPMU support for AMD system

2014-09-30 Thread Wei Huang
Hi Paolo and Gleb, The attached file is a preliminary version of AMD vPMU support for KVM. Currently I am working on a formal patch set; but realized that there are some design choice to make (see below). I thought it is better to send it out now, asking for your comments before sending out