Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db3fe4eb authored by Takuya Yoshikawa's avatar Takuya Yoshikawa Committed by Avi Kivity
Browse files

KVM: Introduce kvm_memory_slot::arch and move lpage_info into it



Some members of kvm_memory_slot are not used by every architecture.

This patch is the first step to make this difference clear by
introducing kvm_memory_slot::arch;  lpage_info is moved into it.

Signed-off-by: default avatarTakuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
parent 189a2f7b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -459,6 +459,9 @@ struct kvm_sal_data {
	unsigned long boot_gp;
};

struct kvm_arch_memory_slot {
};

struct kvm_arch {
	spinlock_t dirty_log_lock;

+10 −0
Original line number Diff line number Diff line
@@ -1571,6 +1571,16 @@ int kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf)
	return VM_FAULT_SIGBUS;
}

void kvm_arch_free_memslot(struct kvm_memory_slot *free,
			   struct kvm_memory_slot *dont)
{
}

int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages)
{
	return 0;
}

int kvm_arch_prepare_memory_region(struct kvm *kvm,
		struct kvm_memory_slot *memslot,
		struct kvm_memory_slot old,
+3 −0
Original line number Diff line number Diff line
@@ -213,6 +213,9 @@ struct revmap_entry {
#define KVMPPC_PAGE_WRITETHRU	HPTE_R_W	/* 0x40 */
#define KVMPPC_GOT_PAGE		0x80

struct kvm_arch_memory_slot {
};

struct kvm_arch {
#ifdef CONFIG_KVM_BOOK3S_64_HV
	unsigned long hpt_virt;
+10 −0
Original line number Diff line number Diff line
@@ -281,6 +281,16 @@ long kvm_arch_dev_ioctl(struct file *filp,
	return -EINVAL;
}

void kvm_arch_free_memslot(struct kvm_memory_slot *free,
			   struct kvm_memory_slot *dont)
{
}

int kvm_arch_create_memslot(struct kvm_memory_slot *slot, unsigned long npages)
{
	return 0;
}

int kvm_arch_prepare_memory_region(struct kvm *kvm,
                                   struct kvm_memory_slot *memslot,
                                   struct kvm_memory_slot old,
+3 −0
Original line number Diff line number Diff line
@@ -245,6 +245,9 @@ struct kvm_vm_stat {
	u32 remote_tlb_flush;
};

struct kvm_arch_memory_slot {
};

struct kvm_arch{
	struct sca_block *sca;
	debug_info_t *dbf;
Loading