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

2020-12-18 Thread Jiaxun Yang
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(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index cc6ec0f8c1

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

2020-12-18 Thread Jiaxun Yang
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 insertions(+), 12 deletions(-) diff --git a/hw/mips/fuloong2e.c b/

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

2020-12-18 Thread Jiaxun Yang
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 --- hw/mips/fuloong2e.c | 6 +++--- 1 file changed, 3 insertions(+), 3 delet

[PATCH v2 5/8] hw/mips/fuloong2e: Remove unused env entry

2020-12-18 Thread Jiaxun Yang
modetty and busclock is not handled by kernel and the parameter here seems unreasonable. Signed-off-by: Jiaxun Yang --- hw/mips/fuloong2e.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index d846ef7b00..c4843dd15e 100644 --- a/hw/mips/fuloong2e.c

[PATCH v2 4/8] hw/pci-host/bonito: Fixup pci.lomem mapping

2020-12-18 Thread Jiaxun Yang
The original mapping had wrong base address. Fix by correct the base adress and merge three alias into a single. Signed-off-by: Jiaxun Yang --- hw/pci-host/bonito.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c

[PATCH v2 3/8] hw/pci-host/bonito: Fixup IRQ mapping

2020-12-18 Thread Jiaxun Yang
Accroading to arch/mips/pci/fixup-fuloong2e.c in kernel, despites south bridge IRQs needs special care, all other IRQ pins are mapped by 'LOONGSON_IRQ_BASE + 25 + pin'. As south bridge IRQs are all handled by ISA bus, we can simply remove BONITO_IRQ_BASE and direct map IRQs here. Signed-off-by: J

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

2020-12-18 Thread Jiaxun Yang
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(-) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c inde

[PATCH v2 1/8] hw/mips/fuloong2e: Remove define DEBUG_FULOONG2E_INIT

2020-12-18 Thread Jiaxun Yang
Seems useless Fixes: 051c190bce5 ("MIPS: Initial support of fulong mini pc (machine construction)") Signed-off-by: Jiaxun Yang Reviewed-by: Philippe Mathieu-Daudé --- hw/mips/fuloong2e.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index 9b

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

2020-12-18 Thread Jiaxun Yang
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 can't be handled by x86emu in original PMON. Tree avilable at: https://gitlab.com/FlyGoat/qemu/-/tree/

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

2020-12-18 Thread Jiaxun Yang
在 2020/12/15 下午2:41, Jiaxun Yang 写道: v2: A big reconstruction. rewrite helpers with CPU feature and sepreate changesets. ping? Jiaxun Yang (8): hw/mips: Make bootloader addresses unsgined hw/mips/malta: Use address translation helper to calculate bootloader_run_addr hw/mips:

Re: [PATCH v1 1/1] chardev: enable guest socket status/crontrol via DTR and DCD

2020-12-18 Thread Darrin M. Gorski
>> Yes, but they can override the default behaviour, or just reuse some code. >> If it doesn't fit, don't worry about it, we can just start with socket. Whew. I spent several hours yesterday trying to figure out how to alter the base class to support this - DCD could be reasonably simple, but DTR

[Bug 1908489] Re: qemu 4.2 bootloops with -cpu host and nested hypervisor

2020-12-18 Thread Luqman
Ok, after bisect between stable-4.1 and stable-4.2 I did confirm that https://github.com/qemu/qemu/commit/20a78b02d31534ae478779c2f2816c273601e869 is the first bad commit. The full qemu command line is: qemu-system-x86_64 \ -name guest=test,debug-threads=on \ -serial none \ -enable-kv

[PATCH] hw/riscv: microchip_pfsoc: specify XIP image

2020-12-18 Thread Vitaly Wool
Add command line parameter to microchip_pfsoc machine to be able to specify XIP kernel image file. To pass over XIP image file, it will be enough to run $ qemu-system-riscv64 -M microchip-icicle-kit,xipImage= ... Signed-off-by: Vitaly Wool --- hw/riscv/microchip_pfsoc.c | 42 +++

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

2020-12-18 Thread Warner Losh
On Fri, Dec 18, 2020 at 1:55 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 message for clarity] > Signed-off-by: Warner Losh > --- > accel/tcg/user-exec.c | 8 +++- >

Re: [RFC v6 10/11] accel: introduce AccelCPUClass extending CPUClass

2020-12-18 Thread Claudio Fontana
On 12/18/20 11:30 PM, Claudio Fontana wrote: > On 12/18/20 10:55 PM, Claudio Fontana wrote: >> On 12/18/20 7:04 PM, Claudio Fontana wrote: >>> On 12/18/20 7:01 PM, Paolo Bonzini wrote: On 18/12/20 18:51, Claudio Fontana wrote: > But with things like cris/ for example, > the tcg functio

Re: QOM address space handling

2020-12-18 Thread Eduardo Habkost
On Fri, Dec 18, 2020 at 07:49:24AM +, Mark Cave-Ayland wrote: > On 10/11/2020 11:40, Paolo Bonzini wrote: > > > On 10/11/20 12:14, Mark Cave-Ayland wrote: > > > There are 2 possible solutions here: 1) ensure QOM objects that add > > > address spaces during instance init have a corresponding in

Re: [RFC v6 10/11] accel: introduce AccelCPUClass extending CPUClass

2020-12-18 Thread Claudio Fontana
On 12/18/20 10:55 PM, Claudio Fontana wrote: > On 12/18/20 7:04 PM, Claudio Fontana wrote: >> On 12/18/20 7:01 PM, Paolo Bonzini wrote: >>> On 18/12/20 18:51, Claudio Fontana wrote: But with things like cris/ for example, the tcg functions to use are actually versioned per each subclass o

Re: [RFC v6 10/11] accel: introduce AccelCPUClass extending CPUClass

2020-12-18 Thread Claudio Fontana
On 12/18/20 7:04 PM, Claudio Fontana wrote: > On 12/18/20 7:01 PM, Paolo Bonzini wrote: >> On 18/12/20 18:51, Claudio Fontana wrote: >>> But with things like cris/ for example, >>> the tcg functions to use are actually versioned per each subclass of >>> TYPE_CRIS_CPU. >>> >>> Different tcg_ops nee

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

2020-12-18 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

Re: [PATCH 0/2] thunk, linux-user: Add support for SIOCETHTOOL ioctl

2020-12-18 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201218214142.3673709-1-...@google.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201218214142.3673709-1-...@google.com Subject: [PATCH 0/2] thunk, linux-user: Add support f

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

2020-12-18 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 ear

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

2020-12-18 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

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

2020-12-18 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 compre

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

2020-12-18 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 ] Sig

[PATCH 2/2] linux-user: Add support for SIOCETHTOOL ioctl

2020-12-18 Thread Shu-Chun Weng via
The ioctl numeric values are platform-independent and determined by the file include/uapi/linux/sockios.h in Linux kernel source code: #define SIOCETHTOOL 0x8946 These ioctls get (or set) various structures pointed by the field ifr_data in the structure ifreq depending on the first 4 bytes of

[PATCH 1/2] thunk: supports flexible arrays

2020-12-18 Thread Shu-Chun Weng via
Flexible arrays may appear in the last field of a struct and are heavily used in the ioctl(SIOCETHTOOL) system call on Linux. E.g. struct ethtool_regs { __u32 cmd; __u32 version; /* driver-specific, indicates different chips/revs */ __u32 len; /* bytes */ __u8da

[PATCH 0/2] thunk, linux-user: Add support for SIOCETHTOOL ioctl

2020-12-18 Thread Shu-Chun Weng via
Hi Riku and Laurent, These two patches together implements the SIOCETHTOOL ioctl operations. Many of the kernel structures in this operations make use of flexible arrays (array with no size / zero size at the end of the structure), so I extended thunk to handle these fields natively. This patch s

Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory

2020-12-18 Thread John Snow
On 12/18/20 3:57 PM, Markus Armbruster wrote: John Snow writes: On 12/18/20 12:24 AM, Markus Armbruster wrote: I could conceivably use source line information and stuff, to be needlessly fancy about it. Nah. I just think singleton patterns are kind of weird to implement in Python, so I didn't

[PATCH 05/11] qapi/gen: use './builtin' for the built-in module name

2020-12-18 Thread Markus Armbruster
From: John Snow Use this in preference to 'None', which helps remove some edge cases in the typing. Signed-off-by: John Snow Message-Id: <20201217015927.197287-6-js...@redhat.com> --- scripts/qapi/gen.py | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff

[PATCH 11/11] qapi/gen: Drop support for QAPIGen without a file name

2020-12-18 Thread Markus Armbruster
The previous commit removed the only user of QAPIGen(None). Tighten the type hint. Signed-off-by: Markus Armbruster --- scripts/qapi/gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index cb00229f5d..8716689450 100644 --- a/scr

[PATCH 02/11] qapi/events: fix visit_event typing

2020-12-18 Thread Markus Armbruster
From: John Snow Actually, the arg_type can indeed be Optional. Signed-off-by: John Snow Message-Id: <20201217015927.197287-3-js...@redhat.com> --- scripts/qapi/events.py | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/qapi/events.py b/scripts/qapi/event

[PATCH 00/11] Drop support for QAPIGen without a file name

2020-12-18 Thread Markus Armbruster
John Snow posted [PATCH 09/12] qapi/gen: move write method to QAPIGenC, make fname a str QAPIGenC and QAPIGenH in particular depend on fname being defined, but we have a usage of QAPIGenCCode that isn't intended to be associated with a particular file. No problem, move the wr

[PATCH 07/11] qapi/gen: Replace ._begin_system_module()

2020-12-18 Thread Markus Armbruster
QAPISchemaModularCVisitor._begin_system_module() is actually just for the builtin module. Rename it to ._begin_builtin_module() and drop its useless @name parameter. Signed-off-by: Markus Armbruster --- scripts/qapi/gen.py | 4 ++-- scripts/qapi/types.py | 2 +- scripts/qapi/visit.py | 2 +-

Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory

2020-12-18 Thread Markus Armbruster
John Snow writes: > On 12/18/20 12:24 AM, Markus Armbruster wrote: >>> I could conceivably use source line information and stuff, to be >>> needlessly fancy about it. Nah. I just think singleton patterns are kind >>> of weird to implement in Python, so I didn't. >> Stupidest singleton that could

[PATCH 03/11] qapi/main: handle theoretical None-return from re.match()

2020-12-18 Thread Markus Armbruster
From: John Snow Mypy cannot understand that this match can never be None, so help it along. Signed-off-by: John Snow Message-Id: <20201217015927.197287-4-js...@redhat.com> --- scripts/qapi/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/qapi/main.py b/scripts/qapi/main.py

[PATCH 10/11] qapi/commands: Simplify command registry generation

2020-12-18 Thread Markus Armbruster
QAPISchemaGenCommandVisitor.visit_command() needs to generate the marshalling function into the current module, and also generate its registration into the ./init system module. The latter is done somewhat awkwardly: .__init__() creates a QAPIGenCCode that will not be written out, each .visit_comm

[PATCH 06/11] qapi/gen: write _genc/_genh access shims

2020-12-18 Thread Markus Armbruster
From: John Snow Many places assume they can access these fields without checking them first to ensure they are defined. Eliminating the _genc and _genh fields and replacing them with functional properties that check for correct state can ease the typing overhead by eliminating the Optional[T] ret

[PATCH 09/11] qapi/gen: Support for switching to another module temporarily

2020-12-18 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- scripts/qapi/gen.py | 8 1 file changed, 8 insertions(+) diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index d9f8bac9aa..cb00229f5d 100644 --- a/scripts/qapi/gen.py +++ b/scripts/qapi/gen.py @@ -15,6 +15,7 @@ from contextlib import contextma

[PATCH 08/11] qapi/gen: Expose a single module name space

2020-12-18 Thread Markus Armbruster
QAPISchemaModularCVisitor attempts to encapsulate the way it splits the module name space between user modules (name can't start with './') and system modules (name is None or starts with './') by providing separate ._add_user_module() and ._add_system_module(), where the latter prepends './' to na

[PATCH 01/11] qapi/commands: assert arg_type is not None

2020-12-18 Thread Markus Armbruster
From: John Snow when boxed is true, expr.py asserts that we must have arguments. Ultimately, this should mean that if boxed is True, that arg_type should be defined. Mypy cannot infer this, and does not support 'stateful' type inference, e.g.: ``` if x: assert y is not None ... if x: y

[PATCH 04/11] qapi/gen: assert that _start_if is not None in _wrap_ifcond

2020-12-18 Thread Markus Armbruster
From: John Snow We already assert this in end_if, but that's opaque to mypy. Do it in _wrap_ifcond instead. Same effect at runtime, but mypy can now infer the type in _wrap_ifcond's body. Signed-off-by: John Snow Message-Id: <20201217015927.197287-5-js...@redhat.com> --- scripts/qapi/gen.py |

Re: [PATCH v3 1/4] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls

2020-12-18 Thread Laurent Vivier
Le 18/12/2020 à 20:32, Shu-Chun Weng via a écrit : > Also reorder blocks so that they are all in the same order everywhere. > > Signed-off-by: Shu-Chun Weng > --- > v1 -> v2: > Updated print_fcntl(). > > v2 -> v3: > Rebase to master on Dec 18, 2020 > > linux-user/strace.c | 39 ++

Re: [PATCH] tests/acceptance: Test PMON with Loongson-3A1000 CPU

2020-12-18 Thread Willian Rampazzo
On 12/16/20 3:17 PM, Philippe Mathieu-Daudé wrote: Test the PMON firmware. As the firmware is not redistributable, it has to be downloaded manually first. Then it can be used by providing its path via the PMON_PATH environment variable: $ AVOCADO_ALLOW_UNTRUSTED_CODE=1 \ PMON_PATH=/image

Re: [PATCH v3 1/4] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls

2020-12-18 Thread Laurent Vivier
Le 18/12/2020 à 20:32, Shu-Chun Weng via a écrit : > Also reorder blocks so that they are all in the same order everywhere. > > Signed-off-by: Shu-Chun Weng > --- > v1 -> v2: > Updated print_fcntl(). > > v2 -> v3: > Rebase to master on Dec 18, 2020 > > linux-user/strace.c | 39 ++

Re: [PATCH v2] bugfix: hostmem: Free host_nodes list right after visited

2020-12-18 Thread Eduardo Habkost
On Thu, Dec 10, 2020 at 03:52:26PM +0800, Keqian Zhu wrote: > In host_memory_backend_get_host_nodes, we build host_nodes > list and output it to v (a StringOutputVisitor) but forget > to free the list. This fixes the memory leak. > > The memory leak stack: > > Direct leak of 32 byte(s) in 2 obje

Re: [PATCH v3 00/18] Support Multifd for RDMA migration

2020-12-18 Thread Dr. David Alan Gilbert
* Zheng Chuan (zhengch...@huawei.com) wrote: > Hi, Dave. > > Since qemu 6.0 is open and some patches of this series have been reviewed, > might you have time to continue reviewing rest of them ? Yes, apologies for not getting further; I'll need to attack it again in the new year; it's quite har

[PATCH v3 2/2] linux-user: setsockopt() SO_TIMESTAMPNS and SO_TIMESTAMPING

2020-12-18 Thread Shu-Chun Weng via
This change supports SO_TIMESTAMPNS_OLD/NEW and SO_TIMESTAMPING_OLD/NEW for setsocketopt() with SOL_SOCKET. Based on the SO_TIMESTAMP_OLD/NEW framework. The three pairs share the same flag `SOCK_TSTAMP_NEW` in linux kernel for deciding if the old or the new format is used. Signed-off-by: Shu-Chun

[PATCH v3 1/2] linux-user: Update SO_TIMESTAMP to SO_TIMESTAMP_OLD/NEW

2020-12-18 Thread Shu-Chun Weng via
Both guest options map to host SO_TIMESTAMP while keeping a global bit to remember if the guest expects the old or the new format. Don't support programs mixing two formats. Added a multiarch test to verify. Signed-off-by: Shu-Chun Weng --- v1 -> v2: Only keep track of old or new format global

[PATCH v3 0/2] linux-user: SO_TIMESTAMP/NS/ING sockopt

2020-12-18 Thread Shu-Chun Weng via
Hi Laurent, This is the two timestamp-related patches splitted off per https://lists.nongnu.org/archive/html/qemu-devel/2020-12/msg05149.html v1 -> v2: Address comments on the first 5 (was 3) patches. Fix style problems. v2 -> v3: Split off into own group per https://lists.nongnu.org/arc

Re: [PATCH] RISC-V: Place DTB at 3GB boundary instead of 4GB

2020-12-18 Thread Atish Patra
On Fri, 2020-12-18 at 16:42 +0800, Bin Meng wrote: > Hi Atish, > > On Fri, Dec 18, 2020 at 4:00 PM Atish Patra > wrote: > > > > On Fri, 2020-12-18 at 15:33 +0800, Bin Meng wrote: > > > Hi Atish, > > > > > > On Fri, Dec 18, 2020 at 3:27 PM Atish Patra > > > wrote: > > > > > > > > On Fri, 2020-

[PATCH v3 4/4] linux-user: Add IPv6 options to do_print_sockopt()

2020-12-18 Thread Shu-Chun Weng via
Signed-off-by: Shu-Chun Weng Reviewed-by: Laurent Vivier --- v1 -> v2: New: Add all IPV6 options to do_print_sockopt(), including the newly supported IPV6_ADDR_PREFERENCES. v2 -> v3: Rebase to master on Dec 18, 2020 linux-user/strace.c | 108

[PATCH v3 3/4] linux-user: add missing IPv6 get/setsockopt option

2020-12-18 Thread Shu-Chun Weng via
IPV6_ADDR_PREFERENCES (RFC5014: Source address selection) was not supported. Signed-off-by: Shu-Chun Weng Reviewed-by: Laurent Vivier --- v1 -> v2: Split out IPV6 options into own patch. do_print_sockopt() changes added in a separate patch since a large number of unrelated changes are invo

[PATCH v3 2/4] linux-user: add missing UDP get/setsockopt option

2020-12-18 Thread Shu-Chun Weng via
SOL_UDP manipulate options at UDP level. All six options currently defined in linux source include/uapi/linux/udp.h take integer values. Signed-off-by: Shu-Chun Weng Reviewed-by: Laurent Vivier --- v1 -> v2: Split out SOL_UDP into own patch. Updated do_print_sockopt(). v2 -> v3: Rebase to

[PATCH v3 0/4] fcntl and sockopt options

2020-12-18 Thread Shu-Chun Weng via
Hi Laurent, This is a series of 4 patches in 2 groups, putting into a single thread for easier tracking. [PATCH v3 1/4] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls An incidental follow up on https://lists.nongnu.org/archive/html/qemu-devel/2019-09/msg01925.html [PATCH v3 2/4] linu

[PATCH v3 1/4] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls

2020-12-18 Thread Shu-Chun Weng via
Also reorder blocks so that they are all in the same order everywhere. Signed-off-by: Shu-Chun Weng --- v1 -> v2: Updated print_fcntl(). v2 -> v3: Rebase to master on Dec 18, 2020 linux-user/strace.c | 39 --- linux-user/syscall.c | 10 +++

Re: [PATCH 06/12] qapi/source: Add builtin null-object sentinel

2020-12-18 Thread John Snow
On 12/17/20 6:56 AM, Markus Armbruster wrote: John Snow writes: On 12/16/20 4:22 AM, Markus Armbruster wrote: 2. On error with "no source info", don't crash. I have my doubts on this one. Such an error means the QAPI code generator screwed up, at least in theory. Crashing is o

Re: [PATCH 08/12] qapi/schema: make QAPISourceInfo mandatory

2020-12-18 Thread John Snow
On 12/18/20 12:24 AM, Markus Armbruster wrote: I could conceivably use source line information and stuff, to be needlessly fancy about it. Nah. I just think singleton patterns are kind of weird to implement in Python, so I didn't. Stupidest singleton that could possibly work: in __init__, self.s

Re: [PATCH 06/12] qapi/source: Add builtin null-object sentinel

2020-12-18 Thread John Snow
On 12/17/20 7:33 AM, Markus Armbruster wrote: A patch limited to the first aspect merely tweaks an implementation detail. As soon as we include the second aspect, we get to debate how to handle programming errors, and maybe whether any of the errors involving a QAPISourceInfo.builtin() are*not*

[Qemu-devel] [PULL 0/1] RDMA queue

2020-12-18 Thread Marcel Apfelbaum
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: https://github.com/marcel-apf/qemu tags/rdma-pul

[Qemu-devel] [PULL 1/1] contrib/rdmacm-mux: Fix error condition in hash_tbl_search_fd_by_ifid()

2020-12-18 Thread Marcel Apfelbaum
From: AlexChen When fd is not found according to ifid, the _hash_tbl_search_fd_by_ifid() returns 0 and assigns the result to *fd, so We have to check that *fd is 0, not that fd is 0. Reported-by: Euler Robot Signed-off-by: AlexChen Message-Id: <5f9ac6ff.4000...@huawei.com> Reviewed-by: Marcel

Re: [PATCH] pci: add romsize property

2020-12-18 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > This property can be useful for distros to set up known-good ROM sizes for > migration purposes. The VM will fail to start if the ROM is too large, > and migration compatibility will not be broken if the ROM is too small. > > Signed-off-by: Paolo Bon

Re: [RFC PATCH v1] x86/cpu: initialize the CPU concurrently

2020-12-18 Thread Eduardo Habkost
Hi, Thanks for the patch, and sorry for taking so long to look at it. On Wed, Nov 25, 2020 at 07:54:17PM +0800, Zhenyu Ye wrote: > From 0b4318c9dbf6fa152ec14eab29837ea06e2d78e5 Mon Sep 17 00:00:00 2001 > From: eillon > Date: Wed, 25 Nov 2020 19:17:03 +0800 > Subject: [PATCH] x86/cpu: initialize

Re: [PATCH RFC 3/3] hw/block/nvme: end-to-end data protection

2020-12-18 Thread Klaus Jensen
On Fri, Dec 18, 2020, at 19:08, Keith Busch wrote: > On Thu, Dec 17, 2020 at 10:02:22PM +0100, Klaus Jensen wrote: > > static uint16_t nvme_rw(NvmeCtrl *n, NvmeRequest *req) > > { > > NvmeRwCmd *rw = (NvmeRwCmd *)&req->cmd; > > NvmeNamespace *ns = req->ns; > > uint32_t nlb = (ui

[PATCH] pci: add romsize property

2020-12-18 Thread Paolo Bonzini
This property can be useful for distros to set up known-good ROM sizes for migration purposes. The VM will fail to start if the ROM is too large, and migration compatibility will not be broken if the ROM is too small. Signed-off-by: Paolo Bonzini --- hw/pci/pci.c | 19 ++

Re: [PATCH v2] tests/acceptance: Add a test with the Fedora 31 kernel and initrd

2020-12-18 Thread Willian Rampazzo
On 12/17/20 5:53 AM, Thomas Huth wrote: This initrd contains a virtio-net and a virtio-gpu kernel module, so we can check that we can set a MAC address for the network device and whether we can hot-plug and -unplug a virtio-crypto device. But the most interesting part is maybe that we can also su

[PATCH] iotests: fix _check_o_direct

2020-12-18 Thread Vladimir Sementsov-Ogievskiy
Unfortunately commit "iotests: handle tmpfs" break running iotests with -nbd -nocache, as _check_o_direct tries to create $TEST_IMG.test_o_direct, but in case of nbd TEST_IMG is smothing like nbd+unix:///... , and test fails with message qemu-img: nbd+unix:///?socket[...]test_o_direct: Protocol

Re: [PATCH 5/5] i386: provide simple 'hyperv=on' option to x86 machine types

2020-12-18 Thread Eduardo Habkost
On Fri, Dec 18, 2020 at 06:13:40PM +0100, Igor Mammedov wrote: > On Wed, 16 Dec 2020 15:52:02 -0500 > Eduardo Habkost wrote: > > > On Thu, Nov 19, 2020 at 11:32:21AM +0100, Vitaly Kuznetsov wrote: > > > Enabling Hyper-V emulation for a Windows VM is a tiring experience as it > > > requires listin

Re: [PATCH RFC 3/3] hw/block/nvme: end-to-end data protection

2020-12-18 Thread Keith Busch
On Thu, Dec 17, 2020 at 10:02:22PM +0100, Klaus Jensen wrote: > static uint16_t nvme_rw(NvmeCtrl *n, NvmeRequest *req) > { > NvmeRwCmd *rw = (NvmeRwCmd *)&req->cmd; > NvmeNamespace *ns = req->ns; > uint32_t nlb = (uint32_t)le16_to_cpu(rw->nlb) + 1; > uint64_t slba = le64_to_cp

Re: [PATCH 0/3] hw/block/nvme: cmb enhancements and bump to v1.4

2020-12-18 Thread Keith Busch
On Fri, Dec 18, 2020 at 10:23:04AM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > This adds CMB logic from v1.4. To my knowledge, this is the last piece > missing for v1.4 compliance, so bump the controller spec version. Please > retort if I am jumping the gun. > > Since the slow-moving (so

Re: [RFC v6 10/11] accel: introduce AccelCPUClass extending CPUClass

2020-12-18 Thread Claudio Fontana
On 12/18/20 7:01 PM, Paolo Bonzini wrote: > On 18/12/20 18:51, Claudio Fontana wrote: >> But with things like cris/ for example, >> the tcg functions to use are actually versioned per each subclass of >> TYPE_CRIS_CPU. >> >> Different tcg_ops need to be used for different subclasses of the >> CPU

Re: [RFC v6 10/11] accel: introduce AccelCPUClass extending CPUClass

2020-12-18 Thread Paolo Bonzini
On 18/12/20 18:51, Claudio Fontana wrote: But with things like cris/ for example, the tcg functions to use are actually versioned per each subclass of TYPE_CRIS_CPU. Different tcg_ops need to be used for different subclasses of the CPU_RESOLVING_TYPE. CRIS is not that bad since it's TCG only

Re: [RFC v6 10/11] accel: introduce AccelCPUClass extending CPUClass

2020-12-18 Thread Claudio Fontana
On 11/27/20 7:21 AM, Paolo Bonzini wrote: > On 26/11/20 23:32, Claudio Fontana wrote: >> +if (acc) { >> +object_class_foreach(accel_init_cpu_int_aux, cpu_type, false, acc); >> +} > > Any reason to do it for cpu_type only, rather than for all subclasses of > CPU_RESOLVING_TYPE? Th

Re: [PATCH RFC 0/3] hw/block/nvme: dif-based end-to-end data protection support

2020-12-18 Thread Keith Busch
On Fri, Dec 18, 2020 at 10:39:01AM +0100, Klaus Jensen wrote: > On Dec 17 13:14, Keith Busch wrote: > > On Thu, Dec 17, 2020 at 10:02:19PM +0100, Klaus Jensen wrote: > > > > Are there any actual users of extended metadata that we care about? I'm > > aware of only a few niche places that can even a

Re: [PULL v2 00/11] testing and configure updates

2020-12-18 Thread Paolo Bonzini
On 18/12/20 18:17, Alex Bennée wrote: I'm surprised about build.ninja and Makefile.ninja Don't they get regenerated by the configure? This just means that meson _looked_ at some moxie file, so the files are a dependency of configure. Even weirder, re-run configure and the list grows! me

Re: [PULL v2 00/11] testing and configure updates

2020-12-18 Thread Alex Bennée
Alex Bennée writes: > Peter Maydell writes: > >> On Fri, 18 Dec 2020 at 11:54, Alex Bennée wrote: >>> >>> >>> Peter Maydell writes: >>> > No, the 'alldbg' build is the one that does do a 'make clean'; >>> > the build-not-from-clean build worked (presumably because the >>> > old executable wa

Re: [RFC PATCH v1] x86/cpu: initialize the CPU concurrently

2020-12-18 Thread Igor Mammedov
On Wed, 25 Nov 2020 19:54:17 +0800 Zhenyu Ye wrote: > From 0b4318c9dbf6fa152ec14eab29837ea06e2d78e5 Mon Sep 17 00:00:00 2001 > From: eillon > Date: Wed, 25 Nov 2020 19:17:03 +0800 > Subject: [PATCH] x86/cpu: initialize the CPU concurrently > > Currently we initialize cpu one by one in qemu_init

Re: [PULL v2 00/11] testing and configure updates

2020-12-18 Thread Alex Bennée
Peter Maydell writes: > On Fri, 18 Dec 2020 at 11:54, Alex Bennée wrote: >> >> >> Peter Maydell writes: >> > No, the 'alldbg' build is the one that does do a 'make clean'; >> > the build-not-from-clean build worked (presumably because the >> > old executable was still left in place from the p

Re: [PATCH 5/5] i386: provide simple 'hyperv=on' option to x86 machine types

2020-12-18 Thread Igor Mammedov
On Wed, 16 Dec 2020 15:52:02 -0500 Eduardo Habkost wrote: > On Thu, Nov 19, 2020 at 11:32:21AM +0100, Vitaly Kuznetsov wrote: > > Enabling Hyper-V emulation for a Windows VM is a tiring experience as it > > requires listing all currently supported enlightenments ("hv_*" CPU > > features) explicit

Re: Ping: [PATCH v2 0/2] bugfix: Decrease dirty bitmap blocks after we remove ramblock

2020-12-18 Thread Stefan Hajnoczi
On Thu, Dec 03, 2020 at 10:02:05PM +0800, zhukeqian wrote: > Hi folks, kindly ping ... > > This bugfix can save several MBs memory, waiting for review, thanks. Paolo: Please take a look when you get a chance. I left a comment because Patch 1 doesn't seem to take RCU into account. Stefan signa

Re: [PATCH v2 1/2] ramlist: Make dirty bitmap blocks of ramlist resizable

2020-12-18 Thread Stefan Hajnoczi
On Mon, Nov 30, 2020 at 09:11:03PM +0800, Keqian Zhu wrote: > @@ -1839,15 +1841,26 @@ static void dirty_memory_extend(ram_addr_t > old_ram_size, > new_blocks = g_malloc(sizeof(*new_blocks) + >sizeof(new_blocks->blocks[0]) * > new_num_blocks); > > -

Re: [PATCH v2 2/2] s390x/pci: Fix memory_region_access_valid call

2020-12-18 Thread Pierre Morel
On 12/18/20 5:51 PM, Cornelia Huck wrote: On Fri, 18 Dec 2020 17:40:50 +0100 Pierre Morel wrote: On 12/18/20 4:32 PM, Cornelia Huck wrote: On Fri, 18 Dec 2020 15:32:08 +0100 Pierre Morel wrote: On 12/18/20 12:04 PM, Cornelia Huck wrote: On Fri, 18 Dec 2020 10:37:38 +0100 Pierre More

Re: [PATCH v2 2/2] s390x/pci: Fix memory_region_access_valid call

2020-12-18 Thread Cornelia Huck
On Fri, 18 Dec 2020 17:40:50 +0100 Pierre Morel wrote: > On 12/18/20 4:32 PM, Cornelia Huck wrote: > > On Fri, 18 Dec 2020 15:32:08 +0100 > > Pierre Morel wrote: > > > >> On 12/18/20 12:04 PM, Cornelia Huck wrote: > >>> On Fri, 18 Dec 2020 10:37:38 +0100 > >>> Pierre Morel wrote: > >>>

Re: [PATCH v2 2/2] s390x/pci: Fix memory_region_access_valid call

2020-12-18 Thread Pierre Morel
On 12/18/20 4:32 PM, Cornelia Huck wrote: On Fri, 18 Dec 2020 15:32:08 +0100 Pierre Morel wrote: On 12/18/20 12:04 PM, Cornelia Huck wrote: On Fri, 18 Dec 2020 10:37:38 +0100 Pierre Morel wrote: On 12/17/20 11:16 PM, Matthew Rosato wrote: In pcistb_service_handler, a call is made to

Re: [PATCH] spapr: Fix buffer overflow in spapr_numa_associativity_init()

2020-12-18 Thread Greg Kurz
On Fri, 18 Dec 2020 16:16:49 +0100 Philippe Mathieu-Daudé wrote: > On 12/18/20 2:53 PM, Greg Kurz wrote: > > Running a guest with 128 NUMA nodes crashes QEMU: > > > > ../../util/error.c:59: error_setv: Assertion `*errp == NULL' failed. > > > > The crash happens when setting the FWNMI migration

Re: [PATCH] vfio: Fix vfio_listener_log_sync function name typo

2020-12-18 Thread Cornelia Huck
On Fri, 4 Dec 2020 09:42:40 +0800 Zenghui Yu wrote: > There is an obvious typo in the function name of the .log_sync() callback. > Spell it correctly. > > Signed-off-by: Zenghui Yu > --- > hw/vfio/common.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Cornelia Huck

Re: [PATCH] spapr: Fix buffer overflow in spapr_numa_associativity_init()

2020-12-18 Thread Philippe Mathieu-Daudé
On 12/18/20 2:53 PM, Greg Kurz wrote: > Running a guest with 128 NUMA nodes crashes QEMU: > > ../../util/error.c:59: error_setv: Assertion `*errp == NULL' failed. > > The crash happens when setting the FWNMI migration blocker: > > 2861 if (spapr_get_cap(spapr, SPAPR_CAP_FWNMI) == SPAPR_CAP_

[PULL 29/30] iotests/102: Pass $QEMU_HANDLE to _send_qemu_cmd

2020-12-18 Thread Max Reitz
The first parameter passed to _send_qemu_cmd is supposed to be the $QEMU_HANDLE. 102 does not do so here, fix it. As a result, the output changes: Now we see the prompt this command is supposedly waiting for before the resize message - as it should be. Signed-off-by: Max Reitz Message-Id: <2020

Re: [PATCH] tests/acceptance: Test PMON with Loongson-3A1000 CPU

2020-12-18 Thread Wainer dos Santos Moschetta
Hi, On 12/16/20 3:17 PM, Philippe Mathieu-Daudé wrote: Test the PMON firmware. As the firmware is not redistributable, it has to be downloaded manually first. Then it can be used by providing its path via the PMON_PATH environment variable: $ AVOCADO_ALLOW_UNTRUSTED_CODE=1 \ PMON_PATH=/

[PULL 28/30] block/nvme: Implement fake truncate() coroutine

2020-12-18 Thread Max Reitz
From: Philippe Mathieu-Daudé NVMe drive cannot be shrunk. Since commit c80d8b06cfa we can use the @exact parameter (set to false) to return success if the block device is larger than the requested offset (even if we can not be shrunk). Use this parameter to implement the NVMe truncate() corouti

Re: [PATCH v2 2/2] s390x/pci: Fix memory_region_access_valid call

2020-12-18 Thread Cornelia Huck
On Fri, 18 Dec 2020 15:32:08 +0100 Pierre Morel wrote: > On 12/18/20 12:04 PM, Cornelia Huck wrote: > > On Fri, 18 Dec 2020 10:37:38 +0100 > > Pierre Morel wrote: > > > >> On 12/17/20 11:16 PM, Matthew Rosato wrote: > >>> In pcistb_service_handler, a call is made to validate that the memory

[PULL 24/30] simplebench/results_to_text: make executable

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Make results_to_text a tool to dump results saved in JSON file. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-21-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- scripts/simplebench/results_to_tex

Re: [PATCH v2 9/9] target/arm: use official org.gnu.gdb.aarch64.sve layout for registers

2020-12-18 Thread Alex Bennée
Alex Bennée writes: > While GDB can work with any XML description given to it there is > special handling for SVE registers on the GDB side which makes the > users life a little better. The changes aren't that major and all the > registers save the $vg reported the same. All that changes is: >

Re: [PATCH] tests/acceptance: Test PMON with Loongson-3A1000 CPU

2020-12-18 Thread Philippe Mathieu-Daudé
On 12/17/20 4:36 AM, Jiaxun Yang wrote: > 在 2020/12/17 上午2:17, Philippe Mathieu-Daudé 写道: >> Test the PMON firmware. As the firmware is not redistributable, >> it has to be downloaded manually first. Then it can be used by >> providing its path via the PMON_PATH environment variable: > > We have a

[PULL 27/30] quorum: Implement bdrv_co_pwrite_zeroes()

2020-12-18 Thread Max Reitz
From: Alberto Garcia This simply calls bdrv_co_pwrite_zeroes() in all children. bs->supported_zero_flags is also set to the flags that are supported by all children. Signed-off-by: Alberto Garcia Message-Id: <2f09c842781fe336b4c2e40036bba577b7430190.1605286097.git.be...@igalia.com> Reviewed-b

[PULL 23/30] simplebench/results_to_text: add difference line to the table

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Performance improvements / degradations are usually discussed in percentage. Let's make the script calculate it for us. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-20-vsement...@virtuozzo.com> Reviewed-by: Max Reitz [mreitz:

[PULL 21/30] simplebench: move results_to_text() into separate file

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Let's keep view part in separate: this way it's better to improve it in the following commits. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-18-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- scr

[PULL 25/30] scripts/simplebench: add bench_prealloc.py

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Benchmark for new preallocate filter. Example usage: ./bench_prealloc.py ../../build/qemu-img \ ssd-ext4:/path/to/mount/point \ ssd-xfs:/path2 hdd-ext4:/path3 hdd-xfs:/path4 The benchmark shows performance improvement (or degradation) when

[PULL 22/30] simplebench/results_to_text: improve view of the table

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Move to generic format for floats and percentage for error. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-19-vsement...@virtuozzo.com> Acked-by: Max Reitz Signed-off-by: Max Reitz --- scripts/simplebench/results_to_text.py |

[PULL 20/30] simplebench: rename ascii() to results_to_text()

2020-12-18 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy Next patch will use utf8 plus-minus symbol, let's use more generic (and more readable) name. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20201021145859.11201-17-vsement...@virtuozzo.com> Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- scrip

[PULL 30/30] iotests: Fix _send_qemu_cmd with bash 5.1

2020-12-18 Thread Max Reitz
With bash 5.1, the output of the following script changes: a=("double space") a=${a[@]:0:1} echo "$a" from "double space" to "double space", i.e. all white space is preserved as-is. This is probably what we actually want here (judging from the "...to accommodate pathnames with spaces" co

  1   2   3   >