Wei, Gang
2009-Sep-03 09:40 UTC
[Xen-devel] [PATCH][PV_OPS_DOM0]Fix the host S3 resume hang
Fix the host S3 resume hang Current pv-ops dom0 is doing ioapic suspend/resume while doing host S3. The ioapic resume will cause a guest_write_ioapic error and hang the S3 resume process. It is actually not necessary for dom0 to do ioapic suspend/resume because hypervisor already cover this. Signed-off-by: Wei Gang <gang.wei@intel.com> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 18d957e..c2756d2 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -3119,6 +3119,9 @@ static int ioapic_suspend(struct sys_device *dev, pm_message_t state) struct sysfs_ioapic_data *data; int i; + if (xen_initial_domain()) + return 0; + data = container_of(dev, struct sysfs_ioapic_data, dev); entry = data->entry; for (i = 0; i < nr_ioapic_registers[dev->id]; i ++, entry ++ ) @@ -3135,6 +3138,9 @@ static int ioapic_resume(struct sys_device *dev) union IO_APIC_reg_00 reg_00; int i; + if (xen_initial_domain()) + return 0; + data = container_of(dev, struct sysfs_ioapic_data, dev); entry = data->entry; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2009-Sep-03 10:07 UTC
Re: [Xen-devel] [PATCH][PV_OPS_DOM0]Fix the host S3 resume hang
Instead of doing the check twice in the suspend and resume handlers, why don''t you just suppress registration of the sysdev(s) in ioapic_init_sysfs()? Jan>>> "Wei, Gang" <gang.wei@intel.com> 03.09.09 11:40 >>>Fix the host S3 resume hang Current pv-ops dom0 is doing ioapic suspend/resume while doing host S3. The ioapic resume will cause a guest_write_ioapic error and hang the S3 resume process. It is actually not necessary for dom0 to do ioapic suspend/resume because hypervisor already cover this. Signed-off-by: Wei Gang <gang.wei@intel.com> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 18d957e..c2756d2 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -3119,6 +3119,9 @@ static int ioapic_suspend(struct sys_device *dev, pm_message_t state) struct sysfs_ioapic_data *data; int i; + if (xen_initial_domain()) + return 0; + data = container_of(dev, struct sysfs_ioapic_data, dev); entry = data->entry; for (i = 0; i < nr_ioapic_registers[dev->id]; i ++, entry ++ ) @@ -3135,6 +3138,9 @@ static int ioapic_resume(struct sys_device *dev) union IO_APIC_reg_00 reg_00; int i; + if (xen_initial_domain()) + return 0; + data = container_of(dev, struct sysfs_ioapic_data, dev); entry = data->entry; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Wei, Gang
2009-Sep-03 10:31 UTC
RE: [Xen-devel] [PATCH][PV_OPS_DOM0]Fix the host S3 resume hang
Jan Beulich wrote:> Instead of doing the check twice in the suspend and resume > handlers, why > don''t you just suppress registration of the sysdev(s) in > ioapic_init_sysfs()?Good idea. Here is it. Fix the host S3 resume hang Current pv-ops dom0 is doing ioapic suspend/resume while doing host S3. The ioapic resume will cause a guest_write_ioapic error and hang the S3 resume process. It is actually not necessary for dom0 to do ioapic suspend/resume because hypervisor already cover this. Signed-off-by: Wei Gang <gang.wei@intel.com> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 18d957e..77151ce 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -3162,6 +3162,9 @@ static int __init ioapic_init_sysfs(void) struct sys_device * dev; int i, size, error; + if (xen_initial_domain()) + return 0; + error = sysdev_class_register(&ioapic_sysdev_class); if (error) return error; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel