All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Huang <kai.huang@linux.intel.com>
To: "Tian, Kevin" <kevin.tian@intel.com>,
	"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
	"tim@xen.org" <tim@xen.org>,
	"jbeulich@suse.com" <jbeulich@suse.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [v2 05/11] vmx: add new data structure member to support PML
Date: Tue, 21 Apr 2015 14:04:54 +0800	[thread overview]
Message-ID: <5535E886.7070801@linux.intel.com> (raw)
In-Reply-To: <5530707E.4060102@linux.intel.com>



On 04/17/2015 10:31 AM, Kai Huang wrote:
>
>
> On 04/17/2015 06:39 AM, Tian, Kevin wrote:
>>> From: Kai Huang [mailto:kai.huang@linux.intel.com]
>>> Sent: Wednesday, April 15, 2015 3:04 PM
>>>
>>> A new 4K page pointer is added to arch_vmx_struct as PML buffer for 
>>> vcpu.
>>> And a
>>> new 'status' field is added to vmx_domain to indicate whether PML is 
>>> enabled
>>> for
>>> the domain or not. The 'status' field also can be used for further 
>>> similiar
>>> purpose.
>> not sure about the last sentence. what's the similar purpose to 
>> "whether PML
>> is enabled"? :-)
> I mean potentially there might be such feature in the future, and I 
> can't give you an example right now. If you are just commenting the 
> description here but fine with the current code, I can remove that 
> last sentence if you like. Or do you suggest to just use a "bool_t 
> pml_enabled"? I am fine with both, but looks there's no objection from 
> others so I intend to keep it as 'unsigned int status', if you agree.
Hi Kevin,

What's your opinion here? Is 'unsigned int status' OK to you?

>
>>
>>> Note both new members don't have to be initialized to zero 
>>> explicitly as both
>>> vcpu and domain structure are zero-ed when they are created.
>> no initialization in this patch, so why explaining it here?
> OK. Looks it's a common sense to all of you so I'll just remove this 
> sentence.
>
>>
>>> Signed-off-by: Kai Huang <kai.huang@linux.intel.com>
>>> ---
>>>   xen/include/asm-x86/hvm/vmx/vmcs.h | 7 +++++++
>>>   1 file changed, 7 insertions(+)
>>>
>>> diff --git a/xen/include/asm-x86/hvm/vmx/vmcs.h
>>> b/xen/include/asm-x86/hvm/vmx/vmcs.h
>>> index f831a78..2c679ac 100644
>>> --- a/xen/include/asm-x86/hvm/vmx/vmcs.h
>>> +++ b/xen/include/asm-x86/hvm/vmx/vmcs.h
>>> @@ -70,8 +70,12 @@ struct ept_data {
>>>       cpumask_var_t synced_mask;
>>>   };
>>>
>>> +#define _VMX_DOMAIN_PML_ENABLED    0
>>> +#define VMX_DOMAIN_PML_ENABLED     (1ul <<
>>> _VMX_DOMAIN_PML_ENABLED)
>>>   struct vmx_domain {
>>>       unsigned long apic_access_mfn;
>>> +    /* VMX_DOMAIN_* */
>>> +    unsigned long status;
>>>   };
>>>
>>>   struct pi_desc {
>>> @@ -142,6 +146,9 @@ struct arch_vmx_struct {
>>>       /* Bitmap to control vmexit policy for Non-root VMREAD/VMWRITE */
>>>       struct page_info     *vmread_bitmap;
>>>       struct page_info     *vmwrite_bitmap;
>>> +
>>> +#define NR_PML_ENTRIES   512
>>> +    struct page_info     *pml_pg;
>> move the macro out of the structure.
> OK. I will move it just above the declaration of struct arch_vmx_struct.
>
>> and is pml_buffer or pml_buf more clear?
>
> To me pml_buffer or pml_buf is more likely a virtual address you can 
> access the buffer directly, while pml_pg indicates it's a pointer of 
> struct page_info. If you you look at patch 6, you can find statements 
> like:
>
>     uint64_t *pml_buf;
>
>     pml_buf = __map_domain_page(v->arch.hvm_vmx.pml_pg);
>
> So I intend to keep it.
And this one? Are you OK with 'pml_pg'?

Thanks,
-Kai
>
> Thanks,
> -Kai
>>
>>>   };
>>>
>>>   int vmx_create_vmcs(struct vcpu *v);
>>> -- 
>>> 2.1.0
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> http://lists.xen.org/xen-devel
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

  reply	other threads:[~2015-04-21  6:04 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-15  7:03 [v2 00/11] PML (Paging Modification Logging) support Kai Huang
2015-04-15  7:03 ` [v2 01/11] vmx: add new boot parameter to control PML enabling Kai Huang
2015-04-15 10:12   ` Andrew Cooper
2015-04-15 12:20   ` Jan Beulich
2015-04-15 13:20     ` Kai Huang
2015-04-15 13:47       ` Jan Beulich
2015-04-15  7:03 ` [v2 02/11] doc: add description for new PML boot parameter Kai Huang
2015-04-15 10:15   ` Andrew Cooper
2015-04-15 12:17     ` Jan Beulich
2015-04-16  4:47     ` Kai Huang
2015-04-16 14:49       ` Andrew Cooper
2015-04-15  7:03 ` [v2 03/11] log-dirty: add new paging_mark_gfn_dirty Kai Huang
2015-04-15  7:03 ` [v2 04/11] vmx: add PML definition and feature detection Kai Huang
2015-04-16 22:35   ` Tian, Kevin
2015-04-17  2:14     ` Kai Huang
2015-04-15  7:03 ` [v2 05/11] vmx: add new data structure member to support PML Kai Huang
2015-04-16 15:33   ` Jan Beulich
2015-04-17  2:12     ` Kai Huang
2015-04-16 22:39   ` Tian, Kevin
2015-04-17  2:31     ` Kai Huang
2015-04-21  6:04       ` Kai Huang [this message]
2015-04-21 13:10         ` Tian, Kevin
2015-04-15  7:03 ` [v2 06/11] vmx: add help functions " Kai Huang
2015-04-16 15:42   ` Jan Beulich
2015-04-17  3:10     ` Kai Huang
2015-04-17  6:23       ` Jan Beulich
2015-04-17  6:51         ` Kai Huang
2015-04-17  6:58           ` Jan Beulich
2015-04-17  7:23             ` Kai Huang
2015-04-17  7:37               ` Jan Beulich
2015-04-17  7:45                 ` Kai Huang
2015-04-24  6:32                 ` Kai Huang
2015-04-24  7:30                   ` Jan Beulich
2015-04-24  7:41                     ` Kai Huang
2015-04-16 22:57   ` Tian, Kevin
2015-04-17  0:10     ` Tim Deegan
2015-04-17  3:32       ` Kai Huang
2015-04-17  8:36         ` Tim Deegan
2015-04-17  9:29           ` Kai Huang
2015-04-20  8:29             ` Tim Deegan
2015-04-20 10:08               ` Kai Huang
2015-04-20 10:13                 ` Tim Deegan
2015-04-17  3:15     ` Kai Huang
2015-04-16 22:59   ` Tian, Kevin
2015-04-15  7:03 ` [v2 07/11] vmx: handle PML buffer full VMEXIT Kai Huang
2015-04-15  7:03 ` [v2 08/11] vmx: handle PML enabling in vmx_vcpu_initialise Kai Huang
2015-04-15  7:03 ` [v2 09/11] vmx: disable PML in vmx_vcpu_destroy Kai Huang
2015-04-15  7:03 ` [v2 10/11] log-dirty: refine common code to support PML Kai Huang
2015-04-16 15:51   ` Jan Beulich
2015-04-16 23:07     ` Tian, Kevin
2015-04-17  2:47       ` Kai Huang
2015-04-17  2:46     ` Kai Huang
2015-04-17  6:28       ` Jan Beulich
2015-04-17  6:55         ` Kai Huang
2015-04-15  7:03 ` [v2 11/11] p2m/ept: enable PML in p2m-ept for log-dirty Kai Huang
2015-04-16 15:54   ` Jan Beulich
2015-04-17  2:40     ` Kai Huang
2015-04-17  6:28       ` Jan Beulich
2015-04-17  7:10         ` Kai Huang
2015-04-17  7:33           ` Jan Beulich
2015-04-16 14:41 ` [v2 00/11] PML (Paging Modification Logging) support Tim Deegan
2015-04-16 15:18   ` Kai Huang

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=5535E886.7070801@linux.intel.com \
    --to=kai.huang@linux.intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=kevin.tian@intel.com \
    --cc=tim@xen.org \
    --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.