[Qemu-devel] [Bug 1665389] Re: Nested kvm guest fails to start on a emulated Westmere CPU guest under a Broadwell CPU host

2017-02-18 Thread Paolo Bonzini
Nested is currently supported only with -cpu host. Kernel 4.9 has the necessary support but QEMU doesn't. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1665389 Title: Nested kvm guest fails to star

[Qemu-devel] [PATCH v4] linux-user: Add sockopts for IPv6 ping and IPv6 traceroute

2017-02-18 Thread Helge Deller
Add the neccessary sockopts for ping and traceroute on IPv6. This fixes the following qemu warnings with IPv6: Unsupported ancillary data: 0/2 Unsupported ancillary data: 0/11 Unsupported ancillary data: 41/25 Unsupported setsockopt level=0 optname=12 Unsupported setsockopt level=41 optname=16 Un

Re: [Qemu-devel] [PATCH 14/24] util/cutils: New qemu_strtosz_metric()

2017-02-18 Thread Markus Armbruster
Eric Blake writes: > On 02/14/2017 04:26 AM, Markus Armbruster wrote: >> To parse numbers with metric suffixes, we use >> >> qemu_strtosz_suffix_unit(nptr, &eptr, QEMU_STRTOSZ_DEFSUFFIX_B, 1000) >> >> Capture this in a new function for legibility: >> >> qemu_strtosz_metric(nptr, &eptr)

Re: [Qemu-devel] [PATCH 20/24] qemu-img: Wrap cvtnum() around qemu_strtosz()

2017-02-18 Thread Markus Armbruster
Eric Blake writes: > On 02/14/2017 04:26 AM, Markus Armbruster wrote: >> Cc: Kevin Wolf >> Cc: Max Reitz >> Cc: qemu-bl...@nongnu.org >> Signed-off-by: Markus Armbruster >> --- >> qemu-img.c | 58 +++--- >> 1 file changed, 31 insertions(+),

Re: [Qemu-devel] [PATCH 21/24] util/cutils: Let qemu_strtosz*() optionally reject trailing crap

2017-02-18 Thread Markus Armbruster
Eric Blake writes: > On 02/14/2017 04:26 AM, Markus Armbruster wrote: >> Change the qemu_strtosz() & friends to return -EINVAL when @endptr is >> null and the conversion doesn't consume the string completely. >> Matches how qemu_strtol() & friends work. >> >> Only test_qemu_strtosz_simple() pass

Re: [Qemu-devel] [PATCH 22/24] util/cutils: Return qemu_strtosz*() error and value separately

2017-02-18 Thread Markus Armbruster
Eric Blake writes: > On 02/14/2017 04:26 AM, Markus Armbruster wrote: >> This makes qemu_strtosz(), qemu_strtosz_mebi() and >> qemu_strtosz_metric() similar to qemu_strtoi64(), except negative >> values are rejected. > > Yay. It also opens the door to allowing them to return an unsigned 64 > bit

Re: [Qemu-devel] [PATCH 23/24] util/cutils: Change qemu_strtosz*() from int64_t to uint64_t

2017-02-18 Thread Markus Armbruster
Eric Blake writes: > On 02/14/2017 04:26 AM, Markus Armbruster wrote: >> This will permit its use in parse_option_size(). > > Progress! (not that it matters - off_t is a signed value, so you are > STILL limited to 2^63, not 2^64, as the maximum theoretical size storage > that you can target - an

Re: [Qemu-devel] [PATCH 24/24] QemuOpts: Fix checking of sizes for overflow and trailing crap

2017-02-18 Thread Markus Armbruster
Eric Blake writes: > On 02/14/2017 04:26 AM, Markus Armbruster wrote: >> parse_option_size()'s checking for overflow and trailing crap is >> wrong. Has always been that way. qemu_strtosz() gets it right, so >> use that. >> >> This adds support for size suffixes 'P', 'E', and ignores case for a

Re: [Qemu-devel] [PATCH 02/14] check-qdict: Simplify qdict_crumple_test_recursive()

2017-02-18 Thread Markus Armbruster
Eric Blake writes: > On 02/17/2017 02:38 PM, Markus Armbruster wrote: >> Use qdict_get_qdict(), qdict_get_qlist() instead of qdict_get() >> followed by qobject_to_qdict(), qobject_to_qlist(). > > Worth a Coccinelle script to make sure we catch it all? I'm pretty sure I got them all: I examined a

Re: [Qemu-devel] [PATCH v15 08/25] block: introduce auto-loading bitmaps

2017-02-18 Thread Denis V. Lunev
On 02/17/2017 03:54 PM, Vladimir Sementsov-Ogievskiy wrote: > 17.02.2017 17:24, Kevin Wolf wrote: >> Am 17.02.2017 um 14:48 hat Denis V. Lunev geschrieben: >>> On 02/17/2017 04:34 PM, Kevin Wolf wrote: Am 17.02.2017 um 14:22 hat Denis V. Lunev geschrieben: > But for sure this is bad from t

Re: [Qemu-devel] [PATCH 03/14] check-qdict: Tighten qdict_crumple_test_recursive() some

2017-02-18 Thread Eric Blake
On 02/17/2017 02:38 PM, Markus Armbruster wrote: > Consistently check for unexpected QDict entries, and qdict_get_qdict() > success. The latter doesn't tighten the test, it only makes it fail > more nicely. > > Signed-off-by: Markus Armbruster > --- > tests/check-qdict.c | 5 + > 1 file cha

Re: [Qemu-devel] [Qemu-arm] [PATCH] ARM i.MX timers: fix software reset

2017-02-18 Thread Peter Maydell
On 17 February 2017 at 18:18, Kurban Mallachiev wrote: > Hello! > > i.MX6 RM says that setting software reset bit in CR register of GPT (general > purpose timers) should resets all of the registers of GPT to their default > reset values, except for the CLKSRC, EN, ENMOD, STOPEN, WAITEN, and DBGEN

Re: [Qemu-devel] [PATCH 04/14] check-qjson: Simplify around compare_litqobj_to_qobj()

2017-02-18 Thread Eric Blake
On 02/17/2017 02:38 PM, Markus Armbruster wrote: > Make compare_litqobj_to_qobj() cope with null, and drop non-null > assertions from callers. > > compare_litqobj_to_qobj() already checks the QType matches; drop the > redundant assertions from callers. > > Signed-off-by: Markus Armbruster > ---

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-18 Thread Michael Davidsaver
On 02/16/2017 09:11 AM, Peter Maydell wrote: > I haven't actually checked real hardware behaviour, but I think > we can fairly safely implement this as not checking the IPSR > exception field. (We might as well go with the "reads 1 in > handler mode" choice of UNKNOWN that the M3 documents, though.

Re: [Qemu-devel] [PATCH] vl: disable default cdrom when using explicitely scsi-hd

2017-02-18 Thread Hervé Poussineau
Hi, Le 09/01/2017 à 14:48, Paolo Bonzini a écrit : On 09/01/2017 13:49, Markus Armbruster wrote: Hervé Poussineau writes: 'ide-hd', 'ide-cd' and 'scsi-cd' devices already disable default cdrom. Make it the same for 'scsi-hd'. That way, we can add/replace the device on lun=2 without using

Re: [Qemu-devel] [PATCH 3/9] armv7m: Rewrite NVIC to not use any GIC code

2017-02-18 Thread Peter Maydell
On 18 February 2017 at 17:45, Michael Davidsaver wrote: > On 02/16/2017 09:11 AM, Peter Maydell wrote: >> I haven't actually checked real hardware behaviour, but I think >> we can fairly safely implement this as not checking the IPSR >> exception field. (We might as well go with the "reads 1 in >>

Re: [Qemu-devel] [PATCH v2] ARM i.MX timers: fix software reset

2017-02-18 Thread Kurban Mallachiev
Ok, thank you for reply. Here is another patch. I have created different function for software reset (imx_gpt_soft_reset), and to prevent duplication extracted common code to imx_gpt_reset_common. Take a look, please. --- Subject: [PATCH] i.MX timers: fix software reset Software reset funct

Re: [Qemu-devel] [PATCH v4] linux-user: Add sockopts for IPv6 ping and IPv6 traceroute

2017-02-18 Thread Laurent Vivier
Le 18/02/2017 à 09:31, Helge Deller a écrit : > Add the neccessary sockopts for ping and traceroute on IPv6. > > This fixes the following qemu warnings with IPv6: > Unsupported ancillary data: 0/2 > Unsupported ancillary data: 0/11 > Unsupported ancillary data: 41/25 > Unsupported setsockopt level

Re: [Qemu-devel] [PULL 050/107] prep: add IBM RS/6000 7020 (40p) machine emulation

2017-02-18 Thread Hervé Poussineau
Le 12/02/2017 à 22:15, Artyom Tarasenko a écrit : On Thu, Feb 2, 2017 at 6:13 AM, David Gibson wrote: From: Hervé Poussineau Machine supports both Open Hack'Ware and OpenBIOS. Open Hack'Ware is the default because OpenBIOS is currently unable to boot PReP boot partitions or PReP kernels. Sig

[Qemu-devel] [PATCH v5] linux-user: Add sockopts for IPv6 ping and IPv6 traceroute

2017-02-18 Thread Helge Deller
Add the neccessary sockopts for ping and traceroute on IPv6. This fixes the following qemu warnings with IPv6: Unsupported ancillary data: 0/2 Unsupported ancillary data: 0/11 Unsupported ancillary data: 41/25 Unsupported setsockopt level=0 optname=12 Unsupported setsockopt level=41 optname=16 Un

Re: [Qemu-devel] [PATCH 2/5] m68k: implement server and client side

2017-02-18 Thread Peter Maydell
On 7 February 2017 at 18:33, Laurent Vivier wrote: > This also adds the basic test file and the configuration update. > > This implementation can only test instructions with values in register and > no memory access. > > Signed-off-by: Laurent Vivier Hi; I got round to setting up my machine with

Re: [Qemu-devel] [PATCH Risu v2 7/9] Add PPC64 in risu build system

2017-02-18 Thread Peter Maydell
On 6 November 2016 at 17:15, Jose Ricardo Ziviani wrote: > Recognizes PPC64 as a valid architecture and setup the environment > variables to compile code for that. > > Signed-off-by: Jose Ricardo Ziviani > --- > configure | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --

[Qemu-devel] [PULL 0/3] ColdFire patches

2017-02-18 Thread Thomas Huth
The following changes since commit ad584d37f2a86b392c25f3f00cc1f1532676c2d1: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2017-02-16 17:46:52 +) are available in the git repository at: https://github.com/huth/qemu.git tags/coldfire-20170219 for you to

[Qemu-devel] [PULL 2/3] hw/m68k: QOMify the ColdFire interrupt controller

2017-02-18 Thread Thomas Huth
Use type_init() and friends to adapt the ColdFire interrupt controller to the latest QEMU device conventions. Reviewed-by: Laurent Vivier Signed-off-by: Thomas Huth --- hw/m68k/mcf_intc.c | 48 1 file changed, 44 insertions(+), 4 deletions(-) di

[Qemu-devel] [PULL 1/3] hw/m68k: Remove dummy machine

2017-02-18 Thread Thomas Huth
Since it is now possible to instantiate a CPU and RAM with the "none" machine, too, and a kernel can be loaded there with the generic loader device, there is no more need for the m68k "dummy" machine. Thus let's remove this unmaintained file now. Reviewed-by: Laurent Vivier Signed-off-by: Thomas

[Qemu-devel] [PULL 3/3] MAINTAINERS: Add odd fixer for the ColdFire boards

2017-02-18 Thread Thomas Huth
I did some work with real ColdFire boards in the past, and after QOMifying most of the ColdFire devices recently, I feel confident that I could at least take care of odd fixes for these boards. Signed-off-by: Thomas Huth --- MAINTAINERS | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-

Re: [Qemu-devel] [PATCH 1/2] monitor.c: make mon_get_cpu return NULL when there is no CPU

2017-02-18 Thread Philippe Mathieu-Daudé
On 02/17/2017 05:27 AM, Ziyue Yang wrote: From: Ziyue Yang Currently mon_get_cpu always dereferences first_cpu without checking whether it's a valid pointer. This commit adds check before dereferencing, and reports "No CPU" info if there isn't any CPU then returns NULL. Signed-off-by: Ziyue Ya

Re: [Qemu-devel] [PATCH 2/2] target/i386/monitor.c: check return value of mon_get_cpu before using it

2017-02-18 Thread Philippe Mathieu-Daudé
On 02/17/2017 05:27 AM, Ziyue Yang wrote: From: Ziyue Yang This patch eliminates the segfault caused by accessing CPU that doesn't exist in hmp command "info lapic", which can be reproduced by $ qemu-system-x86_64 -nographic -M none -serial none -monitor stdio and then type "info lapic" into

Re: [Qemu-devel] [PATCH 5/5] NetRxPkt: Remove code duplication in net_rx_pkt_pull_data()

2017-02-18 Thread Philippe Mathieu-Daudé
On 02/16/2017 09:29 AM, Dmitry Fleytman wrote: This is a refactoring commit that does not change behavior. Signed-off-by: Dmitry Fleytman Reviewed-by: Philippe Mathieu-Daudé --- hw/net/net_rx_pkt.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/net/net_rx_

Re: [Qemu-devel] [PATCH 05/24] util/cutils: Rewrite documentation of qemu_strtol() & friends

2017-02-18 Thread Philippe Mathieu-Daudé
On 02/14/2017 07:25 AM, Markus Armbruster wrote: Fixes the following documentation bugs: * Fails to document that null @nptr is safe. * Fails to document that we return -EINVAL when no conversion could be performed (commit 47d4be1). * Confuses long long with int64_t, and unsigned long long w

Re: [Qemu-devel] [PATCH 03/24] tests/test-cutils: Add missing qemu_strtol()... endptr checks

2017-02-18 Thread Philippe Mathieu-Daudé
On 02/14/2017 07:25 AM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé --- tests/test-cutils.c | 12 1 file changed, 12 insertions(+) diff --git a/tests/test-cutils.c b/tests/test-cutils.c index 20b0f59..71681dc 100644 --- a/test

Re: [Qemu-devel] [PATCH 06/24] util/cutils: Rename qemu_strtoll(), qemu_strtoull()

2017-02-18 Thread Philippe Mathieu-Daudé
On 02/14/2017 07:25 AM, Markus Armbruster wrote: The name qemu_strtoll() suggests conversion to long long, but it actually converts to int64_t. Rename to qemu_strtoi64(). The name qemu_strtoull() suggests conversion to unsigned long long, but it actually converts to uint64_t. Rename to qemu_st

Re: [Qemu-devel] [PATCH 10/24] tests/test-cutils: Add missing qemu_strtosz()... endptr checks

2017-02-18 Thread Philippe Mathieu-Daudé
On 02/14/2017 07:25 AM, Markus Armbruster wrote: Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé --- tests/test-cutils.c | 37 ++--- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/tests/test-cutils.c b/tests/test-cutils.

Re: [Qemu-devel] [PATCH 17/24] util/cutils: Drop QEMU_STRTOSZ_DEFSUFFIX_* macros

2017-02-18 Thread Philippe Mathieu-Daudé
On 02/14/2017 07:26 AM, Markus Armbruster wrote: Writing QEMU_STRTOSZ_DEFSUFFIX_* instead of '*' gains nothing. Get rid of these eyesores. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé --- util/cutils.c | 28 ++-- 1 file changed, 10 inserti

Re: [Qemu-devel] [PATCH v4 2/4] new: debian docker targets for cross-compiling

2017-02-18 Thread Philippe Mathieu-Daudé
On 02/16/2017 09:34 AM, Alex Bennée wrote: This provides a basic Debian install with access to the emdebian cross compilers. The debian-armhf-cross and debian-arm64-cross targets build on the basic Debian image to allow cross compiling to those targets. A new environment variable (QEMU_CONFIGURE

Re: [Qemu-devel] [PATCH v4 1/4] tests/docker: add basic user mapping support

2017-02-18 Thread Philippe Mathieu-Daudé
Hi Alex, I first tried "make docker-image-debian-armhf-cross NOUSER=1 V=1" which worked fine, then "make docker-image-debian-armhf-cross NOUSER=0" but got a "Image is up to date." I thought I should have to remove the image manually so I typed "docker rmi qemu:debian-armhf-cross" and tried aga

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-02-18 Thread Chad Joan
On Fri, Feb 17, 2017 at 12:17 PM, Eric Blake wrote: > On 02/17/2017 10:54 AM, Chad Joan wrote: > > Wow, that is some quick turn-around. Well done! > > > > My thoughts: > > > >- I find this summary info very helpful! On behalf of the N people > >trying to heal paper cuts: thank you! > >

Re: [Qemu-devel] Fix build break during configuration on musl-libc based Linux systems.

2017-02-18 Thread Chad Joan
This is kinda depressing to read :( But thanks for explaining. I got a good laugh when it mentioned of Lotus Notes, "Run away from it." Would it be reasonable to stick a link to that article in the submit a patch document? Something like, "If you can't use 'git send-email' for any reason, then

[Qemu-devel] [Bug 1665389] Re: Nested kvm guest fails to start on a emulated Westmere CPU guest under a Broadwell CPU host

2017-02-18 Thread Nadav Goldin
> Nested is currently supported only with -cpu host. Kernel 4.9 has the necessary support but QEMU doesn't. 1. Just to be sure, you mean '-cpu host' in the bare metal host right? 2. Until it is officially supported in qemu, is there any easy way to work around this? as this setup seemed to have w