[PATCH v4 0/4] RISC-V: Remove deprecated ISA, CPUs and machines

2020-05-28 Thread Alistair Francis
v4: - Remove all of the < PRIV_VERSION_1_10_0 checks - Move the documentation to the "Recently removed features" section - Document the OpenSBI deprecation v3: - Don't use SiFive CPUs for Spike machine v2: - Remove the CPUs and ISA seperatley Alistair Francis (4): hw/riscv: spike:

Re: [PATCH Kernel v22 0/8] Add UAPIs to support migration for VFIO devices

2020-05-28 Thread Alex Williamson
On Thu, 28 May 2020 04:01:02 -0400 Yan Zhao wrote: > > > > This is my understanding of the protocol as well, when the device is > > > > running, pending_bytes might drop to zero if no internal state has > > > > changed and may be non-zero on the next iteration due to device > > > > activity.

Re: [PATCH Kernel v22 0/8] Add UAPIs to support migration for VFIO devices

2020-05-28 Thread Alex Williamson
On Wed, 27 May 2020 09:48:22 +0100 "Dr. David Alan Gilbert" wrote: > * Yan Zhao (yan.y.z...@intel.com) wrote: > > BTW, for viommu, the downtime data is as below. under the same network > > condition and guest memory size, and no running dirty data/memory produced > > by device. > > (1) viommu off

[Bug 1881231] [NEW] colo: Can not recover colo after svm failover twice

2020-05-28 Thread ye.zou
Public bug reported: Hi Expert, x-blockdev-change met some error, during testing colo Host os: CentOS Linux release 7.6.1810 (Core) Reproduce steps: 1. create colo vm following https://github.com/qemu/qemu/blob/master/docs/COLO-FT.txt 2. kill secondary vm and remove the nbd child from the

[PATCH 4/4] python/qemu: delint; add flake8 config

2020-05-28 Thread John Snow
Mostly, ignore the "no bare except" rule, because flake8 is not contextual and cannot determine if we re-raise. Pylint can, though, so always prefer pylint for that. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- python/qemu/.flake8| 2 ++ python/qemu/accel.py | 9

[PATCH 3/4] python/qemu: delint and add pylintrc

2020-05-28 Thread John Snow
Bring our these files up to speed with pylint 2.5.0. Add a pylintrc file to formalize which pylint subset we are targeting. The similarity ignore is there to suppress similarity reports across imports, which for typing constants, are going to trigger this report erroneously. Signed-off-by: John

[PATCH v5 00/11] RISC-V Add the OpenTitan Machine

2020-05-28 Thread Alistair Francis
OpenTitan is an open source silicon Root of Trust (RoT) project. This series adds initial support for the OpenTitan machine to QEMU. This series add the Ibex CPU to the QEMU RISC-V target. It then adds the OpenTitan machine, the Ibex UART and the Ibex PLIC. The UART has been tested sending and

[PATCH v5 01/11] riscv/boot: Add a missing header include

2020-05-28 Thread Alistair Francis
As the functions declared in this header use the symbol_fn_t typedef itself declared in "hw/loader.h", we need to include it here to make the header file self-contained. Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng --- include/hw/riscv/boot.h | 1 +

[PATCH v4 3/3] tests/acpi: update expected SRAT files

2020-05-28 Thread Vishal Verma
Update expected SRAT files for the change to account for NVDIMM NUMA nodes in the SRAT. AML diffs: tests/data/acpi/pc/SRAT.dimmpxm: --- /tmp/asl-3P2IL0.dsl 2020-05-28 15:11:02.326439263 -0600 +++ /tmp/asl-1N4IL0.dsl 2020-05-28 15:11:02.325439280 -0600 @@ -3,7 +3,7 @@ * AML/ASL+ Disassembler

Re: [PATCH] hw/vfio/common: Trace in which mode a IOMMU is opened

2020-05-28 Thread Alex Williamson
On Wed, 27 May 2020 12:53:30 -0400 Peter Xu wrote: > On Wed, May 27, 2020 at 06:27:38PM +0200, Philippe Mathieu-Daudé wrote: > > On 5/27/20 6:16 PM, Peter Xu wrote: > > > On Wed, May 27, 2020 at 05:53:16PM +0200, Philippe Mathieu-Daudé wrote: > > > +for (i = 0; i < ARRAY_SIZE(iommu);

[PATCH v8 2/8] block: consolidate blocksize properties consistency checks

2020-05-28 Thread Roman Kagan
Several block device properties related to blocksize configuration must be in certain relationship WRT each other: physical block must be no smaller than logical block; min_io_size, opt_io_size, and discard_granularity must be a multiple of a logical block. To ensure these requirements are met,

[PATCH v8 1/8] virtio-blk: store opt_io_size with correct size

2020-05-28 Thread Roman Kagan
The width of opt_io_size in virtio_blk_config is 32bit. However, it's written with virtio_stw_p; this may result in value truncation, and on big-endian systems with legacy virtio in completely bogus readings in the guest. Use the appropriate accessor to store it. Signed-off-by: Roman Kagan

[PATCH v8 3/8] qdev-properties: blocksize: use same limits in code and description

2020-05-28 Thread Roman Kagan
Make it easier (more visible) to maintain the limits on the blocksize properties in sync with the respective description, by using macros both in the code and in the description. Signed-off-by: Roman Kagan Reviewed-by: Eric Blake --- hw/core/qdev-properties.c | 21 +++-- 1 file

[PATCH v8 0/8] block: enhance handling of size-related BlockConf properties

2020-05-28 Thread Roman Kagan
BlockConf includes several properties counted in bytes. Enhance their handling in some aspects, specifically - accept common size suffixes (k, m) - perform consistency checks on the values - lift the upper limit on physical_block_size and logical_block_size Also fix the accessor for opt_io_size

[PATCH v5 07/11] hw/char: Initial commit of Ibex UART

2020-05-28 Thread Alistair Francis
This is the initial commit of the Ibex UART device. Serial TX is working, while RX has been implemeneted but untested. This is based on the documentation from: https://docs.opentitan.org/hw/ip/uart/doc/ Signed-off-by: Alistair Francis --- include/hw/char/ibex_uart.h | 110

[PATCH v5 04/11] target/riscv: Don't set PMP feature in the cpu init

2020-05-28 Thread Alistair Francis
The PMP is enabled by default via the "pmp" property so there is no need for us to set it in the init function. As all CPUs have PMP support just remove the set_feature() call in the CPU init functions. Signed-off-by: Alistair Francis --- target/riscv/cpu.c | 7 --- 1 file changed, 7

[PATCH v5 03/11] target/riscv: Disable the MMU correctly

2020-05-28 Thread Alistair Francis
Previously if we didn't enable the MMU it would be enabled in the realize() function anyway. Let's ensure that if we don't want the MMU we disable it. We also don't need to enable the MMU as it will be enalbed in realize() by default. Signed-off-by: Alistair Francis --- target/riscv/cpu.c | 7

[Bug 1872790] Re: empty qcow2

2020-05-28 Thread John Snow
It sounds like maybe these disks have been partitioned in a format that only Windows understands. Can you tell me what the windows disk manager claims the partition table format to be? If you still think that maybe there's a QEMU bug, please give more details: - host kernel version - qemu

[Bug 1877418] Re: qemu-nbd freezes access to VDI file

2020-05-28 Thread Bump
I thought there were qemu-img for that. Since qemu-nbd allows mounting images a rw block devices, it's logical to think that you can use it for that purpose. Will try to reproduce again the issue in case it was a kernel problem instead of qemu-nbd. -- You received this bug notification because

Re: [PATCH Kernel v22 0/8] Add UAPIs to support migration for VFIO devices

2020-05-28 Thread Yan Zhao
On Thu, May 28, 2020 at 04:59:06PM -0600, Alex Williamson wrote: > On Wed, 27 May 2020 09:48:22 +0100 > "Dr. David Alan Gilbert" wrote: > > * Yan Zhao (yan.y.z...@intel.com) wrote: > > > BTW, for viommu, the downtime data is as below. under the same network > > > condition and guest memory size,

Re: [PATCH v4 1/4] hw/riscv: spike: Remove deprecated ISA specific machines

2020-05-28 Thread Thomas Huth
On 29/05/2020 00.16, Alistair Francis wrote: > The ISA specific Spike machines have been deprecated in QEMU since 4.1, > let's finally remove them. > > Signed-off-by: Alistair Francis > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Bin Meng > --- > docs/system/deprecated.rst | 17 +-- >

[PATCH v4 1/4] hw/riscv: spike: Remove deprecated ISA specific machines

2020-05-28 Thread Alistair Francis
The ISA specific Spike machines have been deprecated in QEMU since 4.1, let's finally remove them. Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng --- docs/system/deprecated.rst | 17 +-- include/hw/riscv/spike.h | 6 +- hw/riscv/spike.c

[PATCH v5 08/11] hw/intc: Initial commit of lowRISC Ibex PLIC

2020-05-28 Thread Alistair Francis
The Ibex core contains a PLIC that although similar to the RISC-V spec is not RISC-V spec compliant. This patch implements a Ibex PLIC in a somewhat generic way. As the current RISC-V PLIC needs tidying up, my hope is that as the Ibex PLIC move towards spec compliance this PLIC implementation

[PATCH v4 0/3] account for NVDIMM nodes during SRAT generation

2020-05-28 Thread Vishal Verma
Changes since v3: - Add the SRAT augmentation for ARM's virt-acpi-build as well (Igor) - Update patches 1 and 3 for the test binaries to include ARM tests. Changes since v2: - Change a repetitive OBJECT(dev) to a stored 'Object' (Igor) - No need to return 'numamem' back to build_srat (Igor)

[PATCH v8 4/8] qdev-properties: add size32 property type

2020-05-28 Thread Roman Kagan
Introduce size32 property type which handles size suffixes (k, m, g) just like size property, but is uint32_t rather than uint64_t. It's going to be useful for properties that are byte sizes but are inherently 32bit, like BlkConf.opt_io_size or .discard_granularity (they are switched to this new

[PATCH v8 5/8] qdev-properties: make blocksize accept size suffixes

2020-05-28 Thread Roman Kagan
It appears convenient to be able to specify physical_block_size and logical_block_size using common size suffixes. Teach the blocksize property setter to interpret them. Also express the upper and lower limits in the respective units. Signed-off-by: Roman Kagan Reviewed-by: Eric Blake ---

Re: [PATCH 0/2] Add support for SEV Launch Secret Injection

2020-05-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200528205114.42078-1-to...@linux.vnet.ibm.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT

[PATCH v4 3/4] target/riscv: Drop support for ISA spec version 1.09.1

2020-05-28 Thread Alistair Francis
The RISC-V ISA spec version 1.09.1 has been deprecated in QEMU since 4.1. It's not commonly used so let's remove support for it. Signed-off-by: Alistair Francis --- docs/system/deprecated.rst| 20 +-- target/riscv/cpu.h| 1 - target/riscv/cpu.c

[PATCH v4 1/3] diffs-allowed: add the SRAT AML to diffs-allowed

2020-05-28 Thread Vishal Verma
In anticipation of a change to the SRAT generation in qemu, add the AML file to diffs-allowed. Signed-off-by: Vishal Verma --- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h

Re: [PATCH v7 4/8] qdev-properties: add size32 property type

2020-05-28 Thread Roman Kagan
On Thu, May 28, 2020 at 04:45:19PM -0500, Eric Blake wrote: > On 5/28/20 4:39 PM, Roman Kagan wrote: > > Introduce size32 property type which handles size suffixes (k, m) just > > like size property, but is uint32_t rather than uint64_t. > > Does it handle 'g' as well? (even though the set of

[PATCH v8 7/8] qdev-properties: add getter for size32 and blocksize

2020-05-28 Thread Roman Kagan
Add getter for size32, and use it for blocksize, too. In its human-readable branch, it reports approximate size in human-readable units next to the exact byte value, like the getter for 64bit size does. Adjust the expected test output accordingly. Signed-off-by: Roman Kagan Reviewed-by: Eric

[PATCH v8 6/8] block: make BlockConf size props 32bit and accept size suffixes

2020-05-28 Thread Roman Kagan
Convert all size-related properties in BlockConf to 32bit. This will accommodate bigger block sizes (in a followup patch). This also allows to make them all accept size suffixes, either via DEFINE_PROP_BLOCKSIZE or via DEFINE_PROP_SIZE32. Also, since min_io_size is exposed to the guest by scsi

Re: [PATCH v3 0/3] account for NVDIMM nodes during SRAT generation

2020-05-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200528162011.16258-1-vishal.l.ve...@intel.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200528162011.16258-1-vishal.l.ve...@intel.com Subject: [PATCH v3 0/3] account for NVDIMM nodes

Re: [PATCH RFC 26/32] python//machine.py: use qmp.command

2020-05-28 Thread John Snow
[...] > > -def qmp(self, cmd, conv_keys=True, **args): > -""" > -Invoke a QMP command and return the response dict > -""" > +@classmethod > +def _qmp_args(cls, _conv_keys: bool = True, **args: Any) -> Dict[str, > Any]: > qmp_args = dict() >

Re: [PATCH 00/13] i386: hvf: Remove HVFX86EmulatorState

2020-05-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200528193758.51454-1-r.bolsha...@yadro.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200528193758.51454-1-r.bolsha...@yadro.com Subject: [PATCH 00/13] i386: hvf: Remove

Re: [PATCH 0/2] Add support for SEV Launch Secret Injection

2020-05-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200528205114.42078-1-to...@linux.vnet.ibm.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200528205114.42078-1-to...@linux.vnet.ibm.com Subject: [PATCH 0/2] Add support for SEV Launch

Re: [PATCH 0/2] Add support for SEV Launch Secret Injection

2020-05-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200528205114.42078-1-to...@linux.vnet.ibm.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ===

Re: [PATCH v2 1/1] tests/qtest/fuzz: Add faster virtio tests

2020-05-28 Thread Alexander Bulekov
On 200528 1853, Philippe Mathieu-Daudé wrote: > We don't need to serialize over QTest chardev when we can > directly access the MMIO address space via the first > registered CPU view. > Rename the currents tests as $TEST-qtest, add add faster > tests that don't use the qtest chardev. > >

[PATCH 2/4] python/machine.py: remove bare except

2020-05-28 Thread John Snow
Catch only the timeout error; if there are other problems, allow the stack trace to be visible. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé --- python/qemu/machine.py | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git

[PATCH 1/4] scripts/qmp: Fix shebang and imports

2020-05-28 Thread John Snow
There's more wrong with these scripts; They are in various stages of disrepair. That's beyond the scope of this current patchset. This just mechanically corrects the imports and the shebangs, as part of ensuring that the python/qemu/lib refactoring didn't break anything needlessly.

[PATCH 0/4] python: pylint and flake8 support

2020-05-28 Thread John Snow
This is a quick series to delint the files under python/qemu, with one extra fix outside of that domain. This was split out from my longer series attempting to package python/qemu. This part is a nice standalone chunk. John Snow (4): scripts/qmp: Fix shebang and imports python/machine.py:

[PATCH v4 2/4] target/riscv: Remove the deprecated CPUs

2020-05-28 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Bin Meng --- docs/system/deprecated.rst | 33 ++--- target/riscv/cpu.h | 7 --- target/riscv/cpu.c | 28 tests/qtest/machine-none-test.c | 4 ++-- 4 files

[PATCH v8 8/8] block: lift blocksize property limit to 2 MiB

2020-05-28 Thread Roman Kagan
Logical and physical block sizes in QEMU are limited to 32 KiB. This appears unnecessarily tight, and we've seen bigger block sizes handy at times. Lift the limitation up to 2 MiB which appears to be good enough for everybody, and matches the qcow2 cluster size limit. Signed-off-by: Roman Kagan

[PATCH] virtio-pci: fix queue_enable write

2020-05-28 Thread Jason Wang
Spec said: The driver uses this to selectively prevent the device from executing requests from this virtqueue. 1 - enabled; 0 - disabled. Though write 0 to queue_enable is forbidden by the sepc, we should not assume that the value is 1. Fix this by ignoring the write value other than 1. Cc:

<    1   2   3   4