[Top][All Lists]

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

[Qemu-commits] [qemu/qemu] 586502: qemu-char: Inherit ptys and improve o

From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 586502: qemu-char: Inherit ptys and improve output from -s...
Date: Sun, 23 Dec 2012 13:30:07 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 586502189edf9fd0f89a83de96717a2ea826fdb0
  Author: Lei Li <address@hidden>
  Date:   2012-12-23 (Sun, 23 Dec 2012)

  Changed paths:
    M qemu-char.c

  Log Message:
  qemu-char: Inherit ptys and improve output from -serial pty

Changes since V1:
  - Avoid crashing since qemu_opts_id() may return null on some
    systems according to Markus's suggestion.

When controlling a qemu instance from another program, it's
hard to know which serial port or monitor device is redirected
to which pty. With more than one device using "pty" a lot of
guesswork is involved.

$ ./x86_64-softmmu/qemu-system-x86_64 -serial pty -serial pty -monitor pty
char device redirected to /dev/pts/5
char device redirected to /dev/pts/6
char device redirected to /dev/pts/7

Although we can find out what everything else is connected to
by the "info chardev" with "-monitor stdio" in the command line,
It'd be very useful to be able to have qemu inherit pseudo-tty
file descriptors so they could just be specified on the command
line like:

$ ./x86_64-softmmu/qemu-system-x86_64 -serial pty -serial pty -monitor pty
char device compat_monitor0 redirected to /dev/pts/5
char device serial0 redirected to /dev/pts/6
char device serial1 redirected to /dev/pts/7

Referred link: https://bugs.launchpad.net/qemu/+bug/938552

Signed-off-by: Lei Li <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

  Commit: 57f26ae72983095d0258e391041dfb8864f769e5
  Author: Eduardo Habkost <address@hidden>
  Date:   2012-12-23 (Sun, 23 Dec 2012)

  Changed paths:
    M target-i386/cpu.c

  Log Message:
  target-i386: CPUID: return highest basic leaf if eax > cpuid_xlevel

This fixes a subtle bug. A bug that probably won't cause trouble for any
existing OS, but a bug anyway:

Intel SDM Volume 2, CPUID Instruction states:

> Two types of information are returned: basic and extended function
> information. If a value entered for CPUID.EAX is higher than the maximum
> input value for basic or extended function for that processor then the
> data for the highest basic information leaf is returned. For example,
> using the Intel Core i7 processor, the following is true:
>   CPUID.EAX = 05H (* Returns MONITOR/MWAIT leaf. *)
>   CPUID.EAX = 0AH (* Returns Architectural Performance Monitoring leaf. *)
>   CPUID.EAX = 0BH (* Returns Extended Topology Enumeration leaf. *)
>   CPUID.EAX = 0CH (* INVALID: Returns the same information as CPUID.EAX = 
> 0BH. *)
>   CPUID.EAX = 80000008H (* Returns linear/physical address size data. *)
>   CPUID.EAX = 8000000AH (* INVALID: Returns same information as CPUID.EAX = 
> 0BH. *)

AMD's CPUID Specification, on the other hand, is less specific:

> The CPUID instruction supports two sets or ranges of functions,
> standard and extended.
> • The smallest function number of the standard function range is
>   Fn0000_0000. The largest function num- ber of the standard function
>   range, for a particular implementation, is returned in CPUID
>   Fn0000_0000_EAX.
> • The smallest function number of the extended function range is
>   Fn8000_0000. The largest function num- ber of the extended function
>   range, for a particular implementation, is returned in CPUID
>   Fn8000_0000_EAX.
> Functions that are neither standard nor extended are undefined and
> should not be relied upon.

QEMU's behavior matched Intel's specification before, but this was
changed by commit b3baa152aaef1905876670590275c2dd0bbb088c. This patch
restores the behavior documented by Intel when cpuid_xlevel2 is 0.

The existing behavior when cpuid_xlevel2 is set (falling back to
level=cpuid_xlevel) is being kept, as I couldn't find any public
documentation on the CPUID 0xC0000000 function range on Centaur CPUs.

Signed-off-by: Eduardo Habkost <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

  Commit: 6265e4ff327763b6362cba472e2b46f2dcf18762
  Author: Jan Kiszka <address@hidden>
  Date:   2012-12-23 (Sun, 23 Dec 2012)

  Changed paths:
    M qemu-thread-win32.c

  Log Message:
  win32: Switch thread abstraction to us TLS variable internally

We already depend on working __thread support for coroutines, so this
complication here is no longer needed.

Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Jan Kiszka <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

  Commit: eac236ea7bfc1902126be70459e320591078df5c
  Author: Lluís Vilanova <address@hidden>
  Date:   2012-12-23 (Sun, 23 Dec 2012)

  Changed paths:
    M .gitignore
    M Makefile
    M Makefile.objs
    M scripts/tracetool/backend/dtrace.py
    M scripts/tracetool/format/h.py
    A trace.h
    A trace/Makefile.objs

  Log Message:
  build: Use separate makefile for "trace/"

Reviewed-by: Paolo Bonzini <address@hidden>
Signed-off-by: Lluís Vilanova <address@hidden>
Changes in v2:

* Do not depend on "qemu-timer-common.o".
* Use "$(obj)" in rules to refer to the build sub-directory.
* Remove dependencies against "$(GENERATED_HEADERS)".

Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

  Commit: 2915efbfa8efadaa2806e827ba92b8dba4f7cd52
  Author: Alex Horn <address@hidden>
  Date:   2012-12-23 (Sun, 23 Dec 2012)

  Changed paths:
    M hw/i2c.h
    M hw/tmp105.c
    A hw/tmp105.h

  Log Message:
  tmp105: Create API for TMP105 temperature sensor.

* Define enum for TMP105 registers
* Move tmp105_set() from I2C to TMP105 header
* Document units and range of temperature as preconditions

Reviewed-by: Andreas Färber <address@hidden>
Signed-off-by: Alex Horn <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

  Commit: 74880fe27d2120ab3861dc857ecd025db1a67038
  Author: Robert Schiele <address@hidden>
  Date:   2012-12-23 (Sun, 23 Dec 2012)

  Changed paths:
    M configure
    M target-unicore32/helper.c

  Log Message:
  configure: allow disabling pixman if not needed

When we build neither any system emulation targets nor the tools there
is actually no need for pixman library.  In that case do not enforce
presence of that library on the system.

Reviewed-by: Andreas F=E4rber <address@hidden>
Signed-off-by: Robert Schiele <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

Compare: https://github.com/qemu/qemu/compare/36f25d2537c4...74880fe27d21

reply via email to

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