* [PATCH] x86/HVM: Fixed the bug which cause the nested hvm guest fail to boot
@ 2014-08-19 2:32 Liliang
0 siblings, 0 replies; 7+ messages in thread
From: Liliang @ 2014-08-19 2:32 UTC (permalink / raw)
To: xen-devel; +Cc: Li Liang, keir, jbeulich
From: Li Liang <liangx.z.li@intel.com>
The commit aa9114edd added the needless function call memory_type_changed,
it is unnessary because the PAT content does not influence the result of
epte_get_entry_emt(). If it is called, the cache will be flushed excessively
and make the nested guest very slowly, just like blocked.
Signed-off-by: Li Liang <liangx.z.li@intel.com>
---
xen/arch/x86/hvm/hvm.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index d40c48e..e8f41c1 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -257,8 +257,6 @@ int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat)
if ( !hvm_funcs.set_guest_pat(v, guest_pat) )
v->arch.hvm_vcpu.pat_cr = guest_pat;
- memory_type_changed(v->domain);
-
return 1;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH] x86/HVM: Fixed the bug which cause the nested hvm guest fail to boot
@ 2014-08-18 11:11 Liliang
2014-08-18 11:26 ` Andrew Cooper
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Liliang @ 2014-08-18 11:11 UTC (permalink / raw)
To: xen-devel; +Cc: Li Liang, keir, jbeulich
From: Li Liang <liangx.z.li@intel.com>
The function memory_type_changed should not be called in hvm_set_guest_pat.
or the cache will be flushed excessively and make the nested guest very slowly,
just like blocked.
Signed-off-by: Li Liang <liangx.z.li@intel.com>
---
xen/arch/x86/hvm/hvm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index d40c48e..1a0534b 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -257,7 +257,6 @@ int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat)
if ( !hvm_funcs.set_guest_pat(v, guest_pat) )
v->arch.hvm_vcpu.pat_cr = guest_pat;
- memory_type_changed(v->domain);
return 1;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] x86/HVM: Fixed the bug which cause the nested hvm guest fail to boot
2014-08-18 11:11 Liliang
@ 2014-08-18 11:26 ` Andrew Cooper
2014-08-18 13:08 ` Jan Beulich
2014-08-25 8:08 ` Olaf Hering
2 siblings, 0 replies; 7+ messages in thread
From: Andrew Cooper @ 2014-08-18 11:26 UTC (permalink / raw)
To: Liliang, xen-devel; +Cc: keir, jbeulich
On 18/08/14 12:11, Liliang wrote:
> From: Li Liang <liangx.z.li@intel.com>
>
> The function memory_type_changed should not be called in hvm_set_guest_pat.
> or the cache will be flushed excessively and make the nested guest very slowly,
> just like blocked.
>
> Signed-off-by: Li Liang <liangx.z.li@intel.com>
Whyso? Without it, the caching types are likely wrong, especially after
setting pat.
~Andrew
> ---
> xen/arch/x86/hvm/hvm.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
> index d40c48e..1a0534b 100644
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -257,7 +257,6 @@ int hvm_set_guest_pat(struct vcpu *v, u64 guest_pat)
> if ( !hvm_funcs.set_guest_pat(v, guest_pat) )
> v->arch.hvm_vcpu.pat_cr = guest_pat;
>
> - memory_type_changed(v->domain);
>
> return 1;
> }
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/HVM: Fixed the bug which cause the nested hvm guest fail to boot
2014-08-18 11:11 Liliang
2014-08-18 11:26 ` Andrew Cooper
@ 2014-08-18 13:08 ` Jan Beulich
2014-08-18 13:31 ` Jan Beulich
2014-08-25 8:08 ` Olaf Hering
2 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2014-08-18 13:08 UTC (permalink / raw)
To: liangx.z.li; +Cc: keir, xen-devel
>>> Liliang <liangx.z.li@intel.com> 08/18/14 1:15 PM >>>
>From: Li Liang <liangx.z.li@intel.com>
>
>The function memory_type_changed should not be called in hvm_set_guest_pat.
>or the cache will be flushed excessively and make the nested guest very slowly,
>just like blocked.
As Andrew already said - blindly removing the call is wrong, it is there for a
reason. What you first of all need to explain is why there are so many PAT
modifications, as it's perhaps _that_ which needs adjustment (possibly e.g.
including some filtering to hide writes that don't change the actual value, if
that happens frequently).
Jan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/HVM: Fixed the bug which cause the nested hvm guest fail to boot
2014-08-18 13:08 ` Jan Beulich
@ 2014-08-18 13:31 ` Jan Beulich
0 siblings, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2014-08-18 13:31 UTC (permalink / raw)
To: liangx.z.li; +Cc: andrew.cooper3, keir, xen-devel
>>>> "Jan Beulich" <jbeulich@suse.com> 08/18/14 3:10 PM >>>
>>>> Liliang <liangx.z.li@intel.com> 08/18/14 1:15 PM >>>
>>From: Li Liang <liangx.z.li@intel.com>
>>
>>The function memory_type_changed should not be called in hvm_set_guest_pat.
>>or the cache will be flushed excessively and make the nested guest very slowly,
>>just like blocked.
>
>As Andrew already said - blindly removing the call is wrong, it is there for a
>reason. What you first of all need to explain is why there are so many PAT
>modifications, as it's perhaps _that_ which needs adjustment (possibly e.g.
>including some filtering to hide writes that don't change the actual value, if
>that happens frequently).
Actually I have to correct myself - I think the call here is indeed not needed,
as the PAT contents is being used by the CPU itself when determining the
memory type (and does not influence the result of epte_get_entry_emt()). But
the patch description needs to better describe the situation, preferably also
referencing the commit that needlessly added the call.
Jan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/HVM: Fixed the bug which cause the nested hvm guest fail to boot
2014-08-18 11:11 Liliang
2014-08-18 11:26 ` Andrew Cooper
2014-08-18 13:08 ` Jan Beulich
@ 2014-08-25 8:08 ` Olaf Hering
2014-08-25 8:11 ` Jan Beulich
2 siblings, 1 reply; 7+ messages in thread
From: Olaf Hering @ 2014-08-25 8:08 UTC (permalink / raw)
To: Liliang; +Cc: keir, jbeulich, xen-devel
On Mon, Aug 18, Liliang wrote:
> From: Li Liang <liangx.z.li@intel.com>
>
> The function memory_type_changed should not be called in hvm_set_guest_pat.
> or the cache will be flushed excessively and make the nested guest very slowly,
> just like blocked.
The patch subject is wrongly worded, it will cause bogus 'git log --oneline' output.
I'm sure there are several bugs which cause nested guests to fail.
Olaf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86/HVM: Fixed the bug which cause the nested hvm guest fail to boot
2014-08-25 8:08 ` Olaf Hering
@ 2014-08-25 8:11 ` Jan Beulich
0 siblings, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2014-08-25 8:11 UTC (permalink / raw)
To: Olaf Hering, Liliang; +Cc: keir, xen-devel
>>> On 25.08.14 at 10:08, <olaf@aepfle.de> wrote:
> On Mon, Aug 18, Liliang wrote:
>
>> From: Li Liang <liangx.z.li@intel.com>
>>
>> The function memory_type_changed should not be called in hvm_set_guest_pat.
>> or the cache will be flushed excessively and make the nested guest very
> slowly,
>> just like blocked.
>
> The patch subject is wrongly worded, it will cause bogus 'git log --oneline'
> output.
> I'm sure there are several bugs which cause nested guests to fail.
And as you may have seen I changed the title (for this very
reason) before applying.
Jan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-08-25 8:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-19 2:32 [PATCH] x86/HVM: Fixed the bug which cause the nested hvm guest fail to boot Liliang
-- strict thread matches above, loose matches on Subject: below --
2014-08-18 11:11 Liliang
2014-08-18 11:26 ` Andrew Cooper
2014-08-18 13:08 ` Jan Beulich
2014-08-18 13:31 ` Jan Beulich
2014-08-25 8:08 ` Olaf Hering
2014-08-25 8:11 ` Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).