From patchwork Fri Jan 29 19:28:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 75833 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o0TJT8K8023036 for ; Fri, 29 Jan 2010 19:29:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752561Ab0A2T3E (ORCPT ); Fri, 29 Jan 2010 14:29:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752823Ab0A2T3E (ORCPT ); Fri, 29 Jan 2010 14:29:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40635 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752308Ab0A2T3D (ORCPT ); Fri, 29 Jan 2010 14:29:03 -0500 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0TJT23V011195 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 29 Jan 2010 14:29:02 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0TJT1JF016814; Fri, 29 Jan 2010 14:29:02 -0500 Received: from amt.cnet (vpn-8-22.rdu.redhat.com [10.11.8.22]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o0TJSs6s006847; Fri, 29 Jan 2010 14:28:54 -0500 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 7859865609F; Fri, 29 Jan 2010 17:28:43 -0200 (BRST) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id o0TJSfnk017411; Fri, 29 Jan 2010 17:28:41 -0200 Date: Fri, 29 Jan 2010 17:28:41 -0200 From: Marcelo Tosatti To: kvm Cc: Jason Wang Subject: KVM: PIT: control word is write-only Message-ID: <20100129192840.GA17352@amt.cnet> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-08-17) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 29 Jan 2010 19:29:09 +0000 (UTC) diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index caad189..6a74246 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c @@ -467,6 +467,9 @@ static int pit_ioport_read(struct kvm_io_device *this, return -EOPNOTSUPP; addr &= KVM_PIT_CHANNEL_MASK; + if (addr == 3) + return 0; + s = &pit_state->channels[addr]; mutex_lock(&pit_state->lock);