Skip to content

Commit

Permalink
KVM: SVM: add struct kvm_svm to hold SVM specific KVM vars
Browse files Browse the repository at this point in the history
Add struct kvm_svm, which is analagous to struct vcpu_svm, along with
a helper to_kvm_svm() to retrieve kvm_svm from a struct kvm *.  Move
the SVM specific variables and struct definitions out of kvm_arch
and into kvm_svm.

Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Sean Christopherson authored and Paolo Bonzini committed Mar 23, 2018
1 parent 40bbb9d commit 81811c1
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 73 deletions.
18 changes: 0 additions & 18 deletions arch/x86/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -770,15 +770,6 @@ enum kvm_irqchip_mode {
KVM_IRQCHIP_SPLIT, /* created with KVM_CAP_SPLIT_IRQCHIP */
};

struct kvm_sev_info {
bool active; /* SEV enabled guest */
unsigned int asid; /* ASID used for this guest */
unsigned int handle; /* SEV firmware handle */
int fd; /* SEV device fd */
unsigned long pages_locked; /* Number of pages locked */
struct list_head regions_list; /* List of registered regions */
};

struct kvm_arch {
unsigned int n_used_mmu_pages;
unsigned int n_requested_mmu_pages;
Expand Down Expand Up @@ -857,17 +848,8 @@ struct kvm_arch {

bool disabled_lapic_found;

/* Struct members for AVIC */
u32 avic_vm_id;
u32 ldr_mode;
struct page *avic_logical_id_table_page;
struct page *avic_physical_id_table_page;
struct hlist_node hnode;

bool x2apic_format;
bool x2apic_broadcast_quirk_disabled;

struct kvm_sev_info sev_info;
};

struct kvm_vm_stat {
Expand Down
Loading

0 comments on commit 81811c1

Please sign in to comment.