KVM: s390: Add memcg accounting to KVM allocations
[linux-2.6-microblaze.git] / arch / s390 / kvm / pv.c
index eb99e2f..373b654 100644 (file)
@@ -60,7 +60,7 @@ int kvm_s390_pv_create_cpu(struct kvm_vcpu *vcpu, u16 *rc, u16 *rrc)
        if (kvm_s390_pv_cpu_get_handle(vcpu))
                return -EINVAL;
 
-       vcpu->arch.pv.stor_base = __get_free_pages(GFP_KERNEL,
+       vcpu->arch.pv.stor_base = __get_free_pages(GFP_KERNEL_ACCOUNT,
                                                   get_order(uv_info.guest_cpu_stor_len));
        if (!vcpu->arch.pv.stor_base)
                return -ENOMEM;
@@ -72,7 +72,7 @@ int kvm_s390_pv_create_cpu(struct kvm_vcpu *vcpu, u16 *rc, u16 *rrc)
        uvcb.stor_origin = (u64)vcpu->arch.pv.stor_base;
 
        /* Alloc Secure Instruction Data Area Designation */
-       vcpu->arch.sie_block->sidad = __get_free_page(GFP_KERNEL | __GFP_ZERO);
+       vcpu->arch.sie_block->sidad = __get_free_page(GFP_KERNEL_ACCOUNT | __GFP_ZERO);
        if (!vcpu->arch.sie_block->sidad) {
                free_pages(vcpu->arch.pv.stor_base,
                           get_order(uv_info.guest_cpu_stor_len));
@@ -120,7 +120,7 @@ static int kvm_s390_pv_alloc_vm(struct kvm *kvm)
        struct kvm_memory_slot *memslot;
 
        kvm->arch.pv.stor_var = NULL;
-       kvm->arch.pv.stor_base = __get_free_pages(GFP_KERNEL, get_order(base));
+       kvm->arch.pv.stor_base = __get_free_pages(GFP_KERNEL_ACCOUNT, get_order(base));
        if (!kvm->arch.pv.stor_base)
                return -ENOMEM;