42a945317b
- kvm-virtio-iommu-Fix-64kB-host-page-size-VFIO-device-ass.patch [bz#2211609 bz#2211634] - kvm-virtio-iommu-Rework-the-traces-in-virtio_iommu_set_p.patch [bz#2211609 bz#2211634] - kvm-vfio-pci-add-support-for-VF-token.patch [bz#2192818] - kvm-vfio-migration-Skip-log_sync-during-migration-SETUP-.patch [bz#2192818] - kvm-vfio-pci-Static-Resizable-BAR-capability.patch [bz#2192818] - kvm-vfio-pci-Fix-a-use-after-free-issue.patch [bz#2192818] - kvm-util-vfio-helpers-Use-g_file_read_link.patch [bz#2192818] - kvm-migration-Make-all-functions-check-have-the-same-for.patch [bz#2192818] - kvm-migration-Move-migration_properties-to-options.c.patch [bz#2192818] - kvm-migration-Add-switchover-ack-capability.patch [bz#2192818] - kvm-migration-Implement-switchover-ack-logic.patch [bz#2192818] - kvm-migration-Enable-switchover-ack-capability.patch [bz#2192818] - kvm-vfio-migration-Refactor-vfio_save_block-to-return-sa.patch [bz#2192818] - kvm-vfio-migration-Store-VFIO-migration-flags-in-VFIOMig.patch [bz#2192818] - kvm-vfio-migration-Add-VFIO-migration-pre-copy-support.patch [bz#2192818] - kvm-vfio-migration-Add-support-for-switchover-ack-capabi.patch [bz#2192818] - kvm-vfio-Implement-a-common-device-info-helper.patch [bz#2192818] - kvm-hw-vfio-pci-quirks-Support-alternate-offset-for-GPUD.patch [bz#2192818] - kvm-vfio-pci-Call-vfio_prepare_kvm_msi_virq_batch-in-MSI.patch [bz#2192818] - kvm-vfio-migration-Reset-bytes_transferred-properly.patch [bz#2192818] - kvm-vfio-migration-Make-VFIO-migration-non-experimental.patch [bz#2192818] - kvm-vfio-pci-Fix-a-segfault-in-vfio_realize.patch [bz#2192818] - kvm-vfio-pci-Free-leaked-timer-in-vfio_realize-error-pat.patch [bz#2192818] - kvm-hw-vfio-pci-quirks-Sanitize-capability-pointer.patch [bz#2192818] - kvm-vfio-pci-Disable-INTx-in-vfio_realize-error-path.patch [bz#2192818] - kvm-vfio-migration-Change-vIOMMU-blocker-from-global-to-.patch [bz#2192818] - kvm-vfio-migration-Free-resources-when-vfio_migration_re.patch [bz#2192818] - kvm-vfio-migration-Remove-print-of-Migration-disabled.patch [bz#2192818] - kvm-vfio-migration-Return-bool-type-for-vfio_migration_r.patch [bz#2192818] - kvm-vfio-Fix-null-pointer-dereference-bug-in-vfio_bars_f.patch [bz#2192818] - kvm-pc-bios-s390-ccw-Makefile-Use-z-noexecstack-to-silen.patch [bz#2220866] - kvm-pc-bios-s390-ccw-Fix-indentation-in-start.S.patch [bz#2220866] - kvm-pc-bios-s390-ccw-Provide-space-for-initial-stack-fra.patch [bz#2220866] - kvm-pc-bios-s390-ccw-Don-t-use-__bss_start-with-the-larl.patch [bz#2220866] - kvm-ui-Fix-pixel-colour-channel-order-for-PNG-screenshot.patch [bz#2222579] - kvm-block-blkio-fix-module_block.py-parsing.patch [bz#2213317] - kvm-Fix-virtio-blk-vhost-vdpa-typo-in-spec-file.patch [bz#2213317] - Resolves: bz#2211609 (With virtio-iommu and vfio-pci, qemu reports "warning: virtio-iommu page mask 0xfffffffffffff000 does not match 0x40201000") - Resolves: bz#2211634 ([aarch64] With virtio-iommu and vfio-pci, qemu coredump when host using kernel-64k package) - Resolves: bz#2192818 ([VFIO LM] Live migration) - Resolves: bz#2220866 (Misaligned symbol for s390-ccw image during qemu-kvm build) - Resolves: bz#2222579 (PNG screendump doesn't save screen correctly) - Resolves: bz#2213317 (Enable libblkio-based block drivers in QEMU)
84 lines
3.4 KiB
Diff
84 lines
3.4 KiB
Diff
From 643d93343759a350fe0f6327d308bf6a93c79d25 Mon Sep 17 00:00:00 2001
|
|
From: Eric Auger <eric.auger@redhat.com>
|
|
Date: Wed, 5 Jul 2023 18:51:18 +0200
|
|
Subject: [PATCH 02/37] virtio-iommu: Rework the traces in
|
|
virtio_iommu_set_page_size_mask()
|
|
|
|
RH-Author: Eric Auger <eric.auger@redhat.com>
|
|
RH-MergeRequest: 182: VIRTIO-IOMMU/VFIO page size related fixes
|
|
RH-Bugzilla: 2211609 2211634
|
|
RH-Acked-by: Gavin Shan <gshan@redhat.com>
|
|
RH-Acked-by: Sebastian Ott <None>
|
|
RH-Commit: [2/2] 0af7078dde158f07c83e2b293adc5d9d475688ae (eauger1/centos-qemu-kvm)
|
|
|
|
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2211609
|
|
|
|
The current error messages in virtio_iommu_set_page_size_mask()
|
|
sound quite similar for different situations and miss the IOMMU
|
|
memory region that causes the issue.
|
|
|
|
Clarify them and rework the comment.
|
|
|
|
Also remove the trace when the new page_size_mask is not applied as
|
|
the current frozen granule is kept. This message is rather confusing
|
|
for the end user and anyway the current granule would have been used
|
|
by the driver.
|
|
|
|
Signed-off-by: Eric Auger <eric.auger@redhat.com>
|
|
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
|
|
Message-Id: <20230705165118.28194-3-eric.auger@redhat.com>
|
|
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
|
|
Tested-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
|
|
(cherry picked from commit 587a7641d53055054d68d67d94c9408ef808f127)
|
|
Signed-off-by: Eric Auger <eric.auger@redhat.com>
|
|
---
|
|
hw/virtio/virtio-iommu.c | 19 +++++++------------
|
|
1 file changed, 7 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c
|
|
index 542679b321..421e2a944f 100644
|
|
--- a/hw/virtio/virtio-iommu.c
|
|
+++ b/hw/virtio/virtio-iommu.c
|
|
@@ -1101,29 +1101,24 @@ static int virtio_iommu_set_page_size_mask(IOMMUMemoryRegion *mr,
|
|
new_mask);
|
|
|
|
if ((cur_mask & new_mask) == 0) {
|
|
- error_setg(errp, "virtio-iommu page mask 0x%"PRIx64
|
|
- " is incompatible with mask 0x%"PRIx64, cur_mask, new_mask);
|
|
+ error_setg(errp, "virtio-iommu %s reports a page size mask 0x%"PRIx64
|
|
+ " incompatible with currently supported mask 0x%"PRIx64,
|
|
+ mr->parent_obj.name, new_mask, cur_mask);
|
|
return -1;
|
|
}
|
|
|
|
/*
|
|
* Once the granule is frozen we can't change the mask anymore. If by
|
|
* chance the hotplugged device supports the same granule, we can still
|
|
- * accept it. Having a different masks is possible but the guest will use
|
|
- * sub-optimal block sizes, so warn about it.
|
|
+ * accept it.
|
|
*/
|
|
if (s->granule_frozen) {
|
|
- int new_granule = ctz64(new_mask);
|
|
int cur_granule = ctz64(cur_mask);
|
|
|
|
- if (new_granule != cur_granule) {
|
|
- error_setg(errp, "virtio-iommu page mask 0x%"PRIx64
|
|
- " is incompatible with mask 0x%"PRIx64, cur_mask,
|
|
- new_mask);
|
|
+ if (!(BIT(cur_granule) & new_mask)) {
|
|
+ error_setg(errp, "virtio-iommu %s does not support frozen granule 0x%llx",
|
|
+ mr->parent_obj.name, BIT_ULL(cur_granule));
|
|
return -1;
|
|
- } else if (new_mask != cur_mask) {
|
|
- warn_report("virtio-iommu page mask 0x%"PRIx64
|
|
- " does not match 0x%"PRIx64, cur_mask, new_mask);
|
|
}
|
|
return 0;
|
|
}
|
|
--
|
|
2.39.3
|
|
|