From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Soa4a-0004Ca-1F for qemu-devel@nongnu.org; Tue, 10 Jul 2012 09:01:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Soa4P-00066K-Kw for qemu-devel@nongnu.org; Tue, 10 Jul 2012 09:01:47 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39891 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Soa4P-000662-BB for qemu-devel@nongnu.org; Tue, 10 Jul 2012 09:01:37 -0400 Message-ID: <4FFC27AF.4010802@suse.de> Date: Tue, 10 Jul 2012 15:01:35 +0200 From: Hannes Reinecke 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> <4FFC2593.80809@codemonkey.ws> In-Reply-To: <4FFC2593.80809@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Anthony Liguori Cc: Paolo Bonzini , Alexander Graf , qemu-devel qemu-devel On 07/10/2012 02:52 PM, Anthony Liguori wrote: > On 07/10/2012 12:57 AM, Hannes Reinecke wrote: >> On 07/10/2012 01:19 AM, Anthony Liguori wrote: >>> On 07/09/2012 06:09 PM, Alexander Graf wrote: >>>> >>>> On 09.07.2012, at 18:48, Anthony Liguori wrote: >>>> >>>>> On 07/02/2012 04:41 AM, Paolo Bonzini wrote: >>>>>> Anthony, >>>>>> >>>>>> The following changes since commit >>>>>> 71ea2e016131a9fcde6f1ffd3e0e34a64c21f593: >>>>>> >>>>>> bsd-user: fix build (2012-06-28 20:28:36 +0000) >>>>> >>>>> Pulled. Thanks. >>>> >>>> Megasas? :) >>> >>> So this code is really broken: >>> >>> info.host.type =3D MFI_INFO_HOST_PCIX; >>> info.device.type =3D MFI_INFO_DEV_SAS3G; >>> info.device.port_count =3D 2; >>> info.device.port_addr[0] =3D >>> cpu_to_le64(megasas_gen_sas_addr((uint64_t)s)); >>> >>> 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. >=20 > But it's not stable across migration. That's the problem. >=20 >> The whole thing is informational anyway, and can only be seen when >> using the (proprietary) MegaCLI userspace command. >=20 > Nonetheless, it's still guest visible. >=20 Okay, I see your point. I'll be reworking things to not use the pointer here. >>> This code needs to be refactored to not do this. It's quite >>> pervasive though (there's a half a dozen instances like this). >>> >> >> 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. >=20 > You could used a hashed uuid. >=20 Right. Will see how that'll work out. Cheers, Hannes --=20 Dr. Hannes Reinecke zSeries & Storage hare@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg GF: J. Hawn, J. Guild, F. Imend=F6rffer, HRB 16746 (AG N=FCrnberg)