| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Copyright (C) 2008-2013 Freescale Semiconductor, Inc. All rights reserved. |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 10 | 11 | * Description: |
|---|
| 11 | 12 | * This file is based on arch/powerpc/kvm/44x_tlb.c, |
|---|
| 12 | 13 | * by Hollis Blanchard <hollisb@us.ibm.com>. |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 15 | | - * it under the terms of the GNU General Public License, version 2, as |
|---|
| 16 | | - * published by the Free Software Foundation. |
|---|
| 17 | 14 | */ |
|---|
| 18 | 15 | |
|---|
| 19 | 16 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 536 | 533 | return get_tlb_raddr(gtlbe) | (eaddr & pgmask); |
|---|
| 537 | 534 | } |
|---|
| 538 | 535 | |
|---|
| 539 | | -void kvmppc_mmu_destroy_e500(struct kvm_vcpu *vcpu) |
|---|
| 540 | | -{ |
|---|
| 541 | | -} |
|---|
| 542 | | - |
|---|
| 543 | 536 | /*****************************************/ |
|---|
| 544 | 537 | |
|---|
| 545 | 538 | static void free_gtlb(struct kvmppc_vcpu_e500 *vcpu_e500) |
|---|
| .. | .. |
|---|
| 783 | 776 | if (!pages) |
|---|
| 784 | 777 | return -ENOMEM; |
|---|
| 785 | 778 | |
|---|
| 786 | | - ret = get_user_pages_fast(cfg->array, num_pages, 1, pages); |
|---|
| 779 | + ret = get_user_pages_fast(cfg->array, num_pages, FOLL_WRITE, pages); |
|---|
| 787 | 780 | if (ret < 0) |
|---|
| 788 | 781 | goto free_pages; |
|---|
| 789 | 782 | |
|---|