On 27/10/2020 06.05, Eric Blake wrote:
> Anywhere we create a list of just one item or by prepending items
> (typically because order doesn't matter), we can use the now-public
> macro. But places where we must keep the list in order by appending
> remain open-coded.
>
> Signed-off-by: Eric Blake
When checking for allocation across a chain, it's already easy to
count the depth within the chain at which the allocation is found.
Instead of throwing that information away, return it to the caller.
Existing callers only cared about allocated/non-allocated, but having
a depth available will be us
'qemu-img map' provides a way to determine which extents of an image
come from the top layer vs. inherited from a backing chain. This is
useful information worth exposing over NBD. There is a proposal to
add a QMP command block-dirty-bitmap-populate which can create a dirty
bitmap that reflects a
With this, 'qemu-nbd -B b0 -B b1 -f qcow2 img.qcow2' can let you sniff
out multiple bitmaps from one server. qemu-img as client can still
only read one bitmap per client connection, but other NBD clients
(hello libnbd) can now read multiple bitmaps in a single pass.
Signed-off-by: Eric Blake
Rev
Anywhere we create a list of just one item or by prepending items
(typically because order doesn't matter), we can use the now-public
macro. But places where we must keep the list in order by appending
remain open-coded.
Signed-off-by: Eric Blake
---
docs/devel/writing-qmp-commands.txt | 13 +++
There is no need to rely on the verbosity of the gcc/clang compiler
extension of g_new(typeof(X), 1) when we can instead use the standard
g_malloc(sizeof(X)). In general, we like g_new over g_malloc for
returning type X rather than void* to let the compiler catch more
potential typing mistakes, bu
Each dirty bitmap already knows its name; by reducing the scope of the
places where we construct "qemu:dirty-bitmap:NAME" strings, tracking
the name is more localized, and there are fewer per-export fields to
worry about. This in turn will make it easier for an upcoming patch
to export more than o
Allow the server to expose an additional metacontext to be requested
by savvy clients. qemu-nbd adds a new option -A to expose the
qemu:allocation-depth metacontext through NBD_CMD_BLOCK_STATUS; this
can also be set via QMP when using block-export-add.
qemu as client is hacked into viewing the ke
We have a useful macro for inserting at the front of any
QAPI-generated list; move it from block.c to qapi/util.h so more
places can use it, including one earlier place in block.c.
There are many more places in the codebase that can benefit from using
the macro, but converting them will be left to
Rather than open-code the count of negotiated contexts at several
sites, embed it directly into the struct. This will make it easier
for upcoming commits to support even more simultaneous contexts.
Signed-off-by: Eric Blake
---
nbd/server.c | 26 +++---
1 file changed, 15 in
Rather than open-coding the translation from the deprecated
NbdServerAddOptions type to the preferred BlockExportOptionsNbd, it's
better to utilize QAPI_CLONE_MEMBERS. This solves a couple of issues:
first, if we do any more refactoring of the base type (which an
upcoming patch plans to do), we do
Since 'block-export-add' is new to 5.2, we can still tweak the
interface; there, allowing 'bitmaps':['str'] is nicer than
'bitmap':'str'. This wires up the qapi and qemu-nbd changes to permit
passing multiple bitmaps as distinct metadata contexts that the NBD
client may request, but the actual sup
v5 was here:
https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg07124.html
Also available at:
https://repo.or.cz/qemu/ericb.git/shortlog/refs/tags/nbd-alloc-depth-v6
Since v5:
- rebase to master (mostly affects 8/11) [Vladimir]
- drop v5 1/12, and replace with new v6 1/11 [Markus]
- rearran
>
> are available in the Git repository at:
>
> https://gitlab.com/philmd/qemu.git tags/sd-next-20201026
>
> for you to fetch changes up to 89c6700fe7eed9195f10055751edbc6d5e7ab940:
>
> hw/sd/sdcard: Zero out function selection fields befo
Hi Philippe,
On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote:
> Pass qemu_vfio_do_mapping() an Error* argument so it can propagate
> any error to callers. Replace error_report() which only report
> to the monitor by the more generic error_setg_errno().
>
> Reviewed-by: Fam Zheng
> Reviewed-by
Hi Philippe,
On 10/26/20 11:55 AM, Philippe Mathieu-Daudé wrote:
> In preparation of using multiple IRQs, switch to using the recently
> introduced MSIX API. Instead of allocating and assigning IRQ in
> a single step, we now have to use two distinct calls.
>
> Reviewed-by: Stefan Hajnoczi
> Sign
Hi Philippe,
On 10/26/20 11:55 AM, Philippe Mathieu-Daudé wrote:
> Introduce qemu_vfio_pci_msix_set_irq() to set the event
> notifier of a specific MSIX IRQ. All other registered IRQs
> are left unmodified.
>
> Reviewed-by: Stefan Hajnoczi
> Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Er
Hi Philippe,
On 10/26/20 11:55 AM, Philippe Mathieu-Daudé wrote:
> qemu_vfio_pci_init_irq() allows us to initialize any type of IRQ,
> but only one. Introduce qemu_vfio_pci_msix_init_irqs() which is
> specific to MSIX IRQ type, and allow us to use multiple IRQs
> (thus passing multiple eventfd not
Hi Philippe,
On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote:
> Currently qemu_vfio_dma_map() displays errors on stderr.
> When using management interface, this information is simply
> lost. Pass qemu_vfio_dma_map() an Error* argument so it can
Error** or simply error handle
> propagate the err
Le 24/10/2020 à 07:34, Thomas Huth a écrit :
> On 19/10/2020 18.36, Maxim Levitsky wrote:
>> Signed-off-by: Maxim Levitsky
>> ---
>> include/hw/qdev-core.h | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
>> index 8689
Hi Philippe,
On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote:
> For debug purpose, trace BAR regions info.
>
> Reviewed-by: Fam Zheng
> Reviewed-by: Stefan Hajnoczi
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> util/vfio-helpers.c | 8
> util/trace-events | 1 +
> 2 files chan
Hi Philippe,
On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote:
> We sometime get kernel panic with some devices on Aarch64
> hosts. Alex Williamson suggests it might be broken PCIe
> root complex. Add trace event to record the latest I/O
> access before crashing. In case, assert our accesses are
Hi,
On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote:
> Controllers have different capabilities and report them in the
> CAP register. We are particularly interested by the page size
> limits.
>
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> block/nvme.c | 10 ++
> block/trace-
Hi Philippe,
On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote:
> Introduce device/iommu 'page_size_min' variables to make
> the code clearer.
I am unclear how much the device and the iommu page size must equal. For
instance, in [RFC 0/5] NVMe passthrough: Support 64kB page host, I have
a 64kB h
Hi Philippe,
On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote:
> While trying to simplify the code using a macro, we forgot
> the 12-bit shift... Correct that.
>
> Fixes: fad1eb68862 ("block/nvme: Use register definitions from
> 'block/nvme.h'")
> Reported-by: Eric Auger
> Reviewed-by: Stefan
Hi,
On 10/26/20 11:54 AM, Philippe Mathieu-Daudé wrote:
> When introducing this driver in commit bdd6a90a9e5
> ("block: Add VFIO based NVMe driver") we correctly
> set the request_alignment in nvme_refresh_limits()
> but forgot to set it at initialization. Do it now.
>
> Reported-by: Stefan Hajno
Add argument to allow additional block-job options.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Max Reitz
---
scripts/simplebench/bench-example.py | 2 +-
scripts/simplebench/bench_block_job.py | 11 +++
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/scri
Add script to benchmark new backup architecture.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
scripts/simplebench/bench-backup.py | 165
1 file changed, 165 insertions(+)
create mode 100755 scripts/simplebench/bench-backup.py
diff --git a/scripts/simplebench/ben
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Max Reitz
---
include/block/block-copy.h | 2 +-
block/backup-top.c | 2 +-
block/block-copy.c | 10 ++
3 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/include/block/block-copy.h b/include/block/bl
We are going to stop use of this callback in the following commit.
Still the callback handling code will be dropped in a separate commit.
So, for now let's make it optional.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/block-copy.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-
The further change of moving backup to be a one block-copy call will
make copying chunk-size and cluster-size two separate things. So, even
with 64k cluster sized qcow2 image, default chunk would be 1M.
185 test however assumes, that with speed limited to 64K, one iteration
would result in offset=6
Iotest 257 dumps a lot of in-progress information of backup job, such
as offset and bitmap dirtiness. Further commit will move backup to be
one block-copy call, which will introduce async parallel requests
instead of plain cluster-by-cluster copying. To keep things
deterministic, allow only one wor
We are going to directly use one async block-copy operation for backup
job, so we need rate limiter.
We want to maintain current backup behavior: only background copying is
limited and copy-before-write operations only participate in limit
calculation. Therefore we need one rate limiter for block-
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
scripts/simplebench/bench_block_job.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/simplebench/bench_block_job.py
b/scripts/simplebench/bench_block_job.py
index 9808d696cf..a0dda1dc4e 100755
--- a/scripts/simplebench
Add new parameters to configure future backup features. The patch
doesn't introduce aio backup requests (so we actually have only one
worker) neither requests larger than one cluster. Still, formally we
satisfy these maximums anyway, so add the parameters now, to facilitate
further patch which will
Drop unused code.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
include/block/block-copy.h | 6 --
block/block-copy.c | 15 ---
2 files changed, 21 deletions(-)
diff --git a/include/block/block-copy.h b/include/block/block-copy.h
index 8f5013d0aa..7b77abf70b 100644
--
After introducing parallel async copy requests instead of plain
cluster-by-cluster copying loop, we'll have to wait for paused status,
as we need to wait for several parallel request. So, let's gently wait
instead of just asserting that job already paused.
Signed-off-by: Vladimir Sementsov-Ogievsk
The further change of moving backup to be a one block-copy call will
make copying chunk-size and cluster-size two separate things. So, even
with 64k cluster sized qcow2 image, default chunk would be 1M.
Test 219 depends on specified chunk-size. Update it for explicit
chunk-size for backup as for mi
If main job coroutine called job_yield (while some background process
is in progress), we should give it a chance to call job_pause_point().
It will be used in backup, when moved on async block-copy.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Max Reitz
---
job.c | 1 +
1 file chan
Add function to cancel running async block-copy call. It will be used
in backup.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
include/block/block-copy.h | 13 +
block/block-copy.c | 24 +++-
2 files changed, 32 insertions(+), 5 deletions(-)
diff --git
Experiments show, that copy_range is not always making things faster.
So, to make experimentation simpler, let's add a parameter. Some more
perf parameters will be added soon, so here is a new struct.
For now, add new backup qmp parameter with x- prefix for the following
reasons:
- We are going
Busy is racy, job has it's "pause-points" when it's not busy. Drop this
check.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Max Reitz
---
tests/qemu-iotests/129 | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/qemu-iotests/129 b/tests/qemu-iotests/129
index 0e13244d85..3c22f
We are going to use async block-copy call in backup, so we'll need to
passthrough setting backup speed to block-copy call.
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Max Reitz
---
include/block/blockjob_int.h | 2 ++
blockjob.c | 6 ++
2 files changed, 8 inse
Refactor common path to use BlockCopyCallState pointer as parameter, to
prepare it for use in asynchronous block-copy (at least, we'll need to
run block-copy in a coroutine, passing the whole parameters as one
pointer).
Signed-off-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Max Reitz
---
bloc
We'll need async block-copy invocation to use in backup directly.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
include/block/block-copy.h | 26
block/block-copy.c | 81 --
2 files changed, 103 insertions(+), 4 deletions(-)
diff --git a
It simplifies debugging.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/block-copy.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/block/block-copy.c b/block/block-copy.c
index 35213bd832..6bf1735b93 100644
--- a/block/block-copy.c
+++ b/block/block-copy.
Further commit will add a benchmark
(scripts/simplebench/bench-backup.py), which will show that backup
works better with async parallel requests (previous commit) and
disabled copy_range. So, let's disable copy_range by default.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
qapi/block-core.jso
This brings async request handling and block-status driven chunk sizes
to backup out of the box, which improves backup performance.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/backup.c | 187 -
1 file changed, 121 insertions(+), 66 deleti
After introducing parallel async copy requests instead of plain
cluster-by-cluster copying loop, backup job may finish earlier than
final assertion in do_test_stop. Let's require slow backup explicitly
by specifying speed parameter.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iote
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/backup.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index 8c67d77504..449b763ce4 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -236,7 +236,7 @@ static void backup_init
Hi all!
The series turn backup into series of block_copy_async calls, covering
the whole disk, so we get block-status based paralallel async requests
out of the box, which gives performance gain:
All results are in seconds
- --- - --
-
They will be used for backup.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
include/block/block-copy.h | 6 ++
block/block-copy.c | 11 +--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/include/block/block-copy.h b/include/block/block-copy.h
index 3566827
On 12/10/20 14:49, Philippe Mathieu-Daudé wrote:
> In order to use inclusive terminology, rename SSI 'slave' as
> 'peripheral', following the specification resolution:
> https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names/
>
> Patch created mechanically using:
>
> $ sed -i s/SSISlav
On 26/10/20 18:05, Philippe Mathieu-Daudé wrote:
> ping^2?
>
> On 10/19/20 6:04 PM, Philippe Mathieu-Daudé wrote:
>> Ping for review?
>>
>> On 10/12/20 2:49 PM, Philippe Mathieu-Daudé wrote:
>>> Since v1:
>>> - Fixed patch #1 subject (Kevin)
>>>
>>> In order to use inclusive terminology, rename SS
ping^2?
On 10/19/20 6:04 PM, Philippe Mathieu-Daudé wrote:
Ping for review?
On 10/12/20 2:49 PM, Philippe Mathieu-Daudé wrote:
Since v1:
- Fixed patch #1 subject (Kevin)
In order to use inclusive terminology, rename SSI 'slave' as
'peripheral', following the resolution Paolo pointed in [*]:
h
If a BlockDriverState supports backing files but has none then any
unallocated area reads back as zeroes.
bdrv_co_block_status() is only reporting this is if want_zero is true,
but this is an inexpensive test and there is no reason not to do it in
all cases.
Suggested-by: Vladimir Sementsov-Ogiev
I had to rebase the series due to conflicting changes on master. There
are no other differences.
Berto
v5:
- Fix rebase conflicts after 3555a43261
v4: https://lists.gnu.org/archive/html/qemu-block/2020-09/msg01515.html
- Fix rebase conflicts after cb8503159a
v3: https://lists.gnu.org/archive/ht
Since commit c8bb23cbdbe32f5c326365e0a82e1b0e68cdcd8a when a write
request results in a new allocation QEMU first tries to see if the
rest of the cluster outside the written area contains only zeroes.
In that case, instead of doing a normal copy-on-write operation and
writing explicit zero buffers
On Thu, Oct 22, 2020 at 09:02:54PM +0800, Jiahui Cen wrote:
> A VM in the cloud environment may use a virutal disk as the backend storage,
> and there are usually filesystems on the virtual block device. When backend
> storage is temporarily down, any I/O issued to the virtual block device will
> c
Hi Philippe,
On 10/26/20 11:55 AM, Philippe Mathieu-Daudé wrote:
> This driver uses the host page size to align its memory regions,
> but this size is not always compatible with the IOMMU. Add a
> check if the size matches, and bails out providing a hint what
> is the minimum page size the driver
On Mon, Oct 26, 2020 at 07:01:01AM +0100, Klaus Jensen wrote:
> From: Klaus Jensen
>
> Add support for the Dataset Management command and the Deallocate
> attribute. Deallocation results in discards being sent to the underlying
> block device. Whether of not the blocks are actually deallocated is
On Mon, Oct 26, 2020 at 07:01:00AM +0100, Klaus Jensen wrote:
> From: Klaus Jensen
>
> This adds the NPWG, NPWA, NPDG, NPDA and NOWS family of fields to the
> shared nvme.h header for use by later patches.
>
> Signed-off-by: Klaus Jensen
> Cc: Stefan Hajnoczi
> Cc: Fam Zheng
> ---
> include/
23.07.2020 12:47, Max Reitz wrote:
+static void coroutine_fn backup_set_speed(BlockJob *job, int64_t speed)
+{
+BackupBlockJob *s = container_of(job, BackupBlockJob, common);
+
+if (s->bcs) {
+/* In block_job_create we yet don't have bcs */
Shouldn’t hurt to make it conditional,
Eric Blake writes:
> On 10/23/20 1:36 PM, Eric Blake wrote:
>> v4 was here:
>> https://lists.gnu.org/archive/html/qemu-devel/2020-10/msg02708.html
>>
>> Since then:
>> - rebase to master
>> - patches 1, 2, and 12 are new based on Vladimir's observation of
>> QAPI_LIST_ADD
>> - patches 10-11 are
Eric Blake writes:
> Rather than open-coding the translation from the deprecated
> NbdServerAddOptions type to the preferred BlockExportOptionsNbd, it's
> better to utilize QAPI_CLONE_MEMBERS. This solves a couple of issues:
> first, if we do any more refactoring of the base type (which an
> upc
On 10/26/20 9:37 AM, Eric Blake wrote:
>> PATCH 12 has more. I wonder whether PATCH 12 should be squashed into
>> this one. You decide.
>
> Patch 12 has a LOT more. And we're really close to soft freeze. I kept
> them separate to minimize the risk of landing my QAPI changes (4/12)
Correction
On 10/26/20 9:25 AM, Markus Armbruster wrote:
> Eric Blake writes:
>
>> We have a useful macro for inserting at the front of any
>> QAPI-generated list; move it from block.c to qapi/util.h so more
>> places can use it, including one earlier place in block.c.
>>
>> Suggested-by: Vladimir Sementsov
Eric Blake writes:
> We have a useful macro for inserting at the front of any
> QAPI-generated list; move it from block.c to qapi/util.h so more
> places can use it, including one earlier place in block.c.
>
> Suggested-by: Vladimir Sementsov-Ogievskiy
> Signed-off-by: Eric Blake
> ---
> inclu
On 10/26/20 9:18 AM, Markus Armbruster wrote:
> Eric Blake writes:
>
>> Placing GenericList in util.h will make it easier for the next patch
>> to promote QAPI_LIST_ADD() into a public macro without requiring more
>> files to include the unrelated visitor.h.
>
> Is this true?
>
> You don't actu
Eric Blake writes:
> Placing GenericList in util.h will make it easier for the next patch
> to promote QAPI_LIST_ADD() into a public macro without requiring more
> files to include the unrelated visitor.h.
Is this true?
You don't actually need GenericList to make use of QAPI_LIST_ADD(), do
you?
Kevin Wolf writes:
> While this makes the code quite a bit longer and arguably isn't very
> elegant, it removes the dependency on QemuOpts from the --chardev option
> of the storage daemon.
>
> Going through qmp_chardev_add() already now ensures that semantics and
> accessible features won't chan
On 10/26/20 5:50 AM, Peter Krempa wrote:
> On Fri, Oct 23, 2020 at 13:36:46 -0500, Eric Blake wrote:
>> Since 'nbd-server-add' is deprecated, and 'block-export-add' is new to
>> 5.2, we can still tweak the interface. Allowing 'bitmaps':['str'] is
>> nicer than 'bitmap':'str'. This wires up the qa
On 10/24/20 4:59 AM, Vladimir Sementsov-Ogievskiy wrote:
> 23.10.2020 21:36, Eric Blake wrote:
>> Preserve the tri-state encoding in the low bits, as that still remains
>> a valuable way to utilize qemu-img map with x-dirty-bitmap for
>> accessing quick information without needing a third-party NBD
24.10.2020 12:49, Vladimir Sementsov-Ogievskiy wrote:
23.10.2020 21:36, Eric Blake wrote:
When checking for allocation across a chain, it's already easy to
count the depth within the chain at which the allocation is found.
Instead of throwing that information away, return it to the caller.
Exist
From: Stefan Reiter
sectors_per_chunk is a 64 bit integer, but the calculation is done in 32
bits, leading to an overflow for coarse bitmap granularities.
If that results in the value 0, it leads to a hang where no progress is
made but send_bitmap_bits is constantly called with nr_sectors being
From: Chen Qun
A default value is provided for the variable 'bitmap_name' to avoid
a compiler warning.
The compiler showed the warning:
migration/block-dirty-bitmap.c:1090:13: warning: ‘bitmap_name’
may be used uninitialized in this function [-Wmaybe-uninitialized]
g_strlcpy(s->bitmap_nam
On Fri, 23 Oct 2020 at 16:21, Stefan Hajnoczi wrote:
>
> The following changes since commit 4c5b97bfd0dd54dc27717ae8d1cd10e14eef1430:
>
> Merge remote-tracking branch
> 'remotes/kraxel/tags/modules-20201022-pull-request' into staging (2020-10-22
> 12:33:21 +0100)
>
> are available in the Git r
On Sun, Oct 25, 2020 at 5:55 PM Nir Soffer wrote:
>
> We have tests for vdsm qemuimg wrapper module converting
> images and verifying the operation using "qemu-img compare".
>
> I found that tests using "qemu-img compare -s" started to fail
> recently on RHEL 8.3.0 nightly
> (qemu-img-5.1.0-10.mod
cmd_valid_while_locked() only needs to read SDRequest->cmd,
pass it directly and make it const.
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Alistair Francis
Message-Id: <20200630133912.9428-13-f4...@amsat.org>
---
hw/sd/sd.c | 11 +--
1 file changed, 5
I/O request length can not be negative.
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Alistair Francis
Message-Id: <20200630133912.9428-15-f4...@amsat.org>
---
hw/sd/sd.c | 2 +-
hw/sd/trace-events | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
Am 25.10.2020 um 10:16 hat Markus Armbruster geschrieben:
> I apologize for writing so much. It's the only way I know to figure out
> how things work.
>
> This may feel like I'm trying to shoot down your patch. I'm not! I'm
> merely trying to understand and maybe improve it. I'd love to get ri
From: Bin Meng
The function selection fields (399:376) should be zeroed out to
prevent leftover from being or'ed into the switch function status
data structure.
This fixes the boot failure as seen in the acceptance testing on
the orangepi target.
Fixes: b638627c723a ("hw/sd: Fix incorrect popul
gs/sd-next-20201026
for you to fetch changes up to 89c6700fe7eed9195f10055751edbc6d5e7ab940:
hw/sd/sdcard: Zero out function selection fields before being populated (20=
20-10-26 09:23:47 +0100)
SD/MMC patches
- Fix a b
CRC functions don't modify the buffer argument,
make it const.
Reviewed-by: Alistair Francis
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
Message-Id: <20200630133912.9428-14-f4...@amsat.org>
---
hw/sd/sd.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff
Our only user, the NVMe block driver, switched to the MSIX API.
As this function is now unused, remove it.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Philippe Mathieu-Daudé
---
include/qemu/vfio-helpers.h | 2 --
util/vfio-helpers.c | 43 -
2 files
Add more descriptive comments to keep a clear separation
between static property vs runtime changeable.
Suggested-by: Peter Maydell
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Alistair Francis
Message-Id: <20200630133912.9428-12-f4...@amsat.org>
---
hw/sd/sd.
The block driver asks for a minimum page size, but it might not
match the minimum IOMMU requirement.
In the next commit qemu_vfio_init_pci() will be able to report
the minimum IOMMU page size back to the block driver.
In preparation, pass the minimum page size as argument to
qemu_vfio_open_pci().
Instead of displaying the error on stderr, use error_report()
which also report to the monitor.
Reviewed-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Philippe Mathieu-Daudé
---
util/vfio-helpers.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/vfio-he
In preparation of using multiple IRQs, switch to using the recently
introduced MSIX API. Instead of allocating and assigning IRQ in
a single step, we now have to use two distinct calls.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 14 --
1 fi
qemu_vfio_pci_init_irq() allows us to initialize any type of IRQ,
but only one. Introduce qemu_vfio_pci_msix_init_irqs() which is
specific to MSIX IRQ type, and allow us to use multiple IRQs
(thus passing multiple eventfd notifiers).
All eventfd notifiers are initialized with the special '-1' value
Introduce qemu_vfio_pci_msix_set_irq() to set the event
notifier of a specific MSIX IRQ. All other registered IRQs
are left unmodified.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Philippe Mathieu-Daudé
---
include/qemu/vfio-helpers.h | 2 ++
util/vfio-helpers.c | 35 ++
The QEMU_VFIO_DEBUG definition is only modifiable at build-time.
Trace events can be enabled at run-time. As we prefer the latter,
convert qemu_vfio_dump_mappings() to use trace events instead
of fprintf().
Reviewed-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Philippe Mathieu-Daudé
Currently qemu_vfio_dma_map() displays errors on stderr.
When using management interface, this information is simply
lost. Pass qemu_vfio_dma_map() an Error* argument so it can
propagate the error to callers.
Reviewed-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Philippe Mathieu-Dau
This driver uses the host page size to align its memory regions,
but this size is not always compatible with the IOMMU. Add a
check if the size matches, and bails out providing a hint what
is the minimum page size the driver should use.
Suggested-by: Alex Williamson
Reviewed-by: Stefan Hajnoczi
For debug purpose, trace BAR regions info.
Reviewed-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Philippe Mathieu-Daudé
---
util/vfio-helpers.c | 8
util/trace-events | 1 +
2 files changed, 9 insertions(+)
diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c
index 1
Pass qemu_vfio_do_mapping() an Error* argument so it can propagate
any error to callers. Replace error_report() which only report
to the monitor by the more generic error_setg_errno().
Reviewed-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Philippe Mathieu-Daudé
---
util/vfio-helpe
For debugging purpose, trace where DMA regions are mapped.
Reviewed-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Philippe Mathieu-Daudé
---
util/vfio-helpers.c | 3 ++-
util/trace-events | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/util/vfio-helpers.
For debugging purpose, trace where a BAR is mapped.
Reviewed-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Philippe Mathieu-Daudé
---
util/vfio-helpers.c | 2 ++
util/trace-events | 1 +
2 files changed, 3 insertions(+)
diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c
inde
Controllers have different capabilities and report them in the
CAP register. We are particularly interested by the page size
limits.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 10 ++
block/trace-events | 1 +
2 files changed, 11 insertions(+)
diff --git a/block/nvme
We sometime get kernel panic with some devices on Aarch64
hosts. Alex Williamson suggests it might be broken PCIe
root complex. Add trace event to record the latest I/O
access before crashing. In case, assert our accesses are
aligned.
Reviewed-by: Fam Zheng
Reviewed-by: Stefan Hajnoczi
Signed-of
1 - 100 of 113 matches
Mail list logo