Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstrea…
Browse files Browse the repository at this point in the history
…m' into staging

* configure and meson cleanups
* KVM_GET/SET_SREGS2 support for x86

# gpg: Signature made Wed 12 Jan 2022 13:09:19 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "[email protected]"
# gpg: Good signature from "Paolo Bonzini <[email protected]>" [full]
# gpg:                 aka "Paolo Bonzini <[email protected]>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* remotes/bonzini-gitlab/tags/for-upstream:
  meson: reenable filemonitor-inotify compilation
  meson: build all modules by default
  configure: do not create roms/seabios/config.mak if SeaBIOS not present
  tests/tcg: Fix target-specific Makefile variables path for user-mode
  KVM: x86: ignore interrupt_bitmap field of KVM_GET/SET_SREGS
  KVM: use KVM_{GET|SET}_SREGS2 when supported.
  meson: add comments in the target-specific flags section
  configure, meson: move config-poison.h to meson
  meson: build contrib/ executables after generated headers
  configure: move non-command-line variables away from command-line parsing section
  configure: parse --enable/--disable-strip automatically, flip default
  configure, makefile: remove traces of really old files
  configure: do not set bsd_user/linux_user early
  configure: simplify creation of plugin symbol list
  block/file-posix: Simplify the XFS_IOC_DIOINFO handling
  meson: cleanup common-user/ build
  user: move common-user includes to a subdirectory of {bsd,linux}-user/
  meson: reuse common_user_inc when building files specific to user-mode emulators

Signed-off-by: Peter Maydell <[email protected]>
  • Loading branch information
pm215 committed Jan 13, 2022
2 parents f8d75e1 + 9d30c78 commit 67b6526
Show file tree
Hide file tree
Showing 42 changed files with 276 additions and 248 deletions.
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,11 @@ recurse-clean: $(addsuffix /clean, $(ROM_DIRS))
clean: recurse-clean
-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean || :
-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) clean-ctlist || :
# avoid old build problems by removing potentially incorrect old files
rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
find . \( -name '*.so' -o -name '*.dll' -o -name '*.[oda]' \) -type f \
! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \
! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
-exec rm {} +
rm -f TAGS cscope.* *.pod *~ */*~
rm -f fsdev/*.pod scsi/*.pod
rm -f TAGS cscope.* *~ */*~

VERSION = $(shell cat $(SRC_PATH)/VERSION)

Expand All @@ -224,10 +221,10 @@ qemu-%.tar.bz2:

distclean: clean
-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean -g || :
rm -f config-host.mak config-host.h* config-poison.h
rm -f config-host.mak
rm -f tests/tcg/config-*.mak
rm -f config-all-disas.mak config.status
rm -f roms/seabios/config.mak roms/vgabios/config.mak
rm -f config.status
rm -f roms/seabios/config.mak
rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols
rm -f *-config-target.h *-config-devices.mak *-config-devices.h
rm -rf meson-private meson-logs meson-info compile_commands.json
Expand Down
37 changes: 16 additions & 21 deletions block/file-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@
#include <sys/diskslice.h>
#endif

#ifdef CONFIG_XFS
#include <xfs/xfs.h>
#endif

/* OS X does not have O_DSYNC */
#ifndef O_DSYNC
#ifdef O_SYNC
Expand Down Expand Up @@ -156,9 +152,6 @@ typedef struct BDRVRawState {
int perm_change_flags;
BDRVReopenState *reopen_state;

#ifdef CONFIG_XFS
bool is_xfs:1;
#endif
bool has_discard:1;
bool has_write_zeroes:1;
bool discard_zeroes:1;
Expand Down Expand Up @@ -409,14 +402,22 @@ static void raw_probe_alignment(BlockDriverState *bs, int fd, Error **errp)
if (probe_logical_blocksize(fd, &bs->bl.request_alignment) < 0) {
bs->bl.request_alignment = 0;
}
#ifdef CONFIG_XFS
if (s->is_xfs) {
struct dioattr da;
if (xfsctl(NULL, fd, XFS_IOC_DIOINFO, &da) >= 0) {
bs->bl.request_alignment = da.d_miniosz;
/* The kernel returns wrong information for d_mem */
/* s->buf_align = da.d_mem; */
}

#ifdef __linux__
/*
* The XFS ioctl definitions are shipped in extra packages that might
* not always be available. Since we just need the XFS_IOC_DIOINFO ioctl
* here, we simply use our own definition instead:
*/
struct xfs_dioattr {
uint32_t d_mem;
uint32_t d_miniosz;
uint32_t d_maxiosz;
} da;
if (ioctl(fd, _IOR('X', 30, struct xfs_dioattr), &da) >= 0) {
bs->bl.request_alignment = da.d_miniosz;
/* The kernel returns wrong information for d_mem */
/* s->buf_align = da.d_mem; */
}
#endif

Expand Down Expand Up @@ -798,12 +799,6 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
#endif
s->needs_alignment = raw_needs_alignment(bs);

#ifdef CONFIG_XFS
if (platform_test_xfs_fd(s->fd)) {
s->is_xfs = true;
}
#endif

bs->supported_zero_flags = BDRV_REQ_MAY_UNMAP | BDRV_REQ_NO_FALLBACK;
if (S_ISREG(st.st_mode)) {
/* When extending regular files, we get zeros from the OS */
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion bsd-user/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ endif

bsd_user_ss = ss.source_set()

common_user_inc += include_directories('.')
common_user_inc += include_directories('include')

bsd_user_ss.add(files(
'bsdload.c',
Expand Down
2 changes: 1 addition & 1 deletion common-user/meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
common_user_inc += include_directories('host/' / host_arch)

common_user_ss.add(files(
user_ss.add(files(
'safe-syscall.S',
'safe-syscall-error.c',
))
Loading

0 comments on commit 67b6526

Please sign in to comment.