Re: [PATCH v4 05/11] i440fx/acpi: do not add hotplug related amls for cold plugged bridges

2020-09-15 Thread Igor Mammedov
On Wed, 16 Sep 2020 11:43:29 +0530 Ani Sinha wrote: > Cold plugged bridges are not hot unpluggable, even when their hotplug > property (acpi-pci-hotplug-with-bridge-support) is turned off. Please see > the function acpi_pcihp_pc_no_hotplug() (thanks Julia). However, with

Re: [PATCH] guest agent: Fixes for windows guest agent building on msys2/mingw

2020-09-15 Thread Thomas Huth
On 15/09/2020 21.17, 罗勇刚(Yonggang Luo) wrote: > I agree with that, seems QEMU currently are calling ANSI api all the > time, better not change that, >  so globally define -DUNICODE -D_UNICODE is not a option I agree, -DUNICODE is currently not an option. I'll go with my patch ("qga/commands-win32

Re: [PATCH v4 04/11] Fix a gap where acpi_pcihp_find_hotplug_bus() returns a non-hotpluggable bus

2020-09-15 Thread Igor Mammedov
On Wed, 16 Sep 2020 11:43:28 +0530 Ani Sinha wrote: > When ACPI hotplug for the root bus is disabled, the bsel property for that > bus is not set. Please see the following commit: > > 3d7e78aaf ("Introduce a new flag for i440fx to disable PCI hotplug on the > root bus"). > > As a result, w

Re: [PATCH v6 0/8] s390: Extended-Length SCCB & DIAGNOSE 0x318

2020-09-15 Thread Cornelia Huck
On Tue, 15 Sep 2020 12:57:37 -0700 (PDT) no-re...@patchew.org wrote: > Patchew URL: > https://patchew.org/QEMU/20200915194416.107460-1-wall...@linux.ibm.com/ > > > > Hi, > > This series failed build test on FreeBSD host. Please find the details below. > > === TEST SCRIPT BEGIN === > #!/bin/b

Re: [PATCH v4 03/11] tests/acpi: add a new ACPI table in order to test root pci hotplug on/off

2020-09-15 Thread Igor Mammedov
On Wed, 16 Sep 2020 11:43:27 +0530 Ani Sinha wrote: > A new binary ACPI table tests/data/acpi/pc/DSDT.roothp is added in order > to unit test hotplug on/off capability on the root pci bus for i440fx. > The diff between the table DSDT.bridge and DSDT.roothp is listed below: Acked-by: Igor Mammedo

Re: [PATCH v4 02/11] tests/acpi: add a new unit test to test hotplug off/on feature on the root pci bus

2020-09-15 Thread Igor Mammedov
On Wed, 16 Sep 2020 11:43:26 +0530 Ani Sinha wrote: > Ability to turn hotplug off on the pci root bus for i440fx was added in > commit: > 3d7e78aaf0 ("Introduce a new flag for i440fx to disable PCI hotplug on > the root bus") > > This change adds a unit test in order to test this feature.

[PATCH v4 11/11] tests/acpi: add DSDT.hpbrroot DSDT table blob to test global i440fx hotplug

2020-09-15 Thread Ani Sinha
This change adds a new DSDT golden master table blob to test disabling hotplug on both pci root bus and pci bridges. Also reverts the change in file bios-tables-test-allowed-diff.h to make sure its now empty so that future modifications to acpi tables can be caught. The following is the disassembl

[PATCH v4 10/11] tests/acpi: unit test exercizing hotplug off for pci root bus & bridge in i440fx

2020-09-15 Thread Ani Sinha
This change adds a unit test to exercize the case when hotplug is disabled both for pci root bus and the pci bridges by passing the following two switches to qemu: -global PIIX4_PM.acpi-root-pci-hotplug=off -global PIIX4_PM.acpi-pci-hotplug-with-bridge-support=off bios-tables-test-allowed-di

Re: [PATCH] pci: check bus pointer before dereference

2020-09-15 Thread P J P
+-- On Tue, 15 Sep 2020, Philippe Mathieu-Daudé wrote --+ | > I think in normal this 'bus' will be not NULL. I have look at the link in | > the commit msg. I find it is another DMA to MMIO issue which we have | > discussed a lot but didn't come up with an satisfying solution. If 'bus' is unlik

[PATCH v4 09/11] piix4: don't reserve hw resources when hotplug is off globally

2020-09-15 Thread Ani Sinha
When acpi hotplug is turned off for both root pci bus as well as for pci bridges, we should not generate the related amls for DSDT table or initialize related hw ports or reserve hw resources. This change makes sure all those operations are turned off in the case acpi pci hotplug is off globally.

[PATCH v4 00/11] i440fx/acpi: addition of feature and bug fixes.

2020-09-15 Thread Ani Sinha
In v4 I have made the following changes: - a cosmetic change for patch #4. Commit log was updated as per Igor's suggestion. - patches #10 and #11 were added to unit test patch #9. The DSDT table after disabling hotplug on the root bus and the pci bridges is shown here: https://pastebin.ubuntu.

[PATCH v4 08/11] tests/acpi: add newly added acpi DSDT table blob for pci bridge hotplug flag

2020-09-15 Thread Ani Sinha
This patch adds a binary blob corresponding to the DSDT acpi table. It is used to unit test the flag 'acpi-pci-hotplug-with-bridge-support' used with pci bridges. This change also clears the file tests/qtest/bios-tables-test-allowed-diff.h so that future changes which affect the table can be caugh

[PATCH v4 01/11] tests/acpi: document addition of table DSDT.roothp for unit testing root pci hotplug on/off

2020-09-15 Thread Ani Sinha
A new binary acpi table tests/data/acpi/pc/DSDT.roothp is added in order to unit test the feature flag that can disable/enable root pci bus hotplug on i440fx. This feature was added with the commit: 3d7e78aaf0 ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus") This c

[PATCH v10 00/12] *** A Method for evaluating dirty page rate ***

2020-09-15 Thread Chuan Zheng
v9 -> v10: rename find_page_matched as find_block_matched fix wrong termination condition in find_block_matched add review-by for patches v8 -> v9: fix wrong index return of record_ramblock_hash_info optimize variable name according to review reset dirty_rate as -1 chan

[PATCH v4 07/11] tests/acpi: unit test for 'acpi-pci-hotplug-with-bridge-support' bridge flag

2020-09-15 Thread Ani Sinha
This change adds a new unit test for the global flag 'acpi-pci-hotplug-with-bridge-support' which is available for cold plugged pci bridges in i440fx. The flag can be used to turn off acpi based hotplug support for all pci bridges. Signed-off-by: Ani Sinha --- tests/qtest/bios-tables-test.c | 15

[PATCH v10 08/12] migration/dirtyrate: skip sampling ramblock with size below MIN_RAMBLOCK_SIZE

2020-09-15 Thread Chuan Zheng
In order to sample real RAM, skip ramblock with size below MIN_RAMBLOCK_SIZE which is set as 128M. Signed-off-by: Chuan Zheng Reviewed-by: David Edmondson Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Li Qiang --- migration/dirtyrate.c | 21 + migration/dirtyrate.h | 5

[PATCH v10 07/12] migration/dirtyrate: Compare page hash results for recorded sampled page

2020-09-15 Thread Chuan Zheng
Compare page hash results for recorded sampled page. Signed-off-by: Chuan Zheng Signed-off-by: YanYing Zhuang Reviewed-by: Dr. David Alan Gilbert --- migration/dirtyrate.c | 63 +++ 1 file changed, 63 insertions(+) diff --git a/migration/dirtyra

[PATCH v4 05/11] i440fx/acpi: do not add hotplug related amls for cold plugged bridges

2020-09-15 Thread Ani Sinha
Cold plugged bridges are not hot unpluggable, even when their hotplug property (acpi-pci-hotplug-with-bridge-support) is turned off. Please see the function acpi_pcihp_pc_no_hotplug() (thanks Julia). However, with the current implementaton, windows would try to hot-unplug a pci bridge when it's hot

[PATCH v10 06/12] migration/dirtyrate: Record hash results for each sampled page

2020-09-15 Thread Chuan Zheng
Record hash results for each sampled page, crc32 is taken to calculate hash results for each sampled length in TARGET_PAGE_SIZE. Signed-off-by: Chuan Zheng Signed-off-by: YanYing Zhuang Reviewed-by: David Edmondson Reviewed-by: Li Qiang --- migration/dirtyrate.c | 109

[PATCH v10 11/12] migration/dirtyrate: Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function

2020-09-15 Thread Chuan Zheng
Implement qmp_cal_dirty_rate()/qmp_get_dirty_rate() function which could be called Signed-off-by: Chuan Zheng --- migration/dirtyrate.c | 62 +++ qapi/migration.json | 50 + 2 files changed, 112 insertions

[PATCH v4 06/11] tests/acpi: list added acpi table binary file for pci bridge hotplug test

2020-09-15 Thread Ani Sinha
The file 'tests/data/acpi/pc/DSDT.hpbridge' is a newly added acpi table file for testing the pci bridge option 'acpi-pci-hotplug-with-bridge-support' under i440fx. This change documents this fact. Signed-off-by: Ani Sinha --- tests/qtest/bios-tables-test-allowed-diff.h | 1 + 1 file changed, 1

[PATCH v10 01/12] migration/dirtyrate: setup up query-dirtyrate framwork

2020-09-15 Thread Chuan Zheng
Add get_dirtyrate_thread() functions to setup query-dirtyrate framework. Signed-off-by: Chuan Zheng Signed-off-by: YanYing Zhuang Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson Reviewed-by: Li Qiang --- migration/dirtyrate.c | 38 ++ migr

[PATCH v4 04/11] Fix a gap where acpi_pcihp_find_hotplug_bus() returns a non-hotpluggable bus

2020-09-15 Thread Ani Sinha
When ACPI hotplug for the root bus is disabled, the bsel property for that bus is not set. Please see the following commit: 3d7e78aaf ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus"). As a result, when acpi_pcihp_find_hotplug_bus() is called with bsel set to 0, it m

[PATCH v10 10/12] migration/dirtyrate: Implement calculate_dirtyrate() function

2020-09-15 Thread Chuan Zheng
Implement calculate_dirtyrate() function. Signed-off-by: Chuan Zheng Signed-off-by: YanYing Zhuang Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Li Qiang --- migration/dirtyrate.c | 45 +++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --g

[PATCH v4 03/11] tests/acpi: add a new ACPI table in order to test root pci hotplug on/off

2020-09-15 Thread Ani Sinha
A new binary ACPI table tests/data/acpi/pc/DSDT.roothp is added in order to unit test hotplug on/off capability on the root pci bus for i440fx. The diff between the table DSDT.bridge and DSDT.roothp is listed below: @@ -1,30 +1,30 @@ /* * Intel ACPI Component Architecture * AML/ASL+ Disassemb

[PATCH v4 02/11] tests/acpi: add a new unit test to test hotplug off/on feature on the root pci bus

2020-09-15 Thread Ani Sinha
Ability to turn hotplug off on the pci root bus for i440fx was added in commit: 3d7e78aaf0 ("Introduce a new flag for i440fx to disable PCI hotplug on the root bus") This change adds a unit test in order to test this feature. This change has been tested against upstream qemu master branch ti

[PATCH v10 04/12] migration/dirtyrate: Add dirtyrate statistics series functions

2020-09-15 Thread Chuan Zheng
Add dirtyrate statistics functions to record/update dirtyrate info. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Li Qiang --- migration/dirtyrate.c | 32 migration/dirtyrate.h | 12 2 files changed, 44 insertions(+)

[PATCH v10 02/12] migration/dirtyrate: add DirtyRateStatus to denote calculation status

2020-09-15 Thread Chuan Zheng
add DirtyRateStatus to denote calculating status. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Li Qiang --- migration/dirtyrate.c | 26 ++ qapi/migration.json | 17 + 2 files changed, 43 insertions(+) diff --git a/migrat

[PATCH v10 09/12] migration/dirtyrate: Implement set_sample_page_period() and is_sample_period_valid()

2020-09-15 Thread Chuan Zheng
Implement is_sample_period_valid() to check if the sample period is vaild and do set_sample_page_period() to sleep specific time between sample actions. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson Reviewed-by: Li Qiang --- migration/dirtyrate.c

[PATCH v10 12/12] migration/dirtyrate: Add trace_calls to make it easier to debug

2020-09-15 Thread Chuan Zheng
Add trace_calls to make it easier to debug Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson --- migration/dirtyrate.c | 9 + migration/trace-events | 8 2 files changed, 17 insertions(+) diff --git a/migration/dirtyrate.c b/migratio

[PATCH v10 05/12] migration/dirtyrate: move RAMBLOCK_FOREACH_MIGRATABLE into ram.h

2020-09-15 Thread Chuan Zheng
RAMBLOCK_FOREACH_MIGRATABLE is need in dirtyrate measure, move the existing definition up into migration/ram.h Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson Reviewed-by: Li Qiang --- migration/dirtyrate.c | 1 + migration/ram.c | 11 +--

[PATCH v10 03/12] migration/dirtyrate: Add RamblockDirtyInfo to store sampled page info

2020-09-15 Thread Chuan Zheng
Add RamblockDirtyInfo to store sampled page info of each ramblock. Signed-off-by: Chuan Zheng Reviewed-by: Dr. David Alan Gilbert Reviewed-by: David Edmondson Reviewed-by: Li Qiang --- migration/dirtyrate.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/migration/dirt

Re: [PATCH] hw/arm/aspeed: Map the UART5 device unconditionally

2020-09-15 Thread Cédric Le Goater
On 9/15/20 7:23 PM, Philippe Mathieu-Daudé wrote: > ping? It's reviewed : http://patchwork.ozlabs.org/project/qemu-devel/patch/20200905212415.760452-1-f4...@amsat.org/ I will send a PR when I have more patches. Thanks, C. > On 9/5/20 11:24 PM, Philippe Mathieu-Daudé wrote: >> The UART5 i

[Bug 1894869] Re: Chelsio T4 has old MSIX PBA offset bug

2020-09-15 Thread Alex Williamson
The device ID on function 7 is 0x which is typically not valid, there's no entry for it in the PCI IDs database. Someone from Chelsio would need to explain why it's even exposed, but there doesn't seem to be any value in quirking it since it provides no useful function. ** Changed in: qemu

Re: [PATCH v9 07/12] migration/dirtyrate: Compare page hash results for recorded sampled page

2020-09-15 Thread Zheng Chuan
On 2020/9/16 0:30, Li Qiang wrote: > Chuan Zheng 于2020年9月15日周二 上午10:34写道: >> >> Compare page hash results for recorded sampled page. >> >> Signed-off-by: Chuan Zheng >> Signed-off-by: YanYing Zhuang >> Reviewed-by: Dr. David Alan Gilbert >> --- >> migration/dirtyrate.c | 63 >>

Re: [PATCH v2 1/6] util/oslib-win32: Use _aligned_malloc for qemu_try_memalign

2020-09-15 Thread Stefan Weil
Am 16.09.20 um 02:46 schrieb Richard Henderson: > We do not need or want to be allocating page sized quanta. > > Signed-off-by: Richard Henderson > --- > Cc: Stefan Weil > --- > util/oslib-win32.c | 10 +++--- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/util/oslib-win

Re: [PATCH 0/5] qom: Allow object to be aligned

2020-09-15 Thread Stefan Weil
Am 16.09.20 um 00:47 schrieb Richard Henderson: > On 9/15/20 10:46 AM, Richard Henderson wrote: >> We already have a function that can alloc with alignment, >> but we need to pass this down from the structure. We also >> don't want to use this function unconditionally, because >> the windows vers

[Bug 1883984] Update Released

2020-09-15 Thread Chris Halse Rogers
The verification of the Stable Release Update for qemu has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a reg

[Bug 1883984] Re: QEMU S/390x sqxbr (128-bit IEEE 754 square root) crashes qemu-system-s390x

2020-09-15 Thread Launchpad Bug Tracker
This bug was fixed in the package qemu - 1:4.2-3ubuntu6.5 --- qemu (1:4.2-3ubuntu6.5) focal; urgency=medium * further stabilize qemu by importing patches of qemu v4.2.1 Fixes (LP: #1891203) and (LP: #1891877) - d/p/stable/lp-1891877-* - as part of the stabilization this

[PATCH V9 6/6] hw/mips: Add Loongson-3 machine support

2020-09-15 Thread Huacai Chen
Add Loongson-3 based machine support, it use liointc as the interrupt controler and use GPEX as the pci controller. Currently it can work with both TCG and KVM. As the machine model is not based on any exiting physical hardware, the name of the machine is "loongson3-virt". It may be superseded in

[PATCH V9 5/6] target/mips: Add loongson-ext lsdc2 group of instructions

2020-09-15 Thread Huacai Chen
From: Jiaxun Yang LDC2/SDC2 opcodes have been rewritten as "load & store with offset" group of instructions by loongson-ext ASE. This patch add implementation of these instructions: gslbx: load 1 bytes to GPR gslhx: load 2 bytes to GPR gslwx: load 4 bytes to GPR gsldx: load 8 bytes to GPR gslwxc

[PATCH V9 4/6] target/mips: Add loongson-ext lswc2 group of instructions (Part 2)

2020-09-15 Thread Huacai Chen
From: Jiaxun Yang LWC2 & SWC2 have been rewritten by Loongson EXT vendor ASE as "load/store quad word" and "shifted load/store" groups of instructions. This patch add implementation of these instructions: gslwlc1: similar to lwl but RT is FPR instead of GPR gslwrc1: similar to lwr but RT is FPR

[PATCH V9 2/6] target/mips: Fix PageMask with variable page size

2020-09-15 Thread Huacai Chen
From: Jiaxun Yang Our current code assumed the target page size is always 4k when handling PageMask and VPN2, however, variable page size was just added to mips target and that's nolonger true. Signed-off-by: Huacai Chen Signed-off-by: Jiaxun Yang --- target/mips/cp0_helper.c | 36 +++

[PATCH V9 3/6] target/mips: Add loongson-ext lswc2 group of instructions (Part 1)

2020-09-15 Thread Huacai Chen
From: Jiaxun Yang LWC2 & SWC2 have been rewritten by Loongson EXT vendor ASE as "load/store quad word" and "shifted load/store" groups of instructions. This patch add implementation of these instructions: gslq: load 16 bytes to GPR gssq: store 16 bytes from GPR gslqc1: load 16 bytes to FPR gssqc

[PATCH V9 1/6] linux-headers: Update MIPS KVM type defintition

2020-09-15 Thread Huacai Chen
Update MIPS KVM type defintition from Linux 5.9-rc6. Signed-off-by: Huacai Chen --- linux-headers/linux/kvm.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index a28c366..36a480f 100644 --- a/linux-headers/linux/kvm

[PATCH V9 0/6] mips: Add Loongson-3 machine support

2020-09-15 Thread Huacai Chen
Loongson-3 CPU family include Loongson-3A R1/R2/R3/R4 and Loongson-3B R1/R2. Loongson-3A R1 is the oldest and its ISA is the smallest, while Loongson-3A R4 is the newest and its ISA is almost the superset of all others. To reduce complexity, in QEMU we just define two CPU types: 1, "Loongson-3A100

[PATCH] target/arm: Fix sve ldr/str

2020-09-15 Thread Richard Henderson
The mte update missed a bit when producing clean addresses. Fixes: b2aa8879b88 Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index e4cd6b6251..c0d8a58

[PATCH v2 2/6] qom: Allow objects to be allocated with increased alignment

2020-09-15 Thread Richard Henderson
It turns out that some hosts have a default malloc alignment less than that required for vectors. We assume that, with compiler annotation on CPUArchState, that we can properly align the vector portion of the guest state. Fix the alignment of the allocation by using qemu_memalloc when required.

[PATCH v2 4/6] target/ppc: Set instance_align on PowerPCCPU TypeInfo

2020-09-15 Thread Richard Henderson
Fix alignment of CPUPPCState.vsr. Signed-off-by: Richard Henderson --- Cc: David Gibson Cc: qemu-...@nongnu.org --- target/ppc/translate_init.c.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/target/ppc/translate_init.c.inc b/target/ppc/translate_init.c.inc index 230a062d29..accb4f2fae

[PATCH v2 6/6] target/s390x: Set instance_align on S390CPU TypeInfo

2020-09-15 Thread Richard Henderson
Fix alignment of CPUS390XState.vregs. Signed-off-by: Richard Henderson --- Cc: David Hildenbrand Cc: Cornelia Huck Cc: qemu-s3...@nongnu.org --- target/s390x/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 749cd548f0..e350edc9f5 100644 --

[PATCH v2 1/6] util/oslib-win32: Use _aligned_malloc for qemu_try_memalign

2020-09-15 Thread Richard Henderson
We do not need or want to be allocating page sized quanta. Signed-off-by: Richard Henderson --- Cc: Stefan Weil --- util/oslib-win32.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/util/oslib-win32.c b/util/oslib-win32.c index c654dafd93..8d838bf342 100644 --- a

[PATCH v2 5/6] target/riscv: Set instance_align on RISCVCPU TypeInfo

2020-09-15 Thread Richard Henderson
Fix alignment of CPURISCVState.vreg. Signed-off-by: Richard Henderson --- Cc: Alistair Francis Cc: qemu-ri...@nongnu.org --- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 57c006df5d..0bbfd7f457 100644 --- a/target/riscv/cpu.

[PATCH v2 3/6] target/arm: Set instance_align on CPUARM TypeInfo

2020-09-15 Thread Richard Henderson
Fix alignment of CPUARMState.vfp.zregs. Signed-off-by: Richard Henderson --- Cc: Peter Maydell Cc: qemu-...@nongnu.org --- target/arm/cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 7b5ea65fab..a7643deab4 100644 --- a/target/arm/cpu.c +++ b/

[PATCH v2 0/6] qom: Allow object to be aligned

2020-09-15 Thread Richard Henderson
I've seen some failures on arm and s390x hosts after enabling host vector support. It turns out that the malloc for these hosts does not provide 16-byte alignment. We already have a function that can alloc with alignment, but we need to pass this down from the structure. We also don't want to us

[Bug 1894869] Re: Chelsio T4 has old MSIX PBA offset bug

2020-09-15 Thread Nick Bauer
I was able to boot a VM with just the functions of the device with the ethernet controller function ID added as PCI devices. Something I noticed while adding in those devices though is that all of the others have a description associated with them in Proxmox, but the one that's causing the boot to

[Bug 1892604] Re: qemu-system-arm: ../hw/usb/hcd-dwc2.c:666: dwc2_glbreg_read: Assertion `addr <= GINTSTS2' failed.

2020-09-15 Thread Paul Zimmerman
Hmm, that's odd. I will try to reproduce this. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1892604 Title: qemu-system-arm: ../hw/usb/hcd-dwc2.c:666: dwc2_glbreg_read: Assertion `addr <= GINTSTS

[PATCH 33/37] qapi/introspect.py: add notational type hints

2020-09-15 Thread John Snow
Add a tiny hint into schema.py to allow introspect.py to type check, too. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 123 ++--- scripts/qapi/mypy.ini | 5 -- scripts/qapi/schema.py | 2 +- 3 files changed, 87 insertions(+), 43 deletions

[PATCH 35/37] qapi/types.py: remove one-letter variables

2020-09-15 Thread John Snow
"John, if pylint told you to jump off a bridge, would you?" Hey, if it looked like fun, I might. Now that this file is clean, enable pylint checks on this file. Signed-off-by: John Snow --- scripts/qapi/pylintrc | 1 - scripts/qapi/types.py | 29 +++-- 2 files changed,

Re: [PATCH 0/5] qom: Allow object to be aligned

2020-09-15 Thread Richard Henderson
On 9/15/20 10:46 AM, Richard Henderson wrote: > We already have a function that can alloc with alignment, > but we need to pass this down from the structure. We also > don't want to use this function unconditionally, because > the windows version does page allocation, which would be > overkill for

[PATCH 31/37] qapi/introspect.py: add _gen_features helper

2020-09-15 Thread John Snow
_make_tree doesn't know if it is receiving an object or some other type; adding features information should arguably be performed by the caller. This will help us refactor _make_tree more gracefully in the next patch. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 22 ++--

[PATCH 25/37] qapi/gen.py: add notational type hints

2020-09-15 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/gen.py | 105 +++- 1 file changed, 56 insertions(+), 49 deletions(-) diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index fc46813d1a..c87c84e7c9 100644 --- a/scripts/qapi/gen.py +++ b/scripts/qapi/gen.py @@

[PATCH 36/37] qapi/visit.py: remove unused parameters from gen_visit_object

2020-09-15 Thread John Snow
And this fixes the pylint report for this file, so make sure we check this in the future, too. Signed-off-by: John Snow --- scripts/qapi/pylintrc | 1 - scripts/qapi/visit.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc in

[PATCH 26/37] qapi/gen.py: Enable checking with mypy

2020-09-15 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index 43c8bd1973..dbfeda748c 100644 --- a/scripts/qapi/mypy.ini +++ b/scripts/qapi/mypy.ini @@ -19,11 +19,6 @@ disallow_untyped_defs = False di

[PATCH 27/37] qapi/gen.py: Remove unused parameter

2020-09-15 Thread John Snow
module_basename doesn't use the 'what' argument, so remove it. Signed-off-by: John Snow --- scripts/qapi/gen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py index c87c84e7c9..e873901672 100644 --- a/scripts/qapi/gen.py +++ b/sc

[PATCH 20/37] qapi/commands.py: add notational type hints

2020-09-15 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/commands.py | 72 ++-- 1 file changed, 54 insertions(+), 18 deletions(-) diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py index b215e58357..3c950da10a 100644 --- a/scripts/qapi/commands.py +++ b/scripts

[PATCH 32/37] qapi/introspect.py: create a typed 'Node' data structure

2020-09-15 Thread John Snow
Replacing the un-typed tuple, add a typed Node that we can add typed metadata to. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 53 -- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/scripts/qapi/introspect.py b/scripts/qapi/introsp

[PATCH 30/37] qapi/introspect.py: Add a typed 'extra' structure

2020-09-15 Thread John Snow
Typing arbitrarily shaped dicts with mypy is difficult prior to Python 3.8; using explicit structures is nicer. Since we always define an Extra type now, the return type of _make_tree simplifies and always returns the tuple. Signed-off-by: John Snow --- scripts/qapi/introspect.py | 31 +

[PATCH 28/37] qapi/gen.py: update write() to be more idiomatic

2020-09-15 Thread John Snow
Make the file handling here just a tiny bit more idiomatic. (I realize this is heavily subjective.) Use exist_ok=True for os.makedirs and remove the exception, use fdopen() to wrap the file descriptor in a File-like object, and use a context manager for managing the file pointer. Signed-off-by: J

[PATCH 17/37] qapi/events.py: add notational type hints

2020-09-15 Thread John Snow
This is enough to enable type-checking on events.py, so enable that in this patch, too. Signed-off-by: John Snow --- scripts/qapi/events.py | 46 -- scripts/qapi/mypy.ini | 5 - 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/scripts

[PATCH 21/37] qapi/commands.py: enable checking with mypy

2020-09-15 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index b668776d94..9da1dccef4 100644 --- a/scripts/qapi/mypy.ini +++ b/scripts/qapi/mypy.ini @@ -4,11 +4,6 @@ strict_optional = False disallow_u

[PATCH 37/37] qapi/visit.py: add notational type hints

2020-09-15 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 5 --- scripts/qapi/visit.py | 72 +-- 2 files changed, 55 insertions(+), 22 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index 3babc380a8..5ab3433c5f 100644 --- a/scripts/qap

[PATCH 22/37] qapi/source.py: add notational type hints

2020-09-15 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 5 - scripts/qapi/source.py | 31 ++- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index 9da1dccef4..43c8bd1973 100644 --- a/scripts/qapi/mypy.i

[PATCH 24/37] qapi/gen.py: Fix edge-case of _is_user_module

2020-09-15 Thread John Snow
The edge case is that if the name is '', this expression returns a string instead of a bool, which violates our declared type. Signed-off-by: John Snow --- 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 1147

[PATCH 19/37] qapi/commands.py: Don't re-bind to variable of different type

2020-09-15 Thread John Snow
Mypy isn't a fan of rebinding a variable with a new data type. It's easy enough to avoid. Signed-off-by: John Snow --- scripts/qapi/commands.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/qapi/commands.py b/scripts/qapi/commands.py index 0c0fe854fe..b215e58357

[PATCH 34/37] qapi/types.py: add notational type hints

2020-09-15 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 5 --- scripts/qapi/types.py | 86 --- 2 files changed, 64 insertions(+), 27 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index 9ce8b56f22..3babc380a8 100644 --- a/scripts/qap

[PATCH 18/37] qapi/events.py: Move comments into docstrings

2020-09-15 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/events.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/events.py b/scripts/qapi/events.py index 449a700ffe..0b49cf5fea 100644 --- a/scripts/qapi/events.py +++ b/scripts/qapi/events.py @@ -49,8 +49,10 @@ def gen_event

[PATCH 12/37] qapi/common.py: check with pylint

2020-09-15 Thread John Snow
Remove qapi/common.py from the pylintrc ignore list. Signed-off-by: John Snow --- scripts/qapi/pylintrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc index c2bbb8e8e1..c800055589 100644 --- a/scripts/qapi/pylintrc +++ b/script

[PATCH 16/37] qapi: establish mypy type-checking baseline

2020-09-15 Thread John Snow
Fix two very minor issues, and then establish a mypy type-checking baseline. Like pylint, this should be run from the folder above: > mypy --config-file=qapi/mypy.ini qapi/ Signed-off-by: John Snow --- scripts/qapi/doc.py| 3 +- scripts/qapi/mypy.ini | 65 +++

[PATCH 29/37] qapi/gen.py: delint with pylint

2020-09-15 Thread John Snow
'fp' and 'fd' are self-evident in context, add them to the list of OK names. _top and _bottom also need to stay class methods because some users override the method and need to use `self`. Tell pylint to shush. Signed-off-by: John Snow --- scripts/qapi/gen.py | 2 ++ scripts/qapi/pylintrc | 5

[PATCH 11/37] qapi/common.py: Replace one-letter 'c' variable

2020-09-15 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/common.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index c665e67495..4c079755d3 100644 --- a/scripts/qapi/common.py +++ b/scripts/qapi/common.py @@ -30,14 +30,14 @@ def cam

[PATCH 15/37] qapi/common.py: split build_params into new file

2020-09-15 Thread John Snow
Including it in common.py creates a circular import dependency, because schema relies on common.py. To type build_params properly, it needs to be moved outside of the chain. Signed-off-by: John Snow --- scripts/qapi/commands.py | 2 +- scripts/qapi/common.py | 23 --- scri

[PATCH 23/37] qapi/source.py: delint with pylint

2020-09-15 Thread John Snow
Shush an error and leave a hint for future cleanups when we're allowed to use Python 3.7+. Signed-off-by: John Snow --- scripts/qapi/pylintrc | 1 - scripts/qapi/source.py | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc index

[PATCH 09/37] qapi/common.py: Add indent manager

2020-09-15 Thread John Snow
Code style tools really dislike the use of global keywords, because it generally involves re-binding the name at runtime which can have strange effects depending on when and how that global name is referenced in other modules. Make a little indent level manager instead. Signed-off-by: John Snow

[PATCH 08/37] qapi/common.py: Remove python compatibility workaround

2020-09-15 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/common.py | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index ba35abea47..4fb265a8bf 100644 --- a/scripts/qapi/common.py +++ b/scripts/qapi/common.py @@ -119,10 +119,7 @@ def cgen(c

[PATCH 13/37] qapi/common.py: add notational type hints

2020-09-15 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/common.py | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index 4c079755d3..af01348b35 100644 --- a/scripts/qapi/common.py +++ b/scripts/qapi/common.py @@ -1

[PATCH 14/37] qapi/common.py: Move comments into docstrings

2020-09-15 Thread John Snow
As docstrings, they'll show up in documentation and IDE help. Signed-off-by: John Snow --- scripts/qapi/common.py | 50 ++ 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index af01348b35..38d

[PATCH 05/37] qapi: Remove wildcard includes

2020-09-15 Thread John Snow
Wildcard includes become hard to manage when refactoring and dealing with circular dependencies with strictly typed mypy. Remove them and include things explicitly by name instead. Signed-off-by: John Snow --- scripts/qapi/commands.py | 6 +- scripts/qapi/events.py | 7 ++- scri

[PATCH 06/37] qapi: delint using flake8

2020-09-15 Thread John Snow
Petty style guide fixes and line length enforcement. Not a big win, not a big loss, but flake8 passes 100% on the qapi module, which gives us an easy baseline to enforce hereafter. Signed-off-by: John Snow --- scripts/qapi/.flake8 | 2 ++ scripts/qapi/commands.py | 3 ++- scripts/qapi/sch

[PATCH 07/37] qapi: add pylintrc

2020-09-15 Thread John Snow
Add a skeleton pylintrc file. Right now, it ignores quite a few things. Files will be removed from the known-bad list throughout this and following series as they are repaired. Note: Normally, pylintrc would go in the folder above the module, but as that folder is shared by many things, it is goin

[PATCH 03/37] qapi-gen: Separate arg-parsing from generation

2020-09-15 Thread John Snow
This is a minor re-work of the entrypoint script. It isolates a generate() method from the actual command-line mechanism. Signed-off-by: John Snow --- scripts/qapi-gen.py | 87 - 1 file changed, 63 insertions(+), 24 deletions(-) diff --git a/scripts/q

[PATCH 10/37] qapi/common.py: delint with pylint

2020-09-15 Thread John Snow
Signed-off-by: John Snow --- scripts/qapi/common.py | 16 +++- scripts/qapi/schema.py | 14 +++--- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index 87d87b95e5..c665e67495 100644 --- a/scripts/qapi/common.py

[PATCH 04/37] qapi: move generator entrypoint into module

2020-09-15 Thread John Snow
As part of delinting and adding type hints to the QAPI generator, it's helpful for the entrypoint to be part of the module, only leaving a very tiny entrypoint shim outside of the module. As a result, all of the include statements are reworked to be module-aware, as explicit relative imports. Thi

[PATCH 00/37] qapi: static typing conversion, pt1

2020-09-15 Thread John Snow
Hi, this series starts adding static type hints to the QAPI module. As you can see, the series started getting quite a bit long, so this is only a partial conversion that focuses on a handful of the easier files. The tougher files -- schema.py, expr.py, parser.py -- will each receive their own ser

[PATCH 02/37] [DO-NOT-MERGE] qapi: add debugging tools

2020-09-15 Thread John Snow
This adds some really childishly simple debugging tools. Maybe they're interesting for someone else, too? Signed-off-by: John Snow --- scripts/qapi/debug.py | 78 +++ 1 file changed, 78 insertions(+) create mode 100644 scripts/qapi/debug.py diff --git a/

[PATCH 01/37] python: Require 3.6+

2020-09-15 Thread John Snow
Python 3.5 is now EOL. Python 3.6 brings with it several nice things: - Literal string interpolation (PEP 498) - Syntax for variable annotations (PEP 526) - Preserving keyword argument order (PEP 468) * PEP 526 in particular will allow us to convert the QAPI module to the statically typed subset

Re: [PATCH 1/5] qom: Allow objects to be allocated with increased alignment

2020-09-15 Thread Eduardo Habkost
On Tue, Sep 15, 2020 at 02:30:34PM -0700, Richard Henderson wrote: > On 9/15/20 2:27 PM, Eduardo Habkost wrote: > > On Tue, Sep 15, 2020 at 01:51:48PM -0700, Richard Henderson wrote: > >> On 9/15/20 1:19 PM, Eduardo Habkost wrote: > >>> Once we move to C11, we can just use max_align_t. > >> > >> Ye

[PATCH v3 0/5] Qemu SEV-ES guest support

2020-09-15 Thread Tom Lendacky
From: Tom Lendacky This patch series provides support for launching an SEV-ES guest. Secure Encrypted Virtualization - Encrypted State (SEV-ES) expands on the SEV support to protect the guest register state from the hypervisor. See "AMD64 Architecture Programmer's Manual Volume 2: System Program

[ANNOUNCE] QEMU 5.0.1 Stable released

2020-09-15 Thread Michael Roth
Hi everyone, I am pleased to announce that the QEMU v5.0.1 stable release is now available: You can grab the tarball from our download page here: https://www.qemu.org/download/#source v5.0.1 is now tagged in the official qemu.git repository, and the stable-5.0 branch has been updated accordin

[PATCH v3 5/5] sev/i386: Enable an SEV-ES guest based on SEV policy

2020-09-15 Thread Tom Lendacky
From: Tom Lendacky Update the sev_es_enabled() function return value to be based on the SEV policy that has been specified. SEV-ES is enabled if SEV is enabled and the SEV-ES policy bit is set in the policy object. Signed-off-by: Tom Lendacky --- target/i386/sev.c | 4 +++- 1 file changed, 3 i

[PATCH v3 4/5] sev/i386: Don't allow a system reset under an SEV-ES guest

2020-09-15 Thread Tom Lendacky
From: Tom Lendacky An SEV-ES guest does not allow register state to be altered once it has been measured. When a SEV-ES guest issues a reboot command, Qemu will reset the vCPU state and resume the guest. This will cause failures under SEV-ES, so prevent that from occurring. Signed-off-by: Tom Le

  1   2   3   4   5   >