mbox series

[v9,0/4] hw/ufs: Add Universal Flash Storage (UFS) support

Message ID cover.1691062912.git.jeuk20.kim@samsung.com
Headers show
Series hw/ufs: Add Universal Flash Storage (UFS) support | expand

Message

Jeuk Kim Aug. 3, 2023, 11:48 a.m. UTC
Dear Stefan,
I'm really sorry, but could you please put this patch series
instead of v8, which was previously merged into block-next?
The fixes from v8 are below.
Please let me know if you have any comments or issues.

Thank you very much,
Jeuk

Since v8:
- Fix compilation warnings (Mike Maslenkin reported. Thanks so much Mike!)
- Skip ufs-test for qemu-system-ppc64
I have confirmed that the dma in ufs-test does not work well
for qemu-system-ppc64.
This seems to be because qemu-system-ppc64 is the only big-endian system test.
Since there are currently no ufs devices supported on big-endian systems,
I just skip the test for now, and leave it as a TODO.

Jeuk Kim (4):
  hw/ufs: Initial commit for emulated Universal-Flash-Storage
  hw/ufs: Support for Query Transfer Requests
  hw/ufs: Support for UFS logical unit
  tests/qtest: Introduce tests for UFS

 MAINTAINERS              |    7 +
 docs/specs/pci-ids.rst   |    2 +
 hw/Kconfig               |    1 +
 hw/meson.build           |    1 +
 hw/ufs/Kconfig           |    4 +
 hw/ufs/lu.c              | 1445 ++++++++++++++++++++++++++++++++++++
 hw/ufs/meson.build       |    1 +
 hw/ufs/trace-events      |   58 ++
 hw/ufs/trace.h           |    1 +
 hw/ufs/ufs.c             | 1494 ++++++++++++++++++++++++++++++++++++++
 hw/ufs/ufs.h             |  131 ++++
 include/block/ufs.h      | 1090 +++++++++++++++++++++++++++
 include/hw/pci/pci.h     |    1 +
 include/hw/pci/pci_ids.h |    1 +
 include/scsi/constants.h |    1 +
 meson.build              |    1 +
 tests/qtest/meson.build  |    1 +
 tests/qtest/ufs-test.c   |  584 +++++++++++++++
 18 files changed, 4824 insertions(+)
 create mode 100644 hw/ufs/Kconfig
 create mode 100644 hw/ufs/lu.c
 create mode 100644 hw/ufs/meson.build
 create mode 100644 hw/ufs/trace-events
 create mode 100644 hw/ufs/trace.h
 create mode 100644 hw/ufs/ufs.c
 create mode 100644 hw/ufs/ufs.h
 create mode 100644 include/block/ufs.h
 create mode 100644 tests/qtest/ufs-test.c

Comments

Stefan Hajnoczi Aug. 3, 2023, 3:57 p.m. UTC | #1
On Thu, Aug 03, 2023 at 08:48:22PM +0900, Jeuk Kim wrote:
> Dear Stefan,
> I'm really sorry, but could you please put this patch series
> instead of v8, which was previously merged into block-next?
> The fixes from v8 are below.
> Please let me know if you have any comments or issues.

I hope you have time to solve the remaining endianness issues, but that
can be done as a separate series.

Thanks, applied to my block-next tree:
https://gitlab.com/stefanha/qemu/commits/block-next

Stefan
Stefan Hajnoczi Aug. 30, 2023, 11:35 a.m. UTC | #2
On Thu, 3 Aug 2023 at 07:49, Jeuk Kim <jeuk20.kim@gmail.com> wrote:
>
> Dear Stefan,
> I'm really sorry, but could you please put this patch series
> instead of v8, which was previously merged into block-next?
> The fixes from v8 are below.
> Please let me know if you have any comments or issues.

Hi,
This series fails to compile for win32. I have dropped it from my queue.

You can use "make docker-test-build@fedora-win32-cross" to run a win32
build locally on a Linux host. Please take a look and I'll merge it
again when the build issue is fixed.

Thanks!

https://gitlab.com/qemu-project/qemu/-/jobs/4977255992

In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:72,
from /usr/i686-w64-mingw32/sys-root/mingw/include/winsock2.h:23,
from /builds/qemu-project/qemu/include/sysemu/os-win32.h:29,
from /builds/qemu-project/qemu/include/qemu/osdep.h:160,
from ../hw/ufs/lu.c:11:
/builds/qemu-project/qemu/include/block/ufs.h:456:5: error: expected
identifier before numeric constant
456 | PWR_OK = 0x0,
| ^~~~~~
[1657/3707] Compiling C object libcommon.fa.p/hw_ufs_ufs.c.obj
FAILED: libcommon.fa.p/hw_ufs_ufs.c.obj
i686-w64-mingw32-gcc -m32 -Ilibcommon.fa.p -Isubprojects/dtc/libfdt
-I../subprojects/dtc/libfdt
-I/usr/i686-w64-mingw32/sys-root/mingw/include/pixman-1
-I/usr/i686-w64-mingw32/sys-root/mingw/include/libpng16
-I/usr/i686-w64-mingw32/sys-root/mingw/include/p11-kit-1
-I/usr/i686-w64-mingw32/sys-root/mingw/include/SDL2
-I/usr/i686-w64-mingw32/sys-root/mingw/include/glib-2.0
-I/usr/i686-w64-mingw32/sys-root/mingw/lib/glib-2.0/include
-I/usr/i686-w64-mingw32/sys-root/mingw/include/gtk-3.0
-I/usr/i686-w64-mingw32/sys-root/mingw/include/pango-1.0
-I/usr/i686-w64-mingw32/sys-root/mingw/include/harfbuzz
-I/usr/i686-w64-mingw32/sys-root/mingw/include/freetype2
-I/usr/i686-w64-mingw32/sys-root/mingw/include/fribidi
-I/usr/i686-w64-mingw32/sys-root/mingw/include/cairo
-I/usr/i686-w64-mingw32/sys-root/mingw/include/gdk-pixbuf-2.0
-I/usr/i686-w64-mingw32/sys-root/mingw/include/atk-1.0
-I/usr/i686-w64-mingw32/sys-root/mingw/include/webp
-fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g
-fstack-protector-strong -Wundef -Wwrite-strings -Wmissing-prototypes
-Wstrict-prototypes -Wredundant-decls -Wold-style-declaration
-Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k
-Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs
-Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2
-Wmissing-format-attribute -Wno-missing-include-dirs
-Wno-shift-negative-value -Wno-psabi -iquote . -iquote
/builds/qemu-project/qemu -iquote /builds/qemu-project/qemu/include
-iquote /builds/qemu-project/qemu/host/include/i386 -iquote
/builds/qemu-project/qemu/host/include/generic -iquote
/builds/qemu-project/qemu/tcg/i386 -mms-bitfields -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing
-fno-common -fwrapv -fno-pie -no-pie -mms-bitfields -mms-bitfields
-mms-bitfields -Dmain=SDL_main -MD -MQ libcommon.fa.p/hw_ufs_ufs.c.obj
-MF libcommon.fa.p/hw_ufs_ufs.c.obj.d -o
libcommon.fa.p/hw_ufs_ufs.c.obj -c ../hw/ufs/ufs.c
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:72,
from /usr/i686-w64-mingw32/sys-root/mingw/include/winsock2.h:23,
from /builds/qemu-project/qemu/include/sysemu/os-win32.h:29,
from /builds/qemu-project/qemu/include/qemu/osdep.h:160,
from ../hw/ufs/ufs.c:24:
/builds/qemu-project/qemu/include/block/ufs.h:456:5: error: expected
identifier before numeric constant
456 | PWR_OK = 0x0,
| ^~~~~~
In file included from /builds/qemu-project/qemu/include/block/ufs.h:6,
from ../hw/ufs/ufs.h:16,
from ../hw/ufs/ufs.c:28:
../hw/ufs/ufs.c: In function 'ufs_process_uiccmd':
../hw/ufs/ufs.c:310:58: error: 'PWR_LOCAL' undeclared (first use in
this function)
310 | u->reg.hcs = FIELD_DP32(u->reg.hcs, HCS, UPMCRS, PWR_LOCAL);
| ^~~~~~~~~
/builds/qemu-project/qemu/include/hw/registerfields.h:104:19: note: in
definition of macro 'FIELD_DP32'
104 | } _v = { .v = val }; \
| ^~~
../hw/ufs/ufs.c:310:58: note: each undeclared identifier is reported
only once for each function it appears in
310 | u->reg.hcs = FIELD_DP32(u->reg.hcs, HCS, UPMCRS, PWR_LOCAL);
| ^~~~~~~~~
/builds/qemu-project/qemu/include/hw/registerfields.h:104:19: note: in
definition of macro 'FIELD_DP32'
104 | } _v = { .v = val }; \
| ^~~
Stefan Hajnoczi Aug. 30, 2023, 11:38 a.m. UTC | #3
On Thu, 3 Aug 2023 at 07:49, Jeuk Kim <jeuk20.kim@gmail.com> wrote:
>
> Dear Stefan,
> I'm really sorry, but could you please put this patch series
> instead of v8, which was previously merged into block-next?
> The fixes from v8 are below.
> Please let me know if you have any comments or issues.

The CI hit a test failure:
https://gitlab.com/qemu-project/qemu/-/jobs/4977256030

Please investigate how to fix this so this series can be merged. Thanks!

Stefan
Jeuk Kim Sept. 1, 2023, 12:46 a.m. UTC | #4
On 23. 8. 30. 20:38, Stefan Hajnoczi wrote:
> On Thu, 3 Aug 2023 at 07:49, Jeuk Kim <jeuk20.kim@gmail.com> wrote:
>> Dear Stefan,
>> I'm really sorry, but could you please put this patch series
>> instead of v8, which was previously merged into block-next?
>> The fixes from v8 are below.
>> Please let me know if you have any comments or issues.
> The CI hit a test failure:
> https://gitlab.com/qemu-project/qemu/-/jobs/4977256030
>
> Please investigate how to fix this so this series can be merged. Thanks!
>
> Stefan

https://gitlab.com/qemu-project/qemu/-/jobs/4977256030
https://gitlab.com/qemu-project/qemu/-/jobs/4977255992

I'll analyze and fix above issues and resend the patch.
Thanks for letting me know.

Jeuk