[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 76/81] intel-iommu: don't warn guest errors when getting rid2pa
|
From: |
Michael S. Tsirkin |
|
Subject: |
[PULL v3 76/81] intel-iommu: don't warn guest errors when getting rid2pasid entry |
|
Date: |
Sat, 5 Nov 2022 13:19:07 -0400 |
From: Jason Wang <jasowang@redhat.com>
We use to warn on wrong rid2pasid entry. But this error could be
triggered by the guest and could happens during initialization. So
let's don't warn in this case.
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20221028061436.30093-2-jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
---
hw/i386/intel_iommu.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index 6524c2ee32..271de995be 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -1554,8 +1554,10 @@ static bool vtd_dev_pt_enabled(IntelIOMMUState *s,
VTDContextEntry *ce)
if (s->root_scalable) {
ret = vtd_ce_get_rid2pasid_entry(s, ce, &pe);
if (ret) {
- error_report_once("%s: vtd_ce_get_rid2pasid_entry error: %"PRId32,
- __func__, ret);
+ /*
+ * This error is guest triggerable. We should assumt PT
+ * not enabled for safety.
+ */
return false;
}
return (VTD_PE_GET_TYPE(&pe) == VTD_SM_PASID_ENTRY_PT);
@@ -1569,14 +1571,12 @@ static bool vtd_as_pt_enabled(VTDAddressSpace *as)
{
IntelIOMMUState *s;
VTDContextEntry ce;
- int ret;
assert(as);
s = as->iommu_state;
- ret = vtd_dev_to_context_entry(s, pci_bus_num(as->bus),
- as->devfn, &ce);
- if (ret) {
+ if (vtd_dev_to_context_entry(s, pci_bus_num(as->bus), as->devfn,
+ &ce)) {
/*
* Possibly failed to parse the context entry for some reason
* (e.g., during init, or any guest configuration errors on
--
MST
- [PULL v3 35/81] virtio: core: vq reset feature negotation support, (continued)
- [PULL v3 35/81] virtio: core: vq reset feature negotation support, Michael S. Tsirkin, 2022/11/05
- [PULL v3 37/81] virtio-pci: support queue enable, Michael S. Tsirkin, 2022/11/05
- [PULL v3 40/81] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_reset(), Michael S. Tsirkin, 2022/11/05
- [PULL v3 46/81] virtio-net: enable vq reset feature, Michael S. Tsirkin, 2022/11/05
- [PULL v3 45/81] vhost: vhost-kernel: enable vq reset feature, Michael S. Tsirkin, 2022/11/05
- [PULL v3 54/81] acpi: add get_dev_aml_func() helper, Michael S. Tsirkin, 2022/11/05
- [PULL v3 52/81] tests: acpi: update expected DSDT after ISA bridge is moved directly under PCI host bridge, Michael S. Tsirkin, 2022/11/05
- [PULL v3 63/81] hw/i386/pc.c: CXL Fixed Memory Window should not reserve e820 in bios, Michael S. Tsirkin, 2022/11/05
- [PULL v3 66/81] hw/i386/acpi-build: Resolve north rather than south bridges, Michael S. Tsirkin, 2022/11/05
- [PULL v3 70/81] tests: acpi: q35: update expected blobs *.hmat-noinitiators expected HMAT:, Michael S. Tsirkin, 2022/11/05
- [PULL v3 76/81] intel-iommu: don't warn guest errors when getting rid2pasid entry,
Michael S. Tsirkin <=
- [PULL v3 80/81] vhost: Change the sequence of device start, Michael S. Tsirkin, 2022/11/05
- [PULL v3 41/81] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_restart(), Michael S. Tsirkin, 2022/11/05
- [PULL v3 50/81] tests: acpi: whitelist DSDT before generating PCI-ISA bridge AML automatically, Michael S. Tsirkin, 2022/11/05
- [PULL v3 42/81] virtio-net: introduce flush_or_purge_queued_packets(), Michael S. Tsirkin, 2022/11/05
- [PULL v3 56/81] tests: acpi: update expected blobs, Michael S. Tsirkin, 2022/11/05
- [PULL v3 57/81] tests: acpi: pc/q35 whitelist DSDT before \_GPE cleanup, Michael S. Tsirkin, 2022/11/05
- [PULL v3 28/81] hw/cxl/cdat: CXL CDAT Data Object Exchange implementation, Michael S. Tsirkin, 2022/11/05