WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [PATCH] Append 'nohpet' in dom0 cmdline to prevent dom0

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: RE: [Xen-devel] [PATCH] Append 'nohpet' in dom0 cmdline to prevent dom0 from using HPET
From: "Wei, Gang" <gang.wei@xxxxxxxxx>
Date: Thu, 15 Oct 2009 11:31:39 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Wed, 14 Oct 2009 20:32:19 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <8FED46E8A9CA574792FC7AACAC38FE7714FCC2EFBF@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <8FED46E8A9CA574792FC7AACAC38FE7714FCC2ED95@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4AD62D4A.7030301@xxxxxxxx> <8FED46E8A9CA574792FC7AACAC38FE7714FCC2EFBF@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcpNCKaBrvPTCpZlRnyPo/xyul0pxgAKWEngAAVj+NA=
Thread-topic: [Xen-devel] [PATCH] Append 'nohpet' in dom0 cmdline to prevent dom0 from using HPET
>>> Append 'nohpet' in dom0 cmdline to prevent dom0 from using HPET
>>> 
>>> Xen is using HPET to wakeup cpu from deep c-states, so the HPET
>>> usage in dom0 must be fobidden. In 2.6.18-xen, the HPET was by
>>> default disabled in config file. For upstream kernel built for pv
>>> dom0, it is not practical to disable dom0 HPET usage in that way
>>> because the same image may be also using as bare metal kernerl. So
>>> add cmdline option to do this thing for dom0.
>> 
>> I think it would be better to unstatic disable_hpet() and call it
>> from Xen setup.  But as far as I can see hpet_init() should never be
>> called under Xen, because pv_time_ops won't be pointing to it, so
>> there won't be any attempt to use the hpet.
> 
> Call disable_hpet() in dom0 xen setup phase will disable physical
> hpet and break hpet usage in hypervisor. There are another path to
> initialize hpet: fs_initcall(hpet_late_init),
> hpet_late_init()->hpet_enable(). 

Resend the updated patch which apply to pv-ops tree.

diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 5eeeedb..f8a794b 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -285,6 +285,7 @@ void __init xen_arch_setup(void)
        memcpy(boot_command_line, xen_start_info->cmd_line,
               MAX_GUEST_CMDLINE > COMMAND_LINE_SIZE ?
               COMMAND_LINE_SIZE : MAX_GUEST_CMDLINE);
+       strlcat(boot_command_line, " nohpet", COMMAND_LINE_SIZE);
 
        pm_idle = xen_idle;
 
Jimmy

Attachment: pv-dom0-nohpet.patch
Description: pv-dom0-nohpet.patch

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel