Re: [PATCH v2 12/13] KVM: x86: add SMM to the MMU role, support SMRAM address space

2015-06-18 Thread Paolo Bonzini
On 18/06/2015 07:02, Xiao Guangrong wrote: > However, role->level is more hotter than role->smm so that it's also a good > candidate for this kind of trick. Right, we could give the first 8 bits to role->level, so it can be accessed with a single memory load and extracted with a single AND. Thos

Re: [PATCH v2 12/13] KVM: x86: add SMM to the MMU role, support SMRAM address space

2015-06-17 Thread Xiao Guangrong
On 06/17/2015 04:18 PM, Paolo Bonzini wrote: On 09/06/2015 06:01, Xiao Guangrong wrote: On 05/28/2015 01:05 AM, Paolo Bonzini wrote: This is now very simple to do. The only interesting part is a simple trick to find the right memslot in gfn_to_rmap, retrieving the address space from the

Re: [PATCH v2 12/13] KVM: x86: add SMM to the MMU role, support SMRAM address space

2015-06-17 Thread Paolo Bonzini
On 09/06/2015 06:01, Xiao Guangrong wrote: > > > On 05/28/2015 01:05 AM, Paolo Bonzini wrote: >> This is now very simple to do. The only interesting part is a simple >> trick to find the right memslot in gfn_to_rmap, retrieving the address >> space from the spte role word. The same trick is u

Re: [PATCH v2 12/13] KVM: x86: add SMM to the MMU role, support SMRAM address space

2015-06-08 Thread Xiao Guangrong
On 05/28/2015 01:05 AM, Paolo Bonzini wrote: This is now very simple to do. The only interesting part is a simple trick to find the right memslot in gfn_to_rmap, retrieving the address space from the spte role word. The same trick is used in the auditing code. The comment on top of union kvm

[PATCH v2 12/13] KVM: x86: add SMM to the MMU role, support SMRAM address space

2015-05-27 Thread Paolo Bonzini
This is now very simple to do. The only interesting part is a simple trick to find the right memslot in gfn_to_rmap, retrieving the address space from the spte role word. The same trick is used in the auditing code. The comment on top of union kvm_mmu_page_role has been stale forever, so remove