[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v4 71/83] intel-iommu: don't warn guest errors when getting rid2pa
From: |
Michael S. Tsirkin |
Subject: |
[PULL v4 71/83] intel-iommu: don't warn guest errors when getting rid2pasid entry |
Date: |
Mon, 7 Nov 2022 17:53:26 -0500 |
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 v4 61/83] hw/i386/acpi-build: Resolve north rather than south bridges, (continued)
- [PULL v4 61/83] hw/i386/acpi-build: Resolve north rather than south bridges, Michael S. Tsirkin, 2022/11/07
- [PULL v4 63/83] tests: acpi: add and whitelist *.hmat-noinitiator expected blobs, Michael S. Tsirkin, 2022/11/07
- [PULL v4 64/83] tests: acpi: q35: add test for hmat nodes without initiators, Michael S. Tsirkin, 2022/11/07
- [PULL v4 62/83] hmat acpi: Don't require initiator value in -numa, Michael S. Tsirkin, 2022/11/07
- [PULL v4 65/83] tests: acpi: q35: update expected blobs *.hmat-noinitiators expected HMAT:, Michael S. Tsirkin, 2022/11/07
- [PULL v4 66/83] tests: Add HMAT AArch64/virt empty table files, Michael S. Tsirkin, 2022/11/07
- [PULL v4 67/83] hw/arm/virt: Enable HMAT on arm virt machine, Michael S. Tsirkin, 2022/11/07
- [PULL v4 68/83] tests: acpi: aarch64/virt: add a test for hmat nodes with no initiators, Michael S. Tsirkin, 2022/11/07
- [PULL v4 69/83] tests: virt: Update expected *.acpihmatvirt tables, Michael S. Tsirkin, 2022/11/07
- [PULL v4 70/83] vfio: move implement of vfio_get_xlat_addr() to memory.c, Michael S. Tsirkin, 2022/11/07
- [PULL v4 71/83] intel-iommu: don't warn guest errors when getting rid2pasid entry,
Michael S. Tsirkin <=
- [PULL v4 72/83] intel-iommu: drop VTDBus, Michael S. Tsirkin, 2022/11/07
- [PULL v4 73/83] intel-iommu: convert VTD_PE_GET_FPD_ERR() to be a function, Michael S. Tsirkin, 2022/11/07
- [PULL v4 74/83] intel-iommu: PASID support, Michael S. Tsirkin, 2022/11/07
- [PULL v4 75/83] vhost: Change the sequence of device start, Michael S. Tsirkin, 2022/11/07
- [PULL v4 76/83] vhost-user: Support vhost_dev_start, Michael S. Tsirkin, 2022/11/07
- [PULL v4 77/83] hw/smbios: add core_count2 to smbios table type 4, Michael S. Tsirkin, 2022/11/07
- [PULL v4 78/83] bios-tables-test: teach test to use smbios 3.0 tables, Michael S. Tsirkin, 2022/11/07
- [PULL v4 79/83] tests/acpi: allow changes for core_count2 test, Michael S. Tsirkin, 2022/11/07
- [PULL v4 80/83] bios-tables-test: add test for number of cores > 255, Michael S. Tsirkin, 2022/11/07
- [PULL v4 81/83] tests/acpi: update tables for new core count test, Michael S. Tsirkin, 2022/11/07