From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoUXJ-0007ma-Ub for qemu-devel@nongnu.org; Tue, 10 Jul 2012 03:07:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoUXD-0005Ad-OJ for qemu-devel@nongnu.org; Tue, 10 Jul 2012 03:07:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoUXD-0005AZ-F5 for qemu-devel@nongnu.org; Tue, 10 Jul 2012 03:06:59 -0400 Message-ID: <4FFBD48E.3030807@redhat.com> Date: Tue, 10 Jul 2012 09:06:54 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1341222087-24920-1-git-send-email-pbonzini@redhat.com> <4FFB0B64.2050409@codemonkey.ws> <2FA25786-F7CC-4E72-B695-2DC14130BDE9@suse.de> <4FFB6707.8010106@codemonkey.ws> <4FFBC460.2070104@suse.de> In-Reply-To: <4FFBC460.2070104@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 00/14] SCSI updates for 2012-07-02 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hannes Reinecke Cc: Alexander Graf , Anthony Liguori , qemu-devel qemu-devel Il 10/07/2012 07:57, Hannes Reinecke ha scritto: >> > This will make migration impossible not to mention the fact that >> > casting a pointer to a uint64_t is really broken. >> > > Hey, this is _NOT_ an address. It's a simple way of generating a > system-wide unique SAS address. > > The whole thing is informational anyway, and can only be seen when > using the (proprietary) MegaCLI userspace command. So even on real hardware it is not exported to the VPD (in the case of the per-LUN address)? And the per-port address is also not visible in VPD? I recently added a wwn property to scsi-{hd,cd}, a similar property should perhaps be added to the megasas device. We can do the same thing and add a default. Not the pointer value, though, because it is not migratable. A counter is also problematic for migration when you have hotplug/hotunplug. You can instead use something like a CRC32 of the device id. Once it's added, we can add support for it in SCSIBusInfo so that it is exported via VPD. > Okay, so here's the challenge: We need to generate a system-wide > unique SAS address, one per SCSI device and one per megasas instance. > A simple counter won't work, as we might have several qemu instances > running. Which would result in all of them having the same SAS > address for the host. That's not a problem as long as we're not supporting things like persistent reservations across guests (just like it's not a problem if you give the same MAC address to network cards with slirp). Paolo