Re: [Qemu-devel] [PATCH 05/13] char-win: close file handle except with console

2017-05-29 Thread Marc-André Lureau
Hi - Original Message - > Hi Marc-André, > > On 05/09/2017 08:33 AM, Marc-André Lureau wrote: > > Only the console handle shouldn't be closed, however, the "file" handle > > should. > > Correct. > > > > > Signed-off-by: Marc-André Lureau > > --- > > chardev/char-win.h | 5 ++--- >

Re: [Qemu-devel] [PATCH] pci: Set err to errp directly rather than through error_porpagate()

2017-05-29 Thread Markus Armbruster
Igor Mammedov writes: > On Fri, 26 May 2017 16:29:25 +0800 > Mao Zhongyi wrote: > >> ioh3420_interrupts_init() and its callers, rp_realize() and >> pci_qdev_realize() fill error message to local_err, then >> propagate it to errp by error_porpagate(), which's not necessary. >> So eliminate it and

[Qemu-devel] [RFC 2/6] vfio: Setup IGD quirks earlier

2017-05-29 Thread Zhi Wang
Initialize IGD quirks a bit earlier since we're going to support IGD stolen memory under both primary mode (legacy mode) and secondary mode and we need one extra memory region from IGD quirks. Suggested-by: Xiong Zhang Signed-off-by: Zhi Wang --- hw/vfio/pci-quirks.c | 30 +-

[Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO

2017-05-29 Thread Zhi Wang
This patch series are aim to refine the IGD stolen memory support in QEMU. Some features of Intel HW relies on the stolen memory to work, but some of registers used to indicate the base address of stolen memory can only be programmed once after system is powered-up. This will cause problems if the

[Qemu-devel] [RFC 1/6] vfio: Add Intel platform definitions

2017-05-29 Thread Zhi Wang
This patch introduces device descriptions for Intel platforms. Most of the Intel device definitions come from i915. Suggested-by: Xiong Zhang Signed-off-by: Zhi Wang --- hw/vfio/Makefile.objs| 2 +- hw/vfio/intel-platform.c | 366 +++ hw/vfio/in

[Qemu-devel] [RFC 3/6] vfio: Setup IGD stolen memory

2017-05-29 Thread Zhi Wang
We still keep using VM dedicated memory for isolation to support IGD stolen in the guest. Becuase of the PA of the stolen memory can not be moved after the system is powered-up, we wish the PA of the guest stolen memory can sit in the same PA of host. A new memory region is allocated, and the memor

[Qemu-devel] [RFC 1/6] vfio: Add Intel platform definitions

2017-05-29 Thread Zhi Wang
This patch introduces device descriptions for Intel platforms. Most of the Intel device definitions come from i915. Suggested-by: Xiong Zhang Signed-off-by: Zhi Wang --- hw/vfio/Makefile.objs| 2 +- hw/vfio/intel-platform.c | 366 +++ hw/vfio/in

[Qemu-devel] [RFC 4/6] vfio: Refine GGTT clearing

2017-05-29 Thread Zhi Wang
Clear the whole GGTT page tables after the quirk is initialized. Obtain the total size of GGTT and the entry size of one GGTT entry from intel_device_info(). Suggested-by: Xiong Zhang Signed-off-by: Zhi Wang --- hw/vfio/pci-quirks.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(

[Qemu-devel] [RFC 5/6] vfio: Remove extra quirks and old definitions

2017-05-29 Thread Zhi Wang
Remove extra quirks, old definitions and functions. Once the new Intel platform definition is introduced, and the PA of guest stolen memory equals to the PA of host stolen memory, they are not necessary anymore. Suggested-by: Xiong Zhang Signed-off-by: Zhi Wang --- hw/vfio/pci-quirks.c | 209 ++

[Qemu-devel] [RFC 3/6] vfio: Setup IGD stolen memory

2017-05-29 Thread Zhi Wang
We still keep using VM dedicated memory for isolation to support IGD stolen in the guest. Becuase of the PA of the stolen memory can not be moved after the system is powered-up, we wish the PA of the guest stolen memory can sit in the same PA of host. A new memory region is allocated, and the memor

[Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO

2017-05-29 Thread Zhi Wang
This patch series are aim to refine the IGD stolen memory support in QEMU. Some features of Intel HW relies on the stolen memory to work, but some of registers used to indicate the base address of stolen memory can only be programmed once after system is powered-up. This will cause problems if the

[Qemu-devel] [RFC 2/6] vfio: Setup IGD quirks earlier

2017-05-29 Thread Zhi Wang
Initialize IGD quirks a bit earlier since we're going to support IGD stolen memory under both primary mode (legacy mode) and secondary mode and we need one extra memory region from IGD quirks. Suggested-by: Xiong Zhang Signed-off-by: Zhi Wang --- hw/vfio/pci-quirks.c | 30 +-

[Qemu-devel] [RFC 6/6] vfio: Setup IGD stolen memory under secondary mode

2017-05-29 Thread Zhi Wang
Also setup IGD stolen memory under secondary mode as some HW functions might need the stolen memory anyway. Suggested-by: Xiong Zhang Signed-off-by: Zhi Wang --- hw/vfio/pci-quirks.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/hw/vfio/pci-quirks.c b/h

[Qemu-devel] [RFC 4/6] vfio: Refine GGTT clearing

2017-05-29 Thread Zhi Wang
Clear the whole GGTT page tables after the quirk is initialized. Obtain the total size of GGTT and the entry size of one GGTT entry from intel_device_info(). Suggested-by: Xiong Zhang Signed-off-by: Zhi Wang --- hw/vfio/pci-quirks.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(

[Qemu-devel] [RFC 6/6] vfio: Setup IGD stolen memory under secondary mode

2017-05-29 Thread Zhi Wang
Also setup IGD stolen memory under secondary mode as some HW functions might need the stolen memory anyway. Suggested-by: Xiong Zhang Signed-off-by: Zhi Wang --- hw/vfio/pci-quirks.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/hw/vfio/pci-quirks.c b/h

Re: [Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO

2017-05-29 Thread Zhi Wang
Hi Alex: This the RFC patch of my ides in previous email. Could you shed some lights here? :) Thanks, Zhi. On 05/30/17 01:30, Zhi Wang wrote: This patch series are aim to refine the IGD stolen memory support in QEMU. Some features of Intel HW relies on the stolen memory to work, but some

[Qemu-devel] [RFC 5/6] vfio: Remove extra quirks and old definitions

2017-05-29 Thread Zhi Wang
Remove extra quirks, old definitions and functions. Once the new Intel platform definition is introduced, and the PA of guest stolen memory equals to the PA of host stolen memory, they are not necessary anymore. Suggested-by: Xiong Zhang Signed-off-by: Zhi Wang --- hw/vfio/pci-quirks.c | 209 ++

Re: [Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO

2017-05-29 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO Message-id: 1496079043-26694-1-git-send-email-zhi.a.w...@intel.com === TEST SCRIPT BEGIN === #!/bin/bash BASE=ba

[Qemu-devel] [PATCH v2 00/14] chardev: misc clean-ups

2017-05-29 Thread Marc-André Lureau
Hi, This is the last batch of patches I have pending for chardev for now. They are mostly windows and headers related, and various small improvements. Comments welcome, Thanks v2: - rename skip_free->keep_open, all->write_all - add a patch moving char devices to chardev/ - patch reordering to re

[Qemu-devel] [PATCH v2 01/14] char-win: simplify win_chr_read()

2017-05-29 Thread Marc-André Lureau
win_chr_read_poll() is always used before win_chr_read(). We can easily fold win_chr_readfile() too. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- chardev/char-win.h | 2 +- chardev/char-win.c | 35 +-- 2 files changed, 10 insertions(+

[Qemu-devel] [PATCH v2 03/14] char-win: rename win_chr_init/poll win_chr_serial_init/poll

2017-05-29 Thread Marc-André Lureau
Those 2 functions are specific to serial chardev, make it more clear. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- chardev/char-win.h| 2 +- chardev/char-serial.c | 2 +- chardev/char-win.c| 8 3 files changed, 6 insertions(+), 6 deletions(-) diff -

[Qemu-devel] [PATCH v2 02/14] char-win: remove WinChardev.len

2017-05-29 Thread Marc-André Lureau
The "len" argument can be passed directly to win_chr_read() Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- chardev/char-win.h | 1 - chardev/char-win.c | 16 +++- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/chardev/char-win.h b/chardev/

[Qemu-devel] [PATCH v2 06/14] Remove/replace sysemu/char.h inclusion

2017-05-29 Thread Marc-André Lureau
Those are apparently unnecessary includes. Signed-off-by: Marc-André Lureau --- hw/arm/bcm2835_peripherals.c | 1 - hw/char/imx_serial.c | 1 - hw/display/xenfb.c | 1 - hw/i386/xen/xen-hvm.c| 1 - hw/mips/mips_fulong2e.c | 1 - hw/mips/mips_malta.c | 1 -

[Qemu-devel] [PATCH v2 08/14] chardev: serial & parallel declaration to own headers

2017-05-29 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/chardev/char-parallel.h | 20 +++- include/chardev/char-serial.h | 22 ++ include/chardev/char.h | 36 backends/wctablet.c | 2 +- hw/arm/strongarm.c

[Qemu-devel] [PATCH v2 04/14] char-win: rename hcom->file

2017-05-29 Thread Marc-André Lureau
hcom is the name of the file handle, regardless of the actual chardev driver (serial, file, console etc..). Rename it to be more explicit. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- chardev/char-win.h | 2 +- chardev/char-pipe.c | 10 +- chardev/char-win.

[Qemu-devel] [PATCH v2 05/14] char-win: close file handle except with console

2017-05-29 Thread Marc-André Lureau
Only the console handle shouldn't be closed, however, the "file" handle should. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- chardev/char-win.h | 5 ++--- chardev/char-console.c | 2 +- chardev/char-file.c| 2 +- chardev/char-win.c | 12 4

[Qemu-devel] [PATCH v2 14/14] char: move char devices to chardev/

2017-05-29 Thread Marc-André Lureau
Suggested by Paolo Bonizini during series review. Signed-off-by: Marc-André Lureau --- {backends => chardev}/baum.c | 0 {backends => chardev}/msmouse.c | 0 spice-qemu-char.c => chardev/spice.c | 2 +- {backends => chardev}/testdev.c | 0 {backends => chardev}/wctablet.c

[Qemu-devel] [PATCH v2 09/14] be-hci: use backend functions

2017-05-29 Thread Marc-André Lureau
Avoid accessing CharBackend directly, use qemu_chr_be_* methods instead. be->chr_read should exists if qemu_chr_be_can_write() is true. (use qemu_chr_be_write(), _impl() bypasses replay) Signed-off-by: Marc-André Lureau Reviewed-by: Andrzej Zaborowski --- hw/bt/hci-csr.c | 9 +++-- 1 file

[Qemu-devel] [PATCH v2 11/14] char: move CharBackend handling in char-fe unit

2017-05-29 Thread Marc-André Lureau
Move all the fronted struct and methods to a seperate unit. This avoids accidentally mixing backend and frontend calls, and helps with readibilty. Make qemu_chr_replay() a macro shared by both char and char-fe. Export qemu_chr_write(), and use a macro for qemu_chr_write_all() (nb: yes, CharBacke

[Qemu-devel] [PATCH v2 10/14] char: generalize qemu_chr_write_all()

2017-05-29 Thread Marc-André Lureau
qemu_chr_fe_write() is similar to qemu_chr_write_all(): the later write all with a chardev backend. Make qemu_chr_write() and qemu_chr_fe_write_buffer() take an 'all' argument. If false, handle 'partial' write the way qemu_chr_fe_write() use to, and call qemu_chr_write() from qemu_chr_fe_write().

[Qemu-devel] [PATCH v2 07/14] chardev: move headers to include/chardev

2017-05-29 Thread Marc-André Lureau
So they are all in one place. The following patch will move serial & parallel declarations to the respective headers. Signed-off-by: Marc-André Lureau --- {chardev => include/chardev}/char-fd.h| 2 +- {chardev => include/chardev}/char-io.h| 2 +- {chardev => include/chardev}/ch

[Qemu-devel] [PATCH v2 13/14] char: make chr_fe_deinit() optionaly delete backend

2017-05-29 Thread Marc-André Lureau
This simplifies removing a backend for a frontend user (no need to retrive the associated driver and seperate delete call etc). NB: many frontends have questionable handling of ending a chardev. They should probably delete the backend to prevent broken reusage. Signed-off-by: Marc-André Lureau -

[Qemu-devel] [PATCH v2 12/14] char: rename functions that are not part of fe

2017-05-29 Thread Marc-André Lureau
There is no clear reason to have those functions associated with frontend. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- chardev/char.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/chardev/char.c b/chardev/char.c index 3d5316166e

Re: [Qemu-devel] [PATCH] ivshmem-server: ivshmem-clean: Install only when eventfd() is available

2017-05-29 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Fri, May 26, 2017 at 9:49 AM Kamil Rytarowski wrote: > >> Currently ivshmem requires eventfd() which is Linux specific. >> Do not and build it unconditionally on every Linux/BSD/Solaris. >> >> > I think it should be able to use pipe fallback from event_notif

Re: [Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO

2017-05-29 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Subject: [Qemu-devel] [RFC 0/6] Refine IGD stolen memory support in VFIO Message-id: 1496079043-26694-1-git-send-

[Qemu-devel] [PULL 00/11] 9pfs patches for 2.10 20170525

2017-05-29 Thread Greg Kurz
The following changes since commit 9964e96dccf7f7c936ee854a795415d19b60: Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging (2017-05-23 15:01:31 +0100) are available in the git repository at: https://github.com/gkurz/qemu.git tags/for-upstream for you to fetch c

[Qemu-devel] [PULL 01/11] virtio-9p/xen-9p: move 9p specific bits to core 9p code

2017-05-29 Thread Greg Kurz
These bits aren't related to the transport so let's move them to the core code. Signed-off-by: Greg Kurz Reviewed-by: Stefano Stabellini --- hw/9pfs/9p.c | 8 +++- hw/9pfs/9p.h | 2 +- hw/9pfs/virtio-9p-device.c | 8 +--- hw/9pfs/xen-9p-backend.c | 6 +-

[Qemu-devel] [PULL 05/11] fsdev: fix virtfs-proxy-helper cwd

2017-05-29 Thread Greg Kurz
Since chroot() doesn't change the current directory, it is indeed a good practice to chdir() to the target directory and then then chroot(), or to chroot() to the target directory and then chdir("/"). The current code does neither of them actually. Let's go for the latter. This doesn't fix any se

[Qemu-devel] [PULL 04/11] 9pfs: local: fix unlink of alien files in mapped-file mode

2017-05-29 Thread Greg Kurz
When trying to remove a file from a directory, both created in non-mapped mode, the file remains and EBADF is returned to the guest. This is a regression introduced by commit "df4938a6651b 9pfs: local: unlinkat: don't follow symlinks" when fixing CVE-2016-9602. It changed the way we unlink the met

[Qemu-devel] [PULL 03/11] 9pfs: drop pdu_push_and_notify()

2017-05-29 Thread Greg Kurz
Only pdu_complete() needs to notify the client that a request has completed. Signed-off-by: Greg Kurz Reviewed-by: Stefano Stabellini --- hw/9pfs/9p.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index b3048371a8ee..a25d31e62f1c 100644 --

[Qemu-devel] [PULL 11/11] 9pfs: local: metadata file for the VirtFS root

2017-05-29 Thread Greg Kurz
When using the mapped-file security, credentials are stored in a metadata directory located in the parent directory. This is okay for all paths with the notable exception of the root path, since we don't want and probably can't create a metadata directory above the virtfs directory on the host. Th

[Qemu-devel] [PULL 08/11] 9pfs: check return value of v9fs_co_name_to_path()

2017-05-29 Thread Greg Kurz
These v9fs_co_name_to_path() call sites have always been around. I guess no care was taken to check the return value because the name_to_path operation could never fail at the time. This is no longer true: the handle and synth backends can already fail this operation, and so will the local backend

[Qemu-devel] [PULL 02/11] fsdev: don't allow unknown format in marshal/unmarshal

2017-05-29 Thread Greg Kurz
The code only uses well known format strings. An unknown format token is a bug. Signed-off-by: Greg Kurz Reviewed-by: Stefano Stabellini --- fsdev/9p-iov-marshal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fsdev/9p-iov-marshal.c b/fsdev/9p-iov-marshal.c index 1d16f

[Qemu-devel] [PULL 10/11] 9pfs: local: simplify file opening

2017-05-29 Thread Greg Kurz
The logic to open a path currently sits between local_open_nofollow() and the relative_openat_nofollow() helper, which has no other user. For the sake of clarity, this patch moves all the code of the helper into its unique caller. While here we also: - drop the code to skip leading "/" because the

[Qemu-devel] [PULL 06/11] 9pfs: assume utimensat() and futimens() are present

2017-05-29 Thread Greg Kurz
The utimensat() and futimens() syscalls have been around for ages (ie, glibc 2.6 and linux 2.6.22), and the decision was already taken to switch to utimensat() anyway when fixing CVE-2016-9602 in 2.9. Signed-off-by: Greg Kurz Reviewed-by: Eric Blake --- fsdev/virtfs-proxy-helper.c | 3 ++- hw/9

Re: [Qemu-devel] [PATCH v2 4/5] numa: fallback to default NUMA node instead of node 0

2017-05-29 Thread Igor Mammedov
On Fri, 26 May 2017 11:58:14 -0300 Eduardo Habkost wrote: > On Tue, May 23, 2017 at 05:44:03PM +0200, Igor Mammedov wrote: > > On Tue, 23 May 2017 11:48:54 -0300 > > Eduardo Habkost wrote: > > > > > On Tue, May 23, 2017 at 04:38:49PM +0200, Igor Mammedov wrote: > > > > Do the same as we did

[Qemu-devel] [PULL 09/11] 9pfs: local: resolve special directories in paths

2017-05-29 Thread Greg Kurz
When using the mapped-file security mode, the creds of a path /foo/bar are stored in the /foo/.virtfs_metadata/bar file. This is okay for all paths unless they end with '.' or '..', because we cannot create the corresponding file in the metadata directory. This patch ensures that '.' and '..' are

[Qemu-devel] [PULL 07/11] util: drop old utimensat() compat code

2017-05-29 Thread Greg Kurz
Now that 9pfs and virtfs-proxy-helper have been converted to utimensat(), we don't need to keep qemu_utimens() anymore. Signed-off-by: Greg Kurz Reviewed-by: Eric Blake --- configure | 22 -- include/sysemu/os-posix.h | 11 --- util/oslib-posix.c

[Qemu-devel] [job ad] QEMU Engineering Position with Linaro

2017-05-29 Thread Christoffer Dall
Hi all, Linaro is looking for a full-time engineer to work on QEMU, primarily focused on emulating aspects of the ARM architecture. Feel free to apply to the position or forward this to anyone you know who has experience working with QEMU and experience with modeling computer architecture. The o

Re: [Qemu-devel] [PULL 00/11] 9pfs patches for 2.10 20170525

2017-05-29 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Message-id: 1496048740-26578-1-git-send-email-gr...@kaod.org Subject: [Qemu-devel] [PULL 00/11] 9pfs patches for 2.10 20170525 Type: series === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under

Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.

2017-05-29 Thread Thomas Huth
On 28.05.2017 07:18, Rob Landley wrote: > You can't boot a kernel under -cpu 486 since that commit (hangs > producing no output) because it added a bios image that won't run on > anything short of pentium II. > > You can try the run-emulator.sh script in > http://landley.net/aboriginal/downloads/b

Re: [Qemu-devel] [PATCH v2 3/3] scripts: Test script to look for -device crashes

2017-05-29 Thread Markus Armbruster
Eduardo Habkost writes: > On Tue, May 23, 2017 at 04:52:47PM +0200, Markus Armbruster wrote: >> Beware, my review is rather superficial. >> >> Eduardo Habkost writes: >> >> > Test code to check if we can crash QEMU using -device. It will >> > test all accel/machine/device combinations by defau

Re: [Qemu-devel] [PATCH] msi: remove return code for msi_init()

2017-05-29 Thread Markus Armbruster
Peter Xu writes: > On Mon, May 15, 2017 at 09:14:33PM +0800, Peter Xu wrote: >> MSI should be supported by all interrupt controllers. Switching the old >> check for msi_nonbroken into assertion. Do similar thing to >> pci_add_capability2() below that. Then time to remove *errp. >> >> Since msi_i

Re: [Qemu-devel] [PATCH v7 19/20] qcow2: report encryption specific image information

2017-05-29 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Thu, May 25, 2017 at 02:52:30PM -0500, Eric Blake wrote: >> On 05/25/2017 11:38 AM, Daniel P. Berrange wrote: >> > Currently 'qemu-img info' reports a simple "encrypted: yes" >> > field. This is not very useful now that qcow2 can support >> > multiple encryption

Re: [Qemu-devel] [PATCH] msi: remove return code for msi_init()

2017-05-29 Thread Peter Xu
On Mon, May 29, 2017 at 11:42:35AM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > On Mon, May 15, 2017 at 09:14:33PM +0800, Peter Xu wrote: > >> MSI should be supported by all interrupt controllers. Switching the old > >> check for msi_nonbroken into assertion. Do similar thing to > >>

Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.

2017-05-29 Thread Richard W.M. Jones
On Mon, May 29, 2017 at 11:22:14AM +0200, Thomas Huth wrote: > On 28.05.2017 07:18, Rob Landley wrote: > > You can't boot a kernel under -cpu 486 since that commit (hangs > > producing no output) because it added a bios image that won't run on > > anything short of pentium II. > > > > You can try

Re: [Qemu-devel] [PATCH 0/3] arm/virt: refine virt.c code and implement hot_add_cpu interface

2017-05-29 Thread Igor Mammedov
On Sat, 27 May 2017 10:32:33 +0800 Li Zhang wrote: > On Fri, May 26, 2017 at 7:21 PM, Igor Mammedov wrote: > > On Fri, 26 May 2017 17:21:05 +0800 > > Li Zhang wrote: > > > >> From: Li Zhang > >> > >> virt machine doesn't support hot_add_cpu interface. This patchset is to > >> implement > >>

[Qemu-devel] [PATCH v3] kvmclock: update system_time_msr address forcibly

2017-05-29 Thread Denis Plotnikov
Do an update of system_time_msr address every time before reading the value of tsc_timestamp from guest's kvmclock page. There is no other code paths which ensure that qemu has an up-to-date value of system_time_msr. So, force this update on guest's tsc_timestamp reading. This bug causes effect o

Re: [Qemu-devel] [PATCHv3 4/4] ppc: Rework CPU compatibility testing across migration

2017-05-29 Thread Greg Kurz
On Fri, 26 May 2017 14:16:30 +1000 David Gibson wrote: > On Thu, May 04, 2017 at 12:07:47PM +0200, Greg Kurz wrote: > > On Thu, 27 Apr 2017 17:28:43 +1000 > > David Gibson wrote: > > > > > Migrating between different CPU versions is a bit complicated for ppc. > > > A long time ago, we ensured

Re: [Qemu-devel] [PATCH 25/26] target/s390x: implement TRANSLATE ONE/TWO TO ONE/TWO

2017-05-29 Thread Aurelien Jarno
On 2017-05-26 10:10, Richard Henderson wrote: > On 05/25/2017 02:05 PM, Aurelien Jarno wrote: > > +uint32_t HELPER(trXX)(CPUS390XState *env, uint32_t r1, uint32_t r2, > > + uint32_t sizes) > > +{ > > +uintptr_t ra = GETPC(); > > +int dsize = (sizes & 1) ? 1 : 2; > > +

Re: [Qemu-devel] Commit b2a575a1c652 broke i486 support.

2017-05-29 Thread Thomas Huth
On 29.05.2017 12:14, Richard W.M. Jones wrote: > On Mon, May 29, 2017 at 11:22:14AM +0200, Thomas Huth wrote: >> On 28.05.2017 07:18, Rob Landley wrote: >>> You can't boot a kernel under -cpu 486 since that commit (hangs >>> producing no output) because it added a bios image that won't run on >>> a

Re: [Qemu-devel] [PATCH 21/26] target/s390x: implement PACK UNICODE

2017-05-29 Thread Aurelien Jarno
On 2017-05-26 09:35, Richard Henderson wrote: > On 05/25/2017 02:05 PM, Aurelien Jarno wrote: > > +} else if (srclen > ssize) { > > b = cpu_ldub_data_ra(env, src, ra) & 0x0f; > > -src--; > > -srclen--; > > +src -= ssize; > > +src

Re: [Qemu-devel] [Qemu-block] [PATCH 00/29] qed: Convert to coroutines

2017-05-29 Thread Paolo Bonzini
On 26/05/2017 22:21, Kevin Wolf wrote: > The qed block driver is one of the last remaining block drivers that use the > AIO callback style interfaces. This series converts it to the coroutine model > that other drivers are using and removes some AIO functions from the block > layer API afterwards.

Re: [Qemu-devel] [PATCH 26/26] target/s390x: update maximum TCG model to z800

2017-05-29 Thread Thomas Huth
On 25.05.2017 23:05, Aurelien Jarno wrote: > Now that the extended-translation facility 2 has been fully implemented, > it's possible to emulated a most a z800 CPU with TCG. > > Signed-off-by: Aurelien Jarno > --- > target/s390x/cpu_models.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletio

Re: [Qemu-devel] [PATCH] pci-bridge/i82801b11: Convert to realize

2017-05-29 Thread Markus Armbruster
Marcel Apfelbaum writes: > On 27/05/2017 9:58, Mao Zhongyi wrote: >> >> >> On 05/26/2017 10:08 PM, Marcel Apfelbaum wrote: >>> >>> >>> On 26/05/2017 15:15, Mao Zhongyi wrote: The pci-birdge device i82801b11 still implements the old PCIDeviceClass .init() through i82801b11_bridge_init()

Re: [Qemu-devel] [PATCH v2 1/3] qemu.py: Don't set _popen=None on error/shutdown

2017-05-29 Thread Markus Armbruster
Eduardo Habkost writes: > On Tue, May 23, 2017 at 04:23:08PM +0200, Markus Armbruster wrote: >> Eduardo Habkost writes: >> >> > Keep the Popen object around to we can query its exit code later. >> > >> > To keep the existing 'self._popen is None' checks working, add a >> > is_running() method,

Re: [Qemu-devel] [PATCH v2 3/5] numa: make sure that all cpus in has has_node_id set if numa is enabled

2017-05-29 Thread Igor Mammedov
On Fri, 26 May 2017 13:06:30 -0300 Eduardo Habkost wrote: > On Tue, May 23, 2017 at 04:38:48PM +0200, Igor Mammedov wrote: > > It fixes/add missing _PXM object for non mapped CPU (x86) > > and missing fdt node (virt-arm). > > > > It ensures that possible_cpus contains complete mapping if > > num

Re: [Qemu-devel] [PATCH v2 4/5] numa: fallback to default NUMA node instead of node 0

2017-05-29 Thread Igor Mammedov
On Fri, 26 May 2017 11:58:14 -0300 Eduardo Habkost wrote: > On Tue, May 23, 2017 at 05:44:03PM +0200, Igor Mammedov wrote: > > On Tue, 23 May 2017 11:48:54 -0300 > > Eduardo Habkost wrote: > > > > > On Tue, May 23, 2017 at 04:38:49PM +0200, Igor Mammedov wrote: > > > > Do the same as we did

[Qemu-devel] [PATCH v1] target/s390x: addressing exceptions are suppressing

2017-05-29 Thread David Hildenbrand
We have to make the address in the old PSW point at the next instruction, as addressing exceptions are suppressing and not nullifying. I assume that there are a lot of other broken cases (as most instructions we care about are suppressing) - all trigger_pgm_exception() specifying and explicit numb

Re: [Qemu-devel] [PATCH v2 5/5] numa: move numa_node from CPUState into target specific classes

2017-05-29 Thread Igor Mammedov
On Fri, 26 May 2017 15:25:22 -0300 Eduardo Habkost wrote: > On Tue, May 23, 2017 at 04:38:50PM +0200, Igor Mammedov wrote: > > Move vcpu's assocciated numa_node field out of generic CPUState > > into inherited classes that actually care about cpu<->numa mapping, > > i.e: ARMCPU, PowerPCCPU, X86CP

Re: [Qemu-devel] [PATCH] msi: remove return code for msi_init()

2017-05-29 Thread Markus Armbruster
Peter Xu writes: > On Mon, May 29, 2017 at 11:42:35AM +0200, Markus Armbruster wrote: >> Peter Xu writes: >> >> > On Mon, May 15, 2017 at 09:14:33PM +0800, Peter Xu wrote: >> >> MSI should be supported by all interrupt controllers. Switching the old >> >> check for msi_nonbroken into assertion.

Re: [Qemu-devel] [PATCH] Improve Cocoa modifier key handling

2017-05-29 Thread Gerd Hoffmann
On Fri, 2017-05-26 at 16:38 -0700, Ian McKellar wrote: > I had two problems with QEMU on macOS: >  1) Sometimes when alt-tabbing to QEMU it would act as if the 'a' key > was pressed so I'd get 'a'. >  2) Using Sikuli to programatically send keys to the QEMU window text > like "f

Re: [Qemu-devel] [PATCH] spice: Use proper enum type for kbd led state

2017-05-29 Thread Gerd Hoffmann
On Thu, 2017-05-25 at 12:50 +, Marc-André Lureau wrote: > > > On Thu, May 11, 2017 at 6:16 AM Jonathon Jongsma > wrote: > > Although the Qemu and spice flags currently have the same value, it > > seems more correct to pass the spice flag values to > > spice_server_kbd_leds(), especially cons

Re: [Qemu-devel] [PATCH] usb-hub: set PORT_STAT_C_SUSPEND on host-initiated wake-up

2017-05-29 Thread Gerd Hoffmann
On Mon, 2017-05-22 at 14:33 +0200, Ladi Prosek wrote: > PORT_STAT_C_SUSPEND should be set even on host-initiated wake-up, > i.e. on ClearPortFeature(PORT_SUSPEND). Windows is known to not > work properly otherwise. > > Side note, since PORT_ENABLE looks similar and might appear to > have the same

[Qemu-devel] [PATCH] mirror: Drop permissions on s->target on completion

2017-05-29 Thread Kevin Wolf
This fixes an assertion failure that was triggered by qemu-iotests 129 on some CI host, while the same test case didn't seem to fail on other hosts. Essentially the problem is that the blk_unref(s->target) in mirror_exit() doesn't necessarily mean that the BlockBackend goes away immediately. It is

Re: [Qemu-devel] [PATCH] nbd: Fully initialize client in case of failed negotiation

2017-05-29 Thread Eric Blake
On 05/26/2017 10:04 PM, Eric Blake wrote: > If a non-NBD client connects to qemu-nbd, we would end up with > a SIGSEGV in nbd_cilent_put() because we were trying to > unregister the client's association to the export, even though > we skipped inserting the client into that list. Easy trigger > in

Re: [Qemu-devel] [PATCH] mirror: Drop permissions on s->target on completion

2017-05-29 Thread Paolo Bonzini
On 29/05/2017 14:18, Kevin Wolf wrote: > This fixes an assertion failure that was triggered by qemu-iotests 129 > on some CI host, while the same test case didn't seem to fail on other > hosts. > > Essentially the problem is that the blk_unref(s->target) in > mirror_exit() doesn't necessarily me

Re: [Qemu-devel] [PATCH] RFC: vmcoreinfo device

2017-05-29 Thread Igor Mammedov
On Fri, 26 May 2017 13:59:09 + Marc-André Lureau wrote: > Hi > > On Thu, May 4, 2017 at 5:41 PM Igor Mammedov wrote: > > > On Tue, 02 May 2017 19:03:15 + > > Marc-André Lureau wrote: > > > > > Hi > > > > > > On Tue, May 2, 2017 at 11:17 AM Igor Mammedov > > wrote: > > > > > >

Re: [Qemu-devel] [PATCH 16/26] target/s390x: implement COMPARE LOGICAL LONG

2017-05-29 Thread Aurelien Jarno
On 2017-05-26 08:32, Richard Henderson wrote: > On 05/25/2017 02:04 PM, Aurelien Jarno wrote: > > -if (srclen) { > > -v1 = cpu_ldub_data_ra(env, src, ra); > > +if (*srclen) { > > +v1 = cpu_ldub_data_ra(env, *src, ra); > > } > > -if (destlen)

[Qemu-devel] [PULL 2/9] usb: Deprecate the legacy -usbdevice option

2017-05-29 Thread Gerd Hoffmann
From: Thomas Huth The '-usbdevice' option is considered as deprecated nowadays and we might want to remove these options in a future version of QEMU. So mark this options as deprecated in the documenation and print out a warning if it is used to tell the user what to use instead. While we're at i

[Qemu-devel] [PULL 8/9] usb: don't wakeup during coldplug

2017-05-29 Thread Gerd Hoffmann
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1452512 Signed-off-by: Gerd Hoffmann Message-id: 20170523084635.20062-1-kra...@redhat.com --- hw/usb/core.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/usb/core.c b/hw/usb/core.c index 45fa00c517..241ae66b15 100644 --- a/hw/usb

[Qemu-devel] [PULL 7/9] usb-hub: set PORT_STAT_C_SUSPEND on host-initiated wake-up

2017-05-29 Thread Gerd Hoffmann
From: Ladi Prosek PORT_STAT_C_SUSPEND should be set even on host-initiated wake-up, i.e. on ClearPortFeature(PORT_SUSPEND). Windows is known to not work properly otherwise. Side note, since PORT_ENABLE looks similar and might appear to have the same issue: According to 11.24.2.7.2.2 C_PORT_ENABL

[Qemu-devel] [PULL 9/9] ehci: fix frame timer invocation.

2017-05-29 Thread Gerd Hoffmann
ehci registers ehci_frame_timer as both timer and bottom half, which turned out to be a bad idea as it can be called as bottom half then while it is running as timer, and it isn't prepared to handle recursive calls. Change the timer func to just schedule the bottom half to avoid this. Fixes: http

[Qemu-devel] [PULL 0/9] usb patch queue

2017-05-29 Thread Gerd Hoffmann
branch 'jasowang/tags/net-pull-request' into staging (2017-05-23 15:01:31 +0100) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-usb-20170529-1 for you to fetch changes up to 3bfecee2cb71f21cd39d6183f18b446c01917573: ehci: fix frame timer invocation. (

[Qemu-devel] [PULL 6/9] xhci: add CONFIG_USB_XHCI_NEC option

2017-05-29 Thread Gerd Hoffmann
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1451189 Signed-off-by: Gerd Hoffmann Message-id: 20170517103313.8459-2-kra...@redhat.com --- default-configs/pci.mak | 1 + hw/usb/Makefile.objs| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/default-configs/pci.mak b/de

[Qemu-devel] [PULL 3/9] usb: Deprecate HMP commands usb_add and usb_del

2017-05-29 Thread Gerd Hoffmann
From: Thomas Huth The commands 'device_add' and 'device_del' should be used nowadays instead. Signed-off-by: Thomas Huth Reviewed-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert Message-id: 1495175803-12830-1-git-send-email-th...@redhat.com Signed-off-by: Gerd Hoffmann --- vl.c

[Qemu-devel] [PULL 1/9] ehci: fix overflow in frame timer code

2017-05-29 Thread Gerd Hoffmann
In case the frame timer doesn't run for a while due to the host being busy skipped_uframes can become big enough that UFRAME_TIMER_NS * skipped_uframes overflows. Which in turn throws off all subsequent ehci frame timer calculations. Reported-by: 李林 <8610...@163.com> Signed-off-by: Gerd Hoffmann

[Qemu-devel] [PULL 5/9] xhci: split into multiple files

2017-05-29 Thread Gerd Hoffmann
Moved structs and defines to hcd-xhci.h. Move nec controller variant to hcd-xhci-nec.c. No functional changes. Signed-off-by: Gerd Hoffmann Message-id: 20170517103313.8459-1-kra...@redhat.com --- hw/usb/hcd-xhci.h | 226 +++ hw/usb/hcd-xhci-nec.c |

[Qemu-devel] [PULL 4/9] usb: Simplify the parameter parsing of the legacy usb serial device

2017-05-29 Thread Gerd Hoffmann
From: Thomas Huth Coverity complains about the current code, so let's get rid of the now unneeded while loop and simply always emit "unrecognized serial USB option" for all unsupported options. Signed-off-by: Thomas Huth Reviewed-by: Paolo Bonzini Message-id: 1495177204-16808-1-git-send-email-

[Qemu-devel] [PATCH 1/1] s390x: vmstatify config migration for virtio-ccw

2017-05-29 Thread Halil Pasic
Let's vmstatify virtio_ccw_save_config and virtio_ccw_load_config for flexibility (extending using subsections) and for fun. To achieve this we need to hack the config_vector, which is VirtIODevice (that is common virtio) state, in the middle of the VirtioCcwDevice state representation. This some

Re: [Qemu-devel] [PATCH v3 06/18] numa: mirror cpu to node mapping in MachineState::possible_cpus

2017-05-29 Thread Igor Mammedov
On Fri, 26 May 2017 12:46:25 -0300 Eduardo Habkost wrote: > On Wed, May 10, 2017 at 01:29:50PM +0200, Igor Mammedov wrote: > [...] > > diff --git a/hw/core/machine.c b/hw/core/machine.c > > index 2482c63..420c8c4 100644 > > --- a/hw/core/machine.c > > +++ b/hw/core/machine.c > > @@ -389,6 +389,10

Re: [Qemu-devel] [PATCH v2 3/5] numa: make sure that all cpus in has has_node_id set if numa is enabled

2017-05-29 Thread Eduardo Habkost
On Mon, May 29, 2017 at 01:45:36PM +0200, Igor Mammedov wrote: > On Fri, 26 May 2017 13:06:30 -0300 > Eduardo Habkost wrote: > > > On Tue, May 23, 2017 at 04:38:48PM +0200, Igor Mammedov wrote: > > > It fixes/add missing _PXM object for non mapped CPU (x86) > > > and missing fdt node (virt-arm).

Re: [Qemu-devel] [PATCH] mirror: Drop permissions on s->target on completion

2017-05-29 Thread Max Reitz
On 2017-05-29 14:18, Kevin Wolf wrote: > This fixes an assertion failure that was triggered by qemu-iotests 129 > on some CI host, while the same test case didn't seem to fail on other > hosts. > > Essentially the problem is that the blk_unref(s->target) in > mirror_exit() doesn't necessarily mean

Re: [Qemu-devel] [PATCH v3 06/18] numa: mirror cpu to node mapping in MachineState::possible_cpus

2017-05-29 Thread Eduardo Habkost
On Mon, May 29, 2017 at 03:12:45PM +0200, Igor Mammedov wrote: > On Fri, 26 May 2017 12:46:25 -0300 > Eduardo Habkost wrote: > > > On Wed, May 10, 2017 at 01:29:50PM +0200, Igor Mammedov wrote: > > [...] > > > diff --git a/hw/core/machine.c b/hw/core/machine.c > > > index 2482c63..420c8c4 100644

Re: [Qemu-devel] [PATCH v3] kvmclock: update system_time_msr address forcibly

2017-05-29 Thread Roman Kagan
On Mon, May 29, 2017 at 01:49:04PM +0300, Denis Plotnikov wrote: > Do an update of system_time_msr address every time before reading > the value of tsc_timestamp from guest's kvmclock page. > > There is no other code paths which ensure that qemu has an up-to-date > value of system_time_msr. So, fo

Re: [Qemu-devel] [PATCH v7 17/20] block: remove all encryption handling APIs

2017-05-29 Thread Alberto Garcia
On Thu 25 May 2017 06:38:48 PM CEST, "Daniel P. Berrange" wrote: > Now that all encryption keys must be provided upfront via > the QCryptoSecret API and associated block driver properties > there is no need for any explicit encryption handling APIs > in the block layer. Encryption can be handled

Re: [Qemu-devel] [PATCH v3 06/18] numa: mirror cpu to node mapping in MachineState::possible_cpus

2017-05-29 Thread Igor Mammedov
On Mon, 29 May 2017 10:36:47 -0300 Eduardo Habkost wrote: > On Mon, May 29, 2017 at 03:12:45PM +0200, Igor Mammedov wrote: > > On Fri, 26 May 2017 12:46:25 -0300 > > Eduardo Habkost wrote: > > > > > On Wed, May 10, 2017 at 01:29:50PM +0200, Igor Mammedov wrote: > > > [...] > > > > diff --gi

Re: [Qemu-devel] [PATCH v7 20/20] docs: document encryption options for qcow, qcow2 and luks

2017-05-29 Thread Alberto Garcia
On Thu 25 May 2017 06:38:51 PM CEST, "Daniel P. Berrange" wrote: > Expand the image format docs to cover the new options for > the qcow, qcow2 and luks disk image formats > > Signed-off-by: Daniel P. Berrange Reviewed-by: Alberto Garcia Berto

[Qemu-devel] [PATCH v2 6/7] s390x/css: activate ChannelSubSys migration

2017-05-29 Thread Halil Pasic
Turn on migration for the channel subsystem for the next machine. For legacy machines we still have to do things the old way. Signed-off-by: Halil Pasic --- hw/s390x/css.c | 5 + hw/s390x/s390-virtio-ccw.c | 9 - hw/s390x/virtio-ccw.c | 1 - include/hw/s390x/css.h

[Qemu-devel] [PATCH v2 1/7] s390x: vmstatify config migration for virtio-ccw

2017-05-29 Thread Halil Pasic
Let's vmstatify virtio_ccw_save_config and virtio_ccw_load_config for flexibility (extending using subsections) and for fun. To achieve this we need to hack the config_vector, which is VirtIODevice (that is common virtio) state, in the middle of the VirtioCcwDevice state representation. This some

  1   2   3   >