From: Hannes Reinecke <hare@suse.de>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Alexander Graf <agraf@suse.de>,
qemu-devel qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PULL 00/14] SCSI updates for 2012-07-02
Date: Tue, 10 Jul 2012 07:57:52 +0200 [thread overview]
Message-ID: <4FFBC460.2070104@suse.de> (raw)
In-Reply-To: <4FFB6707.8010106@codemonkey.ws>
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 = MFI_INFO_HOST_PCIX;
> info.device.type = MFI_INFO_DEV_SAS3G;
> info.device.port_count = 2;
> info.device.port_addr[0] =
> 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.
The whole thing is informational anyway, and can only be seen when
using the (proprietary) MegaCLI userspace command.
> 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.
> I'm going to disable the build by default. I don't want to see a
> rash fix like (uint64_t)(intptr_t). This needs to be fixed by not
> making the pointer address guest visible. It can then be
> re-enabled. Should be easy enough to update your .mak config if you
> want to test between now and then.
>
As said, it's _not_ an address. The address it just use to seed the
SAS address.
But as you object, I see to use something else for seeding the SAS
address.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
next prev parent reply other threads:[~2012-07-10 5:58 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 9:41 [Qemu-devel] [PULL 00/14] SCSI updates for 2012-07-02 Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 01/14] scsi: simplify handling of the VPD page length field Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 02/14] scsi: add a qdev property for the disk's WWN Paolo Bonzini
2012-07-03 19:09 ` Blue Swirl
2012-07-04 7:33 ` Paolo Bonzini
2012-07-05 18:03 ` Blue Swirl
2012-07-06 7:05 ` Paolo Bonzini
2012-07-07 7:48 ` Blue Swirl
2012-07-07 12:22 ` Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 03/14] atapi: implement READ DISC INFORMATION Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 04/14] scsi-disk: " Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 05/14] ISCSI: Add SCSI passthrough via scsi-generic to libiscsi Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 06/14] ISCSI: force use of sg for SMC and SSC devices Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 07/14] megasas: Add header file Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 08/14] megasas: LSI Megaraid SAS HBA emulation Paolo Bonzini
2012-07-03 19:09 ` Blue Swirl
2012-07-04 5:52 ` Hannes Reinecke
2012-07-04 7:33 ` Paolo Bonzini
2012-07-05 6:46 ` Hannes Reinecke
2012-07-02 9:41 ` [Qemu-devel] [PATCH 09/14] virtio-scsi: do not crash on adding buffers to the event queue Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 10/14] scsi: Fix data length == SCSI_SENSE_BUF_SIZE Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 11/14] scsi: Fix LOAD_UNLOAD Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 12/14] scsi: Ensure command and transfer lengths are set for all SCSI devices Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 13/14] scsi: Add basic support for SCSI media changer commands Paolo Bonzini
2012-07-02 9:41 ` [Qemu-devel] [PATCH 14/14] scsi: Fix transfer length for READ POSITION commands Paolo Bonzini
2012-07-09 16:48 ` [Qemu-devel] [PULL 00/14] SCSI updates for 2012-07-02 Anthony Liguori
2012-07-09 23:09 ` Alexander Graf
2012-07-09 23:19 ` Anthony Liguori
2012-07-10 5:57 ` Hannes Reinecke [this message]
2012-07-10 7:06 ` Paolo Bonzini
2012-07-10 12:52 ` Anthony Liguori
2012-07-10 13:01 ` Hannes Reinecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FFBC460.2070104@suse.de \
--to=hare@suse.de \
--cc=agraf@suse.de \
--cc=anthony@codemonkey.ws \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).