intel_iommu: move ce fetching out when sync shadow
commit95ecd3df7815b4bc4f9a0f47e1c64d81434715aa
authorPeter Xu <peterx@redhat.com>
Tue, 9 Oct 2018 07:45:42 +0000 (9 15:45 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 5 Nov 2018 18:24:02 +0000 (5 13:24 -0500)
treea5dc6391e34cbc7eb5e9d587c5a95f930bbd9428
parent2cc9ddccebcaa48b3debfc279a83761fcbb7616c
intel_iommu: move ce fetching out when sync shadow

There are two callers for vtd_sync_shadow_page_table_range(): one
provided a valid context entry and one not.  Move that fetching
operation into the caller vtd_sync_shadow_page_table() where we need to
fetch the context entry.

Meanwhile, remove the error_report_once() directly since we're already
tracing all the error cases in the previous call.  Instead, return error
number back to caller.  This will not change anything functional since
callers are dropping it after all.

We do this move majorly because we want to do something more later in
vtd_sync_shadow_page_table().

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/intel_iommu.c