From: Fabio Fantoni Subject: Re: [PATCH] x86_emulate: properly do IP updates and other side effects on success Date: Mon, 11 Aug 2014 15:16:21 +0200 Message-ID: <53E8C225.9070705@m2r.biz> References: <53E35543020000780002A09C@mail.emea.novell.com> <53E37E19.4000006@m2r.biz> <53E3AB96020000780002A2A6@mail.emea.novell.com> <53E393F6.8060004@m2r.biz> <53E8BCCA.9060201@m2r.biz> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XGpSG-00046B-9J for xen-devel@lists.xenproject.org; Mon, 11 Aug 2014 13:16:04 +0000 Received: by mail-we0-f169.google.com with SMTP id u56so8629652wes.0 for ; Mon, 11 Aug 2014 06:16:02 -0700 (PDT) In-Reply-To: <53E8BCCA.9060201@m2r.biz> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org Il 11/08/2014 14:53, Fabio Fantoni ha scritto: > Il 07/08/2014 16:57, Fabio Fantoni ha scritto: >> Il 07/08/2014 16:38, Jan Beulich ha scritto: >>>>>> On 07.08.14 at 15:24, wrote: >>>> Il 07/08/2014 10:30, Jan Beulich ha scritto: >>>>> The two MMX/SSE/AVX code blocks failed to update IP properly, and >>>>> these >>>>> as well as get_reg_refix(), which "manually" updated IP so far, >>>>> failed >>>>> to do the TF and RF processing needed at the end of successfully >>>>> emulated instructions. >>>>> >>>>> Reported-by: Andrei LUTAS >>>>> Signed-off-by: Jan Beulich >>>>> Tested-by: Razvan Cojocaru >>>> Thanks for the patch, I tested it to see if solves also qxl on linux >>>> domUs problem but with this patch the domU crashes and I cannot get a >>>> backtrace or specific errors. >>> Are you saying that this is different from without that patch? >>> Considering the lack of EIP update, the emulation of the >>> instructions in question can't have done much good before, >>> and - just like the reporters of the issue saw - the guest should >>> have hung. >>> >>> Jan >>> >> >> Before this patch the domU's org was always 100% cpu, spice show >> black screen and is possible a xl shutdown, after at xorg start, show >> domU's mouse in center in spice and domU crash. >> I'm unable to debug it, can you tell me what I must do to debug it >> and give you all possibile information? >> >> This is the exact git I used for my tests: >> https://github.com/Fantu/Xen/tree/rebase/m2r-staging >> Contains some libxl patch about spice used for a long time and with >> only qxl problem on linux domUs (with windows domUs is working good >> since your patch of long time ago about similar istructions and same >> performance as kvm after one or more patches in xen-unstable that I >> not know exactly and is still working also with this patch). >> >> Thanks for any reply and sorry for my bad english. > > Someone can tell me how to debug the domU's crash please? > > Thanks for any reply and sorry for my bad english. Now I did also a vcpus dump on domU preserved after crash if can be useful for this problem probably about cpu's instructions emulation: gdbsx -c 1 64 ===> Context for DOMID:1 --> VCPU:0 rip:ffffffff810013a8 rsp:ffff880074803b30 flags:0000000000000092 rax:0000000000000000 rbx:00000000fffffffe rcx:00000000ffffffff rdx:ffffffff81edc300 rsi:ffff880074803b3c rdi:0000000000000002 r08:0000000000000000 r09:0000000000000002 r10:ffffffff81d0a5e0 r11:ffff8800748038c6 r12:ffffffff81c515c0 r13:0000000000000000 r14:ffffffff81edc300 r15:0000000000000000 rbp:ffff880074803b40 cs:0000000000000010 ds:0000000000000000 fs:0000000000000000 gs:0000000000000000 Call Trace: [ffffffff810013a8] [ffffffff8100357e] [ffffffff810035a3] [ffffffff816fa43c] [ffffffff81a07727] [ffffffff816fa49a] [ffffffff816eb027] [ffffffff810e17c8] [ffffffff816f7603] [ffffffff81a073db] [ffffffff81016f9b] --> VCPU:1 rip:ffffffff81053585 rsp:ffff880074823f88 flags:0000000000000046 rax:ffffffff81c2a160 rbx:ffff88007342ffd8 rcx:00000006867023fa rdx:0000000000bad748 rsi:00000000000000ff rdi:00000000000000f0 r08:00000000000000ac r09:0000000000000000 r10:0000000000000400 r11:0000000000000001 r12:0000000000000001 r13:0000000000000000 r14:ffff88007342c000 r15:ffff88007342ffd8 rbp:ffff880074823f88 cs:0000000000000010 ds:0000000000000000 fs:0000000000000000 gs:0000000000000000 Call Trace: [ffffffff81053585] [ffffffff8101d70d] [ffffffff810433b9] [ffffffff8170005d] [ffffffffffffffff] [ffffffff810afd40] [ffffffff8100a410] [ffffffff8100a020] [ffffffff81a06d7f] [ffffffff8180b180] [ffffffff81c2a858]