From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48144) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vdfk0-0004bE-DO for qemu-devel@nongnu.org; Tue, 05 Nov 2013 07:28:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vdfju-0003gt-En for qemu-devel@nongnu.org; Tue, 05 Nov 2013 07:28:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:6216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vdfju-0003gl-6u for qemu-devel@nongnu.org; Tue, 05 Nov 2013 07:28:10 -0500 Message-ID: <5278E44D.80800@redhat.com> Date: Tue, 05 Nov 2013 13:27:57 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1380300560-21086-1-git-send-email-akong@redhat.com> <5278B3B8.5000105@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] extend limit of physical sections number List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Amos Kong , QEMU Developers , Anthony Liguori Il 05/11/2013 13:23, Peter Maydell ha scritto: >>> >> This looks really weird. Why should the memory subsystem >>> >> care whether we're using TCG or KVM or Xen? >> > >> > Because only TCG stores the section number in the low bits of the iotlb >> > entry. This is exactly what is explained in the comments. > So presumably we still crash if there are more than > 32 virtio-blk disks on TCG (and indeed if more than 256 > on KVM)? That doesn't seem very satisfactory... It isn't, do you have any idea on how to make the threshold equal for TCG and KVM? I guess the code could be made clearer like this: assert (... < SHRT_MAX); if (tcg_enabled()) { /* TCG has a stricter limit due to iotlb etc. etc. */ assert (... < TARGET_PAGE_SIZE); } but that's pretty much it... Paolo