qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 0ff0fa: char: remove fixed length filename al


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 0ff0fa: char: remove fixed length filename allocation
Date: Tue, 26 Jan 2016 08:30:06 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0ff0fad23d3693ecf7a0c462cdb48f0e60f93808
      
https://github.com/qemu/qemu/commit/0ff0fad23d3693ecf7a0c462cdb48f0e60f93808
  Author: Daniel P. Berrange <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  char: remove fixed length filename allocation

A variety of places were snprintf()ing into a fixed length
filename buffer. Some of the buffers were stack allocated,
while another was heap allocated with g_malloc(). Switch
them all to heap allocated using g_strdup_printf() avoiding
arbitrary length restrictions.

This also facilitates later patches which will want to
populate the filename by calling external functions
which do not support use of a pre-allocated buffer.

Signed-off-by: Daniel P. Berrange <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9894dc0cdcc397ee5b26370bc53da6d360a363c2
      
https://github.com/qemu/qemu/commit/9894dc0cdcc397ee5b26370bc53da6d360a363c2
  Author: Daniel P. Berrange <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M qemu-char.c
    M tests/Makefile

  Log Message:
  -----------
  char: convert from GIOChannel to QIOChannel

In preparation for introducing TLS support to the TCP chardev
backend, convert existing chardev code from using GIOChannel
to QIOChannel. This simplifies the chardev code by removing
most of the OS platform conditional code for dealing with
file descriptor passing.

Signed-off-by: Daniel P. Berrange <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f2001a7e0555b66d6db25a3ff1801540814045bb
      
https://github.com/qemu/qemu/commit/f2001a7e0555b66d6db25a3ff1801540814045bb
  Author: Daniel P. Berrange <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  char: don't assume telnet initialization will not block

The current code for doing telnet initialization is writing to
a socket without checking the return status. While it is highly
unlikely to be a problem when writing to a bare socket, as the
buffers are large enough to prevent blocking, this cannot be
assumed safe with TLS sockets. So write the telnet initialization
code into a memory buffer and then use an I/O watch to fully
send the data.

Signed-off-by: Daniel P. Berrange <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a8fb542705ac7e0dcf00908bc47bf49cdd058abe
      
https://github.com/qemu/qemu/commit/a8fb542705ac7e0dcf00908bc47bf49cdd058abe
  Author: Daniel P. Berrange <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M qapi-schema.json
    M qemu-char.c
    M qemu-options.hx

  Log Message:
  -----------
  char: introduce support for TLS encrypted TCP chardev backend

This integrates support for QIOChannelTLS object in the TCP
chardev backend. If the 'tls-creds=NAME' option is passed with
the '-chardev tcp' argument, then it will setup the chardev
such that the client is required to establish a TLS handshake
when connecting. There is no support for checking the client
certificate against ACLs in this initial patch. This is pending
work to QOM-ify the ACL object code.

A complete invocation to run QEMU as the server for a TLS
encrypted serial dev might be

  $ qemu-system-x86_64 \
      -nodefconfig -nodefaults -device sga -display none \
      -chardev socket,id=s0,host=127.0.0.1,port=9000,tls-creds=tls0,server \
      -device isa-serial,chardev=s0 \
      -object tls-creds-x509,id=tls0,endpoint=server,verify-peer=off,\
   dir=/home/berrange/security/qemutls

To test with the gnutls-cli tool as the client:

  $ gnutls-cli --priority=NORMAL -p 9000 \
       --x509cafile=/home/berrange/security/qemutls/ca-cert.pem \
       127.0.0.1

If QEMU was told to use 'anon' credential type, then use the
priority string 'NORMAL:+ANON-DH' with gnutls-cli

Alternatively, if setting up a chardev to operate as a client,
then the TLS credentials registered must be for the client
endpoint. First a TLS server must be setup, which can be done
with the gnutls-serv tool

  $ gnutls-serv --priority=NORMAL -p 9000 --echo \
       --x509cafile=/home/berrange/security/qemutls/ca-cert.pem \
       --x509certfile=/home/berrange/security/qemutls/server-cert.pem \
       --x509keyfile=/home/berrange/security/qemutls/server-key.pem

Then QEMU can connect with

  $ qemu-system-x86_64 \
      -nodefconfig -nodefaults -device sga -display none \
      -chardev socket,id=s0,host=127.0.0.1,port=9000,tls-creds=tls0 \
      -device isa-serial,chardev=s0 \
      -object tls-creds-x509,id=tls0,endpoint=client,\
  dir=/home/berrange/security/qemutls

Signed-off-by: Daniel P. Berrange <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 8485140fa07f839aef65f7f782a958804d745615
      
https://github.com/qemu/qemu/commit/8485140fa07f839aef65f7f782a958804d745615
  Author: Sitsofe Wheeler <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M fsdev/virtfs-proxy-helper.texi
    M qemu-doc.texi
    M qemu-ga.texi
    M qemu-img.texi

  Log Message:
  -----------
  docs: Style the command and its options in the synopsis

Signed-off-by: Sitsofe Wheeler <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 27ef9cb0e77eda46618ea084adffa63ebde5be80
      
https://github.com/qemu/qemu/commit/27ef9cb0e77eda46618ea084adffa63ebde5be80
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M qemu-char.c

  Log Message:
  -----------
  qemu-char: avoid leak in qemu_chr_open_pp_fd

drv leaks if qemu_chr_alloc returns an error.

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


  Commit: c81ab0ac90ce50d85a50934f7a519a8bc68cb155
      
https://github.com/qemu/qemu/commit/c81ab0ac90ce50d85a50934f7a519a8bc68cb155
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Cleanup of multiple imports

Removed multiple imports of the same module and moved all imports to
the top.

It is not necessary to import a module each time one of its
functions/classes is used.
For readability each import should get its own line.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 6590045e5dd2fb0b1d7cdc047ae0c52fd4bb5276
      
https://github.com/qemu/qemu/commit/6590045e5dd2fb0b1d7cdc047ae0c52fd4bb5276
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Replaced os.listdir with os.walk

Os.walk gives back lists of directories and files, no need to filter
directories from the list that listdir gives back.

To make it better understandable a wrapper with docstring was
introduced.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: db3e5d9a22cb533d4834746b82a5572ad8e3a540
      
https://github.com/qemu/qemu/commit/db3e5d9a22cb533d4834746b82a5572ad8e3a540
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Make constants uppercase

Constants should be uppercase with separating underscores, as
requested in PEP8. This helps identifying them when reading the code.

Reviewed-by: Jason J. Herne <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: fff51233b75b745fe6d34f30f39049818d56944b
      
https://github.com/qemu/qemu/commit/fff51233b75b745fe6d34f30f39049818d56944b
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Removed unneeded PERF constants

Only two of the constants are actually needed to set up the events, so
the others were removed. All variables that used them were also removed.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: dbedce0ebc88c9b4d3edc5eb1d1dca8e949141ef
      
https://github.com/qemu/qemu/commit/dbedce0ebc88c9b4d3edc5eb1d1dca8e949141ef
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Mark globals in functions

Updating globals over the globals().update() method is not the
standard way of changing globals. Marking variables as global and
modifying them the standard way is better readable.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a6ad61f98742b881b0bce77efb5664d461735c6b
      
https://github.com/qemu/qemu/commit/a6ad61f98742b881b0bce77efb5664d461735c6b
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Invert dictionaries

The exit reasons dictionaries were defined number -> value but later
on were accessed the other way around. Therefore a invert function
inverted them.

Defining them the right way removes the need to invert them and
therefore also speeds up the script's setup process.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 6fbff649d75137fd808aaab1e78504a786bcdd29
      
https://github.com/qemu/qemu/commit/6fbff649d75137fd808aaab1e78504a786bcdd29
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Cleanup of path variables

Paths to debugfs and trace dirs are now specified globally to remove
redundancies in the code.

Reviewed-by: Jason J. Herne <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 7aa4ee5a60c6ac651fd2e60b783630e35a7e3ff4
      
https://github.com/qemu/qemu/commit/7aa4ee5a60c6ac651fd2e60b783630e35a7e3ff4
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Improve debugfs access checking

Access checking with F_OK was replaced with the better readable
os.path.exists().

On Linux exists() returns False when the user doesn't have sufficient
permissions for statting the directory. Therefore the error message
now states that sufficient rights are needed when the check fails.

Also added check for /sys/kernel/debug/tracing/.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 639ce1831082084af80290c79f06a5794a3caa0b
      
https://github.com/qemu/qemu/commit/639ce1831082084af80290c79f06a5794a3caa0b
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Introduce main function

The main function should be the main location for initialization and
helps encapsulating variables into a scope. This way they don't have
to be global and might be mistaken for local ones.

As the providers variable is scoped now it can't be accessed from
within the Stats class. Hence, the global access to the variable was
changed to a local one.

Reviewed-by: Jason J. Herne <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e02d896e45d5dbb2855a591f8f1e05876df3334b
      
https://github.com/qemu/qemu/commit/e02d896e45d5dbb2855a591f8f1e05876df3334b
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Fix spaces around keyword assignments

Keyword assignments should not not have spaces around the equal
character according to PEP8.

Reviewed-by: Jason J. Herne <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a4b2be204b5034f077c45048e5420c9daf1944b1
      
https://github.com/qemu/qemu/commit/a4b2be204b5034f077c45048e5420c9daf1944b1
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Rename variables that redefine globals

Filter, id and byte are builtin python modules which should not be
redefined by local variables.

Reviewed-by: Jason J. Herne <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: f4109dba216f2df61a6098fdd7a6f2d2be4ac848
      
https://github.com/qemu/qemu/commit/f4109dba216f2df61a6098fdd7a6f2d2be4ac848
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Moved DebugfsProvider

When it is next to the TracepointProvider less scrolling is needed to
change related, surrounding code.

Reviewed-by: Jason J. Herne <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 400b3cb519a286421e61692058b980adb7554e1e
      
https://github.com/qemu/qemu/commit/400b3cb519a286421e61692058b980adb7554e1e
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Fixup syscall error reporting

In 2008 a patch was written that introduced ctypes.get_errno() and
set_errno() as official interfaces to the libc errno variable. Using
them we can avoid accessing private libc variables.
The patch was included in python 2.6.

Also we need to raise the right exception, with the right parameters
and a helpful message.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 392a7fa3ca3fbd157cec6b58283c51cbd894d4fb
      
https://github.com/qemu/qemu/commit/392a7fa3ca3fbd157cec6b58283c51cbd894d4fb
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Set sensible no. files rlimit

As num cpus * 1000 is NOT a sensible rlimit, we need to calculate a
more accurate rlimit.

The number of open files is directly dependent on the cpu count and on
the number of trace points per cpu. A additional constant works as a
buffer for files that are needed by python or do get opened when the
script runs.

Hence we have:
      cpus * traces + constant

Reviewed-by: Jason J. Herne <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 8d3b5ddc4e10eeda435c8f9ceecd15cd9ab284e7
      
https://github.com/qemu/qemu/commit/8d3b5ddc4e10eeda435c8f9ceecd15cd9ab284e7
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Cleanup of platform detection

s390 machines can also be detected via uname -m, i.e. python's
os.uname, no need for more complicated checks.

Calling uname once and saving its value for multiple checks is
perfectly sufficient. We don't expect the machine's architecture to
change when the script is running anyway.

On multi-cpu systems x86_init currently will get called multiple
times, returning makes sure we don't waste cicles on that.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 3e46a5c272c71930d3da7353cdc1f912528f1da8
      
https://github.com/qemu/qemu/commit/3e46a5c272c71930d3da7353cdc1f912528f1da8
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Make cpu detection a function

The online cpus detection method is in the Stats class but does not
use any class variables.

Moving it out of the class to the platform detection function makes
the Stats class more readable.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 312bf62b7cb37928ef992518df9a0a5e38a2c69a
      
https://github.com/qemu/qemu/commit/312bf62b7cb37928ef992518df9a0a5e38a2c69a
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Rename _perf_event_open

The underscore in front of the function name does not comply with the
python coding guidelines.

Reviewed-by: Jason J. Herne <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a90b87bf25d4d96a8c31a78eefe4633a0e9da3ad
      
https://github.com/qemu/qemu/commit/a90b87bf25d4d96a8c31a78eefe4633a0e9da3ad
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Introduce properties for providers

As previous commit authors used a mixture of setters/getters and
direct access to class variables consolidating them the python way
improved readability.

Properties allow us to assign a value to a class variable through a
setter without the need to call the setter ourselves.

Reviewed-by: Jason J. Herne <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
[prop.setter is new in Python 2.6, which is the earliest supported
 version. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e06715a3632e0b454dca32ffb9bfefe8fd106a7d
      
https://github.com/qemu/qemu/commit/e06715a3632e0b454dca32ffb9bfefe8fd106a7d
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Cleanup of TracepointProvider

Variables with bad names like f and m were renamed to their full name,
so it is clearer which data they contain.

Unneeded variables were removed and the field generating code was
moved in an own function.

dict.iteritems() was removed as directly iterating over a dictionary
also yields the needed keys.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 357bc1e74fc8af96530148d52dd9ccc8e626f000
      
https://github.com/qemu/qemu/commit/357bc1e74fc8af96530148d52dd9ccc8e626f000
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Cleanup cpu list retrieval

Reading /sys/devices/system/cpu/online makes opening the cpu
directories unnecessary and works on more/older systems.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: dd0b6a4e101e57f0495b71b03be8217c0df1af14
      
https://github.com/qemu/qemu/commit/dd0b6a4e101e57f0495b71b03be8217c0df1af14
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Encapsulate filters variable

The variable was only used in one class but still was defined
globally. Additionaly the detect_platform routine which prepares the
data that goes into the variable was called on each start of the
script, no matter if the class was needed.

To make the variable local to the TracepointProvider class, a new
function that calls detect_platform and returns the filters was
introduced.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e75a36abb42e8ae30bb4ed6fee74699a510ea6e6
      
https://github.com/qemu/qemu/commit/e75a36abb42e8ae30bb4ed6fee74699a510ea6e6
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Cleanup of Stats class

Converted class definition to new style and renamed improper named
variables.

Introduced property for fields_filter.

Moved member variable declaration to init, so one can see all class
variables when reading the init method.

Completely clear the values dict, as we don't need to keep single values.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: fc9fdeebd5f092d746438ab8eb5f8f8dc5030002
      
https://github.com/qemu/qemu/commit/fc9fdeebd5f092d746438ab8eb5f8f8dc5030002
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Cleanup of Groups class

Introduced separating newlines for readability and removed special
treatment/variable of the group leader. Renamed fmt to read_format.

The group leader's file descriptor will not be turned into a file
object anymore, instead os.read is used to read from the descriptor.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d895493b7c8bf22305ebcf74b3e64d1d12e4d27f
      
https://github.com/qemu/qemu/commit/d895493b7c8bf22305ebcf74b3e64d1d12e4d27f
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Cleanup of Event class

Added additional newlines for readability.
Factored out attribute and event setup code into own methods.
Exchanged file() with preferred open().

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 068294a1cac4798e4554d9c9848c7c1b31d28713
      
https://github.com/qemu/qemu/commit/068294a1cac4798e4554d9c9848c7c1b31d28713
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Group arch specific data

Using global variables and multiple initialization functions for arch
specific data makes the code hard to read. By grouping them in the
Arch classes we encapsulate and initialize them in one place.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 9c0ab054edf4b197501e5fa00ce5bf16ed7e3111
      
https://github.com/qemu/qemu/commit/9c0ab054edf4b197501e5fa00ce5bf16ed7e3111
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Remove unneeded X86_EXIT_REASONS

The architecture detection method directly accesses vmx and smv exit
reason constants. Therefore we don't need it anymore.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 8a2a33316cb40779bc7975df9114fd07da25de7c
      
https://github.com/qemu/qemu/commit/8a2a33316cb40779bc7975df9114fd07da25de7c
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Make tui function a class

The tui function itself had a few sub-functions and therefore
basically already was class-like. Making it an actual one with proper
methods improved readability.

The curses wrapper was dropped in favour of __entry/exit__ methods
that implement the same behaviour.

Also renamed single character variable name, so the name reflects the
content.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: c887d9a25e877afe135e94fe582d5c58a2fd4ee2
      
https://github.com/qemu/qemu/commit/c887d9a25e877afe135e94fe582d5c58a2fd4ee2
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Fix output formatting

The key names in log mode were capped to 10 characters which is not
enough for distinguishing between keys. Capping was therefore removed.

In batch mode the spacing between keys and values was too narrow and
therefore had to be extended to 42.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 00842aaca5265a57b0a1f0248bde2f77f986e352
      
https://github.com/qemu/qemu/commit/00842aaca5265a57b0a1f0248bde2f77f986e352
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Cleanup and pre-init perf_event_attr

All initializations of the ctypes struct that don't need additional
information were moved to its init method. The unneeded
initializations for sample_type and sample_period were removed as they
do not affect the counters that are read.

This improves readability of the setup_event_attribute by halfing its
LOC.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: d8e44802f8ae320a454644fb010ef06f3ac8fb06
      
https://github.com/qemu/qemu/commit/d8e44802f8ae320a454644fb010ef06f3ac8fb06
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Read event values as u64

The struct read_format, which denotes the returned values on a read
states that the values are u64 and not long long which is used for
struct unpacking.

Therefore the 'q' long long formatter was exchanged with 'Q' which is
the format for u64 data.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 1cd55f9dc7debdad0d54f4fad8617527433b4c4b
      
https://github.com/qemu/qemu/commit/1cd55f9dc7debdad0d54f4fad8617527433b4c4b
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Fix rlimit for unprivileged users

Setting the hard limit as a unprivileged user either returns an error
when it is higher than the current one or irreversibly sets it lower.

Therefore we leave the hardlimit untouched as long as we don't need to
raise it as this needs CAP_SYS_RESOURCE.

This gives admins the possibility to run the script as an unprivileged
user to increase security.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 126b33e6191cd21ba7e05673eb1428b73bf2d34e
      
https://github.com/qemu/qemu/commit/126b33e6191cd21ba7e05673eb1428b73bf2d34e
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Fixup filtering

When filtering, the group leader event should not be disabled, as all
other events under it will also be disabled. Also we should make sure
that values from disabled fields will not be displayed.

This also filters the fields from the log and batch output for better
readability.

Also the drilldown update now directly checks for the stats' field
filter and (un)sets drilldown accordingly.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 7f786a9a06cc100b1261b120c7698083a802d46c
      
https://github.com/qemu/qemu/commit/7f786a9a06cc100b1261b120c7698083a802d46c
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Add interactive filtering

Interactively changing the filter is much more useful than the
drilldown, because it is more versatile.

With this patch, the filter can be changed by pressing 'f' in the text
ui and entering a new filter regex.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: a013bd2f7b88c831241b3ad6d5635e9d13a7e3fc
      
https://github.com/qemu/qemu/commit/a013bd2f7b88c831241b3ad6d5635e9d13a7e3fc
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/kvm/kvm_stat

  Log Message:
  -----------
  scripts/kvm/kvm_stat: Add optparse description

Added a description text that explains what the script does and which
requirements have to be met to let it run.

The help formatter class is needed as the default optparse formatter
makes the text unreadable.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 96bce6831bd19b61e965384427741d805c7234c3
      
https://github.com/qemu/qemu/commit/96bce6831bd19b61e965384427741d805c7234c3
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M cpus.c

  Log Message:
  -----------
  cpus: use broadcast on qemu_pause_cond

Jiri saw a hang on pause_all_vcpus called from postcopy_start,
where the cpus are all apparently stopped ('stopped' flag set)
but pause_all_vcpus is still stuck on a cond_wait on qemu_paused_cond.
We suspect this is happening if a qmp_stop is called at about the
same time as the postcopy code calls that pause_all_vcpus;
although they both should have the main lock held, Paolo spotted
the cond_wait unlocks the global lock so perhaps they both
could end up waiting at the same time?

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reported-by: Jiri Denemark <address@hidden>
Message-Id: <address@hidden>
Cc: address@hidden
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: fae947b096020e5004ec7ae106a95a69a5e4d929
      
https://github.com/qemu/qemu/commit/fae947b096020e5004ec7ae106a95a69a5e4d929
  Author: Luiz Capitulino <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M numa.c

  Log Message:
  -----------
  memory: exit when hugepage allocation fails if mem-prealloc

When -mem-prealloc is passed on the command-line, the expected
behavior is to exit if the hugepage allocation fails.  However,
this behavior is broken since commit cc57501dee which made
hugepage allocation fall back to regular ram in case of faliure.

This commit restores the expected behavior for -mem-prealloc.

Signed-off-by: Luiz Capitulino <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e5f3e12e8489f5325800c6a86fe5f476adfcbdae
      
https://github.com/qemu/qemu/commit/e5f3e12e8489f5325800c6a86fe5f476adfcbdae
  Author: Denis V. Lunev <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M nbd/server.c

  Log Message:
  -----------
  nbd: add missed aio_context_acquire in nbd_export_new

blk_invalidate_cache() can call qcow2_invalidate_cache which performs
IO inside.

Signed-off-by: Denis V. Lunev <address@hidden>
CC: Kevin Wolf <address@hidden>
CC: Paolo Bonzini <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: ca81ce72b4d12494424d1813c6437035c1f89a8c
      
https://github.com/qemu/qemu/commit/ca81ce72b4d12494424d1813c6437035c1f89a8c
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/dump-guest-memory.py

  Log Message:
  -----------
  scripts/dump-guest-memory.py: Move constants to the top

The constants bloated the class definition and were therefore moved to
the top.

Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 47890203842de8b29716bdffb406ca851e70829d
      
https://github.com/qemu/qemu/commit/47890203842de8b29716bdffb406ca851e70829d
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/dump-guest-memory.py

  Log Message:
  -----------
  scripts/dump-guest-memory.py: Make methods functions

The functions dealing with qemu components rarely used parts of the
class, so they were moved out of the class.

As the uintptr_t variable is needed both within and outside the class,
it was made a constant and moved to the top.

Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 7cb1089d5fbd7b2d9497f111ce948edef41df32d
      
https://github.com/qemu/qemu/commit/7cb1089d5fbd7b2d9497f111ce948edef41df32d
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/dump-guest-memory.py

  Log Message:
  -----------
  scripts/dump-guest-memory.py: Improve python 3 compatibility

This commit does not make the script python 3 compatible, it is a
preparation that fixes the easy and common incompatibilities.

Print is a function in python 3 and therefore needs braces around its
arguments.

Range does not cast a gdb.Value object to int in python 3, we have to
do it ourselves.

Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 6782c0e785a0ba48cd96d99f2402cb87af027d26
      
https://github.com/qemu/qemu/commit/6782c0e785a0ba48cd96d99f2402cb87af027d26
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/dump-guest-memory.py

  Log Message:
  -----------
  scripts/dump-guest-memory.py: Cleanup functions

Increase readability by adding newlines and comments, as well as
removing wrong whitespaces and C style braces around conditionals and
loops.

Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 368e3adc8928b2786939a25a336527f83f18e926
      
https://github.com/qemu/qemu/commit/368e3adc8928b2786939a25a336527f83f18e926
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/dump-guest-memory.py

  Log Message:
  -----------
  scripts/dump-guest-memory.py: Introduce multi-arch support

By modelling the ELF with ctypes we not only gain full python 3
support but can also create dumps for different architectures more easily.

Tested-by: Andrew Jones <address@hidden>
Acked-by: Laszlo Ersek <address@hidden>
Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 28fbf8f67b078f738e790f3c3a56aeab2c0ea5d6
      
https://github.com/qemu/qemu/commit/28fbf8f67b078f738e790f3c3a56aeab2c0ea5d6
  Author: Janosch Frank <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M scripts/dump-guest-memory.py

  Log Message:
  -----------
  scripts/dump-guest-memory.py: Fix module docstring

The module docstring is changed into a multi-line comment to comply
with pep 257.

The comment about the docstring that gets used by gdb to print the
help is moved to the location of the docstring.

Signed-off-by: Janosch Frank <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: ba3fb2f023254ab853df278e1719fc55938e1c16
      
https://github.com/qemu/qemu/commit/ba3fb2f023254ab853df278e1719fc55938e1c16
  Author: Peter Maydell <address@hidden>
  Date:   2016-01-26 (Tue, 26 Jan 2016)

  Changed paths:
    M cpus.c
    M fsdev/virtfs-proxy-helper.texi
    M nbd/server.c
    M numa.c
    M qapi-schema.json
    M qemu-char.c
    M qemu-doc.texi
    M qemu-ga.texi
    M qemu-img.texi
    M qemu-options.hx
    M scripts/dump-guest-memory.py
    M scripts/kvm/kvm_stat
    M tests/Makefile

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging

* chardev support for TLS and leak fix
* NBD fix from Denis
* condvar fix from Dave
* kvm_stat and dump-guest-memory almost rewrite
* mem-prealloc fix from Luiz
* manpage style improvement

# gpg: Signature made Tue 26 Jan 2016 14:58:18 GMT using RSA key ID 78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>"
# gpg:                 aka "Paolo Bonzini <address@hidden>"

* remotes/bonzini/tags/for-upstream: (49 commits)
  scripts/dump-guest-memory.py: Fix module docstring
  scripts/dump-guest-memory.py: Introduce multi-arch support
  scripts/dump-guest-memory.py: Cleanup functions
  scripts/dump-guest-memory.py: Improve python 3 compatibility
  scripts/dump-guest-memory.py: Make methods functions
  scripts/dump-guest-memory.py: Move constants to the top
  nbd: add missed aio_context_acquire in nbd_export_new
  memory: exit when hugepage allocation fails if mem-prealloc
  cpus: use broadcast on qemu_pause_cond
  scripts/kvm/kvm_stat: Add optparse description
  scripts/kvm/kvm_stat: Add interactive filtering
  scripts/kvm/kvm_stat: Fixup filtering
  scripts/kvm/kvm_stat: Fix rlimit for unprivileged users
  scripts/kvm/kvm_stat: Read event values as u64
  scripts/kvm/kvm_stat: Cleanup and pre-init perf_event_attr
  scripts/kvm/kvm_stat: Fix output formatting
  scripts/kvm/kvm_stat: Make tui function a class
  scripts/kvm/kvm_stat: Remove unneeded X86_EXIT_REASONS
  scripts/kvm/kvm_stat: Group arch specific data
  scripts/kvm/kvm_stat: Cleanup of Event class
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/1535a6d69948...ba3fb2f02325

reply via email to

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