From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] KVM: Use thread debug register storage instead of kvm specific data Date: Tue, 01 Sep 2009 13:33:12 +0200 Message-ID: <4A9D0678.5040800@siemens.com> References: <1251798248-13164-1-git-send-email-avi@redhat.com> <20090901112220.GA18271@amt.cnet> <4A9D056E.4030906@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , "kvm@vger.kernel.org" To: Marcelo Tosatti Return-path: Received: from goliath.siemens.de ([192.35.17.28]:21509 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754113AbZIALdY (ORCPT ); Tue, 1 Sep 2009 07:33:24 -0400 In-Reply-To: <4A9D056E.4030906@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: Jan Kiszka wrote: > Marcelo Tosatti wrote: >> On Tue, Sep 01, 2009 at 12:44:08PM +0300, Avi Kivity wrote: >>> Instead of saving the debug registers from the processor to a kvm data >>> structure, rely in the debug registers stored in the thread structure. >>> This allows us not to save dr6 and dr7. >>> >>> Reduces lightweight vmexit cost by 350 cycles, or 11 percent. >> Is this kgdb safe? > > Nope, kgdb writes directly to the debug registers. > > I vaguely recall someone trying to push a debug register management > framework. Did it hit mainline in the meantime? I do not find any trace > on quick glance, at least not in kgdb. For the time being, falling back to conservative save/restore if kgdb is configured in and kgdb_connected != 0 should allow us to apply this optimization otherwise. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux