From: Paolo Bonzini Subject: Re: [PATCH v2 21/24] KVM: x86: drop picdev_in_range() Date: Wed, 29 Mar 2017 10:58:39 +0200 Message-ID: References: <20170323141357.12144-1-david@redhat.com> <20170323141357.12144-22-david@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: KVM list , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Peter Xu To: Steve Rutherford , David Hildenbrand Return-path: Received: from mx1.redhat.com ([209.132.183.28]:54350 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752459AbdC2I6o (ORCPT ); Wed, 29 Mar 2017 04:58:44 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 29/03/2017 02:28, Steve Rutherford wrote: > Not sure this matters, but this changes behavior slightly. This reorders > validation of the length and and validation of the operation. This would change behavior if for example: - KVM registered port 0x22 - the guest wrote 4 bytes to port 0x1f Before, picdev_write would return -EOPNOTSUPP and KVM would invoke the handler for port 0x22; now it would return 0. Since the PIT ports are far from anything else registered by the kernel, this should not matter. Paolo