From patchwork Mon Dec 22 14:34:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 5527451 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2828B9F30B for ; Mon, 22 Dec 2014 14:35:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0FE2720121 for ; Mon, 22 Dec 2014 14:35:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2881920165 for ; Mon, 22 Dec 2014 14:35:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754596AbaLVOe0 (ORCPT ); Mon, 22 Dec 2014 09:34:26 -0500 Received: from mail.skyhub.de ([78.46.96.112]:60545 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753184AbaLVOeY (ORCPT ); Mon, 22 Dec 2014 09:34:24 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1419258863; bh=JKNFwFs4Ejd3XVwt0zBx0u5Zq1IbMdcDn7lIRdPiPLk=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=a 13XCI9pQqg/n3jGcq+eEB5nSHuYybWlgsaq+ZsfYh6hKTHNSXrcqVjOrWHLjIPuz2Hs B4CJOQSk6XDY9T1tK5AsgiZAf17u3vXPo/1N8X4Qgeaa60C0BFNHfgywxXvEs40kskw rYILmbQXZ2BAYPJumLiztv13+HqA3A5UGptg= Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id aQ2xfOpX-vWB; Mon, 22 Dec 2014 15:34:22 +0100 (CET) Received: from pd.tnic (p5DDC6E2E.dip0.t-ipconnect.de [93.220.110.46]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 318191DA38E; Mon, 22 Dec 2014 15:34:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1419258862; bh=JKNFwFs4Ejd3XVwt0zBx0u5Zq1IbMdcDn7lIRdPiPLk=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=m VlIOM8hjav7LTLyz34vt9rNRpgAg1KN6KcO1DscB8Y3ZZtmGYSuMN2R6X94uitMTE2N 1KNfNkcdZ+x4/iPXByrpmdV1RgmqKU9bHsDq2btl0Feq10cGpkS61jzdtOHb8Dth00f Bfhkv5Q5WIQqFVKzk4PEUVLOc/heuD75fqUI= Received: by pd.tnic (Postfix, from userid 1000) id 97DEA10154A; Mon, 22 Dec 2014 15:34:21 +0100 (CET) Date: Mon, 22 Dec 2014 15:34:21 +0100 From: Borislav Petkov To: Paolo Bonzini Cc: kvm ML , lkml Subject: guest hanging on rc1 Message-ID: <20141222143421.GA4403@pd.tnic> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Paolo, so I installed an old SUSE guest (SLES10, kernel is 2.6.16 + enterprise stuff) and it was booting and all was fine but this week not anymore. Host kernel is 3.19-rc1 + tip/master. I did miss some kvm config options initially so I did $ make kvmconfig and it added those (see diff at the end). Now, when I go to the monitor and do (qemu) p $eip 0xffffffff80120e7e This address is in kvm_register_clock() on the guest kernel: ffffffff80120dd2 : ffffffff80120dd2: 55 push %rbp ffffffff80120dd3: 53 push %rbx ffffffff80120dd4: 48 83 ec 08 sub $0x8,%rsp ffffffff80120dd8: 65 8b 34 25 24 00 00 mov %gs:0x24,%esi ffffffff80120ddf: 00 ffffffff80120de0: 31 c0 xor %eax,%eax ffffffff80120de2: 83 3d 7f a8 33 00 00 cmpl $0x0,0x33a87f(%rip) # ffffffff8045b668 ffffffff80120de9: 0f 84 91 00 00 00 je ffffffff80120e80 ffffffff80120def: 48 63 d6 movslq %esi,%rdx ffffffff80120df2: 48 c7 c0 80 04 43 80 mov $0xffffffff80430480,%rax ffffffff80120df9: 48 8b 14 d5 20 42 3f mov -0x7fc0bde0(,%rdx,8),%rdx ffffffff80120e00: 80 ffffffff80120e01: 4c 8b 42 08 mov 0x8(%rdx),%r8 ffffffff80120e05: 4a 8d 14 00 lea (%rax,%r8,1),%rdx ffffffff80120e09: 48 b8 ff ff ff 7f ff movabs $0xffffffff7fffffff,%rax ffffffff80120e10: ff ff ff ffffffff80120e13: 48 39 c2 cmp %rax,%rdx ffffffff80120e16: 8d 8a 00 00 00 80 lea -0x80000000(%rdx),%ecx ffffffff80120e1c: 77 02 ja ffffffff80120e20 ffffffff80120e1e: 89 d1 mov %edx,%ecx ffffffff80120e20: 48 c7 c0 80 04 43 80 mov $0xffffffff80430480,%rax ffffffff80120e27: 83 c9 01 or $0x1,%ecx ffffffff80120e2a: 4a 8d 14 00 lea (%rax,%r8,1),%rdx ffffffff80120e2e: 48 b8 ff ff ff 7f ff movabs $0xffffffff7fffffff,%rax ffffffff80120e35: ff ff ff ffffffff80120e38: 89 cd mov %ecx,%ebp ffffffff80120e3a: 48 39 c2 cmp %rax,%rdx ffffffff80120e3d: 76 07 jbe ffffffff80120e46 ffffffff80120e3f: b8 00 00 00 80 mov $0x80000000,%eax ffffffff80120e44: eb 0a jmp ffffffff80120e50 ffffffff80120e46: 48 b8 00 00 00 00 00 movabs $0x7f0000000000,%rax ffffffff80120e4d: 7f 00 00 ffffffff80120e50: 48 8d 04 02 lea (%rdx,%rax,1),%rax ffffffff80120e54: 48 89 c2 mov %rax,%rdx ffffffff80120e57: 48 c1 ea 20 shr $0x20,%rdx ffffffff80120e5b: 48 85 ff test %rdi,%rdi ffffffff80120e5e: 89 d3 mov %edx,%ebx ffffffff80120e60: 74 11 je ffffffff80120e73 ffffffff80120e62: 49 89 f8 mov %rdi,%r8 ffffffff80120e65: 31 c0 xor %eax,%eax ffffffff80120e67: 48 c7 c7 f4 7a 31 80 mov $0xffffffff80317af4,%rdi ffffffff80120e6e: e8 b7 4a 01 00 callq ffffffff8013592a ffffffff80120e73: b9 12 00 00 00 mov $0x12,%ecx ffffffff80120e78: 89 e8 mov %ebp,%eax ffffffff80120e7a: 89 da mov %ebx,%edx ffffffff80120e7c: 0f 30 wrmsr ffffffff80120e7e: 31 c0 xor %eax,%eax <--- rIP ffffffff80120e80: 5a pop %rdx ffffffff80120e81: 5b pop %rbx ffffffff80120e82: 5d pop %rbp ffffffff80120e83: c3 retq right after we've written the 0x12 MSR, i.e. MSR_KVM_SYSTEM_TIME. So something broke somewhere and the guest won't boot anymore. Even if I try to boot the iso image which I used to install it, its kernel hangs there too. Not the same VA though: (qemu) p $eip 0xffffffff8011b172 (qemu) but the exact same place: (qemu) x/20i 0xffffffff8011b150 0xffffffff8011b150: je 0x7fff8011b167 0xffffffff8011b152: mov %rdi,%r8 0xffffffff8011b155: mov %ebp,%ecx 0xffffffff8011b157: xor %esi,%esi 0xffffffff8011b159: mov $0xffffffff802ee1ac,%rdi 0xffffffff8011b160: xor %eax,%eax 0xffffffff8011b162: callq 0x7fff8012a562 0xffffffff8011b167: mov $0x12,%ecx 0xffffffff8011b16c: mov %ebp,%eax 0xffffffff8011b16e: mov %ebx,%edx 0xffffffff8011b170: wrmsr 0xffffffff8011b172: xor %eax,%eax <--- rIP 0xffffffff8011b174: pop %rdx 0xffffffff8011b175: pop %rbx 0xffffffff8011b176: pop %rbp 0xffffffff8011b177: retq 0xffffffff8011b178: push %rbp 0xffffffff8011b179: mov %edi,%ebp 0xffffffff8011b17b: push %rbx 0xffffffff8011b17c: sub $0x8,%rsp Right after the MSR write. Any ideas how to debug this further? :) Thanks. --- /boot/config-3.19.0-rc1+ 2014-12-22 11:20:13.015922953 +0100 +++ .config 2014-12-22 13:31:24.030189420 +0100 @@ -336,7 +336,15 @@ CONFIG_X86_FEATURE_NAMES=y CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y CONFIG_SCHED_OMIT_FRAME_POINTER=y # CONFIG_KVMTOOL_TEST_ENABLE is not set -# CONFIG_HYPERVISOR_GUEST is not set +CONFIG_HYPERVISOR_GUEST=y +CONFIG_PARAVIRT=y +# CONFIG_PARAVIRT_DEBUG is not set +# CONFIG_PARAVIRT_SPINLOCKS is not set +# CONFIG_XEN is not set +CONFIG_KVM_GUEST=y +# CONFIG_KVM_DEBUG_FS is not set +# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set +CONFIG_PARAVIRT_CLOCK=y CONFIG_NO_BOOTMEM=y # CONFIG_MEMTEST is not set CONFIG_MK8=y @@ -1126,6 +1134,7 @@ CONFIG_VIRTIO_BLK=y # CONFIG_SENSORS_APDS990X is not set # CONFIG_HMC6352 is not set # CONFIG_DS1682 is not set +# CONFIG_VMWARE_BALLOON is not set # CONFIG_BMP085_I2C is not set # CONFIG_USB_SWITCH_FSA9480 is not set # CONFIG_SRAM is not set @@ -2708,6 +2717,7 @@ CONFIG_VIRTIO_PCI=y # # Microsoft Hyper-V guest support # +# CONFIG_HYPERV is not set # CONFIG_STAGING is not set # CONFIG_X86_PLATFORM_DEVICES is not set # CONFIG_CHROME_PLATFORMS is not set