[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation |
Date: |
Tue, 05 Jul 2011 15:59:57 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Mnenhy/0.8.3 Thunderbird/3.1.10 |
On 07/05/2011 03:38 PM, Alexander Graf wrote:
>>
>> + if (is_sgl64) {
>> + iov_pa = ldq_phys(pa);
>> + } else {
>> + iov_pa = ldl_phys(pa);
>
> These load data from memory in target endianness. Are you sure that's
> what you want? I'd expect this to be defined as little endian
> (especially given that ldq and ldl on the same address work).
Seems to be target endianness from the corresponding Linux code:
if (sge_count) {
scsi_for_each_sg(scp, os_sgl, sge_count, i) {
mfi_sgl->sge32[i].length = sg_dma_len(os_sgl);
mfi_sgl->sge32[i].phys_addr = sg_dma_address(os_sgl);
}
}
...
if (sge_count) {
scsi_for_each_sg(scp, os_sgl, sge_count, i) {
mfi_sgl->sge64[i].length = sg_dma_len(os_sgl);
mfi_sgl->sge64[i].phys_addr = sg_dma_address(os_sgl);
}
}
Note that this is _either_ a ldq or a ldl depending on what the driver told
the device. It is not accessing a 64-bit value as 32-bit.
Paolo
- [Qemu-devel] [PATCH 0/5][v6] Megasas HBA emulation, Hannes Reinecke, 2011/07/05
- [Qemu-devel] [PATCH 1/5] iov: Update parameter usage in iov_(to|from)_buf(), Hannes Reinecke, 2011/07/05
- [Qemu-devel] [PATCH 2/5] scsi: Add 'hba_private' to SCSIRequest, Hannes Reinecke, 2011/07/05
- [Qemu-devel] [PATCH 3/5] scsi-disk: Fixup debugging statement, Hannes Reinecke, 2011/07/05
- [Qemu-devel] [PATCH 4/5] scsi-disk: Mask out serial number EVPD, Hannes Reinecke, 2011/07/05
- [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation, Hannes Reinecke, 2011/07/05
- Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation, Alexander Graf, 2011/07/05
- Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation, Alexander Graf, 2011/07/05
- Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation, Alexander Graf, 2011/07/05
- Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation, Stefan Hajnoczi, 2011/07/05
- Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation, Hannes Reinecke, 2011/07/06
- Re: [Qemu-devel] [PATCH 5/5] megasas: LSI Megaraid SAS emulation, Paolo Bonzini, 2011/07/06
- Re: [Qemu-devel] [PATCH 4/5] scsi-disk: Mask out serial number EVPD, Paolo Bonzini, 2011/07/05
- Re: [Qemu-devel] [PATCH 3/5] scsi-disk: Fixup debugging statement, Paolo Bonzini, 2011/07/05
Re: [Qemu-devel] [PATCH 0/5][v6] Megasas HBA emulation, Alexander Graf, 2011/07/05