Re: [PATCH v2 03/11] tests/acceptance: add base class record/replay kernel tests

2020-05-28 Thread Pavel Dovgalyuk
On 28.05.2020 11:28, Alex Bennée wrote: Pavel Dovgalyuk writes: On 27.05.2020 18:20, Alex Bennée wrote: Pavel Dovgalyuk writes: This patch adds a base for testing kernel boot recording and replaying. Each test has the phase of recording and phase of replaying. Virtual machines just boot

Re: [PATCH v2 04/11] tests/acceptance: add kernel record/replay test for x86_64

2020-05-28 Thread Pavel Dovgalyuk
On 28.05.2020 16:26, Alex Bennée wrote: Pavel Dovgalyuk writes: On 27.05.2020 18:41, Alex Bennée wrote: Pavel Dovgalyuk writes: This patch adds a test for record/replay an execution of x86_64 machine. Execution scenario includes simple kernel boot, which allows testing basic hardware

Re: [PULL v3 00/11] bitmaps patches for 2020-05-26

2020-05-28 Thread Vladimir Sementsov-Ogievskiy
Hi! Strange thing with your pull requests: I receive only small part of them.. I thought it's my problem of receiving part, but now I've checked that in mailing list archive there are same only two emails: 00/11 and 08/11 https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg08061.html

Re: [PATCH] spapr: Fix typos in comments and macro indentation

2020-05-28 Thread Cédric Le Goater
All QEMU patches should be sent to the qemu-devel mailing list also and to David as he is the PPC maintainer. On 5/29/20 2:04 AM, Gustavo Romero wrote: > This commit fixes typos in spapr_vio_reg_to_irq() comments and a macro > indentation. > > Signed-off-by: Gustavo Romero Acked-by: Cédric Le

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 +-- >

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. > >

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,

[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

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-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT

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 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] 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:

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 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() >

[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

[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

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 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

[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 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

[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 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 ---

[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

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.

[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 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

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 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

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

2020-05-28 Thread John Snow
I don't recommend you use VDI images in this way; we do not intend to support performant RW access; support for VDI images is there to convert to qcow2 or raw, generally. That said, some questions that might be interesting to know the answer to: - Try converting your VDI image to raw or qcow2

[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 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:

[PATCH v4 2/3] hw/acpi/nvdimm: add a helper to augment SRAT generation

2020-05-28 Thread Vishal Verma
NVDIMMs can belong to their own proximity domains, as described by the NFIT. In such cases, the SRAT needs to have Memory Affinity structures in the SRAT for these NVDIMMs, otherwise Linux doesn't populate node data structures properly during NUMA initialization. See the following for an example

[PATCH v4 4/4] docs: deprecated: Update the -bios documentation

2020-05-28 Thread Alistair Francis
Update the -bios deprecation documentation to describe the new behaviour. Signed-off-by: Alistair Francis --- docs/system/deprecated.rst | 28 +--- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst

[PATCH v5 09/11] riscv/opentitan: Connect the PLIC device

2020-05-28 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé --- include/hw/riscv/opentitan.h | 3 +++ hw/riscv/opentitan.c | 19 +-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/include/hw/riscv/opentitan.h

[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 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 v5 10/11] riscv/opentitan: Connect the UART device

2020-05-28 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé --- include/hw/riscv/opentitan.h | 13 + hw/riscv/opentitan.c | 24 ++-- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git

[PATCH v5 06/11] riscv: Initial commit of OpenTitan machine

2020-05-28 Thread Alistair Francis
This adds a barebone OpenTitan machine to QEMU. Signed-off-by: Alistair Francis Reviewed-by: Bin Meng --- default-configs/riscv32-softmmu.mak | 1 + default-configs/riscv64-softmmu.mak | 11 +- include/hw/riscv/opentitan.h| 68 ++ hw/riscv/opentitan.c| 184

[PATCH v5 05/11] target/riscv: Add the lowRISC Ibex CPU

2020-05-28 Thread Alistair Francis
Ibex is a small and efficient, 32-bit, in-order RISC-V core with a 2-stage pipeline that implements the RV32IMC instruction set architecture. For more details on lowRISC see here: https://github.com/lowRISC/ibex Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Reviewed-by: LIU Zhiwei ---

[PATCH v5 11/11] target/riscv: Use a smaller guess size for no-MMU PMP

2020-05-28 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Bin Meng --- target/riscv/pmp.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index 0e6b640fbd..9418660f1b 100644 --- a/target/riscv/pmp.c +++ b/target/riscv/pmp.c @@

[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

[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 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 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 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 v5 02/11] target/riscv: Don't overwrite the reset vector

2020-05-28 Thread Alistair Francis
The reset vector is set in the init function don't set it again in realize. Signed-off-by: Alistair Francis Reviewed-by: Bin Meng --- target/riscv/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 059d71f2c7..5eb3c02735

[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 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 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

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

2020-05-28 Thread Eric Blake
On 5/28/20 4:39 PM, Roman Kagan wrote: 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.

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

2020-05-28 Thread Eric Blake
On 5/28/20 4:39 PM, Roman Kagan wrote: Convert all size-related properties in BlockConf to 32bit. This will allow to accomodate bigger block sizes (in a followup patch). s/allow to accomodate/accommodate/ This also allows to make them all accept size suffixes, either via

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

2020-05-28 Thread Eric Blake
On 5/28/20 4:39 PM, Roman Kagan wrote: 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:

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

2020-05-28 Thread Eric Blake
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 valid 32-bit sizes with a g suffix is rather small ;) It's going to

Re: [PATCH 1/2] sev: add sev-inject-launch-secret

2020-05-28 Thread Eric Blake
On 5/28/20 3:51 PM, Tobin Feldman-Fitzthum wrote: From: Tobin Feldman-Fitzthum AMD SEV allows a guest owner to inject a secret blob into the memory of a virtual machine. The secret is encrypted with the SEV Transport Encryption Key and integrity is guaranteed with the Transport Integrity Key.

[PATCH v7 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 --- v6 -> v7: -

Re: [PATCH 0/2] linux-user: Load a vdso for x86_64

2020-05-28 Thread Richard Henderson
On 5/28/20 3:32 AM, Laurent Vivier wrote: > Le 28/05/2020 à 12:08, Peter Maydell a écrit : >> On Tue, 19 May 2020 at 20:45, Richard Henderson >> wrote: >>> Makefile | 4 +- >>> linux-user/elfload.c | 203 +- >>> pc-bios/Makefile

[PATCH v7 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 allow to accomodate 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

[PATCH v7 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 --- v6 -> v7: - split out into

[PATCH v7 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 --- v4 -> v5: - split out into separate patch [Philippe]

[PATCH v7 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 v7 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 v7 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 v7 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 v7 4/8] qdev-properties: add size32 property type

2020-05-28 Thread Roman Kagan
Introduce size32 property type which handles size suffixes (k, m) 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 0/2] Add support for SEV Launch Secret Injection

2020-05-28 Thread Tobin Feldman-Fitzthum
This patchset contains two patches. The first enables QEMU to facilitate the injection of a secret blob into the guest memory. The second enables QEMU to parse the guest ROM to determine the address at which the secret should be injected. Tobin Feldman-Fitzthum (2): sev: add

Re: [PATCH 1/2] sev: add sev-inject-launch-secret

2020-05-28 Thread James Bottomley
On Thu, 2020-05-28 at 16:51 -0400, Tobin Feldman-Fitzthum wrote: > --- a/qapi/misc-target.json > +++ b/qapi/misc-target.json > @@ -200,6 +200,26 @@ > { 'command': 'query-sev-capabilities', 'returns': 'SevCapability', >'if': 'defined(TARGET_I386)' } > > +## > +# @sev-inject-launch-secret: >

[PATCH 1/2] sev: add sev-inject-launch-secret

2020-05-28 Thread Tobin Feldman-Fitzthum
From: Tobin Feldman-Fitzthum AMD SEV allows a guest owner to inject a secret blob into the memory of a virtual machine. The secret is encrypted with the SEV Transport Encryption Key and integrity is guaranteed with the Transport Integrity Key. Although QEMU faciliates the injection of the launch

[PATCH 2/2] sev: scan guest ROM for launch secret address

2020-05-28 Thread Tobin Feldman-Fitzthum
From: Tobin Feldman-Fitzthum In addition to using QMP to provide the guest memory address that the launch secret blob will be injected into, the secret address can also be specified in the guest ROM. This patch adds sev_find_secret_gpa, which scans the ROM page by page to find a launch secret

[PATCH Kernel v24 6/8] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-05-28 Thread Kirti Wankhede
DMA mapped pages, including those pinned by mdev vendor drivers, might get unpinned and unmapped while migration is active and device is still running. For example, in pre-copy phase while guest driver could access those pages, host device or vendor driver can dirty these mapped pages. Such pages

[PATCH Kernel v24 8/8] vfio: Selective dirty page tracking if IOMMU backed device pins pages

2020-05-28 Thread Kirti Wankhede
Added a check such that only singleton IOMMU groups can pin pages. >From the point when vendor driver pins any pages, consider IOMMU group dirty page scope to be limited to pinned pages. To optimize to avoid walking list often, added flag pinned_page_dirty_scope to indicate if all of the

[PATCH Kernel v24 2/8] vfio iommu: Remove atomicity of ref_count of pinned pages

2020-05-28 Thread Kirti Wankhede
vfio_pfn.ref_count is always updated while holding iommu->lock, using atomic variable is overkill. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Reviewed-by: Eric Auger Reviewed-by: Cornelia Huck Reviewed-by: Yan Zhao --- drivers/vfio/vfio_iommu_type1.c | 9 + 1 file changed, 5

[PATCH Kernel v24 5/8] vfio iommu: Implementation of ioctl for dirty pages tracking

2020-05-28 Thread Kirti Wankhede
VFIO_IOMMU_DIRTY_PAGES ioctl performs three operations: - Start dirty pages tracking while migration is active - Stop dirty pages tracking. - Get dirty pages bitmap. Its user space application's responsibility to copy content of dirty pages from source to destination during migration. To

[PATCH Kernel v24 1/8] vfio: UAPI for migration interface for device state

2020-05-28 Thread Kirti Wankhede
- Defined MIGRATION region type and sub-type. - Defined vfio_device_migration_info structure which will be placed at the 0th offset of migration region to get/set VFIO device related information. Defined members of structure and usage on read/write access. - Defined device states and state

[PATCH Kernel v24 3/8] vfio iommu: Cache pgsize_bitmap in struct vfio_iommu

2020-05-28 Thread Kirti Wankhede
Calculate and cache pgsize_bitmap when iommu->domain_list is updated and iommu->external_domain is set for mdev device. Add iommu->lock protection when cached pgsize_bitmap is accessed. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Reviewed-by: Cornelia Huck Reviewed-by: Yan Zhao ---

[PATCH Kernel v24 7/8] vfio iommu: Add migration capability to report supported features

2020-05-28 Thread Kirti Wankhede
Added migration capability in IOMMU info chain. User application should check IOMMU info chain for migration capability to use dirty page tracking feature provided by kernel module. User application must check page sizes supported and maximum dirty bitmap size returned by this capability structure

[PATCH Kernel v24 4/8] vfio iommu: Add ioctl definition for dirty pages tracking

2020-05-28 Thread Kirti Wankhede
IOMMU container maintains a list of all pages pinned by vfio_pin_pages API. All pages pinned by vendor driver through this API should be considered as dirty during migration. When container consists of IOMMU capable device and all pages are pinned and mapped, then all pages are marked dirty. Added

[PATCH Kernel v24 0/8] Add UAPIs to support migration for VFIO devices

2020-05-28 Thread Kirti Wankhede
Hi, This patch set adds: * IOCTL VFIO_IOMMU_DIRTY_PAGES to get dirty pages bitmap with respect to IOMMU container rather than per device. All pages pinned by vendor driver through vfio_pin_pages external API has to be marked as dirty during migration. When IOMMU capable device is present

Re: [PATCH v2 0/4] microvm: memory config tweaks

2020-05-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200528134035.32025-1-kra...@redhat.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 === #!/bin/bash

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

2020-05-28 Thread Kirti Wankhede
On 5/28/2020 10:17 AM, Yan Zhao wrote: The whole series works for us in general: Reviewed-by: Yan Zhao Thanks. Kirti On Wed, May 20, 2020 at 11:38:00PM +0530, Kirti Wankhede wrote: Hi, This patch set adds: * IOCTL VFIO_IOMMU_DIRTY_PAGES to get dirty pages bitmap with

Re: [PATCH v2 0/4] microvm: memory config tweaks

2020-05-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200528134035.32025-1-kra...@redhat.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 BEGIN ===

Re: USB pass-through problems

2020-05-28 Thread BALATON Zoltan
On Thu, 28 May 2020, Gerd Hoffmann wrote: #2 0x7f23e8bfbb13 in libusb_handle_events_timeout_completed () at /lib64/libusb-1.0.so.0 #3 0x55e09854b7da in usb_host_abort_xfers (s=0x55e09b036dd0) at hw/usb/host-libusb.c:963 Hmm, does reverting 76d0a9362c6a6a7d88aa18c84c4186c9107ecaef

[PATCH 13/13] i386: hvf: Drop HVFX86EmulatorState

2020-05-28 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- include/qemu/typedefs.h | 1 - target/i386/cpu.h | 1 - target/i386/hvf/hvf.c | 1 - target/i386/hvf/x86.h | 4 4 files changed, 7 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index ecf3cde26c..6ce0356f2c 100644

[PATCH 08/13] i386: hvf: Drop rflags from HVFX86EmulatorState

2020-05-28 Thread Roman Bolshakov
HVFX86EmulatorState carries it's own copy of x86 flags. It can be dropped in favor of eflags in generic CPUX86State. Signed-off-by: Roman Bolshakov --- target/i386/hvf/hvf.c | 5 ++--- target/i386/hvf/x86.c | 2 +- target/i386/hvf/x86.h | 42

[PATCH 09/13] i386: hvf: Drop copy of RFLAGS defines

2020-05-28 Thread Roman Bolshakov
Use the ones provided in target/i386/cpu.h instead. Signed-off-by: Roman Bolshakov --- target/i386/hvf/x86.c| 2 +- target/i386/hvf/x86.h| 20 target/i386/hvf/x86_decode.c | 16 +++- target/i386/hvf/x86_task.c | 2 +- 4 files changed, 9

[PATCH 12/13] i386: hvf: Move mmio_buf into CPUX86State

2020-05-28 Thread Roman Bolshakov
There's no similar field in CPUX86State, but it's needed for MMIO traps. Signed-off-by: Roman Bolshakov --- target/i386/cpu.h | 1 + target/i386/hvf/hvf.c | 5 + target/i386/hvf/x86.h | 1 - target/i386/hvf/x86_emu.c | 12 ++-- 4 files changed, 12 insertions(+), 7

[PATCH 11/13] i386: hvf: Move lazy_flags into CPUX86State

2020-05-28 Thread Roman Bolshakov
The lazy flags are still needed for instruction decoder. Signed-off-by: Roman Bolshakov --- include/sysemu/hvf.h| 7 + target/i386/cpu.h | 2 ++ target/i386/hvf/x86.h | 6 target/i386/hvf/x86_flags.c | 57 ++--- 4 files

[PATCH 10/13] i386: hvf: Drop regs in HVFX86EmulatorState

2020-05-28 Thread Roman Bolshakov
HVFX86EmulatorState carries it's own copy of x86 registers. It can be dropped in favor of regs in generic CPUX86State. Signed-off-by: Roman Bolshakov --- target/i386/hvf/x86.h | 13 +++-- target/i386/hvf/x86_emu.c | 18 +- 2 files changed, 16 insertions(+), 15

[PATCH 05/13] i386: hvf: Use ins_len to advance IP

2020-05-28 Thread Roman Bolshakov
There's no need to read VMCS twice, instruction length is already available in ins_len. Signed-off-by: Roman Bolshakov --- target/i386/hvf/hvf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 9ccdb7e7c7..8ff1d25521 100644

[PATCH 04/13] i386: hvf: Drop unused variable

2020-05-28 Thread Roman Bolshakov
Signed-off-by: Roman Bolshakov --- target/i386/hvf/x86.h | 1 - 1 file changed, 1 deletion(-) diff --git a/target/i386/hvf/x86.h b/target/i386/hvf/x86.h index c95d5b2116..56fcde13c6 100644 --- a/target/i386/hvf/x86.h +++ b/target/i386/hvf/x86.h @@ -293,7 +293,6 @@ typedef struct lazy_flags {

[PATCH 07/13] i386: hvf: Drop fetch_rip from HVFX86EmulatorState

2020-05-28 Thread Roman Bolshakov
The field is used to print address of instructions that have no parser in decode_invalid(). RIP from VMCS is saved into fetch_rip before decoding starts but it's also saved into env->eip in load_regs(). Therefore env->eip can be used instead of fetch_rip. While at it, correct address printed in

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

2020-05-28 Thread Roman Bolshakov
Hi, This is a cleanup series for HVF accel. HVF is using two emulator states CPUX86State and HVFX86EmulatorState simultaneously. HVFX86EmulatorState is used for instruction emulation. CPUX86State is used in all other places. Sometimes the states are in sync, sometimes they're not. It complicates

  1   2   3   4   >