* [PATCH] xen: vcpu_info reinit error after hold/release if VM has multi-cpu
@ 2015-03-30 13:33 Ouyang Zhaowei (Charles)
2015-03-30 13:39 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 2+ messages in thread
From: Ouyang Zhaowei (Charles) @ 2015-03-30 13:33 UTC (permalink / raw)
To: Konrad Rzeszutek Wilk, Boris Ostrovsky, David Vrabel
Cc: linux-kernel, Dingweiping, Yanqiangjun, Huanglinglong,
Ouyangzhaowei (Charles)
If the VM has multi-cpu the vcpu_info of cpu0 is the member of the structure HYPERVISOR_shared_info,
and the others is not, but after hold/release the VM, the vcpu_info will be reinitialized,
the vcpu_info of all the vcpus will be considered as the member of HYPERVISOR_shared_info.
This will cause the cpu1 and other cpu keep receiving interrupts, and the cpu0 is waiting them to
finish the job.
So we do not reinit the vcpu_info if it's doing hold/release.
Signed-off-by: Charles Ouyang <ouyangzhaowei@huawei.com>
---
arch/x86/xen/suspend.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c
index c4df9db..832480c 100644
--- a/arch/x86/xen/suspend.c
+++ b/arch/x86/xen/suspend.c
@@ -32,7 +32,8 @@ static void xen_hvm_post_suspend(int suspend_cancelled)
{
#ifdef CONFIG_XEN_PVHVM
int cpu;
- xen_hvm_init_shared_info();
+ if (!suspend_cancelled)
+ xen_hvm_init_shared_info();
xen_callback_vector();
xen_unplug_emulated_devices();
if (xen_feature(XENFEAT_hvm_safe_pvclock)) {
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xen: vcpu_info reinit error after hold/release if VM has multi-cpu
2015-03-30 13:33 [PATCH] xen: vcpu_info reinit error after hold/release if VM has multi-cpu Ouyang Zhaowei (Charles)
@ 2015-03-30 13:39 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 2+ messages in thread
From: Konrad Rzeszutek Wilk @ 2015-03-30 13:39 UTC (permalink / raw)
To: Ouyang Zhaowei (Charles)
Cc: Boris Ostrovsky, David Vrabel, linux-kernel, Dingweiping,
Yanqiangjun, Huanglinglong
On Mon, Mar 30, 2015 at 09:33:16PM +0800, Ouyang Zhaowei (Charles) wrote:
> If the VM has multi-cpu the vcpu_info of cpu0 is the member of the structure HYPERVISOR_shared_info,
> and the others is not, but after hold/release the VM, the vcpu_info will be reinitialized,
What is 'hold/release' ? Pause and suspend? or do you mean suspend
was cancelled?
> the vcpu_info of all the vcpus will be considered as the member of HYPERVISOR_shared_info.
> This will cause the cpu1 and other cpu keep receiving interrupts, and the cpu0 is waiting them to
> finish the job.
> So we do not reinit the vcpu_info if it's doing hold/release.
s/"hold/release"/suspend cancelled/ ?
>
> Signed-off-by: Charles Ouyang <ouyangzhaowei@huawei.com>
> ---
> arch/x86/xen/suspend.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c
> index c4df9db..832480c 100644
> --- a/arch/x86/xen/suspend.c
> +++ b/arch/x86/xen/suspend.c
> @@ -32,7 +32,8 @@ static void xen_hvm_post_suspend(int suspend_cancelled)
> {
> #ifdef CONFIG_XEN_PVHVM
> int cpu;
> - xen_hvm_init_shared_info();
> + if (!suspend_cancelled)
> + xen_hvm_init_shared_info();
> xen_callback_vector();
> xen_unplug_emulated_devices();
> if (xen_feature(XENFEAT_hvm_safe_pvclock)) {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-30 13:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-30 13:33 [PATCH] xen: vcpu_info reinit error after hold/release if VM has multi-cpu Ouyang Zhaowei (Charles)
2015-03-30 13:39 ` Konrad Rzeszutek Wilk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox