Lorenz Brun | 0de1893 | 2021-03-11 00:36:48 +0100 | [diff] [blame^] | 1 | Copyright 2020 The Monogon Project Authors. |
| 2 | |
| 3 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | you may not use this file except in compliance with the License. |
| 5 | You may obtain a copy of the License at |
| 6 | |
| 7 | http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | |
| 9 | Unless required by applicable law or agreed to in writing, software |
| 10 | distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | See the License for the specific language governing permissions and |
| 13 | limitations under the License. |
| 14 | |
| 15 | |
| 16 | From 931f89680cd6714a4eca13c8ae11cd733c1b4609 Mon Sep 17 00:00:00 2001 |
| 17 | From: Lorenz Brun <lorenz@brun.one> |
| 18 | Date: Wed, 10 Mar 2021 17:55:55 +0100 |
| 19 | Subject: [PATCH 2/6] Fix QEMU code issues |
| 20 | |
| 21 | --- |
| 22 | qom/object.c | 2 +- |
| 23 | softmmu/physmem.c | 3 ++- |
| 24 | 2 files changed, 3 insertions(+), 2 deletions(-) |
| 25 | |
| 26 | diff --git a/qom/object.c b/qom/object.c |
| 27 | index 1065355233..f3aa56cc52 100644 |
| 28 | --- a/qom/object.c |
| 29 | +++ b/qom/object.c |
| 30 | @@ -692,7 +692,7 @@ static void object_finalize(void *data) |
| 31 | |
| 32 | /* Find the minimum alignment guaranteed by the system malloc. */ |
| 33 | #if __STDC_VERSION__ >= 201112L |
| 34 | -typddef max_align_t qemu_max_align_t; |
| 35 | +typedef max_align_t qemu_max_align_t; |
| 36 | #else |
| 37 | typedef union { |
| 38 | long l; |
| 39 | diff --git a/softmmu/physmem.c b/softmmu/physmem.c |
| 40 | index 3027747c03..2eb31592f4 100644 |
| 41 | --- a/softmmu/physmem.c |
| 42 | +++ b/softmmu/physmem.c |
| 43 | @@ -2675,7 +2675,8 @@ static void invalidate_and_set_dirty(MemoryRegion *mr, hwaddr addr, |
| 44 | } |
| 45 | if (dirty_log_mask & (1 << DIRTY_MEMORY_CODE)) { |
| 46 | assert(tcg_enabled()); |
| 47 | - tb_invalidate_phys_range(addr, addr + length); |
| 48 | + // If this symbol is not elided by the compiler it cannot be found. |
| 49 | + // tb_invalidate_phys_range(addr, addr + length); |
| 50 | dirty_log_mask &= ~(1 << DIRTY_MEMORY_CODE); |
| 51 | } |
| 52 | cpu_physical_memory_set_dirty_range(addr, length, dirty_log_mask); |
| 53 | -- |
| 54 | 2.25.1 |
| 55 | |