From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCwZg-0008PF-1I for qemu-devel@nongnu.org; Thu, 31 Jul 2014 16:03:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCwZZ-000453-ST for qemu-devel@nongnu.org; Thu, 31 Jul 2014 16:03:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCwZZ-00044u-KB for qemu-devel@nongnu.org; Thu, 31 Jul 2014 16:03:33 -0400 Message-ID: <53DAA10B.7060503@redhat.com> Date: Thu, 31 Jul 2014 16:03:23 -0400 From: John Snow MIME-Version: 1.0 References: <1404757089-4836-1-git-send-email-jsnow@redhat.com> <1404757089-4836-27-git-send-email-jsnow@redhat.com> <20140731140111.GC25929@stefanha-thinkpad.redhat.com> In-Reply-To: <20140731140111.GC25929@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 26/28] ahci: Add test_hba_spec to ahci-test. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com On 07/31/2014 10:01 AM, Stefan Hajnoczi wrote: > On Mon, Jul 07, 2014 at 02:18:07PM -0400, John Snow wrote: >> + if (bitset(cap, AHCI_CAP_SAM)) { >> + g_test_message("Supports AHCI-Only Mode: GHC_AE is Read-Only."); >> + assert_bit_set(reg, AHCI_GHC_AE); >> + } else { >> + g_test_message("Supports AHCI/Legacy mix."); >> + assert_bit_clear(reg, AHCI_GHC_AE); >> + } > Let's just assert what QEMU implements. It was mentioned at least once to me that supporting this would be interesting. As I was trying to write a spec test, I don't think this conditional is hurting anyone. Certainly if we DO decide to implement a mixed-mode device later, who will remember to add this check back here? Especially since it's not an ugly ifdef like my other "what if" cases, I feel like it could stay.