[PATCH v2 0/3] hw: aspeed_gpio: MMIO region fix and cleanups

2021-07-13 Thread Joel Stanley
This fixes the MMIO region so that the rtc works again on the ast2600. The two patches after that are cleanups. Joel Stanley (3): hw: aspeed_gpio: Fix memory size hw: aspeed_gpio: Simplify 1.8V defines hw: aspeed_gpio: Clarify GPIO controller name hw/gpio/aspeed_gpio.c | 100 ++

[PATCH v2 1/3] hw: aspeed_gpio: Fix memory size

2021-07-13 Thread Joel Stanley
The macro used to calculate the maximum memory size of the MMIO region had a mistake, causing all GPIO models to create a mapping of 0x9D8. The intent was to have it be 0x9D8 - 0x800. This extra size doesn't matter on ast2400 and ast2500, which have a 4KB region set aside for the GPIO controller.

[PATCH v2 3/3] hw: aspeed_gpio: Clarify GPIO controller name

2021-07-13 Thread Joel Stanley
There are two GPIO controllers in the ast2600; one is 3.3V and the other is 1.8V. Signed-off-by: Joel Stanley --- hw/gpio/aspeed_gpio.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/hw/gpio/aspeed_gpio.c b/hw/gpio/aspeed_gpio.c index dc721aec5da

[PATCH v2 2/3] hw: aspeed_gpio: Simplify 1.8V defines

2021-07-13 Thread Joel Stanley
There's no need to define the registers relative to the 0x800 offset where the controller is mapped, as the device is instantiated as it's own model at the correct memory address. Simplify the defines and remove the offset to save future confusion. Signed-off-by: Joel Stanley --- hw/gpio/aspeed

Re: [PATCH v2 1/3] hw/net: e1000: Correct the initial value of VET register

2021-07-13 Thread Jason Wang
在 2021/7/13 上午7:06, Bin Meng 写道: On Mon, Jul 5, 2021 at 1:57 PM Bin Meng wrote: On Mon, Jul 5, 2021 at 12:21 PM Jason Wang wrote: 在 2021/7/2 下午5:24, Bin Meng 写道: From: Christina Wang The initial value of VLAN Ether Type (VET) register is 0x8100, as per the manual and real hardware. Whi

Re: [PATCH v3 0/8] dp8393x: fixes and improvements

2021-07-13 Thread Finn Thain
On Mon, 12 Jul 2021, Finn Thain wrote: > On Sun, 11 Jul 2021, Philippe Mathieu-Daudé wrote: > > > > > > If I'm right that the big_endian flag should go away, commit > > > b1600ff195 ("hw/mips/jazz: specify correct endian for dp8393x > > > device") has already taken mainline in the wrong direct

Re: [RFC PATCH 11/11] target/riscv: Update interrupt return in CLIC mode

2021-07-13 Thread Frank Chang
LIU Zhiwei 於 2021年4月9日 週五 下午3:55寫道: > When a vectored interrupt is selected and serviced, the hardware will > automatically clear the corresponding pending bit in edge-triggered mode. > This may lead to a lower priviledge interrupt pending forever. > > Therefore when interrupts return, pull a pen

Re: configure --without-default-features confusion

2021-07-13 Thread Thomas Huth
On 08/07/2021 21.12, Cole Robinson wrote: Hi all, I'm a bit confused about the intended scope of ./configure --without-default-features. When I try it here there's still lots of stuff enabled: $ ./configure --without-default-features ... VNC support : YES VNC SAS

Re: [RFC PATCH 4/6] machine: Uniformly use maxcpus to calculate the missing values

2021-07-13 Thread wangyanan (Y)
Hi Drew, On 2021/7/12 23:25, Andrew Jones wrote: On Fri, Jul 02, 2021 at 06:07:37PM +0800, Yanan Wang wrote: We are currently using maxcpus to calculate value of sockets but using cpus to calculate value of cores/threads. This makes cmdlines like "-smp 8,maxcpus=12,cores=4" work while "-smp 8,m

Re: [PATCH v2 1/3] hw: aspeed_gpio: Fix memory size

2021-07-13 Thread Rashmica Gupta
On Tue, 2021-07-13 at 16:28 +0930, Joel Stanley wrote: > The macro used to calculate the maximum memory size of the MMIO > region > had a mistake, causing all GPIO models to create a mapping of 0x9D8. > The intent was to have it be 0x9D8 - 0x800. > > This extra size doesn't matter on ast2400 and a

Re: [PATCH v2 2/3] hw: aspeed_gpio: Simplify 1.8V defines

2021-07-13 Thread Rashmica Gupta
On Tue, 2021-07-13 at 16:28 +0930, Joel Stanley wrote: > There's no need to define the registers relative to the 0x800 offset > where the controller is mapped, as the device is instantiated as it's > own model at the correct memory address. > > Simplify the defines and remove the offset to save fu

Re: [PATCH v2 3/3] hw: aspeed_gpio: Clarify GPIO controller name

2021-07-13 Thread Rashmica Gupta
On Tue, 2021-07-13 at 16:28 +0930, Joel Stanley wrote: > There are two GPIO controllers in the ast2600; one is 3.3V and the > other > is 1.8V. > > Signed-off-by: Joel Stanley Thanks for picking this up. Reviewed-by: Rashmica Gupta > --- >  hw/gpio/aspeed_gpio.c | 26 +- >

Re: [RFC PATCH 4/6] machine: Uniformly use maxcpus to calculate the missing values

2021-07-13 Thread wangyanan (Y)
On 2021/7/2 18:07, Yanan Wang wrote: We are currently using maxcpus to calculate value of sockets but using cpus to calculate value of cores/threads. This makes cmdlines like "-smp 8,maxcpus=12,cores=4" work while "-smp 8,maxcpus=12,sockets=3" break the invalid cpu topology check. This patch all

Re: [PULL 0/3] SD/MMC patches for 2021-07-12

2021-07-13 Thread Peter Maydell
On Mon, 12 Jul 2021 at 11:30, Philippe Mathieu-Daudé wrote: > > The following changes since commit d1987c8114921eb30859854de664f879b5626da7: > > Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' > into staging (2021-07-11 22:20:51 +0100) > > are available in the Git reposi

Re: [PATCH v6 5/6] hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35

2021-07-13 Thread Igor Mammedov
On Tue, 13 Jul 2021 02:42:04 +0200 Julia Suvorova wrote: > Q35 has three different types of PCI devices hot-plug: PCIe Native, > SHPC Native and ACPI hot-plug. This patch changes the default choice > for cold-plugged bridges from PCIe Native to ACPI Hot-plug with > ability to use SHPC and PCIe Na

Re: [RFC PATCH 0/6] Add AMD Secure Nested Paging (SEV-SNP) support

2021-07-13 Thread Dov Murik
Brijesh, On 10/07/2021 0:55, Brijesh Singh wrote: > SEV-SNP builds upon existing SEV and SEV-ES functionality while adding > new hardware-based memory protections. SEV-SNP adds strong memory integrity > protection to help prevent malicious hypervisor-based attacks like data > replay, memory re-map

RE: [PATCH] migration: Move bitmap_mutex out of migration_bitmap_clear_dirty()

2021-07-13 Thread Wang, Wei W
On Friday, July 9, 2021 10:48 PM, Peter Xu wrote: > On Fri, Jul 09, 2021 at 08:58:08AM +, Wang, Wei W wrote: > > On Friday, July 9, 2021 2:31 AM, Peter Xu wrote: > > > > > Yes I think this is the place I didn't make myself clear. It's > > > > > not about sleeping, it's about the cmpxchg being

Re: [PATCH] gitignore: Update with some filetypes

2021-07-13 Thread Alex Bennée
Viresh Kumar writes: > On 26-05-21, 13:13, Alex Bennée wrote: >> >> Viresh Kumar writes: >> >> > Update .gitignore to ignore .swp and .patch files. >> > >> > Signed-off-by: Viresh Kumar >> >> Reviewed-by: Alex Bennée > > No one picked it up yet, do I need to do something here ? As no one

Re: [RFC PATCH 0/6] Add AMD Secure Nested Paging (SEV-SNP) support

2021-07-13 Thread Dr. David Alan Gilbert
* Dov Murik (dovmu...@linux.ibm.com) wrote: > Brijesh, > > On 10/07/2021 0:55, Brijesh Singh wrote: > > SEV-SNP builds upon existing SEV and SEV-ES functionality while adding > > new hardware-based memory protections. SEV-SNP adds strong memory integrity > > protection to help prevent malicious hy

Re: [PATCH v2 1/3] hw/net: e1000: Correct the initial value of VET register

2021-07-13 Thread Bin Meng
On Tue, Jul 13, 2021 at 3:03 PM Jason Wang wrote: > > > 在 2021/7/13 上午7:06, Bin Meng 写道: > > On Mon, Jul 5, 2021 at 1:57 PM Bin Meng wrote: > >> On Mon, Jul 5, 2021 at 12:21 PM Jason Wang wrote: > >>> > >>> 在 2021/7/2 下午5:24, Bin Meng 写道: > From: Christina Wang > > The initial va

RE: [PATCH] migration: Move bitmap_mutex out of migration_bitmap_clear_dirty()

2021-07-13 Thread Wang, Wei W
On Thursday, July 1, 2021 4:08 AM, Peter Xu wrote: > Taking the mutex every time for each dirty bit to clear is too slow, > especially we'll > take/release even if the dirty bit is cleared. So far it's only used to sync > with > special cases with qemu_guest_free_page_hint() against migration th

Re: configure --without-default-features confusion

2021-07-13 Thread Thomas Huth
On 13/07/2021 09.20, Thomas Huth wrote: On 08/07/2021 21.12, Cole Robinson wrote: Hi all, I'm a bit confused about the intended scope of ./configure --without-default-features. When I try it here there's still lots of stuff enabled: $ ./configure --without-default-features ... VNC su

[Bug 1916269] Re: TCG: QEMU incorrectly raises exception on SSE4.2 CRC32 instruction

2021-07-13 Thread Alexander Richardson
Reported on GitLab as https://gitlab.com/qemu-project/qemu/-/issues/427 ** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #427 https://gitlab.com/qemu-project/qemu/-/issues/427 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEM

Re: [PATCH v2 1/3] hw/net: e1000: Correct the initial value of VET register

2021-07-13 Thread Jason Wang
在 2021/7/13 下午4:36, Bin Meng 写道: On Tue, Jul 13, 2021 at 3:03 PM Jason Wang wrote: 在 2021/7/13 上午7:06, Bin Meng 写道: On Mon, Jul 5, 2021 at 1:57 PM Bin Meng wrote: On Mon, Jul 5, 2021 at 12:21 PM Jason Wang wrote: 在 2021/7/2 下午5:24, Bin Meng 写道: From: Christina Wang The initial value

Re: [PATCH v2 1/3] hw/net: e1000: Correct the initial value of VET register

2021-07-13 Thread Bin Meng
On Tue, Jul 13, 2021 at 5:02 PM Jason Wang wrote: > > > 在 2021/7/13 下午4:36, Bin Meng 写道: > > On Tue, Jul 13, 2021 at 3:03 PM Jason Wang wrote: > >> > >> 在 2021/7/13 上午7:06, Bin Meng 写道: > >>> On Mon, Jul 5, 2021 at 1:57 PM Bin Meng wrote: > On Mon, Jul 5, 2021 at 12:21 PM Jason Wang wrote:

Re: [PATCH 01/11] nbd/server: Remove unused variable

2021-07-13 Thread Vladimir Sementsov-Ogievskiy
13.07.2021 00:55, Richard Henderson wrote: From clang-13: nbd/server.c:976:22: error: variable 'bitmaps' set but not used \ [-Werror,-Wunused-but-set-variable] Cc: qemu-bl...@nongnu.org Cc: Eric Blake Cc: Vladimir Sementsov-Ogievskiy Signed-off-by: Richard Henderson --- nbd/server.c |

Re: [PULL 00/22] Crypto and more patches

2021-07-13 Thread Peter Maydell
On Mon, 12 Jul 2021 at 14:23, Daniel P. Berrangé wrote: > > The following changes since commit bd38ae26cea0d1d6a97f930248df149204c210a2: > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210710' > into staging (2021-07-12 11:02:39 +0100) > > are available in the Git repositor

[PATCH 3/4] configure: Fix the default setting of the "xen" feature

2021-07-13 Thread Thomas Huth
The "xen" variable should either contain "enabled", "disabled" or nothing (for auto detection). But when the user currently runs the configure script with --without-default-features, it gets set to "no" instead. This does not work as expected, the feature will still be enabled if the Xen headers ar

[PATCH 2/4] configure: Allow vnc to get disabled with --without-default-features

2021-07-13 Thread Thomas Huth
There's no reason why we should keep VNC enabled when the user specified --without-default-features. Reported-by: Cole Robinson Signed-off-by: Thomas Huth --- configure | 2 +- meson.build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 229ea

Re: [PATCH 07/10] iotests/297: return error code from run_linters()

2021-07-13 Thread Vladimir Sementsov-Ogievskiy
13.07.2021 02:56, John Snow wrote: On Tue, Jul 6, 2021 at 5:49 AM Vladimir Sementsov-Ogievskiy mailto:vsement...@virtuozzo.com>> wrote: 25.06.2021 21:20, John Snow wrote: > This turns run_linters() into a bit of a hybrid test; returning non-zero > on failed execution while also p

[PATCH 0/4] Fixes for the --without-default-features configure switch

2021-07-13 Thread Thomas Huth
Many features do not get properly disabled when the user runs the configure script with --without-default-features. Let's fix that now. Thomas Huth (4): configure: Fix --without-default-features propagation to meson configure: Allow vnc to get disabled with --without-default-features configu

[PATCH 1/4] configure: Fix --without-default-features propagation to meson

2021-07-13 Thread Thomas Huth
A typo prevents that many features get disabled when the user runs "configure" with the --without-default-features switch. Reported-by: Cole Robinson Signed-off-by: Thomas Huth --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 85db248a

[PATCH 4/4] configure: Let --without-default-features disable vhost-kernel and vhost-vdpa

2021-07-13 Thread Thomas Huth
The vhost_kernel and vhost_vdpa variables should be pre-initialized with the $default_feature setting so that these features get disabled when the user runs the configure scripts with --without-default-features. Reported-by: Cole Robinson Signed-off-by: Thomas Huth --- configure | 2 ++ 1 file

Re: [PATCH] hw/nvme: fix mmio read

2021-07-13 Thread Gollu Appalanaidu
On Tue, Jul 13, 2021 at 07:43:59AM +0200, Klaus Jensen wrote: From: Klaus Jensen The new PMR test unearthed a long-standing issue with MMIO reads on big-endian hosts. Fix by using the ldn_he_p helper instead of memcpy. Cc: Gollu Appalanaidu Reported-by: Peter Maydell Signed-off-by: Klaus Je

Re: [RFC PATCH 1/2] hw/nvme: add mi device

2021-07-13 Thread Stefan Hajnoczi
On Tue, Jul 13, 2021 at 06:30:28AM +0100, Christoph Hellwig wrote: On Tue, Jul 13, 2021 at 06:30:28AM +0100, Christoph Hellwig wrote: > On Mon, Jul 12, 2021 at 12:03:27PM +0100, Stefan Hajnoczi wrote: > > Why did you decide to implement -device nvme-mi as a device on > > TYPE_NVME_BUS? If the NVMe

[PATCH v2] vfio/pci: Add pba_offset PCI quirk for BAIDU KUNLUN AI processor

2021-07-13 Thread Cai Huoqing
Fix pba_offset initialization value for BAIDU KUNLUN Virtual Function device. The KUNLUN hardware returns an incorrect value for the VF PBA offset, and add a quirk to instead return a hardcoded value of 0xb400. v1->v2: *add the incorrect value and BAR size to comment *use vfio_pci_i

Re: [PATCH 07/10] iotests/297: return error code from run_linters()

2021-07-13 Thread Vladimir Sementsov-Ogievskiy
25.06.2021 21:20, John Snow wrote: This turns run_linters() into a bit of a hybrid test; returning non-zero on failed execution while also printing diffable information. This is done for the benefit of the avocado simple test runner, which will soon be attempting to execute this test from a diffe

Re: [PATCH 08/10] iotests/297: split linters.py off from 297

2021-07-13 Thread Vladimir Sementsov-Ogievskiy
25.06.2021 21:20, John Snow wrote: Split the linter execution itself out from 297, leaving just environment setup in 297. This is done so that non-iotest code can invoke the linters without needing to worry about imports of unpackaged iotest code. Eventually, it should be possible to replace lin

Re: [PATCH 09/10] iotests/linters: Add entry point for Python CI linters

2021-07-13 Thread Vladimir Sementsov-Ogievskiy
25.06.2021 21:20, John Snow wrote: Add a main() function to linters.py so that the Python CI infrastructure has something it can run. Now, linters.py represents an invocation of the linting scripts that more resembles a "normal" execution of pylint/mypy, like you'd expect to use if 'qemu' was a

Re: [PATCH 2/2] tests/acceptance: Add tests for the Pegasos2 machine

2021-07-13 Thread Philippe Mathieu-Daudé
On 7/13/21 12:05 AM, Cleber Rosa wrote: > Wainer dos Santos Moschetta writes: > >> Hi, >> >> On 5/15/21 10:45 AM, Philippe Mathieu-Daudé wrote: >>> Add a pair of tests for the Pegasos2 machine following the steps from: >>> https://lists.nongnu.org/archive/html/qemu-devel/2021-01/msg01553.html >>>

Re: [PATCH 10/10] python: Add iotest linters to test suite

2021-07-13 Thread Vladimir Sementsov-Ogievskiy
25.06.2021 21:20, John Snow wrote: As a convenience, since iotests is an extremely prominent user of the qemu.qmp and qemu.machine packages and already implements a linting regime, run those tests as well so that it's very hard to miss regressions caused by changes to the python library. Signed-

Re: [PATCH v6 2/6] hw/acpi/ich9: Enable ACPI PCI hot-plug

2021-07-13 Thread Marcel Apfelbaum
Hi David, On Tue, Jul 13, 2021 at 7:12 AM David Gibson wrote: > On Tue, Jul 13, 2021 at 02:42:01AM +0200, Julia Suvorova wrote: > > Add acpi_pcihp to ich9_pm as part of > > 'acpi-pci-hotplug-with-bridge-support' option. Set default to false. > > > > Signed-off-by: Julia Suvorova > > Signed-off-

Re: [PATCH] hw/nvme: fix mmio read

2021-07-13 Thread Peter Maydell
On Tue, 13 Jul 2021 at 06:44, Klaus Jensen wrote: > > From: Klaus Jensen > > The new PMR test unearthed a long-standing issue with MMIO reads on > big-endian hosts. > > Fix by using the ldn_he_p helper instead of memcpy. > > Cc: Gollu Appalanaidu > Reported-by: Peter Maydell > Signed-off-by: Kl

Re: [PATCH] hw/nvme: fix mmio read

2021-07-13 Thread Klaus Jensen
On Jul 13 11:07, Peter Maydell wrote: > On Tue, 13 Jul 2021 at 06:44, Klaus Jensen wrote: > > > > From: Klaus Jensen > > > > The new PMR test unearthed a long-standing issue with MMIO reads on > > big-endian hosts. > > > > Fix by using the ldn_he_p helper instead of memcpy. > > > > Cc: Gollu Appa

Re: [PATCH] hw/display/xlnx_dp: fix an out-of-bounds read in xlnx_dp_read

2021-07-13 Thread Philippe Mathieu-Daudé
On 7/13/21 5:14 AM, Qiang Liu wrote: > xlnx_dp_read allows an out-of-bounds read at its default branch because > of an improper index. > > According to > https://www.xilinx.com/html_docs/registers/ug1087/ug1087-zynq-ultrascale-registers.html > (DP Module), registers 0x3A4/0x3A4/0x3AC are allowed.

Re: [PATCH] migration: Move bitmap_mutex out of migration_bitmap_clear_dirty()

2021-07-13 Thread David Hildenbrand
On 13.07.21 10:40, Wang, Wei W wrote: On Thursday, July 1, 2021 4:08 AM, Peter Xu wrote: Taking the mutex every time for each dirty bit to clear is too slow, especially we'll take/release even if the dirty bit is cleared. So far it's only used to sync with special cases with qemu_guest_free_p

Re: [PATCH v6 5/6] hw/acpi/ich9: Set ACPI PCI hot-plug as default on Q35

2021-07-13 Thread Marcel Apfelbaum
Hi Igor, On Tue, Jul 13, 2021 at 10:59 AM Igor Mammedov wrote: > On Tue, 13 Jul 2021 02:42:04 +0200 > Julia Suvorova wrote: > > > Q35 has three different types of PCI devices hot-plug: PCIe Native, > > SHPC Native and ACPI hot-plug. This patch changes the default choice > > for cold-plugged bri

Re: [PATCH] hw/display/xlnx_dp: fix an out-of-bounds read in xlnx_dp_read

2021-07-13 Thread Philippe Mathieu-Daudé
On 7/13/21 12:20 PM, Philippe Mathieu-Daudé wrote: > On 7/13/21 5:14 AM, Qiang Liu wrote: >> xlnx_dp_read allows an out-of-bounds read at its default branch because >> of an improper index. >> >> According to >> https://www.xilinx.com/html_docs/registers/ug1087/ug1087-zynq-ultrascale-registers.html

Re: [PULL 0/4] OVMF patches for 2021-07-12

2021-07-13 Thread Peter Maydell
On Mon, 12 Jul 2021 at 16:02, Philippe Mathieu-Daudé wrote: > > The following changes since commit bd38ae26cea0d1d6a97f930248df149204c210a2: > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210710' > into staging (2021-07-12 11:02:39 +0100) > > are available in the Git repos

Re: [PATCH] hw/nvme: fix mmio read

2021-07-13 Thread Peter Maydell
On Tue, 13 Jul 2021 at 11:19, Klaus Jensen wrote: > > On Jul 13 11:07, Peter Maydell wrote: > > Looking at the surrounding code, I notice that we guard this "read size > > bytes > > from &n->bar + addr" with > > if (addr < sizeof(n->bar)) { > > > > but that doesn't account for 'size', so if t

Re: [PATCH] hw/nvme: fix mmio read

2021-07-13 Thread Klaus Jensen
On Jul 13 11:31, Peter Maydell wrote: > On Tue, 13 Jul 2021 at 11:19, Klaus Jensen wrote: > > > > On Jul 13 11:07, Peter Maydell wrote: > > > Looking at the surrounding code, I notice that we guard this "read size > > > bytes > > > from &n->bar + addr" with > > > if (addr < sizeof(n->bar)) {

Re: [PATCH-for-6.1 v6] fuzz: add an instrumentation filter

2021-07-13 Thread Darren Kenny
On Friday, 2021-07-09 at 16:08:44 -04, Alexander Bulekov wrote: > By default, -fsanitize=fuzzer instruments all code with coverage > information. However, this means that libfuzzer will track coverage over > hundreds of source files that are unrelated to virtual-devices. This > means that libfuzzer

Re: [PULL 37/40] machine: add smp compound property

2021-07-13 Thread Peter Maydell
On Tue, 6 Jul 2021 at 11:39, Paolo Bonzini wrote: > > Make -smp syntactic sugar for a compound property "-machine > smp.{cores,threads,cpu,...}". machine_smp_parse is replaced by the > setter for the property. > > numa-test will now cover the new syntax, while other tests > still use -smp. > > Si

Re: [PULL 0/4] OVMF patches for 2021-07-12

2021-07-13 Thread Philippe Mathieu-Daudé
On 7/13/21 12:25 PM, Peter Maydell wrote: > On Mon, 12 Jul 2021 at 16:02, Philippe Mathieu-Daudé > wrote: >> >> The following changes since commit bd38ae26cea0d1d6a97f930248df149204c210a2: >> >> Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210710' >> into staging (2021-07-1

Re: [PULL 04/15] RISC-V: Copy the fdt in dram instead of ROM

2021-07-13 Thread Peter Maydell
On Tue, 14 Jul 2020 at 01:44, Alistair Francis wrote: > > From: Atish Patra > > Currently, the fdt is copied to the ROM after the reset vector. The firmware > has to copy it to DRAM. Instead of this, directly copy the device tree to a > pre-computed dram address. The device tree load address shou

Re: [PULL 37/40] machine: add smp compound property

2021-07-13 Thread Peter Maydell
On Tue, 6 Jul 2021 at 11:39, Paolo Bonzini wrote: > > Make -smp syntactic sugar for a compound property "-machine > smp.{cores,threads,cpu,...}". machine_smp_parse is replaced by the > setter for the property. > > numa-test will now cover the new syntax, while other tests > still use -smp. > > Si

Re: [PATCH] migration/rdma: prevent from double free the same mr

2021-07-13 Thread Dr. David Alan Gilbert
* Li Zhijian (lizhij...@cn.fujitsu.com) wrote: > backtrace: > '0x75f44ec2 in __ibv_dereg_mr_1_1 (mr=0x7fff1007d390) at > /home/lizhijian/rdma-core/libibverbs/verbs.c:478 > 478 void *addr = mr->addr; > (gdb) bt > #0 0x75f44ec2 in __ibv_dereg_mr_1_1 (mr=0x7

Re: [PATCH] migration: failover: emit a warning when the card is not fully unplugged

2021-07-13 Thread Dr. David Alan Gilbert
* Laurent Vivier (lviv...@redhat.com) wrote: > When the migration fails or is canceled we wait the end of the unplug > operation to be able to plug it back. But if the unplug operation > is never finished we stop to wait and QEMU emits a warning to inform > the user. > > Based-on: 20210629155007.6

Re: [PULL 22/33] spapr: Implement Open Firmware client interface

2021-07-13 Thread Peter Maydell
On Fri, 9 Jul 2021 at 06:17, David Gibson wrote: > > From: Alexey Kardashevskiy > > The PAPR platform describes an OS environment that's presented by > a combination of a hypervisor and firmware. The features it specifies > require collaboration between the firmware and the hypervisor. Hi; Cover

Re: [PATCH 0/3] migration: Three more fixes for postcopy recovery

2021-07-13 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > A few more issues spotted by either Xiaohui or me. Please see and review > individual patches for what they do. Thanks, > > Peter Xu (3): > migration: Release return path early for paused postcopy > migration: Don't do migrate cleanup if during postcop

Re: [PULL 37/40] machine: add smp compound property

2021-07-13 Thread Markus Armbruster
Peter Maydell writes: > On Tue, 6 Jul 2021 at 11:39, Paolo Bonzini wrote: >> >> Make -smp syntactic sugar for a compound property "-machine >> smp.{cores,threads,cpu,...}". machine_smp_parse is replaced by the >> setter for the property. >> >> numa-test will now cover the new syntax, while othe

Re: [PULL 22/33] spapr: Implement Open Firmware client interface

2021-07-13 Thread Peter Maydell
On Fri, 9 Jul 2021 at 06:17, David Gibson wrote: > > From: Alexey Kardashevskiy > > The PAPR platform describes an OS environment that's presented by > a combination of a hypervisor and firmware. The features it specifies > require collaboration between the firmware and the hypervisor. Another C

[PATCH] configure / meson: Move the GBM handling to meson.build

2021-07-13 Thread Thomas Huth
The GBM library detection does not need to be in the configure script, since it does not have any user-facing options (there are no --enable-gbm or --disable-gbm switches). Let's move it to meson.build instead, so we don't have to clutter config-host.mak with the related switches. Additionally, on

Re: [PULL 0/4] OVMF patches for 2021-07-12

2021-07-13 Thread Daniel P . Berrangé
On Tue, Jul 13, 2021 at 11:25:21AM +0100, Peter Maydell wrote: > On Mon, 12 Jul 2021 at 16:02, Philippe Mathieu-Daudé > wrote: > > > > The following changes since commit bd38ae26cea0d1d6a97f930248df149204c210a2: > > > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210710' >

Re: [PULL 0/4] OVMF patches for 2021-07-12

2021-07-13 Thread Daniel P . Berrangé
On Tue, Jul 13, 2021 at 12:35:18PM +0200, Philippe Mathieu-Daudé wrote: > On 7/13/21 12:25 PM, Peter Maydell wrote: > > On Mon, 12 Jul 2021 at 16:02, Philippe Mathieu-Daudé > > wrote: > >> > >> The following changes since commit > >> bd38ae26cea0d1d6a97f930248df149204c210a2: > >> > >> Merge re

Re: [PATCH] hw/display/xlnx_dp: fix an out-of-bounds read in xlnx_dp_read

2021-07-13 Thread Qiang Liu
On Tue, Jul 13, 2021 at 6:24 PM Philippe Mathieu-Daudé wrote: > > On 7/13/21 12:20 PM, Philippe Mathieu-Daudé wrote: > > On 7/13/21 5:14 AM, Qiang Liu wrote: > >> xlnx_dp_read allows an out-of-bounds read at its default branch because > >> of an improper index. > >> > >> According to > >> https://

Re: [PATCH v3 0/2] linux-user/s390x: signal with SIGFPE on compare-and-trap

2021-07-13 Thread Laurent Vivier
Le 12/07/2021 à 23:29, jonathan.albrecht a écrit : > On 2021-07-12 4:02 pm, Laurent Vivier wrote: >> Le 09/07/2021 à 18:04, Jonathan Albrecht a écrit : >>> qemu-s390x signals with SIGILL on compare-and-trap instructions. This >>> breaks OpenJDK which expects SIGFPE in its implementation of implicit

Re: VFIO/vfio-user: specify NVMe namespace to boot from

2021-07-13 Thread Stefan Hajnoczi
On Mon, Jul 12, 2021 at 01:24:07PM +, Thanos Makatos wrote: > We're working on implementing a virtual NVMe controller based on SPDK and a > multiprocess-qemu branch that uses the vfio-user. We're facing a problem > where the existing API doesn't allow us to tell QEMU from which NVMe > namesp

Re: [PATCH v4 10/10] tests: Use QMP to check whether a TPM device model is available

2021-07-13 Thread Stefan Berger
On 7/12/21 4:47 PM, Stefan Berger wrote: Use QMP to check whether a given TPM device model is available and if it is not the case then skip a test that requires it. Signed-off-by: Stefan Berger +rsp_tpm = qtest_qmp(qts, "{ 'execute': 'query-tpm'}"); +if (!qdict_haskey(rsp_tpm, "error

Re: [PATCH] configure / meson: Move the GBM handling to meson.build

2021-07-13 Thread Paolo Bonzini
On 13/07/21 13:15, Thomas Huth wrote: The GBM library detection does not need to be in the configure script, since it does not have any user-facing options (there are no --enable-gbm or --disable-gbm switches). Let's move it to meson.build instead, so we don't have to clutter config-host.mak with

Re: [PATCH 01/11] nbd/server: Remove unused variable

2021-07-13 Thread Eric Blake
On Tue, Jul 13, 2021 at 12:27:48PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 13.07.2021 00:55, Richard Henderson wrote: > > From clang-13: > > nbd/server.c:976:22: error: variable 'bitmaps' set but not used \ > > [-Werror,-Wunused-but-set-variable] > > > > +++ b/nbd/server.c > > @@ -973,

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-13 Thread Stefan Hajnoczi
On Mon, Jul 12, 2021 at 10:41:46AM +0200, Emanuele Giuseppe Esposito wrote: > > > On 08/07/2021 15:04, Stefan Hajnoczi wrote: > > On Thu, Jul 08, 2021 at 01:32:12PM +0200, Paolo Bonzini wrote: > > > On 08/07/21 12:36, Stefan Hajnoczi wrote: > > > > > What is very clear from this patch is that it

Re: [PATCH 01/11] nbd/server: Remove unused variable

2021-07-13 Thread Eric Blake
On Tue, Jul 13, 2021 at 08:01:34AM -0500, Eric Blake wrote: > > > @@ -973,7 +973,6 @@ static int nbd_negotiate_meta_queries(NBDClient > > > *client, > > > { > > > int ret; > > > g_autofree char *export_name = NULL; > > > -g_autofree bool *bitmaps = NULL; > > > NBDExportMeta

Re: [RFC PATCH 0/6] job: replace AioContext lock with job_mutex

2021-07-13 Thread Stefan Hajnoczi
On Mon, Jul 12, 2021 at 10:42:47AM +0200, Emanuele Giuseppe Esposito wrote: > On 08/07/2021 15:09, Stefan Hajnoczi wrote: > > On Wed, Jul 07, 2021 at 06:58:07PM +0200, Emanuele Giuseppe Esposito wrote: > > > This is a continuation on the work to reduce (and possibly get rid of) > > > the usage of

Re: [PULL 0/6] Tracing patches

2021-07-13 Thread Peter Maydell
On Mon, 12 Jul 2021 at 17:50, Stefan Hajnoczi wrote: > > The following changes since commit bd38ae26cea0d1d6a97f930248df149204c210a2: > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210710' > into staging (2021-07-12 11:02:39 +0100) > > are available in the Git repository a

Re: [RFC PATCH 2/6] job: _locked functions and public job_lock/unlock for next patch

2021-07-13 Thread Stefan Hajnoczi
On Mon, Jul 12, 2021 at 10:43:07AM +0200, Emanuele Giuseppe Esposito wrote: > > > On 08/07/2021 12:50, Stefan Hajnoczi wrote: > > On Wed, Jul 07, 2021 at 06:58:09PM +0200, Emanuele Giuseppe Esposito wrote: > > > diff --git a/job.c b/job.c > > > index 872bbebb01..96fb8e9730 100644 > > > --- a/job.

[PATCH for-6.2 04/34] target/arm: Fix signed VADDV

2021-07-13 Thread Peter Maydell
A cut-and-paste error meant we handled signed VADDV like unsigned VADDV; fix the type used. Signed-off-by: Peter Maydell --- target/arm/mve_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/mve_helper.c b/target/arm/mve_helper.c index 16a701933b8..99b4

[PATCH for-6.2 01/34] target/arm: Note that we handle VMOVL as a special case of VSHLL

2021-07-13 Thread Peter Maydell
Although the architecture doesn't define it as an alias, VMOVL (vector move long) is encoded as a VSHLL with a zero shift. Add a comment in the decode file noting that we handle VMOVL as part of VSHLL. Signed-off-by: Peter Maydell --- target/arm/mve.decode | 2 ++ 1 file changed, 2 insertions(+)

[PATCH for-6.2 00/34] target/arm: Third slice of MVE implementation

2021-07-13 Thread Peter Maydell
This patchseries provides the third slice of the MVE implementation. In this series: * fixes for minor bugs in a couple of the insns already upstream * all the remaining integer instructions * the remaining loads and stores (scatter-gather and interleaving) This is obviously for-6.2 material, s

[PATCH for-6.2 02/34] target/arm: Print MVE VPR in CPU dumps

2021-07-13 Thread Peter Maydell
Include the MVE VPR register value in the CPU dumps produced by arm_cpu_dump_state() if we are printing FPU information. This makes it easier to interpret debug logs when predication is active. Signed-off-by: Peter Maydell --- target/arm/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH for-6.2 07/34] target/arm: Fix calculation of LTP mask when LR is 0

2021-07-13 Thread Peter Maydell
In mve_element_mask(), we calculate a mask for tail predication which should have a number of 1 bits based on the value of LR. However, our MAKE_64BIT_MASK() macro has undefined behaviour when passed a zero length. Special case this to give the all-zeroes mask we require. Signed-off-by: Peter Ma

[PATCH for-6.2 05/34] target/arm: Fix mask handling for MVE narrowing operations

2021-07-13 Thread Peter Maydell
In the MVE helpers for the narrowing operations (DO_VSHRN and DO_VSHRN_SAT) we were using the wrong bits of the predicate mask for the 'top' versions of the insn. This is because the loop works over the double-sized input elements and shifts the predicate mask by that many bits each time, but when

[PATCH for-6.2 03/34] target/arm: Fix MVE VSLI by 0 and VSRI by

2021-07-13 Thread Peter Maydell
In the MVE shift-and-insert insns, we special case VSLI by 0 and VSRI by , both of which mean "no shift". However we incorrectly implemented these as "don't update the destination", which works only if Qd == Qm. When Qd != Qm this kind of shift must update Qd, honouring the predicate mask. Signed-

[PATCH for-6.2 10/34] target/arm: Fix VLDRB/H/W for predicated elements

2021-07-13 Thread Peter Maydell
For vector loads, predicated elements are zeroed, instead of retaining their previous values (as happens for most data processing operations). This means we need to distinguish "beat not executed due to ECI" (don't touch destination element) from "beat executed but predicated out" (zero destination

[PATCH for-6.2 09/34] target/arm: Factor out mve_eci_mask()

2021-07-13 Thread Peter Maydell
In some situations we need a mask telling us which parts of the vector correspond to beats that are not being executed because of ECI, separately from the combined "which bytes are predicated away" mask. Factor this mask calculation out of mve_element_mask() into its own function. Signed-off-by:

[PATCH for-6.2 11/34] target/arm: Implement MVE VMULL (polynomial)

2021-07-13 Thread Peter Maydell
Implement the MVE VMULL (polynomial) insn. Unlike Neon, this comes in two flavours: 8x8->16 and a 16x16->32. Also unlike Neon, the inputs are in either the low or the high half of each double-width element. The assembler for this insn indicates the size with "P8" or "P16", encoded into bit 28 as

[PATCH for-6.2 13/34] target/arm: Factor out gen_vpst()

2021-07-13 Thread Peter Maydell
Factor out the "generate code to update VPR.MASK01/MASK23" part of trans_VPST(); we are going to want to reuse it for the VPT insns. Signed-off-by: Peter Maydell --- target/arm/translate-mve.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/t

[PATCH for-6.2 08/34] target/arm: Fix VPT advance when ECI is non-zero

2021-07-13 Thread Peter Maydell
We were not paying attention to the ECI state when advancing the VPT state. Architecturally, VPT state advance happens for every beat (see the pseudocode VPTAdvance()), so on every beat the 4 bits of VPR.P0 corresponding to the current beat are inverted if required, and at the end of beats 1 and 3

[PATCH for-6.2 06/34] target/arm: Fix 48-bit saturating shifts

2021-07-13 Thread Peter Maydell
In do_sqrshl48_d() and do_uqrshl48_d() we got some of the edge cases wrong and failed to saturate correctly: (1) In do_sqrshl48_d() we used the same code that do_shrshl_bhs() does to obtain the saturated most-negative and most-positive 48-bit signed values for the large-shift-left case. This give

[PATCH for-6.2 19/34] target/arm: Move 'x' and 'a' bit definitions into vmlaldav formats

2021-07-13 Thread Peter Maydell
All the users of the vmlaldav formats have an 'x bit in bit 12 and an 'a' bit in bit 5; move these to the format rather than specifying them in each insn pattern. Signed-off-by: Peter Maydell --- Not sure why I didn't write it this way in the first place; when I came to implement VMLADAV I notice

[PATCH for-6.2 15/34] target/arm: Implement MVE integer vector-vs-scalar comparisons

2021-07-13 Thread Peter Maydell
Implement the MVE integer vector comparison instructions that compare each element against a scalar from a general purpose register. These are "VCMP (vector)" encodings T4, T5 and T6 and "VPT (vector)" encodings T4, T5 and T6. We have to move the decodetree pattern for VPST, because it overlaps w

[PATCH for-6.2 18/34] target/arm: Implement MVE shift-by-scalar

2021-07-13 Thread Peter Maydell
Implement the MVE instructions which perform shifts by a scalar. These are VSHL T2, VRSHL T2, VQSHL T1 and VQRSHL T2. They take the shift amount in a general purpose register and shift every element in the vector by that amount. Mostly we can reuse the helper functions for shift-by-immediate; we

[PATCH for-6.2 12/34] target/arm: Implement MVE incrementing/decrementing dup insns

2021-07-13 Thread Peter Maydell
Implement the MVE incrementing/decrementing dup insns VIDUP, VDDUP, VIWDUP and VDWDUP. These fill the elements of a vector with successively incrementing values, starting at the offset specified in a general purpose register. The final value of the offset is written back to this register. The wr

[PATCH for-6.2 16/34] target/arm: Implement MVE VPSEL

2021-07-13 Thread Peter Maydell
Implement the MVE VPSEL insn, which sets each byte of the destination vector Qd to the byte from either Qn or Qm depending on the value of the corresponding bit in VPR.P0. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 2 ++ target/arm/mve.decode | 7 +-- target/arm/mve

[PATCH for-6.2 23/34] target/arm: Rename MVEGenDualAccOpFn to MVEGenLongDualAccOpFn

2021-07-13 Thread Peter Maydell
The MVEGenDualAccOpFn is a bit misnamed, since it is used for the "long dual accumulate" operations that use a 64-bit accumulator. Rename it to MVEGenLongDualAccOpFn so we can use the former name for the 32-bit accumulator insns. Signed-off-by: Peter Maydell --- target/arm/translate-mve.c | 16 +

[PATCH for-6.2 24/34] target/arm: Implement MVE VMLADAV and VMLSLDAV

2021-07-13 Thread Peter Maydell
Implement the MVE VMLADAV and VMLSLDAV insns. Like the VMLALDAV and VMLSLDAV insns already implemented, these accumulate multiplied vector elements; but they accumulate a 32-bit result rather than a 64-bit one. Note that these encodings overlap with what would be RdaHi=0b111 for VMLALDAV, VMLSLDA

[PATCH for-6.2 14/34] target/arm: Implement MVE integer vector comparisons

2021-07-13 Thread Peter Maydell
Implement the MVE integer vector comparison instructions. These are "VCMP (vector)" encodings T1, T2 and T3, and "VPT (vector)" encodings T1, T2 and T3. These insns compare corresponding elements in each vector, and update the VPR.P0 predicate bits with the results of the comparison. VPT also se

[PATCH for-6.2 17/34] target/arm: Implement MVE VMLAS

2021-07-13 Thread Peter Maydell
Implement the MVE VMLAS insn, which multiplies a vector by a vector and adds a scalar. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 8 target/arm/mve.decode | 3 +++ target/arm/mve_helper.c| 31 +++ target/arm/translate-mve.c | 2

[PATCH for-6.2 22/34] target/arm: Implement MVE narrowing moves

2021-07-13 Thread Peter Maydell
Implement the MVE narrowing move insns VMOVN, VQMOVN and VQMOVUN. These take a double-width input, narrow it (possibly saturating) and store the result to either the top or bottom half of the output element. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 20 ++ target/arm/

[PATCH for-6.2 27/34] target/arm: Implement MVE VQABS, VQNEG

2021-07-13 Thread Peter Maydell
Implement the MVE 1-operand saturating operations VQABS and VQNEG. Signed-off-by: Peter Maydell --- target/arm/helper-mve.h| 8 target/arm/mve.decode | 3 +++ target/arm/mve_helper.c| 37 + target/arm/translate-mve.c | 2 ++ 4 files ch

  1   2   3   4   5   >