Re: [PATCH for-6.2 01/10] linux-user: Fix coding style nits in qemu.h

2021-07-18 Thread Philippe Mathieu-Daudé
On 7/18/21 1:20 AM, Peter Maydell wrote: > We're about to move a lot of the code in qemu.h out into different > header files; fix the coding style nits first so that checkpatch > is happy with the pure code-movement patches. This is mostly > block-comment style but also a few whitespace issues. >

Re: [PATCH for-6.2 02/10] linux-user: Split strace prototypes into strace.h

2021-07-18 Thread Philippe Mathieu-Daudé
On 7/18/21 1:20 AM, Peter Maydell wrote: > The functions implemented in strace.c are only used in a few files in > linux-user; split them out of qemu.h and into a new strace.h header > which we include in the places that need it. > > Signed-off-by: Peter Maydell > --- > linux-user/qemu.h| 18

[PATCH 0/2] ui/gtk: prevent QEMU lock up

2021-07-18 Thread Volker Rümelin
Since commit 8eb13bbbac ("ui/gtk: vte: fix sending multiple characeters") it's very easy to lock up QEMU with the gtk ui. If you configure a guest with a serial device and the guest doesn't listen on this device, QEMU will lock up after entering two characters in the serial console. Patch 1/2 is

Re: [PATCH for-6.2 03/10] linux-user: Split signal-related prototypes into sighandling.h

2021-07-18 Thread Philippe Mathieu-Daudé
On 7/18/21 1:20 AM, Peter Maydell wrote: > Split the signal related prototypes into a new header file > sighandling.h, and include it in those places that require it. > > Signed-off-by: Peter Maydell > --- > linux-user/qemu.h| 36 > linux-user/sighandling.h

[PATCH for 6.2 2/2] ui/gtk: drop chars if the chardev frontend makes no progress

2021-07-18 Thread Volker Rümelin
Currently there is no limit how long the virtual console chardev backend retries to send remaining characters in the buffer. Drop the characters after a timeout if the chardev frontend doesn't accept characters. The timeout was calculated from arbitrarily selected constants. It was assumed that 5

[PATCH for 6.1 1/2] ui/gtk: add a keyboard fifo to the VTE consoles

2021-07-18 Thread Volker Rümelin
Since commit 8eb13bbbac ("ui/gtk: vte: fix sending multiple characeters") it's very easy to lock up QEMU with the gtk ui. If you configure a guest with a serial device and the guest doesn't listen on this device, QEMU will lock up after entering two characters in the serial console. To fix this pr

Re: [PATCH for-6.2 06/10] linux-user: Split safe-syscall macro into its own header

2021-07-18 Thread Philippe Mathieu-Daudé
On 7/18/21 1:20 AM, Peter Maydell wrote: > Split the safe-syscall macro from qemu.h into a new safe-syscall.h. > > Signed-off-by: Peter Maydell > --- > linux-user/qemu.h | 135 - > linux-user/safe-syscall.h | 154 ++ > l

Re: [PATCH for-6.2 08/10] linux-user: Don't include gdbstub.h in qemu.h

2021-07-18 Thread Philippe Mathieu-Daudé
On 7/18/21 1:21 AM, Peter Maydell wrote: > Currently the linux-user qemu.h pulls in gdbstub.h. There's no real reason > why it should do this; include it directly from the C files which require > it, and drop the include line in qemu.h. > > (Note that several of the C files previously relying on t

Re: [PATCH for-6.2 09/10] linux-user: Drop unneeded includes from qemu.h

2021-07-18 Thread Philippe Mathieu-Daudé
On 7/18/21 1:21 AM, Peter Maydell wrote: > Trim down the #includes in qemu.h where we can, either by > dropping unneeded headers or by moving them to user-internals.h. > > This includes deleting a couple of #includes that appear at > weird points midway through the header file. > > Signed-off-by:

Re: [PATCH v3 09/13] target/mips: Reduce mips_tr_breakpoint_check pc advance to 2

2021-07-18 Thread Philippe Mathieu-Daudé
On 7/18/21 12:18 AM, Richard Henderson wrote: > The actual number of bytes advanced need not be 100% exact, > but we should not cross a page when the insn would not. > > If mips16 or mips32e are enabled, the minimum insn size is 2. > > Signed-off-by: Richard Henderson > --- > target/mips/tcg/tr

Re: [PATCH v3 08/13] target/avr: Advance pc in avr_tr_breakpoint_check

2021-07-18 Thread Philippe Mathieu-Daudé
On 7/18/21 12:18 AM, Richard Henderson wrote: > Since 0b00b0c1e05b, tb->size must not be zero. > Advance pc so that the breakpoint covers the insn at the bp. > > Signed-off-by: Richard Henderson > --- > target/avr/translate.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Philippe Mathieu

Re: [PATCH for-6.2 03/10] linux-user: Split signal-related prototypes into sighandling.h

2021-07-18 Thread Peter Maydell
On Sun, 18 Jul 2021 at 08:46, Philippe Mathieu-Daudé wrote: > The difference between "signal-common.h" and "sighandling.h" > is not clear. Could they be merged? Yeah, you're right, we don't really need two separate headers here. (signal-common.h was originally "the stuff that signal.c and the per

[PULL 02/12] docs: Fix documentation Copyright date

2021-07-18 Thread Peter Maydell
In commit 6d8980a38fa we updated the copyright string we present to the user in -version output, About dialogs, etc, but we forgot that the Sphinx manuals have a separate copyright string setting. Update that one too. Signed-off-by: Peter Maydell Acked-by: Markus Armbruster Reviewed-by: Daniel

[PULL 08/12] docs: Add QEMU version information to HTML footer

2021-07-18 Thread Peter Maydell
Add a line to the HTML document footer mentioning the QEMU version. The version information is already provided in very faint text below the QEMU logo in the sidebar, but that is rather inconspicious, so repeating it in the footer seems useful. Signed-off-by: Peter Maydell Acked-by: Markus Armbru

[PULL 05/12] docs: Move deprecation, build and license info out of system/

2021-07-18 Thread Peter Maydell
Now that we have a single Sphinx manual rather than multiple manuals, we can provide a better place for "common to all of QEMU" information like the deprecation notices, build platforms, license information, which we currently have in the system/ manual even though it applies to all of QEMU. Creat

[PULL 01/12] target/arm: Fix offsets for TTBCR

2021-07-18 Thread Peter Maydell
From: Richard Henderson The functions vmsa_ttbcr_write and vmsa_ttbcr_raw_write expect the offset to be for the complete TCR structure, not the offset to the low 32-bits of a uint64_t. Using offsetoflow32 in this case breaks big-endian hosts. For TTBCR2, we do want the high 32-bits of a uint64_

[PULL 00/12] target-arm queue

2021-07-18 Thread Peter Maydell
repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20210718 for you to fetch changes up to 8fe612a183dec4c63afdc57537079bc742d024ca: target/arm: Remove duplicate 'plus1' function from Neon and SVE decode (2021-

[PULL 03/12] docs: Stop calling the top level subsections of our manual 'manuals'

2021-07-18 Thread Peter Maydell
We merged our previous multiple-manual setup into a single Sphinx manual, but we left some text in the various index.rst lines that still calls the top level subsections separate 'manuals'. Update them to talk about "this section of the manual" instead, and remove now-obsolete comments about how t

[PULL 06/12] docs: Add some actual About text to about/index.rst

2021-07-18 Thread Peter Maydell
Add some text to About to act as a brief introduction to the QEMU manual and to make the about page a bit less of an abrupt start to it. Signed-off-by: Peter Maydell Acked-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé Message-id: 20210705095547.15790-6-peter.mayd...@linaro.org --- docs

[PULL 07/12] docs: Add license note to the HTML page footer

2021-07-18 Thread Peter Maydell
The standard Sphinx/RTD HTML page footer gives a copyright line (based on the 'copyright' variable set in conf.py) and a line "Built with Sphinx using a theme provided by Read the Docs" (which can be disabled via the html_show_sphinx variable, but we leave it enabled). As a free software project, w

[PULL 11/12] docs: Add skeletal documentation of highbank and midway

2021-07-18 Thread Peter Maydell
Add skeletal documentation for the highbank and midway machines. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210713142226.19155-4-peter.mayd...@linaro.org --- docs/system/arm/highbank.rst | 19 +++ docs/system/ta

[PULL 09/12] docs: Add skeletal documentation of cubieboard

2021-07-18 Thread Peter Maydell
Add skeletal documentation of the cubieboard machine. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210713142226.19155-2-peter.mayd...@linaro.org --- docs/system/arm/cubieboard.rst | 16 docs/system/target-arm.rst

[PULL 10/12] docs: Add skeletal documentation of the emcraft-sf2

2021-07-18 Thread Peter Maydell
Add skeletal documentation of the emcraft-sf2 machine. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20210713142226.19155-3-peter.mayd...@linaro.org --- docs/system/arm/emcraft-sf2.rst | 15 +++ docs/system/target-arm.rs

[PULL 04/12] docs: Remove "Contents:" lines from top-level subsections

2021-07-18 Thread Peter Maydell
Since the top-level subsections aren't self-contained manuals any more, the "Contents:" lines at the top of each of their index pages look a bit odd; remove them. Signed-off-by: Peter Maydell Acked-by: Markus Armbruster Reviewed-by: Daniel P. Berrangé Message-id: 20210705095547.15790-4-peter.ma

[PULL 12/12] target/arm: Remove duplicate 'plus1' function from Neon and SVE decode

2021-07-18 Thread Peter Maydell
The Neon and SVE decoders use private 'plus1' functions to implement "add one" for the !function decoder syntax. We have a generic "plus_1" function in translate.h, so use that instead. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id:

Re: [PATCH for 6.1 1/2] ui/gtk: add a keyboard fifo to the VTE consoles

2021-07-18 Thread Peter Maydell
On Sun, 18 Jul 2021 at 08:50, Volker Rümelin wrote: > > Since commit 8eb13bbbac ("ui/gtk: vte: fix sending multiple > characeters") it's very easy to lock up QEMU with the gtk ui. > If you configure a guest with a serial device and the guest > doesn't listen on this device, QEMU will lock up after

[PATCH] hw/pci: remove all references to find_i440fx function

2021-07-18 Thread Ani Sinha
commit c0e427d6eb5fefc538 ("hw/acpi/ich9: Enable ACPI PCI hot-plug") removed all uses of find_i440fx() function. This has been replaced by the more generic call acpi_get_i386_pci_host() which maybe able to find the root bus both for i440fx machine type as well as for the q35 machine type. There see

[PATCH v1 2/2] Fix nvmm_ram_block_added() function arguments

2021-07-18 Thread Reinoud Zandijk
A parameter max_size was added to the RAMBlockNotifier ram_block_added function. Use the max_size for pre allocation of hva space. Signed-off-by: Reinoud Zandijk --- target/i386/nvmm/nvmm-all.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/i386/nvmm/nvmm-all.c b

[PATCH v1 0/2] Update NVMM support to recent changes

2021-07-18 Thread Reinoud Zandijk
This patchset fixes small NVMM accelerator compilation issues due to changes made in the rest of Qemu since its import. Signed-off-by: Reinoud Zandijk --- Reinoud Zandijk (2): Only check CONFIG_NVMM when NEED_CPU_H is defined Fix nvmm_ram_block_added() function arguments include/sysemu/nvm

[PATCH v1 1/2] Only check CONFIG_NVMM when NEED_CPU_H is defined

2021-07-18 Thread Reinoud Zandijk
Userland targers will otherwise use a poisoned CONFIG_NVMM Signed-off-by: Reinoud Zandijk --- include/sysemu/nvmm.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/sysemu/nvmm.h b/include/sysemu/nvmm.h index 6d216599b0..833670fccb 100644 --- a/include/sysemu/nv

Re: [PATCH] hw/pci: remove all references to find_i440fx function

2021-07-18 Thread Peter Maydell
On Sun, 18 Jul 2021 at 14:18, Ani Sinha wrote: > > commit c0e427d6eb5fefc538 ("hw/acpi/ich9: Enable ACPI PCI hot-plug") removed > all > uses of find_i440fx() function. This has been replaced by the more generic > call > acpi_get_i386_pci_host() which maybe able to find the root bus both for i440

[PATCH v6 0/4] replication: Bugfix and properly attach children

2021-07-18 Thread Lukas Straub
Hello Everyone, A while ago Kevin noticed that the replication driver doesn't properly attach the children it wants to use. Instead, it directly copies the BdrvChilds from it's backing file, which is wrong. Ths Patchset fixes the problem, fixes a potential crash in replication_co_writev due to miss

[PATCH v6 1/4] replication: Remove s->active_disk

2021-07-18 Thread Lukas Straub
s->active_disk is bs->file. Remove it and use local variables instead. Signed-off-by: Lukas Straub Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/replication.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/block/replication.c b/blo

[PATCH v6 4/4] replication: Remove workaround

2021-07-18 Thread Lukas Straub
Remove the workaround introduced in commit 6ecbc6c52672db5c13805735ca02784879ce8285 "replication: Avoid blk_make_empty() on read-only child". It is not needed anymore since s->hidden_disk is guaranteed to be writable when secondary_do_checkpoint() runs. Because replication_start(), _do_checkpoint(

[PATCH v6 3/4] replication: Properly attach children

2021-07-18 Thread Lukas Straub
The replication driver needs access to the children block-nodes of it's child so it can issue bdrv_make_empty() and bdrv_co_pwritev() to manage the replication. However, it does this by directly copying the BdrvChilds, which is wrong. Fix this by properly attaching the block-nodes with bdrv_attach

[PATCH v6 2/4] replication: Reduce usage of s->hidden_disk and s->secondary_disk

2021-07-18 Thread Lukas Straub
In preparation for the next patch, initialize s->hidden_disk and s->secondary_disk later and replace access to them with local variables in the places where they aren't initialized yet. Signed-off-by: Lukas Straub Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/replication.c | 45 ++

Re: [PATCH] hw/pci: remove all references to find_i440fx function

2021-07-18 Thread Philippe Mathieu-Daudé
On 7/18/21 3:16 PM, Ani Sinha wrote: > commit c0e427d6eb5fefc538 ("hw/acpi/ich9: Enable ACPI PCI hot-plug") removed > all > uses of find_i440fx() function. This has been replaced by the more generic > call > acpi_get_i386_pci_host() which maybe able to find the root bus both for i440fx > machine

Re: [PULL 00/12] target-arm queue

2021-07-18 Thread Peter Maydell
tes/mst/tags/for_upstream3' into staging > (2021-07-16 16:34:42 +0100) > > are available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20210718 > > for you to fetch changes up to 8fe612a183dec4c63afdc57537079bc7

Re: [PATCH v1 2/2] Fix nvmm_ram_block_added() function arguments

2021-07-18 Thread Peter Maydell
On Sun, 18 Jul 2021 at 14:54, Reinoud Zandijk wrote: > > A parameter max_size was added to the RAMBlockNotifier > ram_block_added function. Use the max_size for pre allocation > of hva space. > > Signed-off-by: Reinoud Zandijk > --- > target/i386/nvmm/nvmm-all.c | 5 +++-- > 1 file changed, 3 in

Re: [PATCH] hw/pci: remove all references to find_i440fx function

2021-07-18 Thread Ani Sinha
On Sun, 18 Jul 2021, Philippe Mathieu-Daudé wrote: > On 7/18/21 3:16 PM, Ani Sinha wrote: > > commit c0e427d6eb5fefc538 ("hw/acpi/ich9: Enable ACPI PCI hot-plug") > > removed all > > uses of find_i440fx() function. This has been replaced by the more generic > > call > > acpi_get_i386_pci_host(

Re: [PATCH 2/2] i2c/smbus_eeprom: Add feature bit to SPD data

2021-07-18 Thread BALATON Zoltan
On Sun, 18 Jul 2021, David Gibson wrote: On Thu, Jul 15, 2021 at 06:50:44PM +0200, BALATON Zoltan wrote: Add the differential clock input feature bit to the generated SPD data. Most guests don't seem to care but pegasos2 firmware version 1.2 checks for this bit and stops with unsupported module

Re: [PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advance to 2

2021-07-18 Thread Richard Henderson
On 7/17/21 1:35 PM, Peter Maydell wrote: (What goes wrong if we just say "always use a TB size of 1 regardless of target arch" rather than having the arch return the worst case minimum insn length?) Hmm, possibly nothing. Perhaps I should try that and see what happens... r~

Re: [PATCH 2/2] i2c/smbus_eeprom: Add feature bit to SPD data

2021-07-18 Thread Corey Minyard
On Thu, Jul 15, 2021 at 06:50:44PM +0200, BALATON Zoltan wrote: > Add the differential clock input feature bit to the generated SPD > data. Most guests don't seem to care but pegasos2 firmware version 1.2 > checks for this bit and stops with unsupported module type error if > it's not present. Sinc

Re: [PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advance to 2

2021-07-18 Thread Peter Maydell
On Sun, 18 Jul 2021 at 19:02, Richard Henderson wrote: > > On 7/17/21 1:35 PM, Peter Maydell wrote: > > (What goes wrong if we just say "always use a TB size of 1 regardless > > of target arch" rather than having the arch return the worst case > > minimum insn length?) > > Hmm, possibly nothing.

Re: [PATCH v3 10/13] target/riscv: Reduce riscv_tr_breakpoint_check pc advance to 2

2021-07-18 Thread Richard Henderson
On 7/18/21 8:16 AM, Peter Maydell wrote: On Sun, 18 Jul 2021 at 19:02, Richard Henderson wrote: On 7/17/21 1:35 PM, Peter Maydell wrote: (What goes wrong if we just say "always use a TB size of 1 regardless of target arch" rather than having the arch return the worst case minimum insn length?

Re: [PATCH 2/2] i2c/smbus_eeprom: Add feature bit to SPD data

2021-07-18 Thread BALATON Zoltan
On Sun, 18 Jul 2021, Corey Minyard wrote: On Thu, Jul 15, 2021 at 06:50:44PM +0200, BALATON Zoltan wrote: Add the differential clock input feature bit to the generated SPD data. Most guests don't seem to care but pegasos2 firmware version 1.2 checks for this bit and stops with unsupported module

Re: [PATCH v3 00/10] Atomic cleanup + clang-12 build fix

2021-07-18 Thread Cole Robinson
On 7/17/21 3:24 PM, Richard Henderson wrote: > This is intended to fix building with clang-12 on i386. > In the process, I found bugs wrt handling of guest memory in target/ > with respect to atomics, fixed by unifying the api between softmmu > and user-only and removing some ifdefs under target/.

Re: [PATCH 01/20] Hexagon HVX (target/hexagon) README

2021-07-18 Thread Rob Landley
On 7/12/21 8:42 AM, Brian Cain wrote: > If you don't mind binaries, there are x86_64 linux binary toolchains with lld > on releases.llvm.org I've never managed to run those binaries, because they're dynamically linked against some specific distro I'm not using: $ bin/clang --help /lib/ld-linu

[PATCH v2 0/1] nvdimm: add 'target-node' option

2021-07-18 Thread Jingqi Liu
Linux kernel version 5.1 brings in support for the volatile-use of persistent memory as a hotplugged memory region (KMEM DAX). When this feature is enabled, persistent memory can be seen as a separate memory-only NUMA node(s). This newly-added memory can be selected by its unique NUMA node. Add 't

[PATCH v2 1/1] nvdimm: add 'target-node' option

2021-07-18 Thread Jingqi Liu
Linux kernel version 5.1 brings in support for the volatile-use of persistent memory as a hotplugged memory region (KMEM DAX). When this feature is enabled, persistent memory can be seen as a separate memory-only NUMA node(s). This newly-added memory can be selected by its unique NUMA node. Add 't

RE: [PATCH v6 1/4] replication: Remove s->active_disk

2021-07-18 Thread Zhang, Chen
> -Original Message- > From: Qemu-devel bounces+chen.zhang=intel@nongnu.org> On Behalf Of Lukas Straub > Sent: Sunday, July 18, 2021 10:48 PM > To: qemu-devel > Cc: Kevin Wolf ; Vladimir Sementsov-Ogievskiy > ; qemu-block ; > Wen Congyang ; Xie Changlong > ; Max Reitz > Subject: [

[PATCH for-6.2 v2 00/11] machine: smp parsing fixes and improvement

2021-07-18 Thread Yanan Wang
Hi, This is v2 of the series [1] that I have posted to introduce some smp parsing fixes and improvement, much more work has been processed compared to RFC v1. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-07/msg00259.html The purpose of this series is to improve/fix the parsing logic. E

[PATCH for-6.2 v2 01/11] machine: Disallow specifying topology parameters as zero

2021-07-18 Thread Yanan Wang
In the SMP configuration, we should either specify a topology parameter with a reasonable value (equal to or greater than 1) or just leave it omitted and QEMU will calculate its value. Configurations which explicitly specify the topology parameters as zero like "sockets=0" are meaningless, so disa

[PATCH for-6.2 v2 04/11] machine: Use the computed parameters to calculate omitted cpus

2021-07-18 Thread Yanan Wang
Currently we directly calculate the omitted cpus based on the already provided parameters. This makes some cmdlines like: -smp maxcpus=16 -smp sockets=2,maxcpus=16 -smp sockets=2,dies=2,maxcpus=16 -smp sockets=2,cores=4,maxcpus=16 not work. We should probably use the computed paramters to c

[PATCH for-6.2 v2 07/11] machine: Prefer cores over sockets in smp parsing since 6.2

2021-07-18 Thread Yanan Wang
In the real SMP hardware topology world, it's much more likely that we have high cores-per-socket counts and few sockets totally. While the current preference of sockets over cores in smp parsing results in a virtual cpu topology with low cores-per-sockets counts and a large number of sockets, whic

[PATCH for-6.2 v2 06/11] hw: Add compat machines for 6.2

2021-07-18 Thread Yanan Wang
Add 6.2 machine types for arm/i440fx/q35/s390x/spapr. Signed-off-by: Yanan Wang --- hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 14 +- hw/i386/pc_q35.c | 13 -

[PATCH for-6.2 v2 03/11] machine: Uniformly use maxcpus to calculate the omitted parameters

2021-07-18 Thread Yanan Wang
We are currently using maxcpus to calculate the omitted sockets but using cpus to calculate the omitted cores/threads. This makes cmdlines like: -smp cpus=8,maxcpus=16 -smp cpus=8,cores=4,maxcpus=16 -smp cpus=8,threads=2,maxcpus=16 work fine but the ones like: -smp cpus=8,sockets=2,maxcpus=

[PATCH for-6.2 v2 02/11] machine: Make smp_parse generic enough for all arches

2021-07-18 Thread Yanan Wang
Currently the only difference between smp_parse and pc_smp_parse is the support of multi-dies and the related error reporting code. With an arch compat variable "bool smp_dies_supported", we can easily make smp_parse generic enough for all arches and the PC specific one can be removed. Making smp_

[PATCH for-6.2 v2 10/11] machine: Split out the smp parsing code

2021-07-18 Thread Yanan Wang
We are going to introduce an unit test for the parser smp_parse() in hw/core/machine.c, but now machine.c is only built in softmmu. In order to solve the build dependency on the smp parsing code and avoid building unrelated stuff for the unit tests, move the related code from machine.c into a new

[PATCH for-6.2 v2 09/11] machine: Tweak the order of topology members in struct CpuTopology

2021-07-18 Thread Yanan Wang
Now that all the possible topology parameters are integrated in struct CpuTopology, tweak the order of topology members to be "cpus/sockets/ dies/cores/threads/maxcpus" for readability and consistency. We also tweak the comment by adding explanation of dies parameter. Furthermore, a comment of str

[PATCH for-6.2 v2 05/11] machine: Improve the error reporting of smp parsing

2021-07-18 Thread Yanan Wang
We totally have two requirements for a valid SMP configuration: the sum of "sockets * dies * cores * threads" must represent all the possible cpus, i.e., max_cpus, and must include the initial present cpus, i.e., smp_cpus. We only need to ensure "sockets * dies * cores * threads == maxcpus" at fir

回复: [PATCH 2/2] migration: allow enabling mutilfd for specific protocol only

2021-07-18 Thread lizhij...@fujitsu.com
there was a typo: s/protocal/protocol 发件人: Li Zhijian 发送时间: 2021年7月16日 15:59 收件人: quint...@redhat.com; dgilb...@redhat.com 抄送: qemu-devel@nongnu.org; Li, Zhijian/李 智坚 主题: [PATCH 2/2] migration: allow enabling mutilfd for specific protocol only And change

[PATCH for-6.2 v2 08/11] machine: Use ms instead of global current_machine in sanity-check

2021-07-18 Thread Yanan Wang
In the sanity-check of smp_cpus and max_cpus against mc in function machine_set_smp(), we are now using ms->smp.max_cpus for the check but using current_machine->smp.max_cpus in the error message. Tweak this by uniformly using the local ms. Signed-off-by: Yanan Wang --- hw/core/machine.c | 2 +-

[PATCH for-6.2 v2 11/11] tests/unit: Add a unit test for smp parsing

2021-07-18 Thread Yanan Wang
Add a QEMU unit test for the parsing of given SMP configuration. Since all the parsing logic is in generic function smp_parse(), this test passes diffenent SMP configurations to the function and compare the parsing result with what is expected. In the test, all possible collections of the topology

Re: [PATCH 2/2] i2c/smbus_eeprom: Add feature bit to SPD data

2021-07-18 Thread David Gibson
On Sun, Jul 18, 2021 at 10:39:16PM +0200, BALATON Zoltan wrote: > On Sun, 18 Jul 2021, Corey Minyard wrote: > > On Thu, Jul 15, 2021 at 06:50:44PM +0200, BALATON Zoltan wrote: > > > Add the differential clock input feature bit to the generated SPD > > > data. Most guests don't seem to care but pega

Re: spapr_events: Sure we may ignore migrate_add_blocker() failure?

2021-07-18 Thread David Gibson
On Thu, Jul 15, 2021 at 03:32:06PM +0200, Markus Armbruster wrote: > Commit 2500fb423a "migration: Include migration support for machine > check handling" adds this: > > ret = migrate_add_blocker(spapr->fwnmi_migration_blocker, &local_err); > if (ret == -EBUSY) { > /* > *

Re: [PATCH] target/ppc: Ease L=0 requirement on cmp/cmpi/cmpl/cmpli for ppc32

2021-07-18 Thread David Gibson
On Thu, Jul 15, 2021 at 09:29:50AM -0300, matheus.fe...@eldorado.org.br wrote: > From: Matheus Ferst > > In commit 8f0a4b6a9, we started to require L=0 for ppc32 to match what > The Programming Environments Manual say: > > "For 32-bit implementations, the L field must be cleared, otherwise > the

Re: [PATCH for-6.2 v2 06/11] hw: Add compat machines for 6.2

2021-07-18 Thread David Gibson
On Mon, Jul 19, 2021 at 11:20:38AM +0800, Yanan Wang wrote: > Add 6.2 machine types for arm/i440fx/q35/s390x/spapr. > > Signed-off-by: Yanan Wang Acked-by: David Gibson > --- > hw/arm/virt.c | 9 - > hw/core/machine.c | 3 +++ > hw/i386/pc.c | 3

Re: [PATCH for-6.2 v2 07/11] machine: Prefer cores over sockets in smp parsing since 6.2

2021-07-18 Thread David Gibson
On Mon, Jul 19, 2021 at 11:20:39AM +0800, Yanan Wang wrote: > In the real SMP hardware topology world, it's much more likely that > we have high cores-per-socket counts and few sockets totally. While > the current preference of sockets over cores in smp parsing results > in a virtual cpu topology w

Re: [PATCH qemu] ppc/vof: Fix Coverity issues

2021-07-18 Thread David Gibson
On Tue, Jul 13, 2021 at 11:46:38PM +1000, Alexey Kardashevskiy wrote: > This fixes NEGATIVE_RETURNS, OVERRUN issues reported by the Coverity. > > This adds a comment about the return parameters number in the VOF hcall. > The reason for such counting is to keep the numbers look the same in > vof_cl

Re: [PATCH v5 5/7] qapi/qdev.json: add DEVICE_UNPLUG_ERROR QAPI event

2021-07-18 Thread David Gibson
On Mon, Jul 12, 2021 at 04:43:37PM -0300, Daniel Henrique Barboza wrote: > At this moment we only provide one event to report a hotunplug error, > MEM_UNPLUG_ERROR. As of Linux kernel 5.12 and QEMU 6.0.0, the pseries > machine is now able to report unplug errors for other device types, such > as CP

RE: [PATCH v2] migration: clear the memory region dirty bitmap when skipping free pages

2021-07-18 Thread Wang, Wei W
On Friday, July 16, 2021 4:26 PM, David Hildenbrand wrote: > >>> +/* > >>> + * CLEAR_BITMAP_SHIFT_MIN should always guarantee this... this > >>> + * can make things easier sometimes since then start address > >>> + * of the small chunk will always be 64 pages aligned so the > >>> +

Re: [PATCH] hw/net/net_tx_pkt: Fix crash detected by fuzzer

2021-07-18 Thread Pankaj Gupta
> QEMU currently crashes when it's started like this: > > cat << EOF | ./qemu-system-i386 -device vmxnet3 -nodefaults -qtest stdio > outl 0xcf8 0x80001014 > outl 0xcfc 0xe0001000 > outl 0xcf8 0x80001018 > outl 0xcf8 0x80001004 > outw 0xcfc 0x7 > outl 0xcf8 0x80001083 > write 0x0 0x1 0xe1 > write 0x

RE: [PATCH 1/2] virtio-gpu: splitting one extended mode guest fb into n-scanouts

2021-07-18 Thread Kasireddy, Vivek
Hi DW, > When guest is running Linux/X11 with extended multiple displays mode enabled, > the guest shares one scanout resource each time containing whole surface > rather than sharing individual display output separately. This extended frame > is properly splited and rendered on the corresponding

[PATCH RFC 08/19] vfio-user: VFIO container setup & teardown

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Create SW-emulated containers and groups for vfio-user in lieu of the host IOMMU based ones used by the kernel driver VFIO implementation. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- include/hw/vfio/vfio-common.h | 3

[PATCH RFC 04/19] vfio-user: Define type vfio_user_pci_dev_info

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson New class for vfio-user with its class and instance constructors and destructors. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 49 + 1 file changed, 49 in

[PATCH RFC 03/19] vfio-user: define VFIO Proxy and communication functions

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Add user.c and user.h files for vfio-user with the basic send and receive functions. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/user.h| 120 ++ include/hw/vfio/vfio-common.h | 2

[PATCH RFC 07/19] vfio-user: define vfio-user pci ops

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 8ca1431cca..388b7d82d7 100644 --- a/hw/

[PATCH RFC 10/19] vfio-user: device region read/write

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Send VFIO_REGION_READ and VFIO_REGION_WRITE commands. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 16 hw/vfio/common.c | 17 +++-- hw/vfio/pci.c| 13 + h

[PATCH RFC 05/19] vfio-user: connect vfio proxy to remote server

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 2 ++ hw/vfio/pci.c | 16 ++ hw/vfio/user.c | 87 ++ 3 files changed, 105 insertions(+) diff --git

[PATCH RFC 02/19] vfio-user: add VFIO base abstract class

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Add an abstract base class both the kernel driver and user socket implementations can use to share code. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/pci.h | 25 ++-- hw/vfio/pci.c | 63

[PATCH RFC 06/19] vfio-user: negotiate protocol with remote server

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Send version and capabilities and validate reply. Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson --- hw/vfio/user.h | 8 ++ hw/vfio/pci.c | 10 +++ hw/vfio/user.c | 223 +

[PATCH RFC 15/19] vfio-user: vfio user device realize

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Setup INTx interrupts and a device region info cache for remote device info. Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- include/hw/vfio/vfio-common.h | 1 + hw/vfio/common.c | 33 ++- hw

[PATCH RFC 14/19] vfio_user: setup MSI/X interrupts and PCI config operations

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Send VFIO_USER_DEVICE_SET_IRQS to setup interrup configuration. vfio_pci_write_config/vfio_pci_read_config iforms the remote server of PCI config space reads and writes. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/

[PATCH RFC 12/19] vfio-user: probe remote device's BARs

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 054e673552..a8d2e59470

[PATCH RFC 09/19] vfio-user: get device info and get irq info

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Send VFIO_USER_DEVICE_GET_INFO and VFIO_USER_DEVICE_GET_IRQ_INFO commands. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 27 +++ hw/vfio/pci.c | 32 +

[PATCH RFC 01/19] vfio-user: introduce vfio-user protocol specification

2021-07-18 Thread Elena Ufimtseva
From: Thanos Makatos This patch introduces the vfio-user protocol specification (formerly known as VFIO-over-socket), which is designed to allow devices to be emulated outside QEMU, in a separate process. vfio-user reuses the existing VFIO defines, structs and concepts. This patch is sourced fro

[PATCH RFC 00/19] vfio-user implementation

2021-07-18 Thread Elena Ufimtseva
Hi We are happy to introduce the next stage of the multi-process QEMU project[1]. vfio-user is a protocol that allows a device to be emulated in a separate process outside of QEMU. It encapsulates the messages sent from QEMU to the kernel VFIO driver, and sends them to a remote process over a UNI

[PATCH RFC 17/19] vfio-user: probe remote device ROM BAR

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/pci.c | 38 ++ 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index a6c28dac03..bed8

[PATCH RFC 11/19] vfio-user: get region and DMA map/unmap operations

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Send VFIO_USER_DEVICE_GET_REGION_INFO to get device regions and VFIO_USER_DMA_MAP/UNMAP to tell remote server the DMA addresses it can access. Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson --- hw/vfio/user.h

[PATCH RFC 19/19] vfio-user: add migration cli options and version negotiation

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva --- hw/vfio/user.h | 4 hw/vfio/pci.c | 5 + hw/vfio/user.c | 33 + 3 files changed, 42 insertions(+) diff --git a/hw/vfio/user.h b/h

[PATCH RFC 16/19] vfio-user: pci reset

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Send VFIO_USER_DEVICE_RESET to reset remote device. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 1 + hw/vfio/pci.c | 29 ++--- hw/vfio/user.c | 12 3 files chang

[PATCH RFC 13/19] vfio-user: respond to remote DMA read/write requests

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 16 hw/vfio/pci.c | 67 ++ hw/vfio/user.c | 21 +++- 3 files changed, 103 insertion

RE: [PATCH 2/2] ui/gtk-egl: blitting partial guest fb to the proper scanout surface

2021-07-18 Thread Kasireddy, Vivek
Hi DW, > eb_fb_blit needs more parameters which describe x and y offsets and width > and height of the actual scanout to specify the size and cordination of > partial image to blit in the guest fb in case the guest fb contains multiple > display outputs. > > Signed-off-by: Dongwon Kim > --- > h

[PATCH RFC 18/19] vfio-user: migration support

2021-07-18 Thread Elena Ufimtseva
From: John G Johnson Send migration region operations to remote server. Send VFIO_USER_USER_DIRTY_PAGES to get remote dirty bitmap. Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman --- hw/vfio/user.h | 17 +++ hw/vfio/common.c

Re: [PATCH v3 0/5] hw/nvme: fix mmio read

2021-07-18 Thread Klaus Jensen
On Jul 14 08:01, Klaus Jensen wrote: > From: Klaus Jensen > > Fix mmio read issues on big-endian hosts. The core issue is that values > in the BAR is not stored in little endian as required. > > Fix that and add a regression test for this. This required a bit of > cleanup, so it blew up into a s