Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103757
b: refs/heads/master
c: 34d4cb8
h: refs/heads/master
i:
  103755: d76a6c4
v: v3
  • Loading branch information
Marcelo Tosatti authored and Avi Kivity committed Jul 20, 2008
1 parent dc2666f commit c7bdae6
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6e88aec07aa8f6c7e4024f5734ec659fd7c5a40
refs/heads/master: 34d4cb8fca1f2a31be152b74797e6cd160ec9de6
3 changes: 3 additions & 0 deletions trunk/arch/ia64/kvm/kvm-ia64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,6 +1455,9 @@ int kvm_arch_set_memory_region(struct kvm *kvm,
return 0;
}

void kvm_arch_flush_shadow(struct kvm *kvm)
{
}

long kvm_arch_dev_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/powerpc/kvm/powerpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ int kvm_arch_set_memory_region(struct kvm *kvm,
return 0;
}

void kvm_arch_flush_shadow(struct kvm *kvm)
{
}

struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
{
struct kvm_vcpu *vcpu;
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/s390/kvm/kvm-s390.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,10 @@ int kvm_arch_set_memory_region(struct kvm *kvm,
return 0;
}

void kvm_arch_flush_shadow(struct kvm *kvm)
{
}

gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn)
{
return gfn;
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -4032,6 +4032,11 @@ int kvm_arch_set_memory_region(struct kvm *kvm,
return 0;
}

void kvm_arch_flush_shadow(struct kvm *kvm)
{
kvm_mmu_zap_all(kvm);
}

int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
{
return vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ int kvm_arch_set_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem,
struct kvm_memory_slot old,
int user_alloc);
void kvm_arch_flush_shadow(struct kvm *kvm);
gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn);
struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn);
unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn);
Expand Down
3 changes: 3 additions & 0 deletions trunk/virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ int __kvm_set_memory_region(struct kvm *kvm,
if (mem->slot >= kvm->nmemslots)
kvm->nmemslots = mem->slot + 1;

if (!npages)
kvm_arch_flush_shadow(kvm);

*memslot = new;

r = kvm_arch_set_memory_region(kvm, mem, old, user_alloc);
Expand Down

0 comments on commit c7bdae6

Please sign in to comment.