Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18
On Fri, May 19, 2023 at 10:29:47AM +0200, Paolo Bonzini wrote: > On 5/19/23 05:06, Yang Zhong wrote: > > > > Paolo, please help add below queued sgx fix into this PULL request, which > > was > > missed from last time, thanks a lot! > > https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg00841.html > > https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg00896.html > > Isn't this commit 72497cff896fecf74306ed33626c30e43633cdd6? > > Author: Yang Zhong > Date: Thu Apr 6 02:40:41 2023 -0400 > > target/i386: Change wrong XFRM value in SGX CPUID leaf > The previous patch wrongly replaced FEAT_XSAVE_XCR0_{LO|HI} with > FEAT_XSAVE_XSS_{LO|HI} in CPUID(EAX=12,ECX=1):{ECX,EDX}. As a result, > SGX enclaves only supported SSE and x87 feature (xfrm=0x3). > Fixes: 301e90675c3f ("target/i386: Enable support for XSAVES based > features") > Signed-off-by: Yang Zhong > Reviewed-by: Yang Weijiang > Reviewed-by: Kai Huang > Message-Id: <20230406064041.420039-1-yang.zh...@linux.intel.com> > Signed-off-by: Paolo Bonzini > Oh, So sorry for this,,, it's my fault. I missed PULL email information for this patch, Apr 21 Paolo Bonzini (1.4K) [PULL 16/25] target/i386: Change wrong XFRM value in SGX CPUID leaf Regards, Yang > Paolo > >
Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18
On 5/19/23 05:06, Yang Zhong wrote: Paolo, please help add below queued sgx fix into this PULL request, which was missed from last time, thanks a lot! https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg00841.html https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg00896.html Isn't this commit 72497cff896fecf74306ed33626c30e43633cdd6? Author: Yang Zhong Date: Thu Apr 6 02:40:41 2023 -0400 target/i386: Change wrong XFRM value in SGX CPUID leaf The previous patch wrongly replaced FEAT_XSAVE_XCR0_{LO|HI} with FEAT_XSAVE_XSS_{LO|HI} in CPUID(EAX=12,ECX=1):{ECX,EDX}. As a result, SGX enclaves only supported SSE and x87 feature (xfrm=0x3). Fixes: 301e90675c3f ("target/i386: Enable support for XSAVES based features") Signed-off-by: Yang Zhong Reviewed-by: Yang Weijiang Reviewed-by: Kai Huang Message-Id: <20230406064041.420039-1-yang.zh...@linux.intel.com> Signed-off-by: Paolo Bonzini Paolo
Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18
Paolo, please help add below queued sgx fix into this PULL request, which was missed from last time, thanks a lot! https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg00841.html https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg00896.html Regards, Yang
Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18
On 5/18/23 02:22, Peter Maydell wrote: On Wed, 17 May 2023 at 21:32, Richard Henderson wrote: Failures: https://gitlab.com/qemu-project/qemu/-/jobs/4304958508#L2551 /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(init-first.o): in function `__libc_init_first': (.text+0x10): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against symbol `__environ' defined in .bss section in /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(environ.o) /usr/bin/ld: (.text+0x10): warning: too many GOT entries for -fpic, please recompile with -fPIC This is really a bug in the host libc (more specifically, how the libc.a was compiled), isn't it? We've only previously seen it when trying to build the system emulation binaries statically, but it looks like it's finally reared its head for the usermode binaries here. IIRC it basically boils down to how big the final executable is and whether you get unlucky with what gets linked in and what order such that a reloc in libc ends up wanting to access a GOT table entry that gets assigned too high an index. Still, given the prevalence of libc that's been compiled -fpic rather than -fPIC, we probably need to deal with it somehow. Yes, this looks like the same --static-pie issue we saw before. I thought we'd been working around this in CI by testing --static --disable-pie. Given Paolo moves --static handling to meson in this patch set, I assume that's the culprit. Side note: why are we linking against -lstdc++ ??? Missed c++ purging? r~
Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18
On 5/18/23 11:22, Peter Maydell wrote: /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(init-first.o): in function `__libc_init_first': (.text+0x10): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against symbol `__environ' defined in .bss section in /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(environ.o) /usr/bin/ld: (.text+0x10): warning: too many GOT entries for -fpic, please recompile with -fPIC This is really a bug in the host libc (more specifically, how the libc.a was compiled), isn't it? Ok, it's a silly typo that caused -fno-pie to be dropped. Paolo We've only previously seen it when trying to build the system emulation binaries statically, but it looks like it's finally reared its head for the usermode binaries here. IIRC it basically boils down to how big the final executable is and whether you get unlucky with what gets linked in and what order such that a reloc in libc ends up wanting to access a GOT table entry that gets assigned too high an index. Still, given the prevalence of libc that's been compiled -fpic rather than -fPIC, we probably need to deal with it somehow.
Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18
On 5/18/23 11:22, Peter Maydell wrote: On Wed, 17 May 2023 at 21:32, Richard Henderson wrote: Failures: https://gitlab.com/qemu-project/qemu/-/jobs/4304958508#L2551 /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(init-first.o): in function `__libc_init_first': (.text+0x10): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 against symbol `__environ' defined in .bss section in /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(environ.o) /usr/bin/ld: (.text+0x10): warning: too many GOT entries for -fpic, please recompile with -fPIC This is really a bug in the host libc (more specifically, how the libc.a was compiled), isn't it? We've only previously seen it when trying to build the system emulation binaries statically, but it looks like it's finally reared its head for the usermode binaries here. IIRC it basically boils down to how big the final executable is and whether you get unlucky with what gets linked in and what order such that a reloc in libc ends up wanting to access a GOT table entry that gets assigned too high an index. The patches should introduce no code changes AFAICT, but I noticed that they added a '-no-pie' flag that was not there previously in the static compilation case. Maybe that's the source of the breakage (if so it's arguably a GCC driver bug, but compiler command lines are hard). Side note: why are we linking against -lstdc++ ??? A remnant of libvixl that was never deleted: emulator = executable(exe_name, exe['sources'], ... link_language: link_language, ...) Paolo
Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18
On Wed, 17 May 2023 at 21:32, Richard Henderson wrote: > Failures: > https://gitlab.com/qemu-project/qemu/-/jobs/4304958508#L2551 > > /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(init-first.o): > in function `__libc_init_first': > (.text+0x10): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 > against symbol > `__environ' defined in .bss section in > /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(environ.o) > /usr/bin/ld: (.text+0x10): warning: too many GOT entries for -fpic, please > recompile with > -fPIC This is really a bug in the host libc (more specifically, how the libc.a was compiled), isn't it? We've only previously seen it when trying to build the system emulation binaries statically, but it looks like it's finally reared its head for the usermode binaries here. IIRC it basically boils down to how big the final executable is and whether you get unlucky with what gets linked in and what order such that a reloc in libc ends up wanting to access a GOT table entry that gets assigned too high an index. Still, given the prevalence of libc that's been compiled -fpic rather than -fPIC, we probably need to deal with it somehow. Side note: why are we linking against -lstdc++ ??? -- PMM
Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18
Il mer 17 mag 2023, 22:31 Richard Henderson ha scritto: > https://gitlab.com/qemu-project/qemu/-/jobs/4304958487#L1887 > > Warning, treated as error: > the sphinx_rtd_theme extension does not declare if it is safe for parallel > reading, > assuming it isn't - please ask the extension author to check and make it > explicit > Hmm I think with John's infrastructure it will be easy to check for a given version of the theme but I wonder why it didn't fail for me. > https://gitlab.com/qemu-project/qemu/-/jobs/4304958508#L2551 > > /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(init-first.o): > > in function `__libc_init_first': > (.text+0x10): relocation truncated to fit: R_AARCH64_LD64_GOTPAGE_LO15 > against symbol > `__environ' defined in .bss section in > > /usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/lib/../lib/libc.a(environ.o) > /usr/bin/ld: (.text+0x10): warning: too many GOT entries for -fpic, please > recompile with > -fPIC > I will probably just split the PR in two while I figure out what happens, thanks. Paolo > > r~ > >
Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18
On 5/17/23 10:44, Paolo Bonzini wrote: The following changes since commit ab4c44d657aeca7e1da6d6dcb1741c8e7d357b8b: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-05-15 13:54:33 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to b98d6272e33a2ca8bab4c8087e8809e98400d2c5: docs/devel: update build system docs (2023-05-17 16:55:09 +0200) * kvm: enable dirty ring for arm64 * target/i386: new features * target/i386: AVX fixes * configure: create a python venv unconditionally * meson: bump to 0.63.0 and move tests from configure * meson: Pass -j option to sphinx * drop support for Python 3.6 * fix check-python-tox * fix "make clean" in the source directory Emanuele Giuseppe Esposito (2): target/i386: add support for FLUSH_L1D feature target/i386: add support for FB_CLEAR feature Fabiano Rosas (1): meson: Pass -j option to sphinx Gavin Shan (4): migration: Add last stage indicator to global dirty log kvm: Synchronize the backup bitmap in the last stage kvm: Add helper kvm_dirty_ring_init() kvm: Enable dirty ring for arm64 John Snow (23): python: update pylint configuration python: add mkvenv.py mkvenv: add better error message for broken or missing ensurepip mkvenv: add nested venv workaround mkvenv: add ensure subcommand mkvenv: add --diagnose option to explain "ensure" failures mkvenv: add console script entry point generation mkvenv: use pip's vendored distlib as a fallback mkvenv: avoid ensurepip if pip is installed mkvenv: work around broken pip installations on Debian 10 tests/docker: add python3-venv dependency tests/vm: Configure netbsd to use Python 3.10 tests/vm: add py310-expat to NetBSD python: add vendor.py utility configure: create a python venv unconditionally python/wheels: add vendored meson package configure: use 'mkvenv ensure meson' to bootstrap meson qemu.git: drop meson git submodule tests: Use configure-provided pyvenv for tests configure: move --enable-docs and --disable-docs back to configure configure: bootstrap sphinx with mkvenv configure: add --enable-pypi and --disable-pypi configure: Add courtesy hint to Python version failure message Paolo Bonzini (33): target/i386: fix operand size for VCOMI/VUCOMI instructions tests/tcg/i386: correct mask for VPERM2F128/VPERM2I128 tcg: round-robin: do not use mb_read for rr_current_cpu coverity: the definitive COMPONENTS.md update scsi-generic: fix buffer overflow on block limits inquiry python: shut up "pip install" during "make check-minreqs" Python: Drop support for Python 3.6 mkvenv: mark command as required python: bump some of the dependencies meson: regenerate meson-buildoptions.sh meson: require 0.63.0 meson: use prefer_static option meson: remove static_kwargs meson: add more version numbers to the summary meson: drop unnecessary declare_dependency() build: move glib detection and workarounds to meson configure: remove pkg-config functions configure, meson: move --enable-modules to Meson meson: prepare move of QEMU_CFLAGS to meson build: move sanitizer tests to meson build: move SafeStack tests to meson build: move coroutine backend selection to meson build: move stack protector flag selection to meson build: move warning flag selection to meson build: move remaining compiler flag tests to meson build: move compiler version check to meson build: move --disable-debug-info to meson configure: remove compiler sanity check configure: do not rerun the tests with -Werror configure: remove unnecessary mkdir configure: reorder option parsing code configure: remove unnecessary check docs/devel: update build system docs Ricky Zhou (3): target/i386: Fix and add some comments next to SSE/AVX instructions. target/i386: Fix exception classes for SSE/AVX instructions. target/i386: Fix exception classes for MOVNTPS/MOVNTPD. Steve Sistare (1): make: clean after distclean deletes source files Xinyu Li (1): target/i386: fix avx2 instructions vzeroall and vpermdq Failures: https://gitlab.com/qemu-project/qemu/-/jobs/4304958487#L1887 Warning, treated as error: the sphinx_rtd_theme extension does not declare if it is safe for parallel reading, assuming it isn't - please ask the extension author to check and make it explicit https://gitlab.com/qemu-project/qemu/-/jobs/4304958508#L2551
[PULL 00/68] i386, build system, KVM changes for 2023-05-18
The following changes since commit ab4c44d657aeca7e1da6d6dcb1741c8e7d357b8b: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-05-15 13:54:33 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to b98d6272e33a2ca8bab4c8087e8809e98400d2c5: docs/devel: update build system docs (2023-05-17 16:55:09 +0200) * kvm: enable dirty ring for arm64 * target/i386: new features * target/i386: AVX fixes * configure: create a python venv unconditionally * meson: bump to 0.63.0 and move tests from configure * meson: Pass -j option to sphinx * drop support for Python 3.6 * fix check-python-tox * fix "make clean" in the source directory Emanuele Giuseppe Esposito (2): target/i386: add support for FLUSH_L1D feature target/i386: add support for FB_CLEAR feature Fabiano Rosas (1): meson: Pass -j option to sphinx Gavin Shan (4): migration: Add last stage indicator to global dirty log kvm: Synchronize the backup bitmap in the last stage kvm: Add helper kvm_dirty_ring_init() kvm: Enable dirty ring for arm64 John Snow (23): python: update pylint configuration python: add mkvenv.py mkvenv: add better error message for broken or missing ensurepip mkvenv: add nested venv workaround mkvenv: add ensure subcommand mkvenv: add --diagnose option to explain "ensure" failures mkvenv: add console script entry point generation mkvenv: use pip's vendored distlib as a fallback mkvenv: avoid ensurepip if pip is installed mkvenv: work around broken pip installations on Debian 10 tests/docker: add python3-venv dependency tests/vm: Configure netbsd to use Python 3.10 tests/vm: add py310-expat to NetBSD python: add vendor.py utility configure: create a python venv unconditionally python/wheels: add vendored meson package configure: use 'mkvenv ensure meson' to bootstrap meson qemu.git: drop meson git submodule tests: Use configure-provided pyvenv for tests configure: move --enable-docs and --disable-docs back to configure configure: bootstrap sphinx with mkvenv configure: add --enable-pypi and --disable-pypi configure: Add courtesy hint to Python version failure message Paolo Bonzini (33): target/i386: fix operand size for VCOMI/VUCOMI instructions tests/tcg/i386: correct mask for VPERM2F128/VPERM2I128 tcg: round-robin: do not use mb_read for rr_current_cpu coverity: the definitive COMPONENTS.md update scsi-generic: fix buffer overflow on block limits inquiry python: shut up "pip install" during "make check-minreqs" Python: Drop support for Python 3.6 mkvenv: mark command as required python: bump some of the dependencies meson: regenerate meson-buildoptions.sh meson: require 0.63.0 meson: use prefer_static option meson: remove static_kwargs meson: add more version numbers to the summary meson: drop unnecessary declare_dependency() build: move glib detection and workarounds to meson configure: remove pkg-config functions configure, meson: move --enable-modules to Meson meson: prepare move of QEMU_CFLAGS to meson build: move sanitizer tests to meson build: move SafeStack tests to meson build: move coroutine backend selection to meson build: move stack protector flag selection to meson build: move warning flag selection to meson build: move remaining compiler flag tests to meson build: move compiler version check to meson build: move --disable-debug-info to meson configure: remove compiler sanity check configure: do not rerun the tests with -Werror configure: remove unnecessary mkdir configure: reorder option parsing code configure: remove unnecessary check docs/devel: update build system docs Ricky Zhou (3): target/i386: Fix and add some comments next to SSE/AVX instructions. target/i386: Fix exception classes for SSE/AVX instructions. target/i386: Fix exception classes for MOVNTPS/MOVNTPD. Steve Sistare (1): make: clean after distclean deletes source files Xinyu Li (1): target/i386: fix avx2 instructions vzeroall and vpermdq .gitlab-ci.d/buildtest-template.yml| 4 +- .gitlab-ci.d/buildtest.yml | 6 +- .gitmodules| 3 - Makefile | 6 +- accel/kvm/kvm-all.c| 108 ++- accel/tcg/tcg-accel-ops-rr.c | 11 +- configure | 980 - contrib/plugins/Makefile