Skip to content

Commit b599840

Browse files
committed
KVM: SEV-ES: rename guest_ins_data to sev_pio_data
We will be using this field for OUTS emulation as well, in case the data that is pushed via OUTS spans more than one page. In that case, there will be a need to save the data pointer across exits to userspace. So, change the name to something that refers to any kind of PIO. Also spell out what it is used for, namely SEV-ES. No functional change intended. Cc: [email protected] Fixes: 7ed9abf ("KVM: SVM: Support string IO operations for an SEV-ES guest") Reviewed-by: Maxim Levitsky <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent c8c340a commit b599840

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

arch/x86/include/asm/kvm_host.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ struct kvm_vcpu_arch {
702702

703703
struct kvm_pio_request pio;
704704
void *pio_data;
705-
void *guest_ins_data;
705+
void *sev_pio_data;
706706

707707
u8 event_exit_inst_len;
708708

arch/x86/kvm/x86.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12370,7 +12370,7 @@ EXPORT_SYMBOL_GPL(kvm_sev_es_mmio_read);
1237012370

1237112371
static int complete_sev_es_emulated_ins(struct kvm_vcpu *vcpu)
1237212372
{
12373-
memcpy(vcpu->arch.guest_ins_data, vcpu->arch.pio_data,
12373+
memcpy(vcpu->arch.sev_pio_data, vcpu->arch.pio_data,
1237412374
vcpu->arch.pio.count * vcpu->arch.pio.size);
1237512375
vcpu->arch.pio.count = 0;
1237612376

@@ -12402,7 +12402,7 @@ static int kvm_sev_es_ins(struct kvm_vcpu *vcpu, unsigned int size,
1240212402
if (ret) {
1240312403
vcpu->arch.pio.count = 0;
1240412404
} else {
12405-
vcpu->arch.guest_ins_data = data;
12405+
vcpu->arch.sev_pio_data = data;
1240612406
vcpu->arch.complete_userspace_io = complete_sev_es_emulated_ins;
1240712407
}
1240812408

0 commit comments

Comments
 (0)