[Bug 1414466] Re: -net user, hostfwd=... is not working(qemu-system-aarch64)

2020-12-19 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1414466 Title: -net

virtiofsd: sshfs as submount?

2020-12-19 Thread Laszlo Ersek
Hi Miklos, the following 2019 presentation on Stefan's website: https://vmsplice.net/ virtio-fs: A Shared File System for Virtual Machines at KVM Forum 2019 https://vmsplice.net/~stefan/virtio-fs_%20A%20Shared%20File%20System%20for%20Virtual%20Machines.pdf has a slide called "Use case:

[Bug 1906193] Re: riscv32 user mode emulation: fork return values broken

2020-12-19 Thread Andreas K . Hüttel
Thanks a lot! Will test and post the result on monday when I'm back home. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1906193 Title: riscv32 user mode emulation: fork return values broken

Re: [PATCH 2/4] tcg: Additional Trap type for FreeBSD

2020-12-19 Thread Warner Losh
Again, this turns out to be bogus, for reasons I enumerated the first time it sent... Warner On Sat, Dec 19, 2020 at 1:54 PM wrote: > From: Sean Bruno > > FreeBSD can generate a trap 0xc as well as 0xe when writing to a > read-only page. > > Signed-off-by: Juergen Lock > [imp rewored commit

Re: [PATCH 0/4] A few preliminary bsd-user patches

2020-12-19 Thread Warner Losh
I'm not at all sure why this was sent twice. I thought I'd cleared out all the 'failed' attempts on the first system I tried to git email-send from after realizing sendmail hadn't been configured... Sorry about that. Warner On Sat, Dec 19, 2020 at 1:54 PM wrote: > From: Warner Losh > >

Re: [PULL 02/45] vl: remove separate preconfig main_loop

2020-12-19 Thread Laurent Vivier
Le 15/12/2020 à 18:54, Paolo Bonzini a écrit : > Move post-preconfig initialization to the x-exit-preconfig. If preconfig > is not requested, just exit preconfig mode immediately with the QMP > command. > > As a result, the preconfig loop will run with accel_setup_post > and os_setup_post

[PATCH 3/4] bsd-user: move strace OS/arch dependent code to host/arch dirs

2020-12-19 Thread imp
From: Stacey Son This change moves host OS and arch dependent code for the sysarch system call related to the -strace functionality into the appropriate host OS and target arch directories. Signed-off-by: Stacey Son Signed-off-by: Sean Bruno [ imp integrated minor build fixes from sbruno ]

[PATCH 4/4] bsd-user: Update strace.list for FreeBSD's latest syscalls

2020-12-19 Thread imp
From: Warner Losh Update strace.list to include all of FreeBSD's syscalls up through svn r331280. Signed-off-by: Stacey Son Signed-off-by: Sean Bruno Signed-off-by: Alexander Kabaev Signed-off-by: Jung-uk Kim Author: Michal Meloun Signed-off-by: Mikaël Urankar [imp moved this change to

[PATCH 1/4] bsd-user: regenerate FreeBSD's system call numbers

2020-12-19 Thread imp
From: Warner Losh Recreate the FreeBSD system call numbers from current sys/syscall.h. Since this isn't guaranteed to be on all systems, continue the practice of generating it with some variation on: sed -e s/SYS_/TARGET_NR_/ < $FREEBSD_SRC/sys/syscall.h > syscall_nr.h until a more

[PATCH 2/4] tcg: Additional Trap type for FreeBSD

2020-12-19 Thread imp
From: Sean Bruno FreeBSD can generate a trap 0xc as well as 0xe when writing to a read-only page. Signed-off-by: Juergen Lock [imp rewored commit message for clarity] Signed-off-by: Warner Losh --- accel/tcg/user-exec.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

[PATCH 0/4] A few preliminary bsd-user patches

2020-12-19 Thread imp
From: Warner Losh Here's the first round of bsd-user patches. There's on the order of 280 that we've done, but that's too much to review all at once. In addition, 3.1 release was the last rebase point that we've been successful with for a number of reasons unrelated to qemu. Now that those have

Re: [PATCH] acpi/gpex: Inform os to keep firmware resource map

2020-12-19 Thread Michael S. Tsirkin
On Fri, Dec 18, 2020 at 01:56:29PM +0800, Jiahui Cen wrote: > Hi Michael, > > On 2020/12/18 4:04, Michael S. Tsirkin wrote: > > On Thu, Dec 17, 2020 at 09:29:26PM +0800, Jiahui Cen wrote: > >> There may be some differences in pci resource assignment between guest os > >> and firmware. > >> > >>

Re: [PATCH v2 8/8] tests/acceptance: Test boot_linux_console for fuloong2e

2020-12-19 Thread Philippe Mathieu-Daudé
On 12/19/20 8:23 AM, Jiaxun Yang wrote: > The kernel comes from debian archive so it's trusted. > > Signed-off-by: Jiaxun Yang > --- > tests/acceptance/boot_linux_console.py | 21 + > 1 file changed, 21 insertions(+) Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe

Re: [PATCH v2 0/8] MIPS Bootloader helper

2020-12-19 Thread Philippe Mathieu-Daudé
On 12/15/20 7:41 AM, Jiaxun Yang wrote: > v2: > A big reconstruction. rewrite helpers with CPU feature and sepreate > changesets. > > Jiaxun Yang (8): > hw/mips: Make bootloader addresses unsgined > hw/mips/malta: Use address translation helper to calculate > bootloader_run_addr >

[PATCH 4/4] fuzz: delay IO until they can't trigger the crash

2020-12-19 Thread Qiuhao Li
Since programmers usually trigger an IO just before they need it. Try to delay some IO instructions may help us better understanding the timing context when debug. Tested with Bug 1908062. Refined vs. Original result: outl 0xcf8 0x881coutl 0xcf8 0x0 outb 0xcfc 0xc3

Re: [PATCH v2 7/8] hw/mips/fuloong2e: Add highmem support

2020-12-19 Thread Philippe Mathieu-Daudé
On 12/19/20 8:23 AM, Jiaxun Yang wrote: > highmem started from 0x2000. > Now we can have up to 2G RAM. > > Signed-off-by: Jiaxun Yang > --- > v2: Handle SPD for dual DIMM correctly. > --- > hw/mips/fuloong2e.c | 61 - > 1 file changed, 49

[PATCH 2/4] fuzz: split QTest writes from the rightmost byte

2020-12-19 Thread Qiuhao Li
Currently, we split the write commands' data from the middle. If it does not work, try to move the pivot "left" and retry until there is no space left. But, this is complete for ram writes but not for IO writes. For example, there is an IO write command: write addr uuuu u is the

[PATCH 3/4] fuzz: setting bits in operand of out/write to zero

2020-12-19 Thread Qiuhao Li
Simplifying the crash cases by opportunistically setting bits in operands of out/write to zero may help to debug, since usually bit one means turn on or trigger a function while zero is the default turn-off setting. Tested Bug 1908062. Refined vs. Original result: outl 0xcf8 0x881c

[PATCH 1/4] fuzz: refine crash detection mechanism

2020-12-19 Thread Qiuhao Li
The original crash detection method is to fork a process to test our new trace input. If the child process exits in time and the second-to-last line is the same as the first crash, we think it is a crash triggered by the same bug. However, in some situations, it doesn't work since it is a

[PATCH 0/4] improve crash case minimization

2020-12-19 Thread Qiuhao Li
Extend and refine the crash case minimization process. I forgot to cc some reviewers in the last patch, so I merge it as the first on in this patch series. Qiuhao Li (4): fuzz: refine crash detection mechanism fuzz: split QTest writes from the rightmost byte fuzz: setting bits in operand

[Bug 1906193] Re: riscv32 user mode emulation: fork return values broken

2020-12-19 Thread Alistair Francis
I have sent a patch, you can see it here: https://patchwork.ozlabs.org/project/qemu-devel/list/?series=221381 It seems like QEMU's waitid implementation has a bug with handling the status. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to

Re: [PATCH v2 6/8] hw/mips/fuloong2e: Correct cpuclock env

2020-12-19 Thread Philippe Mathieu-Daudé
On 12/19/20 8:21 AM, Jiaxun Yang wrote: > It was missed in 3ca7639ff00 ("hw/mips/fuloong2e: > Set CPU frequency to 533 MHz"), we need to tell kernel > correct clocks. > > Fixes: 3ca7639ff00 ("hw/mips/fuloong2e: Set CPU frequency to 533 MHz"). > Signed-off-by: Jiaxun Yang > --- >

[PATCH v1 1/1] linux-user/signal: Decode waitid si_code

2020-12-19 Thread Alistair Francis
When mapping the host waitid status to the target status we previously just used decoding information in the status value. This doesn't follow what the waitid documentation describes, which instead suggests using the si_code value for the decoding. This results in the incorrect values seen when

Re: [PATCH v2 2/8] hw/mips/fuloong2e: Relpace fault links

2020-12-19 Thread Philippe Mathieu-Daudé
On 12/19/20 8:12 AM, Jiaxun Yang wrote: > Websites are downing, but GitHub may last forever. > Loongson even doesn't recogonize 2E as their products nowadays.. > > Signed-off-by: Jiaxun Yang > --- > hw/mips/fuloong2e.c | 13 +++-- > 1 file changed, 3 insertions(+), 10 deletions(-)

Re: [PATCH] linux-user: Fix loading of BSS segments

2020-12-19 Thread Giuseppe Musacchio
On 19/12/20 11:55, Laurent Vivier wrote: > Le 17/12/2020 à 11:17, Giuseppe Musacchio a écrit : >> Some ELF binaries encode the .bss section as an extension of the data >> ones by setting the segment p_memsz > p_filesz. Some other binaries take >> a different route and encode it as a stand-alone

Re: [PATCH v2 0/8] hm/mips/fuloong2e fixes

2020-12-19 Thread BALATON Zoltan via
On Sat, 19 Dec 2020, Jiaxun Yang wrote: 在2020年12月19日十二月 下午8:13,BALATON Zoltan写道: On Sat, 19 Dec 2020, Jiaxun Yang wrote: It can now boot Debian installer[1] as well as a custom PMON bootloader distribution[2]. Note that it can't boot PMON shipped with actual machine as our ATI vgabios is

[PATCH] hvf: guard xgetbv call.

2020-12-19 Thread Hill Ma
This prevents illegal instruction on cpus do not support xgetbv. Buglink: https://bugs.launchpad.net/qemu/+bug/1758819 Signed-off-by: Hill Ma --- target/i386/hvf/x86_cpuid.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/target/i386/hvf/x86_cpuid.c

Re: [PATCH] sun4m: don't connect two qemu_irqs directly to the same input

2020-12-19 Thread Artyom Tarasenko
сб, 19 дек. 2020 г., 12:19 Mark Cave-Ayland : > The sun4m board code connects both of the IRQ outputs of each ESCC to the > same slavio input qemu_irq. Connecting two qemu_irqs outputs directly to > the > same input is not valid as it produces subtly wrong behaviour (for instance > if both the

Re: [PATCH v3 2/2] hw/block: m25p80: Implement AAI-WP command support for SST flashes

2020-12-19 Thread Bin Meng
Hi Francisco, On Fri, Dec 11, 2020 at 2:37 PM Bin Meng wrote: > > From: Xuzhou Cheng > > Auto Address Increment (AAI) Word-Program is a special command of > SST flashes. AAI-WP allows multiple bytes of data to be programmed > without re-issuing the next sequential address location. > >

Re: [PATCH v2 0/8] hm/mips/fuloong2e fixes

2020-12-19 Thread Jiaxun Yang
在2020年12月19日十二月 下午8:13,BALATON Zoltan写道: > On Sat, 19 Dec 2020, Jiaxun Yang wrote: > > It can now boot Debian installer[1] as well as a custom PMON bootloader > > distribution[2]. > > > > Note that it can't boot PMON shipped with actual machine as our ATI vgabios > > is using some x86 hack that

[Bug 1908781] [NEW] x86-64 not faulting when CS.L = 1 and CS.D = 1

2020-12-19 Thread Bruce Merry
Public bug reported: In a UEFI application I accidentally created a code segment descriptor where both the L and D bits were 1. This is supposed to generate a GP fault (e.g. see page 2942 of https://software.intel.com/sites/default/files/managed/39/c5/325462-sdm- vol-1-2abcd-3abcd.pdf). When

Re: [PATCH 2/2] win32: make qemu_fd_register() specific to windows

2020-12-19 Thread Paolo Bonzini
On 18/12/20 14:57, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Move the declaration of the function to a windows-specific header. The only user left now is SLIRP, which needs special treatement since it doesn't provide event objects itself for the socket/fds. Signed-off-by:

Re: [PATCH v2 0/8] hm/mips/fuloong2e fixes

2020-12-19 Thread BALATON Zoltan via
/loongson-community/pmon/releases/download/20201219/pmon-2edev.bin Thanks. - Jiaxun Jiaxun Yang (8): hw/mips/fuloong2e: Remove define DEBUG_FULOONG2E_INIT hw/mips/fuloong2e: Relpace fault links hw/pci-host/bonito: Fixup IRQ mapping hw/pci-host/bonito: Fixup pci.lomem mapping hw/mips/fuloong2e

Re: [PATCH] configure: Fail when specified cross compiler cannot be found

2020-12-19 Thread Paolo Bonzini
On 18/12/20 12:57, Alex Bennée wrote: Paolo Bonzini writes: On 17/12/20 18:56, Alex Bennée wrote: To be honest at the moment the information is a little hidden at the top of the output. It would be nice if we could teach meson to echo it in it's nice coloured output. Paolo, Any ideas for

Re: [PULL 00/33] QAPI patches patches for 2020-12-19

2020-12-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201219105532.1734134-1-arm...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201219105532.1734134-1-arm...@redhat.com Subject: [PULL 00/33] QAPI patches patches

[PATCH] sun4m: don't connect two qemu_irqs directly to the same input

2020-12-19 Thread Mark Cave-Ayland
The sun4m board code connects both of the IRQ outputs of each ESCC to the same slavio input qemu_irq. Connecting two qemu_irqs outputs directly to the same input is not valid as it produces subtly wrong behaviour (for instance if both the IRQ lines are high, and then one goes low, the PIC input

[PULL 24/33] Revert "qobject: let object_property_get_str() use new API"

2020-12-19 Thread Markus Armbruster
Commit aafb21a0b9 "qobject: let object_property_get_str() use new API" isn't much of a simplification. Not worth having object_property_get_str() differ from the other object_property_get_FOO(). Revert. This reverts commit aafb21a0b9cea5fa0fe52e68111bb6bd13837a02. Cc: Paolo Bonzini Cc: Daniel

[PULL 29/33] migration: Replace migration's JSON writer by the general one

2020-12-19 Thread Markus Armbruster
Commit 8118f0950f "migration: Append JSON description of migration stream" needs a JSON writer. The existing qobject_to_json() wasn't a good fit, because it requires building a QObject to convert. Instead, migration got its very own JSON writer, in commit 190c882ce2 "QJSON: Add JSON writer". It

[PULL 03/33] qapi: Use QAPI_LIST_PREPEND() where possible

2020-12-19 Thread Markus Armbruster
From: Eric Blake Anywhere we create a list of just one item or by prepending items (typically because order doesn't matter), we can use QAPI_LIST_PREPEND(). But places where we must keep the list in order by appending remain open-coded until later patches. Note that as a side effect, this also

[PULL 21/33] qobject: Move internals to qobject-internal.h

2020-12-19 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20201211171152.146877-9-arm...@redhat.com> --- include/qapi/qmp/qbool.h | 2 -- include/qapi/qmp/qdict.h | 2 -- include/qapi/qmp/qlist.h | 2 -- include/qapi/qmp/qnull.h | 2 -- include/qapi/qmp/qnum.h| 3 ---

[PULL 17/33] qobject: Use GString instead of QString to accumulate JSON

2020-12-19 Thread Markus Armbruster
QString supports modifying its string, but it's quite limited: you can only append. The remaining callers use it for building an initial string, never for modifying it later. Use of GString for building the initial string is actually more convenient here. Change qobject_to_json() & friends to

[PULL 32/33] block: Use GString instead of QString to build filenames

2020-12-19 Thread Markus Armbruster
QString supports modifying its string, but it's quite limited: you can only append. Just one caller remains: bdrv_parse_filename_strip_prefix() uses it just for building an initial string. Change it to do build the initial string with GString. This is another step towards making QString

[PULL 25/33] qobject: Drop qobject_get_try_str()

2020-12-19 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20201211171152.146877-13-arm...@redhat.com> --- include/qapi/qmp/qstring.h | 1 - qobject/qstring.c | 11 --- 2 files changed, 12 deletions(-) diff --git a/include/qapi/qmp/qstring.h b/include/qapi/qmp/qstring.h index

[PULL 18/33] qobject: Change qobject_to_json()'s value to GString

2020-12-19 Thread Markus Armbruster
qobject_to_json() and qobject_to_json_pretty() build a GString, then covert it to QString. Just one of the callers actually needs a QString: qemu_rbd_parse_filename(). A few others need a string they can modify: qmp_send_response(), qga's send_response(), to_json_str(), and qmp_fd_vsend_fds().

[PULL 22/33] qmp: Fix tracing of non-string command IDs

2020-12-19 Thread Markus Armbruster
Tracepoints monitor_qmp_cmd_in_band and monitor_qmp_cmd_out_of_band (commit cf869d5317 "qmp: support out-of-band (oob) execution") treat non-string "id" like absent "id". Fix that. Signed-off-by: Markus Armbruster Message-Id: <20201211171152.146877-10-arm...@redhat.com> --- monitor/qmp.c | 30

[PULL 33/33] qobject: Make QString immutable

2020-12-19 Thread Markus Armbruster
The functions to modify a QString's string are all unused now. Drop them, and make the string immutable. Saves 16 bytes per QString on my system. Signed-off-by: Markus Armbruster Message-Id: <20201211171152.146877-21-arm...@redhat.com> --- include/qapi/qmp/qstring.h | 8 +

[PULL 30/33] json: Use GString instead of QString to accumulate strings

2020-12-19 Thread Markus Armbruster
QString supports modifying its string, but it's quite limited: you can only append. The remaining callers use it for building an initial string, never for modifying it later. Change parse_string() to do build the initial string with GString. This is another step towards making QString immutable.

[PULL 14/33] hmp: Simplify how qmp_human_monitor_command() gets output

2020-12-19 Thread Markus Armbruster
Commit 48c043d0d1 "hmp: human-monitor-command: stop using the Memory chardev driver" left us "if string is non-empty, duplicate it, else duplicate the empty string". Meh. Duplicate it unconditionally. Cc: Dr. David Alan Gilbert Signed-off-by: Markus Armbruster Message-Id:

[PULL 31/33] keyval: Use GString to accumulate value strings

2020-12-19 Thread Markus Armbruster
QString supports modifying its string, but it's quite limited: you can only append. The remaining callers use it for building an initial string, never for modifying it later. Change keyval_parse_one() to do build the initial string with GString. This is another step towards making QString

[PULL 20/33] hw/rdma: Replace QList by GQueue

2020-12-19 Thread Markus Armbruster
RdmaProtectedQList provides a thread-safe queue of int64_t on top of a QList. rdma_protected_qlist_destroy() calls qlist_destroy_obj() directly. qlist_destroy_obj() is actually for use by qobject_destroy() only. The next commit will make that obvious. The minimal fix would be calling

[PULL 28/33] qobject: Factor JSON writer out of qobject_to_json()

2020-12-19 Thread Markus Armbruster
We have two JSON writers written in C: qobject/qjson.c provides qobject_to_json(), and migration/qjson.c provides a more low level imperative interface. They don't share code. The latter tacitly limits numbers to int64_t, and strings contents to characters that don't need escaping. Factor out

[PULL 15/33] monitor: Use GString instead of QString for output buffer

2020-12-19 Thread Markus Armbruster
GString has a richer set of string operations than QString. It should be preferred to QString except where we need a QObject or reference counting. We don't here. Switch to GString, and put its richer interface to use. Cc: Dr. David Alan Gilbert Signed-off-by: Markus Armbruster Message-Id:

[PULL 19/33] Revert "qstring: add qstring_free()"

2020-12-19 Thread Markus Armbruster
This reverts commit 164c374b75f87c6765a705c4418ab7005a2d356f. A free function for a reference-counted object is in bad taste. Fortunately, this one is now also unused. Drop it. Signed-off-by: Markus Armbruster Message-Id: <20201211171152.146877-7-arm...@redhat.com> ---

[PULL 23/33] block: Avoid qobject_get_try_str()

2020-12-19 Thread Markus Armbruster
I'm about to remove qobject_get_try_str(). Use qstring_get_str() instead. Safe because the argument is known to be a QString here. Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-bl...@nongnu.org Signed-off-by: Markus Armbruster Message-Id: <20201211171152.146877-11-arm...@redhat.com> Reviewed-by:

[PULL 27/33] qobject: Factor quoted_str() out of to_json()

2020-12-19 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20201211171152.146877-15-arm...@redhat.com> --- qobject/qjson.c | 110 1 file changed, 54 insertions(+), 56 deletions(-) diff --git a/qobject/qjson.c b/qobject/qjson.c index 2f690c1816..962214f5a7

[PULL 13/33] test-visitor-serialization: Clean up test_primitives()

2020-12-19 Thread Markus Armbruster
test_primitives() uses union member intmax_t max to compare the integer members. Unspecified behavior. Has worked fine for many years, though. Clean it up. Signed-off-by: Markus Armbruster Message-Id: <20201210161452.2813491-11-arm...@redhat.com> --- tests/test-visitor-serialization.c | 44

[PULL 26/33] qobject: Drop qstring_get_try_str()

2020-12-19 Thread Markus Armbruster
No users left outside tests/, and the ones in tests/ can just as well use qstring_get_str(). Do that, and drop the function. Signed-off-by: Markus Armbruster Message-Id: <20201211171152.146877-14-arm...@redhat.com> --- include/qapi/qmp/qstring.h | 1 - qobject/qstring.c | 10

[PULL 07/33] tests/check-qjson: Replace redundant large_number()

2020-12-19 Thread Markus Armbruster
Move one of large_number()'s three checks to uint_number(), and the other two to float_number(). Signed-off-by: Markus Armbruster Message-Id: <20201210161452.2813491-5-arm...@redhat.com> --- tests/check-qjson.c | 47 +++-- 1 file changed, 3 insertions(+),

[PULL 02/33] migration: Refactor migrate_cap_add

2020-12-19 Thread Markus Armbruster
From: Eric Blake Instead of taking a list parameter and returning a new head at a distance, just return the new item for the caller to insert into a list via QAPI_LIST_PREPEND. Signed-off-by: Eric Blake Message-Id: <20201113011340.463563-4-ebl...@redhat.com> Reviewed-by: Markus Armbruster

[PULL 09/33] qobject: Fix qnum_to_string() to use sufficient precision

2020-12-19 Thread Markus Armbruster
We should serialize numbers to JSON so that they deserialize back to the same number. We fail to do so. The culprit is qnum_to_string(): it uses format %f with trailing '0' trimmed. Results in pretty output for "nice" numbers, but is prone to nasty rounding errors. For instance, numbers

[PULL 00/33] QAPI patches patches for 2020-12-19

2020-12-19 Thread Markus Armbruster
The following changes since commit a05f8ecd88f15273d033b6f044b850a8af84a5b8: Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20201217-1' into staging (2020-12-18 11:12:35 +) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git

[PULL 16/33] qobject: Make qobject_to_json_pretty() take a pretty argument

2020-12-19 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20201211171152.146877-4-arm...@redhat.com> --- include/qapi/qmp/qjson.h | 2 +- monitor/qmp.c| 2 +- qemu-img.c | 8 qobject/qjson.c | 28 +++- qom/qom-hmp-cmds.c | 2 +-

[PULL 11/33] string-output-visitor: Fix to use sufficient precision

2020-12-19 Thread Markus Armbruster
The string output visitor should serialize numbers so that the string input visitor deserializes them back to the same number. It fails to do so. print_type_number() uses format %f. This is prone to nasty rounding errors. For instance, numbers between 0 and 0.005 get flushed to zero. We

[PULL 05/33] tests/check-qjson: Examine QNum more thoroughly

2020-12-19 Thread Markus Armbruster
simple_number() checks only qnum_get_try_int(). Also check qnum_get_try_uint() and qnum_get_double(). float_number() checks only qnum_get_double(). Also check qnum_get_try_int() and qnum_get_try_uint(). Signed-off-by: Markus Armbruster Message-Id: <20201210161452.2813491-3-arm...@redhat.com>

[PULL 12/33] test-visitor-serialization: Drop insufficient precision workaround

2020-12-19 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20201210161452.2813491-10-arm...@redhat.com> --- tests/test-visitor-serialization.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/tests/test-visitor-serialization.c b/tests/test-visitor-serialization.c index

[PULL 06/33] tests/check-qjson: Cover number 2^63

2020-12-19 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20201210161452.2813491-4-arm...@redhat.com> --- tests/check-qjson.c | 41 +++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/tests/check-qjson.c b/tests/check-qjson.c index 6ab6b111b0..8cb8a40524

[PULL 10/33] test-string-output-visitor: Cover "unround" number

2020-12-19 Thread Markus Armbruster
This demonstrates rounding error due to insufficient precision: double 3.1415926535897932 gets converted to JSON 3.141593. Signed-off-by: Markus Armbruster Message-Id: <20201210161452.2813491-8-arm...@redhat.com> --- tests/test-string-output-visitor.c | 4 ++-- 1 file changed, 2 insertions(+),

[PULL 08/33] tests/check-qnum: Cover qnum_to_string() for "unround" argument

2020-12-19 Thread Markus Armbruster
qnum_to_string() has a FIXME comment about rounding errors due to insufficient precision. Cover it: 2.718281828459045 gets converted to "2.718282". The next commit will fix it. Signed-off-by: Markus Armbruster Message-Id: <20201210161452.2813491-6-arm...@redhat.com> --- tests/check-qnum.c | 6

[PULL 04/33] tests/check-qjson: Don't skip funny QNumber to JSON conversions

2020-12-19 Thread Markus Armbruster
simple_number() and float_number() convert from JSON to QNumber and back. simple_number() tests "-0", but skips the conversion back to JSON, because it yields "0", not "-0". Works as intended, so better cover it: don't skip, but expect the funny result. float_number() tests "-32.20e-10", but

[PULL 01/33] rocker: Revamp fp_port_get_info

2020-12-19 Thread Markus Armbruster
From: Eric Blake Instead of modifying the value member of a list element passed as a parameter, and open-coding the manipulation of that list, it's nicer to just return a freshly allocated value to be prepended to a list using QAPI_LIST_PREPEND. Signed-off-by: Eric Blake Message-Id:

Re: [PATCH] linux-user: Fix loading of BSS segments

2020-12-19 Thread Laurent Vivier
Le 17/12/2020 à 11:17, Giuseppe Musacchio a écrit : > Some ELF binaries encode the .bss section as an extension of the data > ones by setting the segment p_memsz > p_filesz. Some other binaries take > a different route and encode it as a stand-alone PT_LOAD segment with > p_filesz = 0 and p_memsz

[PATCH 6/7] macio: wire macio GPIOs to OpenPIC using sysbus IRQs

2020-12-19 Thread Mark Cave-Ayland
This both allows the wiring to be done as Ben suggested in his original comment in gpio.c and also enables the OpenPIC object property link to be removed. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/gpio.c | 24 +--- hw/misc/macio/macio.c| 12

[PATCH 7/7] macio: don't set user_creatable to false

2020-12-19 Thread Mark Cave-Ayland
Now that all of the object property links to the heathrow PIC and OpenPIC have been removed from the macio devices, it is safe to allow the macio-oldworld and macio-neworld devices to be marked as user_creatable. Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/macio.c | 2 -- 1 file changed,

[PATCH 5/7] macio: move OpenPIC inside macio-newworld device

2020-12-19 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/macio.c | 19 +-- hw/ppc/mac_newworld.c | 25 +++-- include/hw/misc/macio/macio.h | 2 +- 3 files changed, 21 insertions(+), 25 deletions(-) diff --git a/hw/misc/macio/macio.c

[PATCH 4/7] mac_newworld: delay wiring of PCI IRQs in New World machine

2020-12-19 Thread Mark Cave-Ayland
This is to prepare for moving the OpenPIC device into the macio-newworld device. Signed-off-by: Mark Cave-Ayland --- hw/ppc/mac_newworld.c | 46 --- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/hw/ppc/mac_newworld.c

[PATCH 3/7] macio: move heathrow PIC inside macio-oldworld device

2020-12-19 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/misc/macio/macio.c | 20 +-- hw/ppc/mac_oldworld.c | 66 +-- include/hw/misc/macio/macio.h | 2 +- 3 files changed, 43 insertions(+), 45 deletions(-) diff --git a/hw/misc/macio/macio.c

[PATCH 2/7] mac_oldworld: move initialisation of grackle before heathrow

2020-12-19 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/ppc/mac_oldworld.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 2ead34bdf1..e58e0525fe 100644 --- a/hw/ppc/mac_oldworld.c +++ b/hw/ppc/mac_oldworld.c

[PATCH 1/7] mac_oldworld: remove duplicate bus check for PPC_INPUT(env)

2020-12-19 Thread Mark Cave-Ayland
This condition will have already been caught when wiring the heathrow PIC irqs to the CPU. Signed-off-by: Mark Cave-Ayland --- hw/ppc/mac_oldworld.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c index 04f98a4d81..2ead34bdf1 100644 ---

[PATCH 0/7] macio: remove PIC object property links

2020-12-19 Thread Mark Cave-Ayland
This patchset follows on from the dicussion at https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg02630.html where the user_creatable flag for the macio devices was set back to false just before the 5.2 release. The underlying cause was that the PIC object property links were not being set

Re: [PATCH v2 0/7] Common macros for QAPI list growth

2020-12-19 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: > >> v1, as such, was here: >> https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg08003.html >> (v6 11/11 qapi: Use QAPI_LIST_ADD() where possible) >> >> since then, I've rebased that patch (upstream went with PREPEND >> instead of ADD),

Re: [PATCH 0/2] Cleanup internal WHPX headers

2020-12-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201219090637.1700900-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201219090637.1700900-1-pbonz...@redhat.com Subject: [PATCH 0/2] Cleanup internal

[PATCH 0/2] Cleanup internal WHPX headers

2020-12-19 Thread Paolo Bonzini
Remove Windows type usage from sysemu/whpx.h, because the whp-dispatch.h header is internal to the WHPX accelerator implementation. Fixes WHPX build. Paolo Bonzini (2): whpx: rename whp-dispatch to whpx-internal.h whpx: move internal definitions to whpx-internal.h include/sysemu/whpx.h

[PATCH 1/2] whpx: rename whp-dispatch to whpx-internal.h

2020-12-19 Thread Paolo Bonzini
Rename the file in preparation for moving more implementation-internal definitions to it. The build is still broken though. Signed-off-by: Paolo Bonzini --- target/i386/whpx/whpx-all.c | 5 + target/i386/whpx/whpx-apic.c | 2 +-

[PATCH 2/2] whpx: move internal definitions to whpx-internal.h

2020-12-19 Thread Paolo Bonzini
Only leave the external interface in sysemu/whpx.h. whpx_apic_in_platform is moved to a .c file because it needs whpx_state. Reported-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- include/sysemu/whpx.h| 22 +- target/i386/whpx/whpx-all.c | 4

Re: [PATCH v12 0/7] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-12-19 Thread Markus Armbruster
Markus Armbruster writes: > Lukas Straub writes: > >> Hello Everyone, >> So here is v12. >> @Marc-André Lureau, We still need an ACK for the chardev patch. > > Marc-André? Would be good to get this wrapped before Christmas. No go. Unless someone objects, I'll merge this when I'm back (mid