qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] WebGame


From: Haitham Zuriq
Subject: [Qemu-devel] WebGame
Date: Tue, 26 Mar 2013 04:53:05 +0300






Sent from Samsung tablet



-------- Original message --------
From: address@hidden
Date: 26/03/2013 12:36 AM (GMT+03:00)
To: address@hidden
Subject: Qemu-devel Digest, Vol 120, Issue 840


Send Qemu-devel mailing list submissions to
address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
https://lists.nongnu.org/mailman/listinfo/qemu-devel
or, via email, send a message with subject or body 'help' to
address@hidden

You can reach the person managing the list at
address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Qemu-devel digest..."


Today's Topics:

   1. Re: [RFC PATCH 1/3] target-i386: Add 486sx, old486, and
      old486sx CPU models (H. Peter Anvin)
   2. [Bug 1158912] Re: QEMU Version 1.4.0 - SLIRP hangs VM
      (Kenneth Salerno)
   3. [Bug 1158912] Re: QEMU Version 1.4.0 - SLIRP hangs VM
      (Kenneth Salerno)
   4. Re: [PATCH 2/2] Monitor: Make output buffer dynamic
      (Paolo Bonzini)
   5. Re: [PATCH] ifname=xxx for -netdev bridge (Alexandre Kandalintsev)
   6. Re: [PATCHv4 0/9] buffer_is_zero / migration optimizations
      (Peter Lieven)


----------------------------------------------------------------------

Message: 1
Date: Mon, 25 Mar 2013 13:56:41 -0700
From: "H. Peter Anvin" <address@hidden>
To: Eduardo Habkost <address@hidden>
Cc: Igor Mammedov <address@hidden>, Orit Wasserman
<address@hidden>, Andreas F?rber <address@hidden>, Anthony
Liguori <address@hidden>, address@hidden
Subject: Re: [Qemu-devel] [RFC PATCH 1/3] target-i386: Add 486sx,
old486, and old486sx CPU models
Message-ID: <address@hidden>
Content-Type: text/plain; charset=UTF-8

On 03/25/2013 01:56 PM, Eduardo Habkost wrote:
>
>>
>> It needs to be possible to fix bugs....
>
> It is possible to fix them today: just write a compat function or add a
> global variable that is handled by cpu_x86_init(), and call it from the
> pc-1.3 machine-type init function. See disable_kvm_pv_eoi() and
> enable_compat_apic_id_mode(), for example.
>
> The difference is that this will be much easier once we introduce the
> static properties: then you just need to add the compat property values
> to the compat_props field on the machine-type struct.
>

It sounds like this is underway, and since the priority for the 486 bit
is very low it is better for that bit to just wait.

-hpa




------------------------------

Message: 2
Date: Mon, 25 Mar 2013 20:59:53 -0000
From: Kenneth Salerno <address@hidden>
To: address@hidden
Subject: [Qemu-devel] [Bug 1158912] Re: QEMU Version 1.4.0 - SLIRP
hangs VM
Message-ID: <address@hidden>
Content-Type: text/plain; charset="utf-8"

** Attachment added: "GDB log to match strace log"
   https://bugs.launchpad.net/qemu/+bug/1158912/+attachment/3596881/+files/debug-qemu-20130325-1050.log

--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1158912

Title:
  QEMU Version 1.4.0 - SLIRP hangs VM

Status in QEMU:
  New

Bug description:
  (Note: problem is not present in version 1.3.0)

  Stacktrace: please see attached gdb log file.

  Steps to reproduce:

  1. gdb -x debug-qemu.gdb testing/qemu-1.4.0/ppc64-softmmu/qemu-system-
  ppc64

  Contents of debug-qemu.gdb:

  run -L ./testing/qemu-1.4.0/pc-bios  -name "[DEBUG] Software und
  System-Entwicklung IBM POWER7" -cpu POWER7_v2.3 -M pseries -m 1024
  -rtc base=utc -nodefaults -vga std -monitor vc -serial vc -netdev
  type=user,id=mynet0,hostfwd=tcp:127.0.0.1:9011-10.0.2.11:22 -device
  virtio-net-pci,netdev=mynet0 -drive file=images/suse-
  ppc.img,if=virtio,index=0,media=disk,cache=unsafe -kernel
  images/iso/suseboot/vmlinux -append "root=/dev/mapper/system-root ro
  audit=0 selinux=0 apparmor=0" -initrd images/iso/suseboot/initrd.img
  -drive if=scsi,bus=0,unit=0,media=cdrom

 
  2. build information
      QEMU: ppc64 full emulation, version 1.4.0
      Host OS: Windows XP
      Guest OS: openSUSE 12.2 kernel 3.4.6-2.10-ppc64

      PATH=/usr/i686-pc-mingw32/sys-root/mingw/bin:$PATH
      PKG_CONFIG_LIBDIR=/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig
      THREADS=4
      export PKG_CONFIG_LIBDIR
     
      sed -i 's/--static-libs/--static --libs/' configure
      CC=i686-pc-mingw32-gcc ./configure \
            --target-list=ppc64-softmmu \
            --enable-debug \
            --enable-sdl \
            --static \
            --enable-fdt && \
      sed -i 's/ -Wl,--dynamicbase//g; s/-Wl,--nxcompat //g;'  config-host.mak && \
      make -j$THREADS && {
            echo "renaming binw.exe to bin.exe..."
            for i in `echo $TARGET_LIST | tr ',' ' '`; do
                   BINARCH=`echo $i | sed 's/-softmmu//'`
                   mv $i/qemu-system-${BINARCH}w.exe \
                          $i/qemu-system-$BINARCH.exe
            done
      }

    
  3. From VM:
      Command to hang VM: zypper dup
      Last message before VM hang:  Retrieving repository 'openSUSE-12.2-12.2-0' metadata -----------------------[|]

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1158912/+subscriptions



------------------------------

Message: 3
Date: Mon, 25 Mar 2013 20:57:46 -0000
From: Kenneth Salerno <address@hidden>
To: address@hidden
Subject: [Qemu-devel] [Bug 1158912] Re: QEMU Version 1.4.0 - SLIRP
hangs VM
Message-ID: <address@hidden>
Content-Type: text/plain; charset="utf-8"

Result of git bisect:

commit 837d1f978224f7e7b020c71ffb10b291952cc596
Merge: a6fc23e 2b35e93
Author: Blue Swirl <address@hidden>
Date:   Sat Jan 12 12:46:57 2013 +0000

    Merge branch 's390-reorg' of git://repo.or.cz/qemu/rth
   
    * 's390-reorg' of git://repo.or.cz/qemu/rth: (149 commits)
      target-s390: Claim maintainership
      target-s390: Use noreturn for exception and load_psw
      target-s390: Use TCG_CALL_NO_WG for misc helpers
      target-s390: Use TCG_CALL_NO_WG for integer helpers
      target-s390: Use TCG_CALL_NO_WG for floating-point helpers
      target-s390: Use TCG_CALL_NO_WG for memory helpers
      target-s390: Perform COMPARE AND SWAP inline
      target-s390: Optimize get_address
      target-s390: Optimize ADDC/SUBB
      target-s390: Optimize ADDU/SUBU CC testing
      target-s390: Tidy comparisons
      target-s390: Optmize emitting discards
      target-s390: Optimize XC
      target-s390: Fix cpu_clone_regs
      target-s390: Implement LOAD/SET FP AND SIGNAL
      target-s390: Implement SET ROUNDING MODE
      target-s390: Use uint64_to_float128
      target-s390: Implement LCDFR
      target-s390: Check insn operand specifications
      target-s390: Implement CPSDR
      ...


There are 1,484 files affected by this commit - Is there a way I can narrow this down even further within this commit?

Also attaching "strace -f" output from guest during execution of "zypper
dup" leading to hang, as well as corresponding qemu gdb log following
hang.

The last lines of the strace are:

time(NULL)                              = 1364222018
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
uname({sys="Linux", node="suse-ppc", ...}) = 0
write(3, "2013-03-25 10:33:38 <1> suse-ppc"..., 127) = 127
time(NULL)                              = 1364222018
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
uname({sys="Linux", node="suse-ppc", ...}) = 0
write(3, "2013-03-25 10:33:38 <1> suse-ppc"..., 137) = 137
close(9)                                = 0
time(NULL)                              = 1364222018
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
uname({sys="Linux", node="suse-ppc", ...}) = 0
write(3, "2013-03-25 10:33:38 <1> suse-ppc"..., 127) = 127
time(NULL)                              = 1364222018
stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3519, ...}) = 0
uname({sys="Linux", node="suse-ppc", ...}) = 0
write(3, "2013-03-25 10:33:38 <1> suse-ppc"..., 137   <------------ QEMU window becomes unresponsive

** Attachment added: "strace log"
   https://bugs.launchpad.net/qemu/+bug/1158912/+attachment/3596880/+files/suse-strace.log

--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1158912

Title:
  QEMU Version 1.4.0 - SLIRP hangs VM

Status in QEMU:
  New

Bug description:
  (Note: problem is not present in version 1.3.0)

  Stacktrace: please see attached gdb log file.

  Steps to reproduce:

  1. gdb -x debug-qemu.gdb testing/qemu-1.4.0/ppc64-softmmu/qemu-system-
  ppc64

  Contents of debug-qemu.gdb:

  run -L ./testing/qemu-1.4.0/pc-bios  -name "[DEBUG] Software und
  System-Entwicklung IBM POWER7" -cpu POWER7_v2.3 -M pseries -m 1024
  -rtc base=utc -nodefaults -vga std -monitor vc -serial vc -netdev
  type=user,id=mynet0,hostfwd=tcp:127.0.0.1:9011-10.0.2.11:22 -device
  virtio-net-pci,netdev=mynet0 -drive file=images/suse-
  ppc.img,if=virtio,index=0,media=disk,cache=unsafe -kernel
  images/iso/suseboot/vmlinux -append "root=/dev/mapper/system-root ro
  audit=0 selinux=0 apparmor=0" -initrd images/iso/suseboot/initrd.img
  -drive if=scsi,bus=0,unit=0,media=cdrom

 
  2. build information
      QEMU: ppc64 full emulation, version 1.4.0
      Host OS: Windows XP
      Guest OS: openSUSE 12.2 kernel 3.4.6-2.10-ppc64

      PATH=/usr/i686-pc-mingw32/sys-root/mingw/bin:$PATH
      PKG_CONFIG_LIBDIR=/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig
      THREADS=4
      export PKG_CONFIG_LIBDIR
     
      sed -i 's/--static-libs/--static --libs/' configure
      CC=i686-pc-mingw32-gcc ./configure \
            --target-list=ppc64-softmmu \
            --enable-debug \
            --enable-sdl \
            --static \
            --enable-fdt && \
      sed -i 's/ -Wl,--dynamicbase//g; s/-Wl,--nxcompat //g;'  config-host.mak && \
      make -j$THREADS && {
            echo "renaming binw.exe to bin.exe..."
            for i in `echo $TARGET_LIST | tr ',' ' '`; do
                   BINARCH=`echo $i | sed 's/-softmmu//'`
                   mv $i/qemu-system-${BINARCH}w.exe \
                          $i/qemu-system-$BINARCH.exe
            done
      }

    
  3. From VM:
      Command to hang VM: zypper dup
      Last message before VM hang:  Retrieving repository 'openSUSE-12.2-12.2-0' metadata -----------------------[|]

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1158912/+subscriptions



------------------------------

Message: 4
Date: Mon, 25 Mar 2013 22:07:36 +0100
From: Paolo Bonzini <address@hidden>
To: Luiz Capitulino <address@hidden>
Cc: address@hidden, address@hidden,
address@hidden
Subject: Re: [Qemu-devel] [PATCH 2/2] Monitor: Make output buffer
dynamic
Message-ID: <address@hidden>
Content-Type: text/plain; charset=ISO-8859-1

Il 25/03/2013 20:40, Luiz Capitulino ha scritto:
> Commit f628926bb423fa8a7e0b114511400ea9df38b76a changed monitor_flush()
> to retry on qemu_chr_fe_write() errors. However, the Monitor's output
> buffer can keep growing while the retry is not issued and this can
> cause the buffer to overflow.
>
> To reproduce this issue, just start qemu and type on the Monitor:
>
> (qemu) ?
>
> This will cause the assertion to trig.
>
> To fix this problem this commit makes the Monitor buffer dynamic,
> which means that it can grow as much as needed.

What about using a GString instead?

Paolo

> Signed-off-by: Luiz Capitulino <address@hidden>
> ---
>  monitor.c | 42 +++++++++++++++++++++++++-----------------
>  1 file changed, 25 insertions(+), 17 deletions(-)
>
> diff --git a/monitor.c b/monitor.c
> index 2d9e887..c93dfe7 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -188,8 +188,7 @@ struct Monitor {
>      int reset_seen;
>      int flags;
>      int suspend_cnt;
> -    uint8_t outbuf[1024];
> -    int outbuf_index;
> +    QString *outbuf;
>      ReadLineState *rs;
>      MonitorControl *mc;
>      CPUArchState *mon_cpu;
> @@ -271,45 +270,52 @@ static gboolean monitor_unblocked(GIOChannel *chan, GIOCondition cond,
>  void monitor_flush(Monitor *mon)
>  {
>      int rc;
> +    size_t len;
> +    const char *buf;
> +
> +    buf = qstring_get_str(mon->outbuf);
> +    len = qstring_get_length(mon->outbuf);

> -    if (mon && mon->outbuf_index != 0 && !mon->mux_out) {
> -        rc = qemu_chr_fe_write(mon->chr, mon->outbuf, mon->outbuf_index);
> -        if (rc == mon->outbuf_index) {
> +    if (mon && len && !mon->mux_out) {
> +        rc = qemu_chr_fe_write(mon->chr, (const uint8_t *) buf, len);
> +        if (rc == len) {
>              /* all flushed */
> -            mon->outbuf_index = 0;
> +            QDECREF(mon->outbuf);
> +            mon->outbuf = qstring_new();
>              return;
>          }
>          if (rc > 0) {
>              /* partinal write */
> -            memmove(mon->outbuf, mon->outbuf + rc, mon->outbuf_index - rc);
> -            mon->outbuf_index -= rc;
> +            QString *tmp = qstring_from_str(buf + rc);
> +            QDECREF(mon->outbuf);
> +            mon->outbuf = tmp;
>          }
>          qemu_chr_fe_add_watch(mon->chr, G_IO_OUT, monitor_unblocked, mon);
>      }
>  }

> -/* flush at every end of line or if the buffer is full */
> +/* flush at every end of line */
>  static void monitor_puts(Monitor *mon, const char *str)
>  {
>      char c;

>      for(;;) {
> -        assert(mon->outbuf_index < sizeof(mon->outbuf) - 1);
>          c = *str++;
>          if (c == '\0')
>              break;
> -        if (c == '\n')
> -            mon->outbuf[mon->outbuf_index++] = '\r';
> -        mon->outbuf[mon->outbuf_index++] = c;
> -        if (mon->outbuf_index >= (sizeof(mon->outbuf) - 1)
> -            || c == '\n')
> +        if (c == '\n') {
> +            qstring_append_chr(mon->outbuf, '\r');
> +        }
> +        qstring_append_chr(mon->outbuf, c);
> +        if (c == '\n') {
>              monitor_flush(mon);
> +        }
>      }
>  }

>  void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
>  {
> -    char buf[4096];
> +    char *buf;

>      if (!mon)
>          return;
> @@ -318,8 +324,9 @@ void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
>          return;
>      }

> -    vsnprintf(buf, sizeof(buf), fmt, ap);
> +    buf = g_strdup_vprintf(fmt, ap);
>      monitor_puts(mon, buf);
> +    g_free(buf);
>  }

>  void monitor_printf(Monitor *mon, const char *fmt, ...)
> @@ -4732,6 +4739,7 @@ void monitor_init(CharDriverState *chr, int flags)
>      }

>      mon = g_malloc0(sizeof(*mon));
> +    mon->outbuf = qstring_new();

>      mon->chr = chr;
>      mon->flags = flags;
>




------------------------------

Message: 5
Date: Mon, 25 Mar 2013 22:28:58 +0100
From: Alexandre Kandalintsev <address@hidden>
To: Stefan Hajnoczi <address@hidden>
Cc: Anthony Liguori <address@hidden>, address@hidden
Subject: Re: [Qemu-devel] [PATCH] ifname=xxx for -netdev bridge
Message-ID: <address@hidden>
Content-Type: text/plain; charset=US-ASCII

> By default, custom names should not be allowed.  Perhaps the
> qemu-bridge-helper configuration file needs an option to specify a
> glob pattern, e.g. vm*.
>
> This way the host system administrator can restrict network interface
> names while still allowing humand-friendly names.

Ok, lets go this way. We will define patterns in bridge.conf like
~~~
allowifname vm*
~~~

--
Alexandre Kandalintsev



------------------------------

Message: 6
Date: Mon, 25 Mar 2013 22:37:44 +0100
From: Peter Lieven <address@hidden>
To: Paolo Bonzini <address@hidden>
Cc: Stefan Hajnoczi <address@hidden>, Orit Wasserman
<address@hidden>, address@hidden, address@hidden
Subject: Re: [Qemu-devel] [PATCHv4 0/9] buffer_is_zero / migration
optimizations
Message-ID: <address@hidden>
Content-Type: text/plain; charset=windows-1252


Am 25.03.2013 um 15:34 schrieb Paolo Bonzini <address@hidden>:

> Il 25/03/2013 14:32, Peter Lieven ha scritto:
>>
>> Am 25.03.2013 um 14:23 schrieb Peter Lieven <address@hidden>:
>>
>>>
>>> Am 25.03.2013 um 14:02 schrieb Paolo Bonzini <address@hidden>:
>>>
>>>>> Maybe I should have explained the output more detailed. The percentages
>>>>> are added. 35.8% in the second last column means that
>>>>> 35.8% have a return value that is less than TARGET_PAGE_SIZE.
>>>>> This was meant to illustrate at how many 64-bit chunks you have
>>>>> to look to grab a certain percentage of non-zero pages.
>>>>
>>>> Ok, I wrongly understood that many pages had 4088 zero bytes but
>>>> the last 8 were not zero.  Now it's clearer, and more logical too. :)
>>>>
>>>>> Looking e.g. at the third value it means that looking at the first
>>>>> three 64-bit chunks it will catch 34.0% of all pages.
>>>>> It turns out that the non-zeroness of a page can be detected looking
>>>>> at the first 256 or so bits and only a low
>>>>> percentage turns out to be non-zero at a later position. So after
>>>>> having checked the first chunks one by one
>>>>> there is no big penalty looking at the remaining chunks with the
>>>>> vectorized loop.
>>>>
>>>> I think it makes most sense to unroll the first four non-vectorized
>>>> iterations, i.e. not use SSE and use three or four ifs.  Either:
>>>>
>>>> if (foo[0]) return 0;
>>>> if (foo[1]) return 8;
>>>> if (foo[2]) return 16;
>>>> if (foo[3]) return 24;
>>>>
>>>> or
>>>>
>>>> if (foo[0]) return 0;
>>>> if (foo[1] | foo[2] | foo[3]) return 8;
>>>>
>>>> and then proceed on the remaining 4096-4*sizeof(long) bytes with
>>>> the vectorized loop.  foo+4 is aligned for SIMD operations on both
>>>> 32- and 64-bit machines, which makes this a nice choice.
>>>
>>> i can't start at foo+4 since the remaining X-4*sizeof(long) bytes
>>> are not dividable by 8*sizeof(VECTYPE).
>
>
> Hmm, right.  What about just processing the first few longs twice, i.e.
> the above followed by "for (i = 0; i < len / sizeof(sizeof(VECTYPE); i
> += BUFFER_FIND_NONZERO_OFFSET_UNROLL_FACTOR)"?

i will profile it tomorrow.

what is bad about processing the first 8 vectors like described below?

>>  for (i = 0; i < BUFFER_FIND_NONZERO_OFFSET_UNROLL_FACTOR; i++) {
>>        if (!ALL_EQ(p[i], zero)) {
>>            return i * sizeof(VECTYPE);
>>        }
>>    }


this way it would not be necessary to process them twice.

Peter




------------------------------

_______________________________________________
Qemu-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/qemu-devel


End of Qemu-devel Digest, Vol 120, Issue 840
********************************************

reply via email to

[Prev in Thread] Current Thread [Next in Thread]