Re: [PATCH 3/4] KVM: MMU: reduce the size of mmu_page_path

2016-03-25 Thread Paolo Bonzini
On 25/03/2016 15:07, Xiao Guangrong wrote: >> >> @@ -2037,13 +2037,14 @@ static void mmu_pages_clear_parents(struct >> mmu_page_path *parents) >> { >> struct kvm_mmu_page *sp; >> unsigned int level = 0; >> +unsigned int idx; >> >> do { >> -unsigned int idx =

Re: [PATCH 3/4] KVM: MMU: reduce the size of mmu_page_path

2016-03-25 Thread Paolo Bonzini
On 25/03/2016 15:07, Xiao Guangrong wrote: >> >> @@ -2037,13 +2037,14 @@ static void mmu_pages_clear_parents(struct >> mmu_page_path *parents) >> { >> struct kvm_mmu_page *sp; >> unsigned int level = 0; >> +unsigned int idx; >> >> do { >> -unsigned int idx =

Re: [PATCH 3/4] KVM: MMU: reduce the size of mmu_page_path

2016-03-25 Thread Xiao Guangrong
On 03/25/2016 09:56 PM, Paolo Bonzini wrote: On 25/03/2016 14:48, Xiao Guangrong wrote: This patch and the previous one are basically redoing commit 0a47cd85833e ("KVM: MMU: Fix ubsan warnings", 2016-03-04). While you find your version easier to understand, I of course find mine easier.

Re: [PATCH 3/4] KVM: MMU: reduce the size of mmu_page_path

2016-03-25 Thread Xiao Guangrong
On 03/25/2016 09:56 PM, Paolo Bonzini wrote: On 25/03/2016 14:48, Xiao Guangrong wrote: This patch and the previous one are basically redoing commit 0a47cd85833e ("KVM: MMU: Fix ubsan warnings", 2016-03-04). While you find your version easier to understand, I of course find mine easier.

Re: [PATCH 3/4] KVM: MMU: reduce the size of mmu_page_path

2016-03-25 Thread Paolo Bonzini
On 25/03/2016 14:48, Xiao Guangrong wrote: >>> >> >> This patch and the previous one are basically redoing commit >> 0a47cd85833e ("KVM: MMU: Fix ubsan warnings", 2016-03-04). While you >> find your version easier to understand, I of course find mine easier. >> >> Rather than getting stuck in a

Re: [PATCH 3/4] KVM: MMU: reduce the size of mmu_page_path

2016-03-25 Thread Paolo Bonzini
On 25/03/2016 14:48, Xiao Guangrong wrote: >>> >> >> This patch and the previous one are basically redoing commit >> 0a47cd85833e ("KVM: MMU: Fix ubsan warnings", 2016-03-04). While you >> find your version easier to understand, I of course find mine easier. >> >> Rather than getting stuck in a

Re: [PATCH 3/4] KVM: MMU: reduce the size of mmu_page_path

2016-03-25 Thread Xiao Guangrong
On 03/25/2016 09:45 PM, Paolo Bonzini wrote: On 25/03/2016 14:19, Xiao Guangrong wrote: Currently only PT64_ROOT_LEVEL - 1 levels are used, one additional entry in .parent[] is used as a sentinel, the additional entry in .idx[] is purely wasted This patch reduces its size and sets the

Re: [PATCH 3/4] KVM: MMU: reduce the size of mmu_page_path

2016-03-25 Thread Xiao Guangrong
On 03/25/2016 09:45 PM, Paolo Bonzini wrote: On 25/03/2016 14:19, Xiao Guangrong wrote: Currently only PT64_ROOT_LEVEL - 1 levels are used, one additional entry in .parent[] is used as a sentinel, the additional entry in .idx[] is purely wasted This patch reduces its size and sets the

Re: [PATCH 3/4] KVM: MMU: reduce the size of mmu_page_path

2016-03-25 Thread Paolo Bonzini
On 25/03/2016 14:19, Xiao Guangrong wrote: > Currently only PT64_ROOT_LEVEL - 1 levels are used, one additional entry > in .parent[] is used as a sentinel, the additional entry in .idx[] is > purely wasted > > This patch reduces its size and sets the sentinel on the upper level of > the place

Re: [PATCH 3/4] KVM: MMU: reduce the size of mmu_page_path

2016-03-25 Thread Paolo Bonzini
On 25/03/2016 14:19, Xiao Guangrong wrote: > Currently only PT64_ROOT_LEVEL - 1 levels are used, one additional entry > in .parent[] is used as a sentinel, the additional entry in .idx[] is > purely wasted > > This patch reduces its size and sets the sentinel on the upper level of > the place

[PATCH 3/4] KVM: MMU: reduce the size of mmu_page_path

2016-03-25 Thread Xiao Guangrong
Currently only PT64_ROOT_LEVEL - 1 levels are used, one additional entry in .parent[] is used as a sentinel, the additional entry in .idx[] is purely wasted This patch reduces its size and sets the sentinel on the upper level of the place where we start from Signed-off-by: Xiao Guangrong

[PATCH 3/4] KVM: MMU: reduce the size of mmu_page_path

2016-03-25 Thread Xiao Guangrong
Currently only PT64_ROOT_LEVEL - 1 levels are used, one additional entry in .parent[] is used as a sentinel, the additional entry in .idx[] is purely wasted This patch reduces its size and sets the sentinel on the upper level of the place where we start from Signed-off-by: Xiao Guangrong ---