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