mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
iommu/amd: KVM: SVM: Delete now-unused cached/previous GA tag fields
Delete the amd_ir_data.prev_ga_tag field now that all usage is superfluous. Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Tested-by: Sairaj Kodilkar <sarunkod@amd.com> Link: https://lore.kernel.org/r/20250611224604.313496-8-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
parent
0a917e9d4b
commit
1da19c5ce0
|
|
@ -939,9 +939,7 @@ int avic_pi_update_irte(struct kvm_kernel_irqfd *irqfd, struct kvm *kvm,
|
|||
/**
|
||||
* Here, pi is used to:
|
||||
* - Tell IOMMU to use legacy mode for this interrupt.
|
||||
* - Retrieve ga_tag of prior interrupt remapping data.
|
||||
*/
|
||||
pi.prev_ga_tag = 0;
|
||||
pi.is_guest_mode = false;
|
||||
ret = irq_set_vcpu_affinity(host_irq, &pi);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1054,7 +1054,6 @@ struct irq_2_irte {
|
|||
};
|
||||
|
||||
struct amd_ir_data {
|
||||
u32 cached_ga_tag;
|
||||
struct amd_iommu *iommu;
|
||||
struct irq_2_irte irq_2_irte;
|
||||
struct msi_msg msi_entry;
|
||||
|
|
|
|||
|
|
@ -3887,23 +3887,13 @@ static int amd_ir_set_vcpu_affinity(struct irq_data *data, void *vcpu_info)
|
|||
ir_data->cfg = irqd_cfg(data);
|
||||
pi_data->ir_data = ir_data;
|
||||
|
||||
pi_data->prev_ga_tag = ir_data->cached_ga_tag;
|
||||
if (pi_data->is_guest_mode) {
|
||||
ir_data->ga_root_ptr = (pi_data->base >> 12);
|
||||
ir_data->ga_vector = vcpu_pi_info->vector;
|
||||
ir_data->ga_tag = pi_data->ga_tag;
|
||||
ret = amd_iommu_activate_guest_mode(ir_data);
|
||||
if (!ret)
|
||||
ir_data->cached_ga_tag = pi_data->ga_tag;
|
||||
} else {
|
||||
ret = amd_iommu_deactivate_guest_mode(ir_data);
|
||||
|
||||
/*
|
||||
* This communicates the ga_tag back to the caller
|
||||
* so that it can do all the necessary clean up.
|
||||
*/
|
||||
if (!ret)
|
||||
ir_data->cached_ga_tag = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ struct amd_iommu;
|
|||
*/
|
||||
struct amd_iommu_pi_data {
|
||||
u32 ga_tag;
|
||||
u32 prev_ga_tag;
|
||||
u64 base;
|
||||
|
||||
bool is_guest_mode;
|
||||
struct vcpu_data *vcpu_data;
|
||||
void *ir_data;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user