[Qemu-devel] [Bug 1751422] Re: some instructions translate error in x86
Could you please provide some more information about the problem? What's exactly the error? If you've already got a patch, please have a look at https://wiki.qemu.org/Contribute/SubmitAPatch to get some information how to submit it. ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1751422 Title: some instructions translate error in x86 Status in QEMU: Incomplete Bug description: There is some instructions translation error on target i386 in many versions, such as 2.11.1, 2.10.2, 2.7.1 and so on. The error translation instructions include les, lds. I has got a patch, but I have no idea how to apply it. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1751422/+subscriptions
[Qemu-devel] [Bug 1688231] Re: [Qemu-ppc] sendkey is not working for any of the keystrokes
** Changed in: qemu Status: New => Won't Fix -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1688231 Title: [Qemu-ppc] sendkey is not working for any of the keystrokes Status in QEMU: Won't Fix Bug description: sendkey option is not working for any of the keystrokes in ppc64le, Qemu version: # qemu-img --version qemu-img version 2.9.50 (v2.9.0-303-g81b2d5c-dirty) Qemu command line: # qemu-system-ppc64 --enable-kvm --nographic -vga none -machine pseries -m 4G,slots=32,maxmem=32G -smp 16,maxcpus=32 -device virtio-blk-pci,drive=rootdisk -drive file=/var/lib/libvirt/images/f25-upstream-ppc64le.qcow2,if=none,cache=none,format=qcow2,id=rootdisk -monitor telnet:127.0.0.1:1234,server,nowait -net nic,model=virtio -net user -redir tcp:2000::22 Guest booted successfully and logged in Fedora 25 (Twenty Five) Kernel 4.11.0-rc4 on an ppc64le (hvc0) atest-guest login: updatedb (5582) used greatest stack depth: 9568 bytes left root Password: Last login: Mon Mar 27 01:57:51 on hvc0 [root@atest-guest ~]# Qemu monitor: # telnet 127.0.0.1 1234 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. QEMU 2.9.50 monitor - type 'help' for more information (qemu) sendkey a (qemu) sendkey ret But from the console, I couldn't observe the keystroke a or return. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1688231/+subscriptions
Re: [Qemu-devel] Windows vioinput guest driver tablet input bug
The last email's diff got mangled due to long lines. The original source has long lines still but it shouldnt get cut off his time. Justin, diff --git a/vioinput/sys/HidMouse.c b/vioinput/sys/HidMouse.c index 69dac235..528bd3d6 100644 --- a/vioinput/sys/HidMouse.c +++ b/vioinput/sys/HidMouse.c @@ -325,7 +325,12 @@ HIDMouseProbe( DynamicArrayReserve(&AxisMap, AXIS_MAP_INITIAL_LENGTH * 2 * sizeof(ULONG)); // Windows won't drive a mouse without at least the X and Y relative axes -if (InputCfgDataHasBit(pRelAxes, REL_X) && InputCfgDataHasBit(pRelAxes, REL_Y)) +if (InputCfgDataHasBit(pRelAxes, REL_X) && InputCfgDataHasBit(pRelAxes, REL_Y) +#ifdef EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE +|| (pMouseDesc->uNumOfButtons > 0 && InputCfgDataHasBit(pAbsAxes, ABS_X) +&& InputCfgDataHasBit(pAbsAxes, ABS_Y)) +#endif // EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE +) { for (i = 0; i < pRelAxes->size; i++) { @@ -391,7 +396,8 @@ HIDMouseProbe( } #ifdef EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE -if (uNumOfRelAxes == 0 && +if ((!InputCfgDataHasBit(pRelAxes, REL_X) || + !InputCfgDataHasBit(pRelAxes, REL_Y)) && pMouseDesc->uNumOfButtons > 0 && InputCfgDataHasBit(pAbsAxes, ABS_X) && InputCfgDataHasBit(pAbsAxes, ABS_Y)) { On Sun, Feb 25, 2018 at 05:21:29AM -0500, Justin Gatzen wrote: > Hi, > > The vioinput Windows guest driver does not seem to work with mouse wheel or > side buttons for virtio-tablet-pci devices, while virtio-mouse-pci works as > expected. Linux guest drivers are unaffected. Tablets are being categorized as > mice due to the EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE compile flag. But when > there are no relative REL_X or REL_Y input axes the driver ignores all other > relative axis entries. Mouse wheel is one such relative axis. I've attached a > proof of concept fix for the guest driver that seems to fix both the mouse > wheel and side buttons but I believe this needs a more robust fix and deeper > look at the HIDMouseProbe function. > > Thanks, > Justin > > > diff --git a/vioinput/sys/HidMouse.c b/vioinput/sys/HidMouse.c > index 69dac235..ea188991 100644 > --- a/vioinput/sys/HidMouse.c > +++ b/vioinput/sys/HidMouse.c > @@ -325,7 +325,11 @@ HIDMouseProbe( > DynamicArrayReserve(&AxisMap, AXIS_MAP_INITIAL_LENGTH * 2 * > sizeof(ULONG)); > > // Windows won't drive a mouse without at least the X and Y relative axes > -if (InputCfgDataHasBit(pRelAxes, REL_X) && > InputCfgDataHasBit(pRelAxes, REL_Y)) > +if (InputCfgDataHasBit(pRelAxes, REL_X) && > InputCfgDataHasBit(pRelAxes, REL_Y) > +#ifdef EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE > +|| (pMouseDesc->uNumOfButtons > 0 && > InputCfgDataHasBit(pAbsAxes, ABS_X) && InputCfgDataHasBit(pAbsAxes, > ABS_Y)) > +#endif // EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE > +) > { > for (i = 0; i < pRelAxes->size; i++) > { > @@ -391,7 +395,7 @@ HIDMouseProbe( > } > > #ifdef EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE > -if (uNumOfRelAxes == 0 && > +if ((!InputCfgDataHasBit(pRelAxes, REL_X) || > !InputCfgDataHasBit(pRelAxes, REL_Y)) && > pMouseDesc->uNumOfButtons > 0 && > InputCfgDataHasBit(pAbsAxes, ABS_X) && > InputCfgDataHasBit(pAbsAxes, ABS_Y)) > {
[Qemu-devel] Windows vioinput guest driver tablet input bug
Hi, The vioinput Windows guest driver does not seem to work with mouse wheel or side buttons for virtio-tablet-pci devices, while virtio-mouse-pci works as expected. Linux guest drivers are unaffected. Tablets are being categorized as mice due to the EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE compile flag. But when there are no relative REL_X or REL_Y input axes the driver ignores all other relative axis entries. Mouse wheel is one such relative axis. I've attached a proof of concept fix for the guest driver that seems to fix both the mouse wheel and side buttons but I believe this needs a more robust fix and deeper look at the HIDMouseProbe function. Thanks, Justin diff --git a/vioinput/sys/HidMouse.c b/vioinput/sys/HidMouse.c index 69dac235..ea188991 100644 --- a/vioinput/sys/HidMouse.c +++ b/vioinput/sys/HidMouse.c @@ -325,7 +325,11 @@ HIDMouseProbe( DynamicArrayReserve(&AxisMap, AXIS_MAP_INITIAL_LENGTH * 2 * sizeof(ULONG)); // Windows won't drive a mouse without at least the X and Y relative axes -if (InputCfgDataHasBit(pRelAxes, REL_X) && InputCfgDataHasBit(pRelAxes, REL_Y)) +if (InputCfgDataHasBit(pRelAxes, REL_X) && InputCfgDataHasBit(pRelAxes, REL_Y) +#ifdef EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE +|| (pMouseDesc->uNumOfButtons > 0 && InputCfgDataHasBit(pAbsAxes, ABS_X) && InputCfgDataHasBit(pAbsAxes, ABS_Y)) +#endif // EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE +) { for (i = 0; i < pRelAxes->size; i++) { @@ -391,7 +395,7 @@ HIDMouseProbe( } #ifdef EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE -if (uNumOfRelAxes == 0 && +if ((!InputCfgDataHasBit(pRelAxes, REL_X) || !InputCfgDataHasBit(pRelAxes, REL_Y)) && pMouseDesc->uNumOfButtons > 0 && InputCfgDataHasBit(pAbsAxes, ABS_X) && InputCfgDataHasBit(pAbsAxes, ABS_Y)) {
Re: [Qemu-devel] [PATCH v3] linux-user: Support f_flags in statfs when available.
Le 23/02/2018 à 05:57, Shea Levy a écrit : > Signed-off-by: Shea Levy > --- > configure | 21 +++ > linux-user/syscall.c | 3 +++ > linux-user/syscall_defs.h | 53 > +++ > 3 files changed, 77 insertions(+) > > diff --git a/configure b/configure > index 913e14839d..91082aa1dc 100755 > --- a/configure > +++ b/configure > @@ -5303,6 +5303,23 @@ if compile_prog "" "" ; then > have_utmpx=yes > fi > > +## > +# Check for newer fields of struct statfs on Linux > + > +if test "$linux_user" = "yes"; then > + cat > $TMPC < +#include > + > +int main(void) { > + struct statfs fs; > + fs.f_flags = 0; > + return fs.f_flags; > +} > +EOF > + if compile_object ; then > + have_statfs_flags=yes > + fi > +fi I don't think you need this. statfs is provided by glibc and glibc as a flag to tell code we have this member: _STATFS_F_FLAGS (see glibc commit: 3cdaa6adb1 f_flags in Linux statfs implementation. (Wed Aug 11 14:07:28 2010 -0700) since glibc 2.13) > ## > # checks for sanitizers > > @@ -6518,6 +6535,10 @@ if test "$have_utmpx" = "yes" ; then >echo "HAVE_UTMPX=y" >> $config_host_mak > fi > > +if test "$have_statfs_flags" = "yes" ; then > + echo "HAVE_STATFS_FLAGS=y" >> $config_host_mak > +fi > + > if test "$ivshmem" = "yes" ; then >echo "CONFIG_IVSHMEM=y" >> $config_host_mak > fi > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 82b35a6bdf..77481eca2c 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -9534,6 +9534,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long > arg1, > __put_user(stfs.f_fsid.__val[1], &target_stfs->f_fsid.val[1]); > __put_user(stfs.f_namelen, &target_stfs->f_namelen); > __put_user(stfs.f_frsize, &target_stfs->f_frsize); > +#ifdef HAVE_STATFS_FLAGS #ifdef _STATFS_F_FLAGS > +__put_user(stfs.f_flags, &target_stfs->f_flags); I think you should define f_flags in target_statfs unconditionally (see below), so you should clear target_stfs->f_flags if host kernel doesn't support it: glibc will check for "ST_VALID" flag to see if this field is implemented by the kernel, and we must be sure in this case it is not set. > +#endif > memset(target_stfs->f_spare, 0, sizeof(target_stfs->f_spare)); > unlock_user_struct(target_stfs, arg2, 1); > } > diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h > index a35c52a60a..64aa49d3c5 100644 > --- a/linux-user/syscall_defs.h > +++ b/linux-user/syscall_defs.h > @@ -362,7 +362,14 @@ struct kernel_statfs { > int f_ffree; > kernel_fsid_t f_fsid; > int f_namelen; > +#ifdef HAVE_STATFS_FLAGS > + int f_frsize; > + int f_flags; > + int f_spare[4]; > +#else > int f_spare[6]; > +#endif > + > }; I think the kernel_statfs structure can be removed totally, as it is not used anymore since: 56c8f68f1d statfs fix (Mon Nov 28 22:28:41 2005) > > struct target_dirent { > @@ -2223,7 +2230,12 @@ struct target_statfs { I think you can update unconditionally all target_statfs to be in sync with current kernel structures, that have been updated by: commit 365b18189789bfa1acd9939e6312b8a4b4577b28 Author: Christoph Hellwig Date: Wed Jul 7 18:53:25 2010 +0200 add f_flags to struct statfs(64) Add a flags field to help glibc implementing statvfs(3) efficiently. We copy the flag values from glibc, and add a new ST_VALID flag to denote that f_flags is implemented. Thanks, Laurent
Re: [Qemu-devel] Windows vioinput guest driver tablet input bug
Hello Justin, Thanks a lot for the patch proposal. I opened the issue on virtio-win GitHub page to track the issue: https://github.com/virtio-win/kvm-guest-drivers-windows/issues/249 Best regards, Yan. > On 25 Feb 2018, at 13:41, Justin Gatzen wrote: > > The last email's diff got mangled due to long lines. The original > source has long lines still but it shouldnt get cut off his time. > > Justin, > > > diff --git a/vioinput/sys/HidMouse.c b/vioinput/sys/HidMouse.c > index 69dac235..528bd3d6 100644 > --- a/vioinput/sys/HidMouse.c > +++ b/vioinput/sys/HidMouse.c > @@ -325,7 +325,12 @@ HIDMouseProbe( > DynamicArrayReserve(&AxisMap, AXIS_MAP_INITIAL_LENGTH * 2 * > sizeof(ULONG)); > > // Windows won't drive a mouse without at least the X and Y relative axes > -if (InputCfgDataHasBit(pRelAxes, REL_X) && InputCfgDataHasBit(pRelAxes, > REL_Y)) > +if (InputCfgDataHasBit(pRelAxes, REL_X) && InputCfgDataHasBit(pRelAxes, > REL_Y) > +#ifdef EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE > +|| (pMouseDesc->uNumOfButtons > 0 && InputCfgDataHasBit(pAbsAxes, > ABS_X) > +&& InputCfgDataHasBit(pAbsAxes, ABS_Y)) > +#endif // EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE > +) > { > for (i = 0; i < pRelAxes->size; i++) > { > @@ -391,7 +396,8 @@ HIDMouseProbe( > } > > #ifdef EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE > -if (uNumOfRelAxes == 0 && > +if ((!InputCfgDataHasBit(pRelAxes, REL_X) || > + !InputCfgDataHasBit(pRelAxes, REL_Y)) && > pMouseDesc->uNumOfButtons > 0 && > InputCfgDataHasBit(pAbsAxes, ABS_X) && InputCfgDataHasBit(pAbsAxes, > ABS_Y)) > { > > > On Sun, Feb 25, 2018 at 05:21:29AM -0500, Justin Gatzen wrote: >> Hi, >> >> The vioinput Windows guest driver does not seem to work with mouse wheel or >> side buttons for virtio-tablet-pci devices, while virtio-mouse-pci works as >> expected. Linux guest drivers are unaffected. Tablets are being categorized >> as >> mice due to the EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE compile flag. But when >> there are no relative REL_X or REL_Y input axes the driver ignores all other >> relative axis entries. Mouse wheel is one such relative axis. I've attached a >> proof of concept fix for the guest driver that seems to fix both the mouse >> wheel and side buttons but I believe this needs a more robust fix and deeper >> look at the HIDMouseProbe function. >> >> Thanks, >> Justin >> >> >> diff --git a/vioinput/sys/HidMouse.c b/vioinput/sys/HidMouse.c >> index 69dac235..ea188991 100644 >> --- a/vioinput/sys/HidMouse.c >> +++ b/vioinput/sys/HidMouse.c >> @@ -325,7 +325,11 @@ HIDMouseProbe( >> DynamicArrayReserve(&AxisMap, AXIS_MAP_INITIAL_LENGTH * 2 * >> sizeof(ULONG)); >> >> // Windows won't drive a mouse without at least the X and Y relative axes >> -if (InputCfgDataHasBit(pRelAxes, REL_X) && >> InputCfgDataHasBit(pRelAxes, REL_Y)) >> +if (InputCfgDataHasBit(pRelAxes, REL_X) && >> InputCfgDataHasBit(pRelAxes, REL_Y) >> +#ifdef EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE >> +|| (pMouseDesc->uNumOfButtons > 0 && >> InputCfgDataHasBit(pAbsAxes, ABS_X) && InputCfgDataHasBit(pAbsAxes, >> ABS_Y)) >> +#endif // EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE >> +) >> { >> for (i = 0; i < pRelAxes->size; i++) >> { >> @@ -391,7 +395,7 @@ HIDMouseProbe( >> } >> >> #ifdef EXPOSE_ABS_AXES_WITH_BUTTONS_AS_MOUSE >> -if (uNumOfRelAxes == 0 && >> +if ((!InputCfgDataHasBit(pRelAxes, REL_X) || >> !InputCfgDataHasBit(pRelAxes, REL_Y)) && >> pMouseDesc->uNumOfButtons > 0 && >> InputCfgDataHasBit(pAbsAxes, ABS_X) && >> InputCfgDataHasBit(pAbsAxes, ABS_Y)) >> { >
[Qemu-devel] [PULL 0/4] Linux user for 2.12 patches
The following changes since commit 0a773d55ac76c5aa89ed9187a3bc5af8c5c2a6d0: maintainers: Add myself as a OpenBSD maintainer (2018-02-23 12:05:07 +) are available in the Git repository at: git://github.com/vivier/qemu.git tags/linux-user-for-2.12-pull-request for you to fetch changes up to 45506bddba6fe73f61cf15fb68273ce156c0: linux-user: MIPS set cpu to r6 CPU if binary is R6 (2018-02-25 17:29:45 +0100) This pull request includes new version of patches of the previous one that were breaking some linux-user targets. Laurent Vivier (2): linux-user: Move CPU type name selection to a function linux-user, m68k: select CPU according to ELF header values YunQiang Su (2): linux-user: introduce functions to detect CPU type linux-user: MIPS set cpu to r6 CPU if binary is R6 include/elf.h | 35 ++ linux-user/aarch64/target_elf.h| 14 + linux-user/alpha/target_elf.h | 14 + linux-user/arm/target_elf.h| 14 + linux-user/cris/target_elf.h | 14 + linux-user/elfload.c | 35 ++ linux-user/hppa/target_elf.h | 14 + linux-user/i386/target_elf.h | 14 + linux-user/m68k/target_elf.h | 20 + linux-user/main.c | 59 +++--- linux-user/microblaze/target_elf.h | 14 + linux-user/mips/target_elf.h | 17 +++ linux-user/mips64/target_elf.h | 17 +++ linux-user/nios2/target_elf.h | 14 + linux-user/openrisc/target_elf.h | 14 + linux-user/ppc/target_elf.h| 18 linux-user/qemu.h | 1 + linux-user/s390x/target_elf.h | 14 + linux-user/sh4/target_elf.h| 14 + linux-user/sparc/target_elf.h | 18 linux-user/sparc64/target_elf.h| 14 + linux-user/tilegx/target_elf.h | 14 + linux-user/unicore32/target_elf.h | 14 + linux-user/x86_64/target_elf.h | 14 + 24 files changed, 382 insertions(+), 48 deletions(-) create mode 100644 linux-user/aarch64/target_elf.h create mode 100644 linux-user/alpha/target_elf.h create mode 100644 linux-user/arm/target_elf.h create mode 100644 linux-user/cris/target_elf.h create mode 100644 linux-user/hppa/target_elf.h create mode 100644 linux-user/i386/target_elf.h create mode 100644 linux-user/m68k/target_elf.h create mode 100644 linux-user/microblaze/target_elf.h create mode 100644 linux-user/mips/target_elf.h create mode 100644 linux-user/mips64/target_elf.h create mode 100644 linux-user/nios2/target_elf.h create mode 100644 linux-user/openrisc/target_elf.h create mode 100644 linux-user/ppc/target_elf.h create mode 100644 linux-user/s390x/target_elf.h create mode 100644 linux-user/sh4/target_elf.h create mode 100644 linux-user/sparc/target_elf.h create mode 100644 linux-user/sparc64/target_elf.h create mode 100644 linux-user/tilegx/target_elf.h create mode 100644 linux-user/unicore32/target_elf.h create mode 100644 linux-user/x86_64/target_elf.h -- 2.14.3
[Qemu-devel] [PULL 4/4] linux-user: MIPS set cpu to r6 CPU if binary is R6
From: YunQiang Su So here we need to detect the version of binaries and set cpu_model for it. Signed-off-by: YunQiang Su [lv: original patch modified to move code into cpu_get_model()] Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20180220173307.25125-5-laur...@vivier.eu> --- include/elf.h | 7 +++ linux-user/mips/target_elf.h | 3 +++ linux-user/mips64/target_elf.h | 3 +++ 3 files changed, 13 insertions(+) diff --git a/include/elf.h b/include/elf.h index ca9a419043..943ee21171 100644 --- a/include/elf.h +++ b/include/elf.h @@ -33,6 +33,9 @@ typedef int64_t Elf64_Sxword; /* Flags in the e_flags field of the header */ /* MIPS architecture level. */ +#define EF_MIPS_ARCH0xf000 + +/* Legal values for MIPS architecture level. */ #define EF_MIPS_ARCH_1 0x /* -mips1 code. */ #define EF_MIPS_ARCH_2 0x1000 /* -mips2 code. */ #define EF_MIPS_ARCH_3 0x2000 /* -mips3 code. */ @@ -40,6 +43,10 @@ typedef int64_t Elf64_Sxword; #define EF_MIPS_ARCH_5 0x4000 /* -mips5 code. */ #define EF_MIPS_ARCH_320x5000 /* MIPS32 code. */ #define EF_MIPS_ARCH_640x6000 /* MIPS64 code. */ +#define EF_MIPS_ARCH_32R2 0x7000 /* MIPS32r2 code. */ +#define EF_MIPS_ARCH_64R2 0x8000 /* MIPS64r2 code. */ +#define EF_MIPS_ARCH_32R6 0x9000 /* MIPS32r6 code. */ +#define EF_MIPS_ARCH_64R6 0xa000 /* MIPS64r6 code. */ /* The ABI of a file. */ #define EF_MIPS_ABI_O320x1000 /* O32 ABI. */ diff --git a/linux-user/mips/target_elf.h b/linux-user/mips/target_elf.h index bed0b43259..fa5d30bf99 100644 --- a/linux-user/mips/target_elf.h +++ b/linux-user/mips/target_elf.h @@ -9,6 +9,9 @@ #define MIPS_TARGET_ELF_H static inline const char *cpu_get_model(uint32_t eflags) { +if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_32R6) { +return "mips32r6-generic"; +} return "24Kf"; } #endif diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h index 5b6f4692e0..ec55d8542a 100644 --- a/linux-user/mips64/target_elf.h +++ b/linux-user/mips64/target_elf.h @@ -9,6 +9,9 @@ #define MIPS64_TARGET_ELF_H static inline const char *cpu_get_model(uint32_t eflags) { +if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) { +return "I6400"; +} return "5KEf"; } #endif -- 2.14.3
[Qemu-devel] [PULL 3/4] linux-user, m68k: select CPU according to ELF header values
M680x0 doesn't support the same set of instructions as ColdFire, so we can't use "any" CPU type to execute m68020 instructions. We select CPU type ("m68040" or "any" for ColdFire) according to the ELF header. If we can't, we use by default the value used until now: "any". Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20180220173307.25125-4-laur...@vivier.eu> --- include/elf.h| 28 linux-user/m68k/target_elf.h | 6 ++ 2 files changed, 34 insertions(+) diff --git a/include/elf.h b/include/elf.h index e8a515ce3d..ca9a419043 100644 --- a/include/elf.h +++ b/include/elf.h @@ -537,6 +537,34 @@ typedef struct { #define HWCAP_S390_HIGH_GPRS512 #define HWCAP_S390_TE 1024 +/* M68K specific definitions. */ +/* We use the top 24 bits to encode information about the + architecture variant. */ +#define EF_M68K_CPU320x0081 +#define EF_M68K_M68000 0x0100 +#define EF_M68K_CFV4E0x8000 +#define EF_M68K_FIDO 0x0200 +#define EF_M68K_ARCH_MASK \ + (EF_M68K_M68000 | EF_M68K_CPU32 | EF_M68K_CFV4E | EF_M68K_FIDO) + +/* We use the bottom 8 bits to encode information about the + coldfire variant. If we use any of these bits, the top 24 bits are + either 0 or EF_M68K_CFV4E. */ +#define EF_M68K_CF_ISA_MASK 0x0F /* Which ISA */ +#define EF_M68K_CF_ISA_A_NODIV 0x01 /* ISA A except for div */ +#define EF_M68K_CF_ISA_A0x02 +#define EF_M68K_CF_ISA_A_PLUS 0x03 +#define EF_M68K_CF_ISA_B_NOUSP 0x04 /* ISA_B except for USP */ +#define EF_M68K_CF_ISA_B0x05 +#define EF_M68K_CF_ISA_C0x06 +#define EF_M68K_CF_ISA_C_NODIV 0x07 /* ISA C except for div */ +#define EF_M68K_CF_MAC_MASK 0x30 +#define EF_M68K_CF_MAC 0x10 /* MAC */ +#define EF_M68K_CF_EMAC 0x20 /* EMAC */ +#define EF_M68K_CF_EMAC_B 0x30 /* EMAC_B */ +#define EF_M68K_CF_FLOAT0x40 /* Has float insns */ +#define EF_M68K_CF_MASK 0xFF + /* * 68k ELF relocation types */ diff --git a/linux-user/m68k/target_elf.h b/linux-user/m68k/target_elf.h index df375ad5d3..998fe0fe2f 100644 --- a/linux-user/m68k/target_elf.h +++ b/linux-user/m68k/target_elf.h @@ -9,6 +9,12 @@ #define M68K_TARGET_ELF_H static inline const char *cpu_get_model(uint32_t eflags) { +if (eflags == 0 || (eflags & EF_M68K_M68000)) { +/* 680x0 */ +return "m68040"; +} + +/* Coldfire */ return "any"; } #endif -- 2.14.3
[Qemu-devel] [PULL 2/4] linux-user: introduce functions to detect CPU type
From: YunQiang Su Add a function to return ELF e_flags and use it to select the CPU model. Signed-off-by: YunQiang Su [lv: split the patch and some cleanup in get_elf_eflags()] Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20180220173307.25125-3-laur...@vivier.eu> --- linux-user/elfload.c | 35 +++ linux-user/main.c| 20 ++-- linux-user/qemu.h| 1 + 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 8bb9a2c3e8..0208022445 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -2396,6 +2396,41 @@ give_up: g_free(syms); } +uint32_t get_elf_eflags(int fd) +{ +struct elfhdr ehdr; +off_t offset; +int ret; + +/* Read ELF header */ +offset = lseek(fd, 0, SEEK_SET); +if (offset == (off_t) -1) { +return 0; +} +ret = read(fd, &ehdr, sizeof(ehdr)); +if (ret < sizeof(ehdr)) { +return 0; +} +offset = lseek(fd, offset, SEEK_SET); +if (offset == (off_t) -1) { +return 0; +} + +/* Check ELF signature */ +if (!elf_check_ident(&ehdr)) { +return 0; +} + +/* check header */ +bswap_ehdr(&ehdr); +if (!elf_check_ehdr(&ehdr)) { +return 0; +} + +/* return architecture id */ +return ehdr.e_flags; +} + int load_elf_binary(struct linux_binprm *bprm, struct image_info *info) { struct image_info interp_info; diff --git a/linux-user/main.c b/linux-user/main.c index 079b98235b..bbeb78fb89 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4344,8 +4344,17 @@ int main(int argc, char **argv, char **envp) init_qemu_uname_release(); +execfd = qemu_getauxval(AT_EXECFD); +if (execfd == 0) { +execfd = open(filename, O_RDONLY); +if (execfd < 0) { +printf("Error while loading %s: %s\n", filename, strerror(errno)); +_exit(EXIT_FAILURE); +} +} + if (cpu_model == NULL) { -cpu_model = cpu_get_model(0); +cpu_model = cpu_get_model(get_elf_eflags(execfd)); } tcg_exec_init(0); /* NOTE: we need to init the CPU at this stage to get @@ -4438,15 +4447,6 @@ int main(int argc, char **argv, char **envp) cpu->opaque = ts; task_settid(ts); -execfd = qemu_getauxval(AT_EXECFD); -if (execfd == 0) { -execfd = open(filename, O_RDONLY); -if (execfd < 0) { -printf("Error while loading %s: %s\n", filename, strerror(errno)); -_exit(EXIT_FAILURE); -} -} - ret = loader_exec(execfd, filename, target_argv, target_environ, regs, info, &bprm); if (ret != 0) { diff --git a/linux-user/qemu.h b/linux-user/qemu.h index bc4bf35036..f4b4ca72ad 100644 --- a/linux-user/qemu.h +++ b/linux-user/qemu.h @@ -186,6 +186,7 @@ int loader_exec(int fdexec, const char *filename, char **argv, char **envp, struct target_pt_regs * regs, struct image_info *infop, struct linux_binprm *); +uint32_t get_elf_eflags(int fd); int load_elf_binary(struct linux_binprm *bprm, struct image_info *info); int load_flt_binary(struct linux_binprm *bprm, struct image_info *info); -- 2.14.3
[Qemu-devel] [PULL 1/4] linux-user: Move CPU type name selection to a function
Instead of a sequence of "#if ... #endif" move the selection to a function in linux-user/*/target_elf.h We can't add them in linux-user/*/target_cpu.h because we will need to include "elf.h" to use ELF flags with eflags, and including "elf.h" in "target_cpu.h" introduces some conflicts in elfload.c Suggested-by: Richard Henderson Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20180220173307.25125-2-laur...@vivier.eu> --- linux-user/aarch64/target_elf.h| 14 + linux-user/alpha/target_elf.h | 14 + linux-user/arm/target_elf.h| 14 + linux-user/cris/target_elf.h | 14 + linux-user/hppa/target_elf.h | 14 + linux-user/i386/target_elf.h | 14 + linux-user/m68k/target_elf.h | 14 + linux-user/main.c | 41 ++ linux-user/microblaze/target_elf.h | 14 + linux-user/mips/target_elf.h | 14 + linux-user/mips64/target_elf.h | 14 + linux-user/nios2/target_elf.h | 14 + linux-user/openrisc/target_elf.h | 14 + linux-user/ppc/target_elf.h| 18 + linux-user/s390x/target_elf.h | 14 + linux-user/sh4/target_elf.h| 14 + linux-user/sparc/target_elf.h | 18 + linux-user/sparc64/target_elf.h| 14 + linux-user/tilegx/target_elf.h | 14 + linux-user/unicore32/target_elf.h | 14 + linux-user/x86_64/target_elf.h | 14 + 21 files changed, 290 insertions(+), 39 deletions(-) create mode 100644 linux-user/aarch64/target_elf.h create mode 100644 linux-user/alpha/target_elf.h create mode 100644 linux-user/arm/target_elf.h create mode 100644 linux-user/cris/target_elf.h create mode 100644 linux-user/hppa/target_elf.h create mode 100644 linux-user/i386/target_elf.h create mode 100644 linux-user/m68k/target_elf.h create mode 100644 linux-user/microblaze/target_elf.h create mode 100644 linux-user/mips/target_elf.h create mode 100644 linux-user/mips64/target_elf.h create mode 100644 linux-user/nios2/target_elf.h create mode 100644 linux-user/openrisc/target_elf.h create mode 100644 linux-user/ppc/target_elf.h create mode 100644 linux-user/s390x/target_elf.h create mode 100644 linux-user/sh4/target_elf.h create mode 100644 linux-user/sparc/target_elf.h create mode 100644 linux-user/sparc64/target_elf.h create mode 100644 linux-user/tilegx/target_elf.h create mode 100644 linux-user/unicore32/target_elf.h create mode 100644 linux-user/x86_64/target_elf.h diff --git a/linux-user/aarch64/target_elf.h b/linux-user/aarch64/target_elf.h new file mode 100644 index 00..a7eb962fba --- /dev/null +++ b/linux-user/aarch64/target_elf.h @@ -0,0 +1,14 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef AARCH64_TARGET_ELF_H +#define AARCH64_TARGET_ELF_H +static inline const char *cpu_get_model(uint32_t eflags) +{ +return "any"; +} +#endif diff --git a/linux-user/alpha/target_elf.h b/linux-user/alpha/target_elf.h new file mode 100644 index 00..344e9f4d39 --- /dev/null +++ b/linux-user/alpha/target_elf.h @@ -0,0 +1,14 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef ALPHA_TARGET_ELF_H +#define ALPHA_TARGET_ELF_H +static inline const char *cpu_get_model(uint32_t eflags) +{ +return "any"; +} +#endif diff --git a/linux-user/arm/target_elf.h b/linux-user/arm/target_elf.h new file mode 100644 index 00..58ff6a0986 --- /dev/null +++ b/linux-user/arm/target_elf.h @@ -0,0 +1,14 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef ARM_TARGET_ELF_H +#define ARM_TARGET_ELF_H +static inline const char *cpu_get_model(uint32_t eflags) +{ +return "any"; +} +#endif diff --git a/linux-user/cris/target_elf.h b/linux-user/cris/target_elf.h new file mode 100644 index 00..99eb4ec704 --- /dev/null +++ b/linux-user/cris/target_elf.h @@ -0,0 +1,14 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the F
Re: [Qemu-devel] [PATCH v4 RFC 0/3] util/uri.c: Coding style format
On 25.02.2018 05:57, no-re...@patchew.org wrote: > Hi, > > This series failed build test on s390x host. Please find the details below. [...] > GEN trace/generated-helpers.c > CC mipsel-softmmu/trace/control-target.o > CC ppc-softmmu/memory_mapping.o > CC ppc-softmmu/dump.o > CC ppc-softmmu/migration/ram.o > CC ppc-softmmu/accel/accel.o > CC ppc-softmmu/accel/stubs/hax-stub.o > CC ppc-softmmu/accel/stubs/hvf-stub.o > CC ppc-softmmu/accel/stubs/whpx-stub.o > CC ppc-softmmu/accel/stubs/kvm-stub.o > CC ppc-softmmu/accel/tcg/tcg-all.o > CC ppc-softmmu/accel/tcg/cputlb.o > CC ppc-softmmu/accel/tcg/tcg-runtime.o > CC mipsel-softmmu/trace/generated-helpers.o > CC ppc-softmmu/accel/tcg/tcg-runtime-gvec.o > LINKmipsel-softmmu/qemu-system-mipsel > CC ppc-softmmu/accel/tcg/cpu-exec.o > CC ppc-softmmu/accel/tcg/cpu-exec-common.o > collect2: error: ld returned 1 exit status > make[1]: *** [Makefile:193: qemu-system-mipsel] Error 1 > make: *** [Makefile:404: subdir-mipsel-softmmu] Error 2 > CC ppc-softmmu/accel/tcg/translate-all.o > CC sh4-softmmu/target/sh4/gdbstub.o > CC ppc-softmmu/accel/tcg/translator.o > CC ppc-softmmu/hw/9pfs/virtio-9p-device.o > CC ppc-softmmu/hw/block/virtio-blk.o > CC ppc-softmmu/hw/block/vhost-user-blk.o > CC ppc-softmmu/hw/block/dataplane/virtio-blk.o > CC ppc-softmmu/hw/char/virtio-serial-bus.o > CC ppc-softmmu/hw/core/generic-loader.o > CC ppc-softmmu/hw/core/null-machine.o > CC ppc-softmmu/hw/display/sm501.o > CC ppc-softmmu/hw/display/vga.o > CC ppc-softmmu/hw/display/virtio-gpu.o > CC ppc-softmmu/hw/display/virtio-gpu-3d.o > CC ppc-softmmu/hw/display/virtio-gpu-pci.o > GEN trace/generated-helpers.c > CC ppc-softmmu/hw/i2c/ppc4xx_i2c.o > CC sh4-softmmu/trace/control-target.o > CC ppc-softmmu/hw/misc/ivshmem.o > CC ppc-softmmu/hw/misc/mmio_interface.o > CC sh4-softmmu/trace/generated-helpers.o > CC ppc-softmmu/hw/net/xilinx_ethlite.o > CC ppc-softmmu/hw/net/virtio-net.o > CC ppc-softmmu/hw/net/vhost_net.o > LINKsh4-softmmu/qemu-system-sh4 > CC ppc-softmmu/hw/net/fsl_etsec/etsec.o > CC ppc-softmmu/hw/net/fsl_etsec/registers.o > CC ppc-softmmu/hw/net/fsl_etsec/rings.o > CC ppc-softmmu/hw/net/fsl_etsec/miim.o > CC ppc-softmmu/hw/scsi/virtio-scsi.o > CC ppc-softmmu/hw/scsi/virtio-scsi-dataplane.o > CC ppc-softmmu/hw/scsi/vhost-scsi-common.o > collect2: error: ld returned 1 exit status > make[1]: *** [Makefile:193: qemu-system-sh4] Error 1 > make: *** [Makefile:404: subdir-sh4-softmmu] Error 2 > CC ppc-softmmu/hw/scsi/vhost-scsi.o > CC ppc-softmmu/hw/scsi/vhost-user-scsi.o > CC ppc-softmmu/hw/timer/mc146818rtc.o > CC ppc-softmmu/hw/vfio/common.o > CC ppc-softmmu/hw/vfio/pci.o > CC ppc-softmmu/hw/vfio/pci-quirks.o > CC ppc-softmmu/hw/vfio/platform.o > CC ppc-softmmu/hw/vfio/spapr.o > CC ppc-softmmu/hw/virtio/virtio.o > CC ppc-softmmu/hw/virtio/virtio-balloon.o > CC ppc-softmmu/hw/virtio/vhost.o > CC ppc-softmmu/hw/virtio/vhost-backend.o > CC ppc-softmmu/hw/virtio/vhost-user.o > CC ppc-softmmu/hw/virtio/vhost-vsock.o > CC ppc-softmmu/hw/virtio/virtio-crypto.o > CC ppc-softmmu/hw/virtio/virtio-crypto-pci.o > CC ppc-softmmu/hw/ppc/ppc.o > CC ppc-softmmu/hw/ppc/ppc_booke.o > CC ppc-softmmu/hw/ppc/fdt.o > CC ppc-softmmu/hw/ppc/ppc4xx_devs.o > CC ppc-softmmu/hw/ppc/ppc405_uc.o > CC ppc-softmmu/hw/ppc/ppc4xx_pci.o > CC ppc-softmmu/hw/ppc/ppc405_boards.o > CC ppc-softmmu/hw/ppc/ppc440_bamboo.o > CC ppc-softmmu/hw/ppc/prep.o > CC ppc-softmmu/hw/ppc/prep_systemio.o > CC ppc-softmmu/hw/ppc/rs6000_mc.o > CC ppc-softmmu/hw/ppc/mac_oldworld.o > CC ppc-softmmu/hw/ppc/mac_newworld.o > CC ppc-softmmu/hw/ppc/e500.o > CC ppc-softmmu/hw/ppc/mpc8544ds.o > CC ppc-softmmu/hw/ppc/e500plat.o > CC ppc-softmmu/hw/ppc/mpc8544_guts.o > CC ppc-softmmu/hw/ppc/ppce500_spin.o > CC ppc-softmmu/hw/ppc/virtex_ml507.o > CC ppc-softmmu/target/ppc/cpu-models.o > CC ppc-softmmu/target/ppc/cpu.o > CC ppc-softmmu/target/ppc/translate.o > CC ppc-softmmu/target/ppc/machine.o > CC ppc-softmmu/target/ppc/mmu_helper.o > CC ppc-softmmu/target/ppc/mmu-hash32.o > CC ppc-softmmu/target/ppc/monitor.o > CC ppc-softmmu/target/ppc/arch_dump.o > CC ppc-softmmu/target/ppc/kvm-stub.o > CC ppc-softmmu/target/ppc/dfp_helper.o > CC ppc-softmmu/target/ppc/excp_helper.o > CC ppc-softmmu/target/ppc/fpu_helper.o > CC ppc-softmmu/target/ppc/int_helper.o > CC ppc-softmmu/target/ppc/tim
Re: [Qemu-devel] [PATCH] virtio-gpu-3d: add support for second capability set (v4)
Gerd, This seems to have passed the bots, but realised I hadn't cc'ed you. Please pick it up whenever you get a chance. Dave. On 23 February 2018 at 12:38, Dave Airlie wrote: > From: Dave Airlie > > Due to a kernel bug we can never increase the size of capability > set 1, so introduce a new capability set in parallel, old userspace > will continue to use the old set, new userspace will start using > the new one when it detects a fixed kernel. > > v2: don't use a define from virglrenderer, just probe it. > v3: fix compilation when virglrenderer disabled > v4: fix style warning, just use ?: op instead. > > Signed-off-by: Dave Airlie > --- > hw/display/virtio-gpu-3d.c | 15 +++ > hw/display/virtio-gpu.c | 7 ++- > include/hw/virtio/virtio-gpu.h | 2 +- > include/standard-headers/linux/virtio_gpu.h | 1 + > 4 files changed, 23 insertions(+), 2 deletions(-) > > diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c > index 7db84efe89..3558f38fe8 100644 > --- a/hw/display/virtio-gpu-3d.c > +++ b/hw/display/virtio-gpu-3d.c > @@ -362,6 +362,11 @@ static void virgl_cmd_get_capset_info(VirtIOGPU *g, > virgl_renderer_get_cap_set(resp.capset_id, > &resp.capset_max_version, > &resp.capset_max_size); > +} else if (info.capset_index == 1) { > +resp.capset_id = VIRTIO_GPU_CAPSET_VIRGL2; > +virgl_renderer_get_cap_set(resp.capset_id, > + &resp.capset_max_version, > + &resp.capset_max_size); > } else { > resp.capset_max_version = 0; > resp.capset_max_size = 0; > @@ -635,4 +640,14 @@ int virtio_gpu_virgl_init(VirtIOGPU *g) > return 0; > } > > +int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g) > +{ > +uint32_t capset2_max_ver, capset2_max_size; > +virgl_renderer_get_cap_set(VIRTIO_GPU_CAPSET_VIRGL2, > + &capset2_max_ver, > + &capset2_max_size); > + > +return capset2_max_ver ? 2 : 1; > +} > + > #endif /* CONFIG_VIRGL */ > diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c > index 6658f6c6a6..2dd3c3481a 100644 > --- a/hw/display/virtio-gpu.c > +++ b/hw/display/virtio-gpu.c > @@ -1215,7 +1215,12 @@ static void virtio_gpu_device_realize(DeviceState > *qdev, Error **errp) > /* use larger control queue in 3d mode */ > g->ctrl_vq = virtio_add_queue(vdev, 256, > virtio_gpu_handle_ctrl_cb); > g->cursor_vq = virtio_add_queue(vdev, 16, > virtio_gpu_handle_cursor_cb); > -g->virtio_config.num_capsets = 1; > + > +#if defined(CONFIG_VIRGL) > +g->virtio_config.num_capsets = virtio_gpu_virgl_get_num_capsets(g); > +#else > +g->virtio_config.num_capsets = 0; > +#endif > } else { > g->ctrl_vq = virtio_add_queue(vdev, 64, virtio_gpu_handle_ctrl_cb); > g->cursor_vq = virtio_add_queue(vdev, 16, > virtio_gpu_handle_cursor_cb); > diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h > index 83f474ffc3..22ac3c2d0e 100644 > --- a/include/hw/virtio/virtio-gpu.h > +++ b/include/hw/virtio/virtio-gpu.h > @@ -171,5 +171,5 @@ void virtio_gpu_virgl_fence_poll(VirtIOGPU *g); > void virtio_gpu_virgl_reset(VirtIOGPU *g); > void virtio_gpu_gl_block(void *opaque, bool block); > int virtio_gpu_virgl_init(VirtIOGPU *g); > - > +int virtio_gpu_virgl_get_num_capsets(VirtIOGPU *g); > #endif > diff --git a/include/standard-headers/linux/virtio_gpu.h > b/include/standard-headers/linux/virtio_gpu.h > index c1c8f0751d..52a830dcf8 100644 > --- a/include/standard-headers/linux/virtio_gpu.h > +++ b/include/standard-headers/linux/virtio_gpu.h > @@ -260,6 +260,7 @@ struct virtio_gpu_cmd_submit { > }; > > #define VIRTIO_GPU_CAPSET_VIRGL 1 > +#define VIRTIO_GPU_CAPSET_VIRGL2 2 > > /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */ > struct virtio_gpu_get_capset_info { > -- > 2.14.3 > >
Re: [Qemu-devel] [PATCH v3 0/7] block: Handle null backing link
Hi, This series failed build test on ppcle host. Please find the details below. Message-id: 20180224154033.29559-1-mre...@redhat.com Subject: [Qemu-devel] [PATCH v3 0/7] block: Handle null backing link Type: series === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that has the patches applied on top of "base" # branch set -e echo "=== ENV ===" env echo "=== PACKAGES ===" rpm -qa echo "=== TEST BEGIN ===" INSTALL=$PWD/install BUILD=$PWD/build mkdir -p $BUILD $INSTALL SRC=$PWD cd $BUILD $SRC/configure --prefix=$INSTALL make -j100 # XXX: we need reliable clean up # make check -j100 V=1 make install === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Submodule 'capstone' (git://git.qemu.org/capstone.git) registered for path 'capstone' Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc' Submodule 'roms/QemuMacDrivers' (git://git.qemu.org/QemuMacDrivers.git) registered for path 'roms/QemuMacDrivers' Submodule 'roms/SLOF' (git://git.qemu-project.org/SLOF.git) registered for path 'roms/SLOF' Submodule 'roms/ipxe' (git://git.qemu-project.org/ipxe.git) registered for path 'roms/ipxe' Submodule 'roms/openbios' (git://git.qemu-project.org/openbios.git) registered for path 'roms/openbios' Submodule 'roms/openhackware' (git://git.qemu-project.org/openhackware.git) registered for path 'roms/openhackware' Submodule 'roms/qemu-palcode' (git://github.com/rth7680/qemu-palcode.git) registered for path 'roms/qemu-palcode' Submodule 'roms/seabios' (git://git.qemu-project.org/seabios.git/) registered for path 'roms/seabios' Submodule 'roms/seabios-hppa' (git://github.com/hdeller/seabios-hppa.git) registered for path 'roms/seabios-hppa' Submodule 'roms/sgabios' (git://git.qemu-project.org/sgabios.git) registered for path 'roms/sgabios' Submodule 'roms/skiboot' (git://git.qemu.org/skiboot.git) registered for path 'roms/skiboot' Submodule 'roms/u-boot' (git://git.qemu-project.org/u-boot.git) registered for path 'roms/u-boot' Submodule 'roms/vgabios' (git://git.qemu-project.org/vgabios.git/) registered for path 'roms/vgabios' Submodule 'ui/keycodemapdb' (git://git.qemu.org/keycodemapdb.git) registered for path 'ui/keycodemapdb' Cloning into 'capstone'... Submodule path 'capstone': checked out '22ead3e0bfdb87516656453336160e0a37b066bf' Cloning into 'dtc'... Submodule path 'dtc': checked out 'e54388015af1fb4bf04d0bca99caba1074d9cc42' Cloning into 'roms/QemuMacDrivers'... Submodule path 'roms/QemuMacDrivers': checked out 'd4e7d7ac663fcb55f1b93575445fcbca372f17a7' Cloning into 'roms/SLOF'... Submodule path 'roms/SLOF': checked out 'fa981320a1e0968d6fc1b8de319723ff8212b337' Cloning into 'roms/ipxe'... Submodule path 'roms/ipxe': checked out '0600d3ae94f93efd10fc6b3c7420a9557a3a1670' Cloning into 'roms/openbios'... Submodule path 'roms/openbios': checked out '54d959d97fb331708767b2fd4a878efd2bbc41bb' Cloning into 'roms/openhackware'... Submodule path 'roms/openhackware': checked out 'c559da7c8eec5e45ef1f67978827af6f0b9546f5' Cloning into 'roms/qemu-palcode'... Submodule path 'roms/qemu-palcode': checked out 'f3c7e44c70254975df2a00af39701eafbac4d471' Cloning into 'roms/seabios'... Submodule path 'roms/seabios': checked out '63451fca13c75870e1703eb3e20584d91179aebc' Cloning into 'roms/seabios-hppa'... Submodule path 'roms/seabios-hppa': checked out '649e6202b8d65d46c69f542b1380f840fbe8ab13' Cloning into 'roms/sgabios'... Submodule path 'roms/sgabios': checked out 'cbaee52287e5f32373181cff50a00b6c4ac9015a' Cloning into 'roms/skiboot'... Submodule path 'roms/skiboot': checked out 'e0ee24c27a172bcf482f6f2bc905e6211c134bcc' Cloning into 'roms/u-boot'... Submodule path 'roms/u-boot': checked out 'd85ca029f257b53a96da6c2fb421e78a003a9943' Cloning into 'roms/vgabios'... Submodule path 'roms/vgabios': checked out '19ea12c230ded95928ecaef0db47a82231c2e485' Cloning into 'ui/keycodemapdb'... Submodule path 'ui/keycodemapdb': checked out '6b3d716e2b6472eb7189d3220552280ef3d832ce' Switched to a new branch 'test' 20aa306 block: Deprecate "backing": "" c9e6a2d block: Handle null backing link 3a046aa qapi: Make more of qobject_to() a51ebac qapi: Remove qobject_to_X() functions 7b78cc8 qapi: Replace qobject_to_X(o) by qobject_to(o, X) 0a96468 qapi: Add qobject_to() 0cd4496 compiler: Add QEMU_BUILD_BUG_MSG() macro === OUTPUT BEGIN === === ENV === XDG_SESSION_ID=209502 SHELL=/bin/sh USER=patchew PATCHEW=/home/patchew/patchew/patchew-cli -s http://patchew.org --nodebug PATH=/usr/bin:/bin PWD=/var/tmp/patchew-tester-tmp-pczff6ou/src LANG=en_US.UTF-8 HOME=/home/patchew SHLVL=2 LOGNAME=patchew XDG_RUNTIME_DIR=/run/user/1000 _=/usr/bin/env === PACKAGES === plymouth-core-libs-0.8.9-0.28.20140113.el7.centos.ppc64le vim-common-7.4.160-2.el7.ppc64le perl-Test-Simple-0.98-243.el7.noarch hplip-common-3.15.9-3.el7.ppc64le valgrind-3.12.0-8.el7.ppc64le gamin-0.1.10-16.el7.ppc64le libpeas-loader-python-1.20.0-1.el7.p
Re: [Qemu-devel] [RFC v4 00/21] blockjobs: add explicit job management
Hi, This series failed build test on ppcle host. Please find the details below. Message-id: 20180223235142.21501-1-js...@redhat.com Subject: [Qemu-devel] [RFC v4 00/21] blockjobs: add explicit job management Type: series === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that has the patches applied on top of "base" # branch set -e echo "=== ENV ===" env echo "=== PACKAGES ===" rpm -qa echo "=== TEST BEGIN ===" INSTALL=$PWD/install BUILD=$PWD/build mkdir -p $BUILD $INSTALL SRC=$PWD cd $BUILD $SRC/configure --prefix=$INSTALL make -j100 # XXX: we need reliable clean up # make check -j100 V=1 make install === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Submodule 'capstone' (git://git.qemu.org/capstone.git) registered for path 'capstone' Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc' Submodule 'roms/QemuMacDrivers' (git://git.qemu.org/QemuMacDrivers.git) registered for path 'roms/QemuMacDrivers' Submodule 'roms/SLOF' (git://git.qemu-project.org/SLOF.git) registered for path 'roms/SLOF' Submodule 'roms/ipxe' (git://git.qemu-project.org/ipxe.git) registered for path 'roms/ipxe' Submodule 'roms/openbios' (git://git.qemu-project.org/openbios.git) registered for path 'roms/openbios' Submodule 'roms/openhackware' (git://git.qemu-project.org/openhackware.git) registered for path 'roms/openhackware' Submodule 'roms/qemu-palcode' (git://github.com/rth7680/qemu-palcode.git) registered for path 'roms/qemu-palcode' Submodule 'roms/seabios' (git://git.qemu-project.org/seabios.git/) registered for path 'roms/seabios' Submodule 'roms/seabios-hppa' (git://github.com/hdeller/seabios-hppa.git) registered for path 'roms/seabios-hppa' Submodule 'roms/sgabios' (git://git.qemu-project.org/sgabios.git) registered for path 'roms/sgabios' Submodule 'roms/skiboot' (git://git.qemu.org/skiboot.git) registered for path 'roms/skiboot' Submodule 'roms/u-boot' (git://git.qemu-project.org/u-boot.git) registered for path 'roms/u-boot' Submodule 'roms/vgabios' (git://git.qemu-project.org/vgabios.git/) registered for path 'roms/vgabios' Submodule 'ui/keycodemapdb' (git://git.qemu.org/keycodemapdb.git) registered for path 'ui/keycodemapdb' Cloning into 'capstone'... Submodule path 'capstone': checked out '22ead3e0bfdb87516656453336160e0a37b066bf' Cloning into 'dtc'... Submodule path 'dtc': checked out 'e54388015af1fb4bf04d0bca99caba1074d9cc42' Cloning into 'roms/QemuMacDrivers'... Submodule path 'roms/QemuMacDrivers': checked out 'd4e7d7ac663fcb55f1b93575445fcbca372f17a7' Cloning into 'roms/SLOF'... Submodule path 'roms/SLOF': checked out 'fa981320a1e0968d6fc1b8de319723ff8212b337' Cloning into 'roms/ipxe'... Submodule path 'roms/ipxe': checked out '0600d3ae94f93efd10fc6b3c7420a9557a3a1670' Cloning into 'roms/openbios'... Submodule path 'roms/openbios': checked out '54d959d97fb331708767b2fd4a878efd2bbc41bb' Cloning into 'roms/openhackware'... Submodule path 'roms/openhackware': checked out 'c559da7c8eec5e45ef1f67978827af6f0b9546f5' Cloning into 'roms/qemu-palcode'... Submodule path 'roms/qemu-palcode': checked out 'f3c7e44c70254975df2a00af39701eafbac4d471' Cloning into 'roms/seabios'... Submodule path 'roms/seabios': checked out '63451fca13c75870e1703eb3e20584d91179aebc' Cloning into 'roms/seabios-hppa'... Submodule path 'roms/seabios-hppa': checked out '649e6202b8d65d46c69f542b1380f840fbe8ab13' Cloning into 'roms/sgabios'... Submodule path 'roms/sgabios': checked out 'cbaee52287e5f32373181cff50a00b6c4ac9015a' Cloning into 'roms/skiboot'... Submodule path 'roms/skiboot': checked out 'e0ee24c27a172bcf482f6f2bc905e6211c134bcc' Cloning into 'roms/u-boot'... Submodule path 'roms/u-boot': checked out 'd85ca029f257b53a96da6c2fb421e78a003a9943' Cloning into 'roms/vgabios'... Submodule path 'roms/vgabios': checked out '19ea12c230ded95928ecaef0db47a82231c2e485' Cloning into 'ui/keycodemapdb'... Submodule path 'ui/keycodemapdb': checked out '6b3d716e2b6472eb7189d3220552280ef3d832ce' Switched to a new branch 'test' 230e578 blockjobs: add manual_mgmt option to transactions f278a51 iotests: test manual job dismissal 8e473ab blockjobs: Expose manual property 7ad2d01 blockjobs: add block-job-finalize 3857c91 blockjobs: add PENDING status and event 18eb8a4 blockjobs: add waiting status daf9613 blockjobs: add prepare callback 78be501 blockjobs: add block_job_txn_apply function 4b659ab blockjobs: add commit, abort, clean helpers 4023046 blockjobs: ensure abort is called for cancelled jobs e9300b1 blockjobs: add block_job_dismiss 4fc045e blockjobs: add NULL state e6aa454 blockjobs: add CONCLUDED state 78efa2f blockjobs: add ABORTING state 057ad24 blockjobs: add block_job_verb permission table c62c5b7 iotests: add pause_wait 4aadb9c blockjobs: add state transition table afc594c blockjobs: add status enum 434d381 blockjobs: add manual property fc3e3ee blockjobs: model single jobs as transactions 8d32662 b
[Qemu-devel] [Bug 1751674] [NEW] qemu-system-arm segmentation fault trying to dump VM memory
Public bug reported: Qemu segfaults trying to generate a VM memory dump: $ QEMU_AUDIO_DRV=none qemu-git-src/arm-softmmu/qemu-system-arm -M vexpress-a9 -smp 4 -m 1024 -machine secure=off,dump-guest-core=on -kernel linux-4.9.75/arch/arm/boot/zImage -append "root=/dev/mmcblk0 rw rootfstype=ext4 mem=1024M net.ifnames=0 console=ttyAMA0" -dtb vexpress-v2p-ca9.dtb -sd armv7-hd.qcow2 -netdev tap,ifname=tap_armv7,script=no,downscript=no,id=net0 -device virtio-net-device,mac=00:DE:AD:BE:FF:02,netdev=net0 -monitor stdio -serial vc -loadvm SS0 QEMU 2.11.50 monitor - type 'help' for more information (qemu) pmemsave 0 0x3FFF memory.dmp Segmentation fault (core dumped) $ git rev-parse HEAD b384cd95eb9c6f73ad84ed1bb0717a26e29cc78f It's the second time I try to submit this bug, I think last time it failed because the attached core dump size (400M compressed). Have a look if you can get that file, otherwise I will try to update this ticket once it's created: (Error ID: OOPS-65553b72bc14be693eb1e37814ff9267) ** Affects: qemu Importance: Undecided Status: New ** Tags: arm dump memory pmemsave segfault -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1751674 Title: qemu-system-arm segmentation fault trying to dump VM memory Status in QEMU: New Bug description: Qemu segfaults trying to generate a VM memory dump: $ QEMU_AUDIO_DRV=none qemu-git-src/arm-softmmu/qemu-system-arm -M vexpress-a9 -smp 4 -m 1024 -machine secure=off,dump-guest-core=on -kernel linux-4.9.75/arch/arm/boot/zImage -append "root=/dev/mmcblk0 rw rootfstype=ext4 mem=1024M net.ifnames=0 console=ttyAMA0" -dtb vexpress-v2p-ca9.dtb -sd armv7-hd.qcow2 -netdev tap,ifname=tap_armv7,script=no,downscript=no,id=net0 -device virtio-net-device,mac=00:DE:AD:BE:FF:02,netdev=net0 -monitor stdio -serial vc -loadvm SS0 QEMU 2.11.50 monitor - type 'help' for more information (qemu) pmemsave 0 0x3FFF memory.dmp Segmentation fault (core dumped) $ git rev-parse HEAD b384cd95eb9c6f73ad84ed1bb0717a26e29cc78f It's the second time I try to submit this bug, I think last time it failed because the attached core dump size (400M compressed). Have a look if you can get that file, otherwise I will try to update this ticket once it's created: (Error ID: OOPS-65553b72bc14be693eb1e37814ff9267) To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1751674/+subscriptions
[Qemu-devel] [Bug 1751674] Re: qemu-system-arm segmentation fault trying to dump VM memory
Yeah, the page fails uploading the code dump file. Actually it seems to upload the whole file but then it shows a "Timeout error" error. Anyway, let me know if you need that file and if so how can I send it to you. ** Description changed: Qemu segfaults trying to generate a VM memory dump: - $ QEMU_AUDIO_DRV=none qemu-git-src/arm-softmmu/qemu-system-arm -M vexpress-a9 -smp 4 -m 1024 -machine secure=off,dump-guest-core=on -kernel linux-4.9.75/arch/arm/boot/zImage -append "root=/dev/mmcblk0 rw rootfstype=ext4 mem=1024M net.ifnames=0 console=ttyAMA0" -dtb vexpress-v2p-ca9.dtb -sd armv7-hd.qcow2 -netdev tap,ifname=tap_armv7,script=no,downscript=no,id=net0 -device virtio-net-device,mac=00:DE:AD:BE:FF:02,netdev=net0 -monitor stdio -serial vc -loadvm SS0 + $ QEMU_AUDIO_DRV=none qemu-git-src/arm-softmmu/qemu-system-arm -M vexpress-a9 -smp 4 -m 1024 -machine secure=off,dump-guest-core=on -kernel linux-4.9.75/arch/arm/boot/zImage -append "root=/dev/mmcblk0 rw rootfstype=ext4 mem=1024M net.ifnames=0 console=ttyAMA0" -dtb vexpress-v2p-ca9.dtb -sd armv7-hd.qcow2 -netdev tap,ifname=tap_armv7,script=no,downscript=no,id=net0 -device virtio-net-device,mac=00:AA:AD:BB:FF:02,netdev=net0 -monitor stdio -serial vc -loadvm SS0 QEMU 2.11.50 monitor - type 'help' for more information (qemu) pmemsave 0 0x3FFF memory.dmp Segmentation fault (core dumped) $ git rev-parse HEAD b384cd95eb9c6f73ad84ed1bb0717a26e29cc78f It's the second time I try to submit this bug, I think last time it failed because the attached core dump size (400M compressed). Have a look if you can get that file, otherwise I will try to update this ticket once it's created: (Error ID: OOPS-65553b72bc14be693eb1e37814ff9267) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1751674 Title: qemu-system-arm segmentation fault trying to dump VM memory Status in QEMU: New Bug description: Qemu segfaults trying to generate a VM memory dump: $ QEMU_AUDIO_DRV=none qemu-git-src/arm-softmmu/qemu-system-arm -M vexpress-a9 -smp 4 -m 1024 -machine secure=off,dump-guest-core=on -kernel linux-4.9.75/arch/arm/boot/zImage -append "root=/dev/mmcblk0 rw rootfstype=ext4 mem=1024M net.ifnames=0 console=ttyAMA0" -dtb vexpress-v2p-ca9.dtb -sd armv7-hd.qcow2 -netdev tap,ifname=tap_armv7,script=no,downscript=no,id=net0 -device virtio-net-device,mac=00:AA:AD:BB:FF:02,netdev=net0 -monitor stdio -serial vc -loadvm SS0 QEMU 2.11.50 monitor - type 'help' for more information (qemu) pmemsave 0 0x3FFF memory.dmp Segmentation fault (core dumped) $ git rev-parse HEAD b384cd95eb9c6f73ad84ed1bb0717a26e29cc78f It's the second time I try to submit this bug, I think last time it failed because the attached core dump size (400M compressed). Have a look if you can get that file, otherwise I will try to update this ticket once it's created: (Error ID: OOPS-65553b72bc14be693eb1e37814ff9267) To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1751674/+subscriptions
Re: [Qemu-devel] [PATCH v4 RFC 0/3] util/uri.c: Coding style format
On Sun, 02/25 21:56, Thomas Huth wrote: > On 25.02.2018 05:57, no-re...@patchew.org wrote: > > LINKppc-softmmu/qemu-system-ppc > > collect2: error: ld returned 1 exit status > > make[1]: *** [Makefile:193: qemu-system-ppc] Error 1 > > make: *** [Makefile:404: subdir-ppc-softmmu] Error 2 > > Hi Fam, > > Patchew genereted some really weird errors here - linking failed without > any further explanation. Are there currently any known problems with the > build bot? This is the first time I see it too. I have no clue but will keep an eye. Fam
Re: [Qemu-devel] [PATCH v2] intel-iommu: Accept 64-bit writes to FEADDR
On Sat, Feb 24, 2018 at 09:30:12AM +0100, Jan Kiszka wrote: > From: Jan Kiszka > > Xen is doing this [1] and currently triggers an abort. > > [1] > http://xenbits.xenproject.org/gitweb/?p=xen.git;a=blob;f=xen/drivers/passthrough/vtd/iommu.c;h=daaed0abbdd06b6ba3d948ea103aadf02651e83c;hb=refs/heads/master#l1108 > > Reported-by: Luis Lloret > Signed-off-by: Jan Kiszka Thanks, Jan. Reviewed-by: Peter Xu > --- > hw/i386/intel_iommu.c | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c > index 2e841cde27..fb31de9416 100644 > --- a/hw/i386/intel_iommu.c > +++ b/hw/i386/intel_iommu.c > @@ -2129,8 +2129,15 @@ static void vtd_mem_write(void *opaque, hwaddr addr, > > /* Fault Event Address Register, 32-bit */ > case DMAR_FEADDR_REG: > -assert(size == 4); > -vtd_set_long(s, addr, val); > +if (size == 4) { > +vtd_set_long(s, addr, val); > +} else { > +/* > + * While the register is 32-bit only, some guests (Xen...) write > to > + * it with 64-bit. > + */ > +vtd_set_quad(s, addr, val); > +} > break; > > /* Fault Event Upper Address Register, 32-bit */ -- Peter Xu
[Qemu-devel] [PATCH v2 RFC] scripts/checkpatch.pl: add check for `while` and `for`
Add check for `while` and `for` statements, which condition has more than one line. The former checkpatch.pl can check `if` statement, which condition has more than one line, whether block misses brace round, like this: ''' if (cond1 || cond2) statement; ''' But it doesn't do the same check for `for` and `while` statements. Suggested-by: Eric Blake Suggested-by: Thomas Huth Signed-off-by: Su Hang --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 1b4b812e28fa..10c138344fa9 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2353,7 +2353,8 @@ sub process { } # check for missing bracing round if etc - if ($line =~ /(^.*)\bif\b/ && $line !~ /\#\s*if/) { + if ($line =~ /(^.*)\b(for|while|if)\b/ && + $line !~ /\#\s*(for|while|if)/) { my ($level, $endln, @chunks) = ctx_statement_full($linenr, $realcnt, 1); if ($dbg_adv_apw) { -- 2.7.4
[Qemu-devel] [PATCH v4 2/2] README: Document 'git-publish' workflow
Signed-off-by: Fam Zheng --- README | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/README b/README index 2c8e1c8cc4..7833b97365 100644 --- a/README +++ b/README @@ -56,7 +56,7 @@ The QEMU source code is maintained under the GIT version control system. git clone git://git.qemu.org/qemu.git -When submitting patches, the preferred approach is to use 'git +When submitting patches, one common approach is to use 'git format-patch' and/or 'git send-email' to format & send the mail to the qemu-devel@nongnu.org mailing list. All patches submitted must contain a 'Signed-off-by' line from the author. Patches should follow the @@ -73,6 +73,35 @@ The QEMU website is also maintained under source control. git clone git://git.qemu.org/qemu-web.git https://www.qemu.org/2017/02/04/the-new-qemu-website-is-up/ +A 'git-profile' utility was created to make above process less +cumbersome, and is highly recommended for making regular contributions, +or even just for sending consecutive patch series revisions. It also +requires a working 'git send-email' setup, and by default doesn't +automate everything, so you may want to go through the above steps +manually for once. + +For installation instructions, please go to + + https://github.com/stefanha/git-publish + +The workflow with 'git-publish' is: + + $ git checkout master -b my-feature + $ # work on new commits, add your 'Signed-off-by' lines to each + $ git publish + +Your patch series will be sent and tagged as my-feature-v1 if you need to refer +back to it in the future. + +Sending v2: + + $ git checkout my-feature # same topic branch + $ # making changes to the commits (using 'git rebase', for example) + $ git publish + +Your patch series will be sent with 'v2' tag in the subject and the git tip +will be tagged as my-feature-v2. + Bug reporting = -- 2.14.3
[Qemu-devel] [PATCH v4 0/2] Add git-publish config file
v4: Fix prefixes. [Stefan] Keep rich profiles. [Paolo] v3: Fix trivial hunk placement. [Michael] Fix PPC sub-list. [Michael] v2: Add README paragraph [Marc-Andr??, Stefan] Fix 'trivial' profile [Marc-Andr??] Rename profiles [Stefan] Fam Zheng (2): Add a git-publish configuration file README: Document 'git-publish' workflow .gitpublish | 51 +++ README | 31 ++- 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 .gitpublish -- 2.14.3
[Qemu-devel] [PATCH v4 1/2] Add a git-publish configuration file
git-publish [1] is a convenient tool to send patches and has been popular among QEMU developers. Recently it has been made available in Fedora/Debian official repo. One nice feature of the tool is a per-project configuration with profiles, especially in which the cccmd option is a handy method to create the Cc list. [1]: https://github.com/stefanha/git-publish Signed-off-by: Fam Zheng --- .gitpublish | 51 +++ 1 file changed, 51 insertions(+) create mode 100644 .gitpublish diff --git a/.gitpublish b/.gitpublish new file mode 100644 index 00..a13f8c7c0e --- /dev/null +++ b/.gitpublish @@ -0,0 +1,51 @@ +# +# Common git-publish profiles that can be used to send patches to QEMU upstream. +# +# See https://github.com/stefanha/git-publish for more information +# +[gitpublishprofile "default"] +base = master +to = qemu-devel@nongnu.org +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null + +[gitpublishprofile "rfc"] +base = master +prefix = RFC PATCH +to = qemu-devel@nongnu.org +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null + +[gitpublishprofile "stable"] +base = master +to = qemu-devel@nongnu.org +cc = qemu-sta...@nongnu.org +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null + +[gitpublishprofile "trivial"] +base = master +to = qemu-devel@nongnu.org +cc = qemu-triv...@nongnu.org +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null + +[gitpublishprofile "block"] +base = master +to = qemu-devel@nongnu.org +cc = qemu-bl...@nongnu.org +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null + +[gitpublishprofile "arm"] +base = master +to = qemu-devel@nongnu.org +cc = qemu-...@nongnu.org +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null + +[gitpublishprofile "s390"] +base = master +to = qemu-devel@nongnu.org +cc = qemu-s...@nongnu.org +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null + +[gitpublishprofile "ppc"] +base = master +to = qemu-devel@nongnu.org +cc = qemu-...@nongnu.org +cccmd = scripts/get_maintainer.pl --noroles --norolestats --nogit --nogit-fallback 2>/dev/null -- 2.14.3
[Qemu-devel] QEMU GSoC 2018 Project Idea (Apply polling to QEMU NVMe)
Hi all, The project would be about utilizing shadow doorbell buffer features in NVMe 1.3 to enable QEMU side polling for virtualized NVMe device, thus achieving comparable performance as in virtio-dataplane. **Why not virtio?** The reason is many industrial/academic researchers uses QEMU NVMe as a performance platform for research/product prototyping. NVMe interface is better in the rich features it provides than virtio interface. If we can make QEMU NVMe performance competent with virtio, it will benefit a lot of communities. **Doable?** NVMe spec 1.3 introduces a shadow doorbell buffer which is aimed for virtual NVMe controller optimizations. QEMU can certainly utilize this feature to reduce or even eliminate VM-exits triggered by doorbell writes. I remember there were some discussions back in 2015 about this, but I don't see it finally done. For this project, I think we can go in three steps: (1). add the shadow doorbell buffer support into QEMU NVMe emulation, this will reduce # of VM-exits. (2). replace current timers used by QEMU NVMe with a separate polling thread, thus we can completely eliminate VM-exits. (3). Even further, we can adapt the architecture to use one polling thread for each NVMe queue pair, thus it's possible to provide more performance. (step 3 can be left for next year if the workload is too much for 3 months). Actually, I have an initial implementation over step (1)(2) and would like to work more on it to push it upstream. More information is in this papper, (Section 3.1 and Figure 2-left), http://ucare.cs.uchicago.edu/pdf/fast18-femu.pdf Comments are welcome. Thanks. Best, Huaicheng
Re: [Qemu-devel] [PATCH v2 3/3] virtio-balloon: add a timer to limit the free page report waiting time
On 02/09/2018 08:15 PM, Dr. David Alan Gilbert wrote: * Wei Wang (wei.w.w...@intel.com) wrote: This patch adds a timer to limit the time that host waits for the free page hints reported by the guest. Users can specify the time in ms via "free-page-wait-time" command line option. If a user doesn't specify a time, host waits till the guest finishes reporting all the free page hints. The policy (wait for all the free page hints to be reported or use a time limit) is determined by the orchestration layer. That's kind of a get-out; but there's at least two problems: a) With a timeout of 0 (the default) we might hang forever waiting for the guest; broken guests are just too common, we can't do that. b) Even if we were going to do that, you'd have to make sure that migrate_cancel provided a way out. c) How does that work during a savevm snapshot or when the guest is stopped? d) OK, the timer gives us some safety (except c); but how does the orchestration layer ever come up with a 'safe' value for it? Unless we can suggest a safe value that the orchestration layer can use, or a way they can work it out, then they just wont use it. Hi Dave, Sorry for my late response. Please see below: a) I think people would just kill the guest if it is broken. We can also change the default timeout value, for example 1 second, which is enough for the free page reporting. b) How about changing it this way: if timeout happens, host sends a stop command to the guest, and makes virtio_balloon_poll_free_page_hints() "return" immediately (without getting the guest's acknowledge). The "return" basically goes back to the migration_thread function: while (s->state == MIGRATION_STATUS_ACTIVE || s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE) { ... } migration_cancel sets the state to MIGRATION_CANCELLING, so it will stop the migration process. c) This optimization needs the guest to report. If the guest is stopped, it wouldn't work. How about adding a check of "RUN_STATE" before going into the optimization? d) Yes. Normally it is faster to wait for the guest to report all the free pages. Probably, we can just hardcode a value (e.g. 1s) for now (instead of making it configurable by users), this is used to handle the case that the guest is broken. What would you think? Best, Wei
Re: [Qemu-devel] [PATCH v2 0/3] virtio-balloon: free page hint reporting support
On 02/09/2018 06:53 PM, Dr. David Alan Gilbert wrote: * Wei Wang (wei.w.w...@intel.com) wrote: On 02/09/2018 04:15 AM, Dr. David Alan Gilbert wrote: * Wei Wang (wei.w.w...@intel.com) wrote: This is the deivce part implementation to add a new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT to the virtio-balloon device. The device receives the guest free page hints from the driver and clears the corresponding bits in the dirty bitmap, so that those free pages are not transferred by the migration thread to the destination. Please see the driver patch link for test results: https://lkml.org/lkml/2018/2/4/60 Hi Wei, I'll look at the code a bit more - but first some more basic questions on that lkml post: a) The idle guest time thing is a nice result; can you just state what the host was, speed of connection, and what other options you were using? b) The workload test, the one with the kernel compile; you list the kernel compile time but don't mention any changes in the migration times of the ping-pong; can you give those times as well? c) What's your real workload that this is aimed at? Is it really for people migrating idle VMs - or do you have some NFV application in mind, if so why not include a figure for those? Hi Dave, Thanks for joining the review. Please see below info. a) Environment info - Host: - Physical CPU: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz - kernel: 3.10.0 - Guest: - kernel: 4.15.0 - QEMU setup: -cpu host -M pc -smp 4,threads=1,sockets=1 -m 8G --mem-prealloc -realtime mlock=on -balloon virtio,free-page-hint=true - Migration setup: - migrate_set_speed 0 - migrate_set_downtime 0.01 (10ms) That's an unusually low downtime (and I'm not sure what setting the speed to 0 does!). For idle guest tests, I used 0.01s downtime. If we run workloads, we can change it to 2s. Just make sure we set the same downtime for both legacy and optimization cases so that we can have an apple to apple comparison. speed being set to 0 means using the largest bandwidth. Here it is effectively the same as setting it to 100G. b) Michael asked the same question on the kernel patches, I'll reply there with you cc-ed, so that kernel maintainers can also see it. Btw, do you have any other workloads you would suggest to have a try? No, not really; I guess it's best for VMs that are either idle or have lots of spare RAM. Yes, less free memory results in less improvement (please see the more results with the linux compilation workload shared in LKML). Best, Wei
Re: [Qemu-devel] [PATCH v2 2/3] migration: use the free page reporting feature from balloon
On 02/09/2018 07:50 PM, Dr. David Alan Gilbert wrote: * Wei Wang (wei.w.w...@intel.com) wrote: Use the free page reporting feature from the balloon device to clear the bits corresponding to guest free pages from the dirty bitmap, so that the free memory are not sent. Signed-off-by: Wei Wang CC: Michael S. Tsirkin CC: Juan Quintela --- migration/ram.c | 24 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index d6f462c..4fe16d2 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -49,6 +49,7 @@ #include "qemu/rcu_queue.h" #include "migration/colo.h" #include "migration/block.h" +#include "sysemu/balloon.h" /***/ /* ram save/restore */ @@ -206,6 +207,10 @@ struct RAMState { uint32_t last_version; /* We are in the first round */ bool ram_bulk_stage; +/* The feature, skipping the transfer of free pages, is supported */ +bool free_page_support; +/* Skip the transfer of free pages in the bulk stage */ +bool free_page_done; /* How many times we have dirty too many pages */ int dirty_rate_high_cnt; /* these variables are used for bitmap sync */ @@ -773,7 +778,7 @@ unsigned long migration_bitmap_find_dirty(RAMState *rs, RAMBlock *rb, unsigned long *bitmap = rb->bmap; unsigned long next; -if (rs->ram_bulk_stage && start > 0) { +if (rs->ram_bulk_stage && start > 0 && !rs->free_page_support) { next = start + 1; } else { next = find_next_bit(bitmap, size, start); @@ -1653,6 +1658,8 @@ static void ram_state_reset(RAMState *rs) rs->last_page = 0; rs->last_version = ram_list.version; rs->ram_bulk_stage = true; +rs->free_page_support = balloon_free_page_support(); +rs->free_page_done = false; } #define MAX_WAIT 50 /* ms, half buffered_file limit */ @@ -2135,7 +2142,7 @@ static int ram_state_init(RAMState **rsp) return 0; } -static void ram_list_init_bitmaps(void) +static void ram_list_init_bitmaps(RAMState *rs) { RAMBlock *block; unsigned long pages; @@ -2145,7 +2152,11 @@ static void ram_list_init_bitmaps(void) QLIST_FOREACH_RCU(block, &ram_list.blocks, next) { pages = block->max_length >> TARGET_PAGE_BITS; block->bmap = bitmap_new(pages); -bitmap_set(block->bmap, 0, pages); +if (rs->free_page_support) { +bitmap_set(block->bmap, 1, pages); I don't understand how it makes sense to do that here; ignoring anything ese it means that migration_dirty_pages is wrong which could end up with migration finishing before all real pages are sent. The bulk stage treats all the pages as dirty pages, so we set all the bits to "1", this is needed by this optimization feature, because the free pages reported from the guest can then be directly cleared from the bitmap (we don't need any more bitmaps to record free pages). Why is migration_dirty_pages incorrect? Best, Wei
Re: [Qemu-devel] [PATCH v4 RFC 1/3] util/uri.c: Coding style check, Only whitespace involved. Using `clang-format -i util/uri.c` first, then change back few code manually, to make sure only whitespace
On 25.02.2018 05:35, Su Hang wrote: > Signed-off-by: Su Hang Looks like the patch description accidentally somehow moved into the "Subject" line ... but I hope that can be fixed when the patch is picked up, so: Reviewed-by: Thomas Huth
Re: [Qemu-devel] [PATCH v4 RFC 2/3] util/uri.c: remove brackets that wrap `return` statement's content.
On 25.02.2018 05:35, Su Hang wrote: > only remove brackets that wrap `return` statements' content. > > use `perl -pi -e "s/return \((.*?)\);/return \1;/g" util/uri.c` > to remove pattern like this: "return (1);" > > Signed-off-by: Su Hang > --- > util/uri.c | 160 > ++--- > 1 file changed, 80 insertions(+), 80 deletions(-) Looks good to me! Reviewed-by: Thomas Huth
Re: [Qemu-devel] [PATCH v4 RFC 3/3] util/uri.c: wrap single statement blocks with braces {}
On 25.02.2018 05:35, Su Hang wrote: > For this patch, using curly braces to wrap `if` `while` `else` statements, > which only hold single statement. For example: > ''' > if (cond) > statement; > ''' > to > ''' > if (cond) { > statement; > } > ''' > > And using tricks that compare the disassemblies before and after > code changes, to make sure code logic isn't changed: > ''' > git checkout master > make util/uri.o > strip util/uri.o > objdump -Drx util/uri.o > /tmp/uri-master.txt > git checkout cleanupbranch > make util/uri.o > strip util/uri.o > objdump -Drx util/uri.o > /tmp/uri-cleanup.txt > diff -u /tmp/uri-*.txt > ''' > > With that, all complaints raised by checkpatch.pl have been suppressed. > > Suggested-by: Thomas Huth > Suggested-by: Eric Blake > Signed-off-by: Su Hang > --- > util/uri.c | 463 > +++-- > 1 file changed, 294 insertions(+), 169 deletions(-) Reviewed-by: Thomas Huth I've also checked again with the "objdump" trick that there are no differences in the generated code, and indeed, looks good now, so I think I can also say: Tested-by: Thomas Huth Thank you very much for cleaning up that huge file! Thomas
[Qemu-devel] [PATCH 2/2] tests: Use query-usernet instead of 'info usernet'
Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 686d88decf..f51604e0ab 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -101,7 +101,7 @@ class BaseVM(object): "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=" + os.devnull, "-o", "ConnectTimeout=1", - "-p", self.ssh_port, "-i", self._ssh_key_file] + "-p", str(self.ssh_port), "-i", self._ssh_key_file] if interactive: ssh_cmd += ['-t'] assert not isinstance(cmd, str) @@ -166,13 +166,13 @@ class BaseVM(object): raise atexit.register(self.shutdown) self._guest = guest -usernet_info = guest.qmp("human-monitor-command", - command_line="info usernet") +usernet_info = guest.qmp("query-usernet") self.ssh_port = None -for l in usernet_info["return"].splitlines(): -fields = l.split() -if "TCP[HOST_FORWARD]" in fields and "22" in fields: -self.ssh_port = l.split()[3] +for i in usernet_info["return"]: +if i.get("id") != "vnet": +continue +self.ssh_port = i["connections"][0]["src_port"] +break if not self.ssh_port: raise Exception("Cannot find ssh port from 'info usernet':\n%s" % \ usernet_info) -- 2.14.3
[Qemu-devel] [PATCH 1/2] slirp: Add "query-usernet" QMP command
HMP "info usernet" has been available but it isn't ideal for programed use cases. This closes the gap in QMP by adding a counterpart "query-usernet" command. It is basically translated from the HMP slirp_connection_info() loop, which now calls the QMP implementation and prints the data, just like other HMP info_* commands. The TCPS_* macros are now defined as a QAPI enum. Signed-off-by: Fam Zheng --- net/slirp.c | 26 +++ qapi/net.json| 201 +++ slirp/libslirp.h | 1 + slirp/misc.c | 156 +- slirp/tcp.h | 15 - 5 files changed, 339 insertions(+), 60 deletions(-) diff --git a/net/slirp.c b/net/slirp.c index 8991816bbf..415f967f99 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -36,6 +36,7 @@ #include "monitor/monitor.h" #include "qemu/error-report.h" #include "qemu/sockets.h" +#include "slirp/slirp.h" #include "slirp/libslirp.h" #include "slirp/ip6.h" #include "chardev/char-fe.h" @@ -43,6 +44,7 @@ #include "qemu/cutils.h" #include "qapi/error.h" #include "qapi/qmp/qdict.h" +#include "qmp-commands.h" static int get_str_sep(char *buf, int buf_size, const char **pp, int sep) { @@ -864,6 +866,30 @@ static int slirp_guestfwd(SlirpState *s, const char *config_str, return -1; } +UsernetInfoList *qmp_query_usernet(Error **errp) +{ +SlirpState *s; +UsernetInfoList *list = NULL; +UsernetInfoList **p = &list; + +QTAILQ_FOREACH(s, &slirp_stacks, entry) { +int vlan; +UsernetInfoList *il = g_new0(UsernetInfoList, 1); +UsernetInfo *info = il->value = g_new0(UsernetInfo, 1); + +info->id = g_strdup(s->nc.name); +if (!net_hub_id_for_client(&s->nc, &vlan)) { +info->vlan = vlan; +} else { +info->vlan = -1; +} +usernet_get_info(s->slirp, info); +*p = il; +p = &il->next; +} +return list; +} + void hmp_info_usernet(Monitor *mon, const QDict *qdict) { SlirpState *s; diff --git a/qapi/net.json b/qapi/net.json index 1238ba5de1..26b2674ffa 100644 --- a/qapi/net.json +++ b/qapi/net.json @@ -706,3 +706,204 @@ ## { 'event': 'NIC_RX_FILTER_CHANGED', 'data': { '*name': 'str', 'path': 'str' } } + +## +# @TCPS: +# +# TCP States of a SLIRP connection. +# +# - States where connections are not established: none, closed, listen, syn_sent, +# syn_received +# +# - States where user has closed: fin_wait_1, closing, last_ack, fin_wait_2, +# time_wait +# +# - States await ACK of FIN: fin_wait_1, closing, last_ack +# +# 'none' state is used only when host forwarding +# +# Since 2.12 +# +## +{ 'enum': 'TCPS', + 'data': + ['closed', +'listen', +'syn_sent', +'syn_received', +'established', +'close_wait', +'fin_wait_1', +'closing', +'last_ack', +'fin_wait_2', +'time_wait', +'none' + ] } + +## +# @UsernetTCPConnection: +# +# SLIRP TCP information. +# +# @state: tcp connection state +# +# @hostfwd: whether this connection has host port forwarding +# +# @fd: the file descriptor of the connection +# +# @src_addr: source address of host port forwarding +# +# @src_port: source port of host port forwarding +# +# @dest_addr: destination address of host port forwarding +# +# @dest_port: destination port of host port forwarding +# +# @recv_buffered: number of bytes queued in the receive buffer +# +# @send_buffered: number of bytes queued in the send buffer +# +# Since: 2.12 +## +{ 'struct': 'UsernetTCPConnection', + 'data': { +'state': 'TCPS', +'hostfwd': 'bool', +'fd': 'int', +'src_addr': 'str', +'src_port': 'int', +'dest_addr': 'str', +'dest_port': 'int', +'recv_buffered': 'int', +'send_buffered': 'int' + } } + +## +# @UsernetUDPConnection: +# +# SLIRP UDP information. +# +# @hostfwd: whether this connection has host port forwarding +# +# @expire_time_ms: time in microseconds after which this connection will expire +# +# @fd: the file descriptor of the connection +# +# @src_addr: source address of host port forwarding +# +# @src_port: source port of host port forwarding +# +# @dest_addr: destination address of host port forwarding +# +# @dest_port: destination port of host port forwarding +# +# @recv_buffered: number of bytes queued in the receive buffer +# +# @send_buffered: number of bytes queued in the send buffer +# +# Since: 2.12 +## +{ 'struct': 'UsernetUDPConnection', + 'data': { +'hostfwd': 'bool', +'expire_time_ms': 'int', +'fd': 'int', +'src_addr': 'str', +'src_port': 'int', +'dest_addr': 'str', +'dest_port': 'int', +'recv_buffered': 'int', +'send_buffered': 'int' +} } + +## +# @UsernetICMPConnection: +# +# SLIRP ICMP information. +# +# @expire_time_ms: time in microseconds after which this connection will expire +# +# @fd: the file descriptor of the connection +# +# @src_addr: source address of host port forwarding +# +# @dest_addr: destin
[Qemu-devel] [PATCH 0/2] slirp: Add query-usernet QMP command
The command is a counterpart of HMP "info usernet" and is at least very useful for the VM tests. So add it. Fam Zheng (2): slirp: Add "query-usernet" QMP command tests: Use query-usernet instead of 'info usernet' net/slirp.c| 26 +++ qapi/net.json | 201 + slirp/libslirp.h | 1 + slirp/misc.c | 156 + slirp/tcp.h| 15 tests/vm/basevm.py | 14 ++-- 6 files changed, 346 insertions(+), 67 deletions(-) -- 2.14.3
Re: [Qemu-devel] [PATCH 0/2] slirp: Add query-usernet QMP command
Hi, This series failed build test on s390x host. Please find the details below. Type: series Message-id: 20180226070311.10057-1-f...@redhat.com Subject: [Qemu-devel] [PATCH 0/2] slirp: Add query-usernet QMP command === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that has the patches applied on top of "base" # branch set -e echo "=== ENV ===" env echo "=== PACKAGES ===" rpm -qa echo "=== TEST BEGIN ===" CC=$HOME/bin/cc INSTALL=$PWD/install BUILD=$PWD/build echo -n "Using CC: " realpath $CC mkdir -p $BUILD $INSTALL SRC=$PWD cd $BUILD $SRC/configure --cc=$CC --prefix=$INSTALL make -j4 # XXX: we need reliable clean up # make check -j4 V=1 make install === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu t [tag update] patchew/1519533358-13759-1-git-send-email-suhan...@mails.ucas.ac.cn -> patchew/1519533358-13759-1-git-send-email-suhan...@mails.ucas.ac.cn * [new tag] patchew/20180226070311.10057-1-f...@redhat.com -> patchew/20180226070311.10057-1-f...@redhat.com Switched to a new branch 'test' 0069927f29 tests: Use query-usernet instead of 'info usernet' 085ab77db6 slirp: Add "query-usernet" QMP command === OUTPUT BEGIN === === ENV === LANG=en_US.UTF-8 XDG_SESSION_ID=73208 USER=fam PWD=/var/tmp/patchew-tester-tmp-5g645hxd/src HOME=/home/fam SHELL=/bin/sh SHLVL=2 PATCHEW=/home/fam/patchew/patchew-cli -s http://patchew.org --nodebug LOGNAME=fam DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1012/bus XDG_RUNTIME_DIR=/run/user/1012 PATH=/usr/bin:/bin _=/usr/bin/env === PACKAGES === gpg-pubkey-873529b8-54e386ff glibc-debuginfo-common-2.24-10.fc25.s390x fedora-release-26-1.noarch dejavu-sans-mono-fonts-2.35-4.fc26.noarch xemacs-filesystem-21.5.34-22.20170124hgf412e9f093d4.fc26.noarch bash-4.4.12-7.fc26.s390x freetype-2.7.1-9.fc26.s390x libSM-1.2.2-5.fc26.s390x libmpc-1.0.2-6.fc26.s390x libaio-0.3.110-7.fc26.s390x libverto-0.2.6-7.fc26.s390x perl-Scalar-List-Utils-1.48-1.fc26.s390x iptables-libs-1.6.1-2.fc26.s390x perl-threads-shared-1.57-1.fc26.s390x p11-kit-trust-0.23.9-2.fc26.s390x tcl-8.6.6-2.fc26.s390x libxshmfence-1.2-4.fc26.s390x expect-5.45-23.fc26.s390x perl-Thread-Queue-3.12-1.fc26.noarch perl-encoding-2.19-6.fc26.s390x keyutils-1.5.10-1.fc26.s390x gmp-devel-6.1.2-4.fc26.s390x enchant-1.6.0-16.fc26.s390x net-snmp-libs-5.7.3-17.fc26.s390x python-gobject-base-3.24.1-1.fc26.s390x python3-distro-1.0.3-1.fc26.noarch python3-enchant-1.6.10-1.fc26.noarch python-lockfile-0.11.0-6.fc26.noarch python2-pyparsing-2.1.10-3.fc26.noarch python2-lxml-4.1.1-1.fc26.s390x librados2-10.2.7-2.fc26.s390x trousers-lib-0.3.13-7.fc26.s390x libpaper-1.1.24-14.fc26.s390x libdatrie-0.2.9-4.fc26.s390x libsoup-2.58.2-1.fc26.s390x passwd-0.79-9.fc26.s390x bind99-libs-9.9.10-3.P3.fc26.s390x python3-rpm-4.13.0.2-1.fc26.s390x mock-core-configs-27.4-1.fc26.noarch systemd-233-7.fc26.s390x virglrenderer-0.6.0-1.20170210git76b3da97b.fc26.s390x s390utils-ziomon-1.36.1-3.fc26.s390x s390utils-osasnmpd-1.36.1-3.fc26.s390x libXrandr-1.5.1-2.fc26.s390x libglvnd-glx-1.0.0-1.fc26.s390x texlive-ifxetex-svn19685.0.5-33.fc26.2.noarch texlive-psnfss-svn33946.9.2a-33.fc26.2.noarch texlive-dvipdfmx-def-svn40328-33.fc26.2.noarch texlive-natbib-svn20668.8.31b-33.fc26.2.noarch texlive-xdvi-bin-svn40750-33.20160520.fc26.2.s390x texlive-cm-svn32865.0-33.fc26.2.noarch texlive-beton-svn15878.0-33.fc26.2.noarch texlive-fpl-svn15878.1.002-33.fc26.2.noarch texlive-mflogo-svn38628-33.fc26.2.noarch texlive-texlive-docindex-svn41430-33.fc26.2.noarch texlive-luaotfload-bin-svn34647.0-33.20160520.fc26.2.noarch texlive-koma-script-svn41508-33.fc26.2.noarch texlive-pst-tree-svn24142.1.12-33.fc26.2.noarch texlive-breqn-svn38099.0.98d-33.fc26.2.noarch texlive-xetex-svn41438-33.fc26.2.noarch gstreamer1-plugins-bad-free-1.12.3-1.fc26.s390x xorg-x11-font-utils-7.5-33.fc26.s390x ghostscript-fonts-5.50-36.fc26.noarch libXext-devel-1.3.3-5.fc26.s390x libusbx-devel-1.0.21-2.fc26.s390x libglvnd-devel-1.0.0-1.fc26.s390x emacs-25.3-3.fc26.s390x alsa-lib-devel-1.1.4.1-1.fc26.s390x kbd-2.0.4-2.fc26.s390x dconf-0.26.0-2.fc26.s390x ccache-3.3.4-1.fc26.s390x glibc-static-2.25-12.fc26.s390x mc-4.8.19-5.fc26.s390x doxygen-1.8.13-9.fc26.s390x dpkg-1.18.24-1.fc26.s390x libtdb-1.3.13-1.fc26.s390x python2-pynacl-1.1.1-1.fc26.s390x nss-sysinit-3.34.0-1.0.fc26.s390x kernel-4.13.16-202.fc26.s390x perl-Filter-1.58-1.fc26.s390x python2-pip-9.0.1-11.fc26.noarch dnf-2.7.5-2.fc26.noarch pcre2-utf16-10.23-11.fc26.s390x glusterfs-devel-3.10.8-1.fc26.s390x sssd-common-1.16.0-4.fc26.s390x python2-sssdconfig-1.16.0-4.fc26.noarch acpica-tools-20171110-1.fc26.s390x glibc-debuginfo-2.24-10.fc25.s390x fedora-repos-26-1.noarch dejavu-fonts-common-2.35-4.fc26.noarch bind99-license-9.9.10-3.P3.fc26.noarch ncurses-libs-6.0-8.20170212.fc26.s390x libpng-1.6.28-2.fc26.s390x libICE-1.0.9-9.fc26.s390x kmod-24-1.fc26.s390x libseccomp-2.3.2-1.fc26.s39
Re: [Qemu-devel] [PATCH v4 RFC 3/3] util/uri.c: wrap single statement blocks with braces {}
I can't be too happy to know my first patch get accepted! ^_^ I hope I can make more contributions to community! > -Original Messages- > From: "Thomas Huth" > Sent Time: 2018-02-26 14:49:46 (Monday) > To: "Su Hang" , boxa...@163.com > Cc: qemu-devel@nongnu.org, "Stefan Hajnoczi" > Subject: Re: [Qemu-devel] [PATCH v4 RFC 3/3] util/uri.c: wrap single > statement blocks with braces {} > > On 25.02.2018 05:35, Su Hang wrote: > > For this patch, using curly braces to wrap `if` `while` `else` statements, > > which only hold single statement. For example: > > ''' > > if (cond) > > statement; > > ''' > > to > > ''' > > if (cond) { > > statement; > > } > > ''' > > > > And using tricks that compare the disassemblies before and after > > code changes, to make sure code logic isn't changed: > > ''' > > git checkout master > > make util/uri.o > > strip util/uri.o > > objdump -Drx util/uri.o > /tmp/uri-master.txt > > git checkout cleanupbranch > > make util/uri.o > > strip util/uri.o > > objdump -Drx util/uri.o > /tmp/uri-cleanup.txt > > diff -u /tmp/uri-*.txt > > ''' > > > > With that, all complaints raised by checkpatch.pl have been suppressed. > > > > Suggested-by: Thomas Huth > > Suggested-by: Eric Blake > > Signed-off-by: Su Hang > > --- > > util/uri.c | 463 > > +++-- > > 1 file changed, 294 insertions(+), 169 deletions(-) > > Reviewed-by: Thomas Huth > > I've also checked again with the "objdump" trick that there are no > differences in the generated code, and indeed, looks good now, so I > think I can also say: > > Tested-by: Thomas Huth > > Thank you very much for cleaning up that huge file! > > Thomas
Re: [Qemu-devel] [PATCH qemu repost] qmp: Add qom-list-properties to list QOM object properties
On 23/02/18 22:33, Paolo Bonzini wrote: > On 22/02/2018 06:00, Alexey Kardashevskiy wrote: >> There is already 'device-list-properties' which does most of the job, >> however it does not handle everything returned by qom-list-types such >> as machines as they inherit directly from TYPE_OBJECT and not TYPE_DEVICE. >> >> This adds a new qom-list-properties command which prints properties >> of a specific class and its instance. It is pretty much a simplified copy >> of the device-list-properties handler. >> >> Since it creates an object instance, device properties should appear >> in the output as they are copied to QOM properties at the instance_init >> hook. >> >> Signed-off-by: Alexey Kardashevskiy >> --- >> >> This is a simple rebase on top of the current upstream. >> >> >> --- >> qapi-schema.json | 29 + >> qmp.c| 52 >> 2 files changed, 81 insertions(+) >> >> diff --git a/qapi-schema.json b/qapi-schema.json >> index 0262b9f..fa5f189 100644 >> --- a/qapi-schema.json >> +++ b/qapi-schema.json >> @@ -1455,6 +1455,35 @@ >>'returns': [ 'DevicePropertyInfo' ] } >> >> ## >> +# @QOMPropertyInfo: >> +# >> +# Information about object properties. >> +# >> +# @name: the name of the property >> +# @type: the typename of the property >> +# @description: if specified, the description of the property. >> +# >> +# Since: 2.12 >> +## >> +{ 'struct': 'QOMPropertyInfo', >> + 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } } >> + >> +## >> +# @qom-list-properties: >> +# >> +# List properties associated with a QOM object. >> +# >> +# @typename: the type name of an object >> +# >> +# Returns: a list of QOMPropertyInfo describing object properties >> +# >> +# Since: 2.12 >> +## >> +{ 'command': 'qom-list-properties', >> + 'data': { 'typename': 'str'}, >> + 'returns': [ 'QOMPropertyInfo' ] } >> + >> +## >> # @xen-set-global-dirty-log: >> # >> # Enable or disable the global dirty log mode. >> diff --git a/qmp.c b/qmp.c >> index 793f6f3..f2d4781 100644 >> --- a/qmp.c >> +++ b/qmp.c >> @@ -576,6 +576,58 @@ DevicePropertyInfoList >> *qmp_device_list_properties(const char *typename, >> return prop_list; >> } >> >> +QOMPropertyInfoList *qmp_qom_list_properties(const char *typename, >> + Error **errp) >> +{ >> +ObjectClass *klass; >> +Object *obj; >> +ObjectProperty *prop; >> +ObjectPropertyIterator iter; >> +QOMPropertyInfoList *prop_list = NULL; >> + >> +klass = object_class_by_name(typename); >> +if (klass == NULL) { >> +error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND, >> + "Class '%s' not found", typename); >> +return NULL; >> +} >> + >> +klass = object_class_dynamic_cast(klass, TYPE_OBJECT); >> +if (klass == NULL) { >> +error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "typename", >> TYPE_OBJECT); >> +return NULL; >> +} >> + >> +if (object_class_is_abstract(klass)) { >> +error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "typename", >> + "non-abstract class"); > > This sucks, it would be nice to enumerate properties on base classes. We > could list class properties only. However, it can be improved later. > > Queued, thanks. Wait, adding abstract classes support seems very easy, I'll post v2 in a few minutes. -- Alexey
Re: [Qemu-devel] [PATCH 0/2] slirp: Add query-usernet QMP command
On Sun, 02/25 23:10, no-re...@patchew.org wrote: > Hi, > > This series failed build test on s390x host. Please find the details below. > > Type: series > Message-id: 20180226070311.10057-1-f...@redhat.com > Subject: [Qemu-devel] [PATCH 0/2] slirp: Add query-usernet QMP command > > === TEST SCRIPT BEGIN === > #!/bin/bash > # Testing script will be invoked under the git checkout with > # HEAD pointing to a commit that has the patches applied on top of "base" > # branch > set -e > echo "=== ENV ===" > env > echo "=== PACKAGES ===" > rpm -qa > echo "=== TEST BEGIN ===" > CC=$HOME/bin/cc > INSTALL=$PWD/install > BUILD=$PWD/build > echo -n "Using CC: " > realpath $CC > mkdir -p $BUILD $INSTALL > SRC=$PWD > cd $BUILD > $SRC/configure --cc=$CC --prefix=$INSTALL > make -j4 > # XXX: we need reliable clean up > # make check -j4 V=1 > make install > === TEST SCRIPT END === > > Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 > From https://github.com/patchew-project/qemu > t [tag update] > patchew/1519533358-13759-1-git-send-email-suhan...@mails.ucas.ac.cn -> > patchew/1519533358-13759-1-git-send-email-suhan...@mails.ucas.ac.cn > * [new tag] patchew/20180226070311.10057-1-f...@redhat.com -> > patchew/20180226070311.10057-1-f...@redhat.com > Switched to a new branch 'test' > 0069927f29 tests: Use query-usernet instead of 'info usernet' > 085ab77db6 slirp: Add "query-usernet" QMP command > > === OUTPUT BEGIN === > === ENV === > LANG=en_US.UTF-8 > XDG_SESSION_ID=73208 > USER=fam > PWD=/var/tmp/patchew-tester-tmp-5g645hxd/src > HOME=/home/fam > SHELL=/bin/sh > SHLVL=2 > PATCHEW=/home/fam/patchew/patchew-cli -s http://patchew.org --nodebug > LOGNAME=fam > DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1012/bus > XDG_RUNTIME_DIR=/run/user/1012 > PATH=/usr/bin:/bin > _=/usr/bin/env > === PACKAGES === > gpg-pubkey-873529b8-54e386ff > glibc-debuginfo-common-2.24-10.fc25.s390x > fedora-release-26-1.noarch > dejavu-sans-mono-fonts-2.35-4.fc26.noarch > xemacs-filesystem-21.5.34-22.20170124hgf412e9f093d4.fc26.noarch > bash-4.4.12-7.fc26.s390x > freetype-2.7.1-9.fc26.s390x > libSM-1.2.2-5.fc26.s390x > libmpc-1.0.2-6.fc26.s390x > libaio-0.3.110-7.fc26.s390x > libverto-0.2.6-7.fc26.s390x > perl-Scalar-List-Utils-1.48-1.fc26.s390x > iptables-libs-1.6.1-2.fc26.s390x > perl-threads-shared-1.57-1.fc26.s390x > p11-kit-trust-0.23.9-2.fc26.s390x > tcl-8.6.6-2.fc26.s390x > libxshmfence-1.2-4.fc26.s390x > expect-5.45-23.fc26.s390x > perl-Thread-Queue-3.12-1.fc26.noarch > perl-encoding-2.19-6.fc26.s390x > keyutils-1.5.10-1.fc26.s390x > gmp-devel-6.1.2-4.fc26.s390x > enchant-1.6.0-16.fc26.s390x > net-snmp-libs-5.7.3-17.fc26.s390x > python-gobject-base-3.24.1-1.fc26.s390x > python3-distro-1.0.3-1.fc26.noarch > python3-enchant-1.6.10-1.fc26.noarch > python-lockfile-0.11.0-6.fc26.noarch > python2-pyparsing-2.1.10-3.fc26.noarch > python2-lxml-4.1.1-1.fc26.s390x > librados2-10.2.7-2.fc26.s390x > trousers-lib-0.3.13-7.fc26.s390x > libpaper-1.1.24-14.fc26.s390x > libdatrie-0.2.9-4.fc26.s390x > libsoup-2.58.2-1.fc26.s390x > passwd-0.79-9.fc26.s390x > bind99-libs-9.9.10-3.P3.fc26.s390x > python3-rpm-4.13.0.2-1.fc26.s390x > mock-core-configs-27.4-1.fc26.noarch > systemd-233-7.fc26.s390x > virglrenderer-0.6.0-1.20170210git76b3da97b.fc26.s390x > s390utils-ziomon-1.36.1-3.fc26.s390x > s390utils-osasnmpd-1.36.1-3.fc26.s390x > libXrandr-1.5.1-2.fc26.s390x > libglvnd-glx-1.0.0-1.fc26.s390x > texlive-ifxetex-svn19685.0.5-33.fc26.2.noarch > texlive-psnfss-svn33946.9.2a-33.fc26.2.noarch > texlive-dvipdfmx-def-svn40328-33.fc26.2.noarch > texlive-natbib-svn20668.8.31b-33.fc26.2.noarch > texlive-xdvi-bin-svn40750-33.20160520.fc26.2.s390x > texlive-cm-svn32865.0-33.fc26.2.noarch > texlive-beton-svn15878.0-33.fc26.2.noarch > texlive-fpl-svn15878.1.002-33.fc26.2.noarch > texlive-mflogo-svn38628-33.fc26.2.noarch > texlive-texlive-docindex-svn41430-33.fc26.2.noarch > texlive-luaotfload-bin-svn34647.0-33.20160520.fc26.2.noarch > texlive-koma-script-svn41508-33.fc26.2.noarch > texlive-pst-tree-svn24142.1.12-33.fc26.2.noarch > texlive-breqn-svn38099.0.98d-33.fc26.2.noarch > texlive-xetex-svn41438-33.fc26.2.noarch > gstreamer1-plugins-bad-free-1.12.3-1.fc26.s390x > xorg-x11-font-utils-7.5-33.fc26.s390x > ghostscript-fonts-5.50-36.fc26.noarch > libXext-devel-1.3.3-5.fc26.s390x > libusbx-devel-1.0.21-2.fc26.s390x > libglvnd-devel-1.0.0-1.fc26.s390x > emacs-25.3-3.fc26.s390x > alsa-lib-devel-1.1.4.1-1.fc26.s390x > kbd-2.0.4-2.fc26.s390x > dconf-0.26.0-2.fc26.s390x > ccache-3.3.4-1.fc26.s390x > glibc-static-2.25-12.fc26.s390x > mc-4.8.19-5.fc26.s390x > doxygen-1.8.13-9.fc26.s390x > dpkg-1.18.24-1.fc26.s390x > libtdb-1.3.13-1.fc26.s390x > python2-pynacl-1.1.1-1.fc26.s390x > nss-sysinit-3.34.0-1.0.fc26.s390x > kernel-4.13.16-202.fc26.s390x > perl-Filter-1.58-1.fc26.s390x > python2-pip-9.0.1-11.fc26.noarch > dnf-2.7.5-2.fc26.noarch > pcre2-utf16-10.23-11.fc26.s390x > glusterfs-devel-3.10.8-1.fc26.s390x > sssd-common-1.16.0-4.fc26.s390x > python2-ss
[Qemu-devel] [PATCH v2 0/2] slirp: Add query-usernet QMP command
v2: Fix compiler error. [patchew] The command is a counterpart of HMP "info usernet" and is at least very useful for the VM tests. So add it. Fam Zheng (2): slirp: Add "query-usernet" QMP command tests: Use query-usernet instead of 'info usernet' net/slirp.c| 26 +++ qapi/net.json | 201 + slirp/libslirp.h | 1 + slirp/misc.c | 156 + slirp/tcp.h| 15 tests/vm/basevm.py | 14 ++-- 6 files changed, 346 insertions(+), 67 deletions(-) -- 2.14.3
[Qemu-devel] [PATCH v2 2/2] tests: Use query-usernet instead of 'info usernet'
Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 686d88decf..f51604e0ab 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -101,7 +101,7 @@ class BaseVM(object): "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=" + os.devnull, "-o", "ConnectTimeout=1", - "-p", self.ssh_port, "-i", self._ssh_key_file] + "-p", str(self.ssh_port), "-i", self._ssh_key_file] if interactive: ssh_cmd += ['-t'] assert not isinstance(cmd, str) @@ -166,13 +166,13 @@ class BaseVM(object): raise atexit.register(self.shutdown) self._guest = guest -usernet_info = guest.qmp("human-monitor-command", - command_line="info usernet") +usernet_info = guest.qmp("query-usernet") self.ssh_port = None -for l in usernet_info["return"].splitlines(): -fields = l.split() -if "TCP[HOST_FORWARD]" in fields and "22" in fields: -self.ssh_port = l.split()[3] +for i in usernet_info["return"]: +if i.get("id") != "vnet": +continue +self.ssh_port = i["connections"][0]["src_port"] +break if not self.ssh_port: raise Exception("Cannot find ssh port from 'info usernet':\n%s" % \ usernet_info) -- 2.14.3