From patchwork Mon May 11 11:20:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 22932 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4BBL7ru024567 for ; Mon, 11 May 2009 11:21:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752461AbZEKLUe (ORCPT ); Mon, 11 May 2009 07:20:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752782AbZEKLUd (ORCPT ); Mon, 11 May 2009 07:20:33 -0400 Received: from mx2.redhat.com ([66.187.237.31]:37754 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752461AbZEKLUd (ORCPT ); Mon, 11 May 2009 07:20:33 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4BBKXQs000522; Mon, 11 May 2009 07:20:33 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4BBKWGC008603; Mon, 11 May 2009 07:20:32 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4BBKVHd027617; Mon, 11 May 2009 07:20:31 -0400 Received: from balrog.qumranet.com (dhcp-1-197.tlv.redhat.com [10.35.1.197]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id A62D6250ABF; Mon, 11 May 2009 14:20:30 +0300 (IDT) Message-ID: <4A0809FE.7050801@redhat.com> Date: Mon, 11 May 2009 14:20:30 +0300 From: Avi Kivity User-Agent: Thunderbird 2.0.0.21 (X11/20090320) MIME-Version: 1.0 To: =?UTF-8?B?UGlvdHIgSmFyb3N6ecWEc2tp?= CC: kvm@vger.kernel.org Subject: Re: kvm hardlocks on hp dv9010us References: In-Reply-To: X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Piotr Jaroszyński wrote: > I have a hp dv9010us laptop (one of those that hard locked before > CONFIG_IO_DELAY_* options were introduced in kernel - not sure if it > may be related at all). > I skipped this bit, and it's crucial. kvm passes port 80 to go from guest to host as an optimization, and of course it kills your laptop. I'll fix this up. (nowadays it may be faster to emulate the port access in the kernel rather than pass it to the hardware, so this is likely to be a performance improvement as well). In the meantime, you can use the attached patch. diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 27d5b74..f994c6d 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -384,7 +384,6 @@ static __init int svm_hardware_setup(void) iopm_va = page_address(iopm_pages); memset(iopm_va, 0xff, PAGE_SIZE * (1 << IOPM_ALLOC_ORDER)); - clear_bit(0x80, iopm_va); /* allow direct access to PC debug port */ iopm_base = page_to_pfn(iopm_pages) << PAGE_SHIFT; if (boot_cpu_has(X86_FEATURE_NX))