From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NFRil-0000Nq-Py for qemu-devel@nongnu.org; Tue, 01 Dec 2009 07:20:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NFRig-0000Jd-Df for qemu-devel@nongnu.org; Tue, 01 Dec 2009 07:20:43 -0500 Received: from [199.232.76.173] (port=33329 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NFRig-0000J2-54 for qemu-devel@nongnu.org; Tue, 01 Dec 2009 07:20:38 -0500 Received: from mail-px0-f174.google.com ([209.85.216.174]:58844) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NFRid-0002E2-SK for qemu-devel@nongnu.org; Tue, 01 Dec 2009 07:20:36 -0500 Received: by pxi4 with SMTP id 4so3380758pxi.4 for ; Tue, 01 Dec 2009 04:20:33 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4B15096A.5060801@siemens.com> References: <1259256300-23937-1-git-send-email-glommer@redhat.com> <4B12B042.9020409@web.de> <5d6222a80911300342x4d29653as6c23acac598dec64@mail.gmail.com> <5d6222a80911300755o4fed5447w9ddae1abaccf7100@mail.gmail.com> <4B13F570.4030605@redhat.com> <5d6222a80911300847w2faa9d39nb2fc6ee3ccb9ccfd@mail.gmail.com> <4B140141.1040708@siemens.com> <4B1507AA.5050502@redhat.com> <4B15096A.5060801@siemens.com> Date: Tue, 1 Dec 2009 10:20:33 -0200 Message-ID: <5d6222a80912010420q6ef5b433mcc75855b2b3d7968@mail.gmail.com> Subject: Re: [Qemu-devel] Re: [PATCH 0/7] KVM SMP support, early version From: Glauber Costa Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Glauber Costa , "aliguori@us.ibm.com" , Avi Kivity , "qemu-devel@nongnu.org" On Tue, Dec 1, 2009 at 10:17 AM, Jan Kiszka wrote: > Avi Kivity wrote: >> On 11/30/2009 07:30 PM, Jan Kiszka wrote: >>>>> No. =C2=A0But what's wrong with on_vcpu? >>>>> >>>> intrinsically racy. signal passing slow down things, etc. >>>> >>>> That said, as I've stated many times: I don't believe there's anything >>>> fundamentally wrong with on_vcpu. But we might get benefits from a re-= design >>>> of things to avoid it whenever possible. (just like the vcpu_reset() >>>> I've just posted) >>>> >>>> >>> If you don't want immediate execution of update_guest_debug, save the >>> state that shall be transferred, set some flag, and run the transfer >>> before guest entry inside the vcpu threads (after putting the registers >>> as older kernels may otherwise overwrite the flags register). Should >>> work, may even avoid redundant calls during a gdb session. >>> >> >> There's no guarantee the vcpu will ever exit to qemu, so you have to >> signal the vcpu thread anyway. =C2=A0When you do that, you might as well= load >> the new state. > > Debugging is special here as it involves vmstop before you start playing > with the debug settings. But I may also oversee some corner case right no= w. > I imagined so. In this case, it might be better to set a flag before vmstop, and then honor it on vcpu entry. I had this feeling that in most cases where we current signal the vcpu, the VM will be already stopped anyway, so we don't need to resignal. --=20 Glauber Costa. "Free as in Freedom" http://glommer.net "The less confident you are, the more serious you have to act."