qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] b094f2: kvm: x86: q35: Add support for -machi


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] b094f2: kvm: x86: q35: Add support for -machine kernel_irq...
Date: Wed, 16 Mar 2016 02:30:05 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: b094f2e015e75fd2d1ddb773061700f5e474f22a
      
https://github.com/qemu/qemu/commit/b094f2e015e75fd2d1ddb773061700f5e474f22a
  Author: Rita Sinha <address@hidden>
  Date:   2016-03-15 (Tue, 15 Mar 2016)

  Changed paths:
    M hw/i386/pc_q35.c

  Log Message:
  -----------
  kvm: x86: q35: Add support for -machine kernel_irqchip=split for q35

The split IRQ chip mode via KVM_CAP_SPLIT_IRQCHIP was introduced with commit
15eafc2e60 but was broken for q35. This patch makes kernel_irqchip=split
functional for q35.

Signed-off-by: Rita Sinha <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Jan Kiszka <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 2ae823d4f707df05f28509dfa7ae7293b8e9164f
      
https://github.com/qemu/qemu/commit/2ae823d4f707df05f28509dfa7ae7293b8e9164f
  Author: Alexey Kardashevskiy <address@hidden>
  Date:   2016-03-15 (Tue, 15 Mar 2016)

  Changed paths:
    M scripts/update-linux-headers.sh

  Log Message:
  -----------
  update-linux-headers: Add userfaultfd.h

userfailtfd.h is used by post-copy migration so include it to
the update-linux-headers.sh as we want it updated altogether with
other kernel headers.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
Message-Id: <address@hidden>
Acked-by: Christian Borntraeger <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: fd97fd4408040a9a6dfaf2fdaeca1c566db6d0aa
      
https://github.com/qemu/qemu/commit/fd97fd4408040a9a6dfaf2fdaeca1c566db6d0aa
  Author: Markus Armbruster <address@hidden>
  Date:   2016-03-15 (Tue, 15 Mar 2016)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: Fix memory allocation when memory path names new file

Commit 8d31d6b extended file_ram_alloc() to accept file names in
addition to directory names.  Even though it passes O_CREAT to open(),
it actually works only for existing files.  Reproducer adapted from
the commit's qemu-doc.texi update:

    $ qemu-system-x86_64 -object 
memory-backend-file,size=2M,mem-path=/dev/hugepages/my-shmem-file,id=mb1
    qemu-system-x86_64: -object 
memory-backend-file,size=2M,mem-path=/dev/hugepages/my-shmem-file,id=mb1: 
failed to get page size of file /dev/hugepages/my-shmem-file: No such file or 
directory

This is because we first get the page size for @path, then open the
actual file.  Unwise even before the flawed commit, because the
directory could change in between, invalidating the page size.
Unlikely to bite in practice.

Rearrange the code to create the file (if necessary) before getting
its page size.  Carefully avoid TOCTTOU conditions with a method
suggested by Paolo Bonzini.

While there, replace "hugepages" by "guest RAM" in error messages,
because host memory backends can be used for purposes other than huge
pages, e.g. /dev/shm/ shared memory.  Help text of -mem-path agrees.

Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e1fb6471999939539ecfb21b41cbbb24047fa4dc
      
https://github.com/qemu/qemu/commit/e1fb6471999939539ecfb21b41cbbb24047fa4dc
  Author: Markus Armbruster <address@hidden>
  Date:   2016-03-15 (Tue, 15 Mar 2016)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: Fix memory allocation when memory path isn't on hugetlbfs

gethugepagesize() works reliably only when its argument is on
hugetlbfs.  When it's not, it returns the filesystem's "optimal
transfer block size", which may or may not be the actual page size
you'll get when you mmap().

If the value is too small or not a power of two, we fail
qemu_ram_mmap()'s assertions.  These were added in commit 794e8f3
(v2.5.0).  The bug's impact before that is currently unknown.  Seems
fairly unlikely at least when the normal page size is 4KiB.

Else, if the value is too large, we align more strictly than
necessary.

gethugepagesize() goes back to commit c902760 (v0.13).  That commit
clearly intended gethugepagesize() to be used on hugetlbfs only.  Not
only was it named accordingly, it also printed a warning when used on
anything else.  However, the commit neglected to spell out the
restriction in user documentation of -mem-path.

Commit bfc2a1a (v2.5.0) dropped the warning as bogus "because QEMU
functions perfectly well with the path on a regular tmpfs filesystem".
It sure does when you're sufficiently lucky.  In my testing, I was
lucky, too.

Fix by switching to qemu_fd_getpagesize().  Rename the variable
holding its result from hpagesize to page_size.

Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 39c350ee12e733070e63d64a21bd42607366ea99
      
https://github.com/qemu/qemu/commit/39c350ee12e733070e63d64a21bd42607366ea99
  Author: Paolo Bonzini <address@hidden>
  Date:   2016-03-15 (Tue, 15 Mar 2016)

  Changed paths:
    M exec.c

  Log Message:
  -----------
  exec: fix early return from ram_block_add

After reporting an error, ram_block_add was going on with the registration
of the RAMBlock.  The visible effect is that it unlocked the ramlist
mutex twice.

Fixes: 528f46af6ecd1e300db18684969104d4067b867b
Reviewed-by: Fam Zheng <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 33577b47c64435fcc2a1bc01c7e82534256f1fc3
      
https://github.com/qemu/qemu/commit/33577b47c64435fcc2a1bc01c7e82534256f1fc3
  Author: Pavel Dovgalyuk <address@hidden>
  Date:   2016-03-15 (Tue, 15 Mar 2016)

  Changed paths:
    M gdbstub.c
    M include/sysemu/char.h
    M include/sysemu/replay.h
    M qemu-char.c
    M replay/Makefile.objs
    A replay/replay-char.c
    M replay/replay-events.c
    M replay/replay-internal.h
    M replay/replay.c
    M stubs/replay.c

  Log Message:
  -----------
  replay: character devices

This patch implements record and replay of character devices.
It records chardevs communication in replay mode. Recorded information
include data read from backend and counter of bytes written
from frontend to backend to preserve frontend internal state.
If character device was configured through the command line in record mode,
then in replay mode it should be also added to command line. Backend of
the character device could be changed in replay mode.
Replaying of devices that perform ioctl and get_msgfd operations is not
supported.
gdbstub which also acts as a backend is not recorded to allow controlling
the replaying through gdb. Monitor backends are also not recorded.

Signed-off-by: Pavel Dovgalyuk <address@hidden>
Message-Id: <address@hidden>
[Add stubs. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 281b2201e4e18d5b9a26e1e8d81b62b5581a13be
      
https://github.com/qemu/qemu/commit/281b2201e4e18d5b9a26e1e8d81b62b5581a13be
  Author: Pavel Dovgalyuk <address@hidden>
  Date:   2016-03-15 (Tue, 15 Mar 2016)

  Changed paths:
    M cpus.c

  Log Message:
  -----------
  icount: remove obsolete warp call

qemu_clock_warp call in qemu_tcg_wait_io_event function is not needed
anymore, because it is called in every iteration of main_loop_wait.

Reviewed-by: Paolo Bonzini <address@hidden>

Signed-off-by: Pavel Dovgalyuk <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: e76d1798faa6d29f54c0930a034b67f3ecdb947d
      
https://github.com/qemu/qemu/commit/e76d1798faa6d29f54c0930a034b67f3ecdb947d
  Author: Pavel Dovgalyuk <address@hidden>
  Date:   2016-03-15 (Tue, 15 Mar 2016)

  Changed paths:
    M cpus.c
    M docs/replay.txt
    M include/qemu/timer.h
    M include/sysemu/replay.h
    M main-loop.c
    M qemu-timer.c
    M stubs/clock-warp.c

  Log Message:
  -----------
  icount: decouple warp calls

qemu_clock_warp function is called to update virtual clock when CPU
is sleeping. This function includes replay checkpoint to make execution
deterministic in icount mode.
Record/replay module flushes async event queue at checkpoints.
Some of the events (e.g., block devices operations) include interaction
with hardware. E.g., APIC polled by block devices sets one of IRQ flags.
Flag to be set depends on currently executed thread (CPU or iothread).
Therefore in replay mode we have to process the checkpoints in the same thread
as they were recorded.
qemu_clock_warp function (and its checkpoint) may be called from different
thread. This patch decouples two different execution cases of this function:
call when CPU is sleeping from iothread and call from cpu thread to update
virtual clock.
First task is performed by qemu_start_warp_timer function. It sets warp
timer event to the moment of nearest pending virtual timer.
Second function (qemu_account_warp_timer) is called from cpu thread
before execution of the code. It advances virtual clock by adding the length
of period while CPU was sleeping.

Signed-off-by: Pavel Dovgalyuk <address@hidden>
Message-Id: <address@hidden>
[Update docs. - Paolo]
Signed-off-by: Paolo Bonzini <address@hidden>


  Commit: 4caecccbc13b23c1e7344046f6d0c346be6297a3
      
https://github.com/qemu/qemu/commit/4caecccbc13b23c1e7344046f6d0c346be6297a3
  Author: Peter Maydell <address@hidden>
  Date:   2016-03-15 (Tue, 15 Mar 2016)

  Changed paths:
    M cpus.c
    M docs/replay.txt
    M exec.c
    M gdbstub.c
    M hw/i386/pc_q35.c
    M include/qemu/timer.h
    M include/sysemu/char.h
    M include/sysemu/replay.h
    M main-loop.c
    M qemu-char.c
    M qemu-timer.c
    M replay/Makefile.objs
    A replay/replay-char.c
    M replay/replay-events.c
    M replay/replay-internal.h
    M replay/replay.c
    M scripts/update-linux-headers.sh
    M stubs/clock-warp.c
    M stubs/replay.c

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

* Miscellaneous exec.c fixes (Markus, myself)
* Q35 support for -machine kernel_irqchip=split (Rita)
* Chardev replay support (Pavel)
* icount "warping" cleanups (Pavel)

# gpg: Signature made Tue 15 Mar 2016 17:24:08 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:
  icount: decouple warp calls
  icount: remove obsolete warp call
  replay: character devices
  exec: fix early return from ram_block_add
  exec: Fix memory allocation when memory path isn't on hugetlbfs
  exec: Fix memory allocation when memory path names new file
  update-linux-headers: Add userfaultfd.h
  kvm: x86: q35: Add support for -machine kernel_irqchip=split for q35

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


Compare: https://github.com/qemu/qemu/compare/a6cdb77f8169...4caecccbc13b

reply via email to

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