`section` passed by the caller to determine the
pages that need to be write-protected. Compared to the original method,
this saves time.
Moreover, this makes only pages whose dirty-bits
are cleared write-protected instead of making the whole memory slot
write-protected.
Signed-off-by: Yan-Jie Wang
work properly.
Buglink: https://bugs.launchpad.net/qemu/+bug/1827005
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-mem.c | 62
include/sysemu/hvf_int.h | 14 +
target/arm/hvf/hvf.c | 5
target/i386/hvf/hvf.c| 25
We follow how KVM accel does in its memory listener (kvm-all.c) and add
a lock for the memory related functions.
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-mem.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/accel/hvf/hvf-mem.c b/accel/hvf/hvf-mem.c
index 896e718374
It is no need to dirty-track MMIO regions or other readonly regions.
Before we start or stop to dirty-track a memory region, check the type of
the memory region. The region must be a writeable ram to be dirty-tracked.
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-mem.c | 6 ++
1 file
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-accel-ops.c | 220 +
accel/hvf/hvf-mem.c | 252 ++
accel/hvf/meson.build | 1 +
include/sysemu/hvf_int.h | 2 +
4 files changed, 256 insertions(+), 219 deletions
Follow the QEMU coding style. Structured type names are in CamelCase.
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-mem.c | 14 +++---
include/sysemu/hvf_int.h | 8
target/i386/hvf/hvf.c| 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/accel
Follow the QEMU coding style. Use hwaddr for guest physical address.
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-mem.c | 2 +-
include/sysemu/hvf_int.h | 8
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/accel/hvf/hvf-mem.c b/accel/hvf/hvf-mem.c
index 32452696b6
`section` passed by the caller to determine the
pages that need to be write-protected. Compared to the original method,
this saves time.
Moreover, this makes only pages whose dirty-bits
are cleared write-protected instead of making the whole memory slot
write-protected.
Signed-off-by: Yan-Jie Wang
work properly.
Buglink: https://bugs.launchpad.net/qemu/+bug/1827005
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-mem.c | 62
include/sysemu/hvf_int.h | 14 +
target/arm/hvf/hvf.c | 5
target/i386/hvf/hvf.c| 25
es instead of arrays to store
in-kernel KVM memory slots.
5. Add a lock to protect the data structures of HVF memory slots
Patches have been tested on Apple Silicon Macs and Intel Macs.
Yan-Jie Wang (9):
hvf: move memory related functions from hvf-accel-ops.c to hvf-mem.c
hvf: sim
Follow the QEMU coding style. Use hwaddr for guest physical address.
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-mem.c | 2 +-
include/sysemu/hvf_int.h | 8
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/accel/hvf/hvf-mem.c b/accel/hvf/hvf-mem.c
index 32452696b6
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-accel-ops.c | 220 +
accel/hvf/hvf-mem.c | 252 ++
accel/hvf/meson.build | 1 +
include/sysemu/hvf_int.h | 2 +
4 files changed, 256 insertions(+), 219 deletions
Currently, there are only 32 memory slots in the fixed size array.
It is not scalable. Instead of using fixed size array, use GTree
(from glib library) and dynamically-allocated structures to store
memory slots.
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-mem.c | 63
We follow how KVM accel does in its memory listener (kvm-all.c) and add
a lock for the memory related functions.
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-mem.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/accel/hvf/hvf-mem.c b/accel/hvf/hvf-mem.c
index 896e718374
Follow the QEMU coding style. Structured type names are in CamelCase.
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-mem.c | 14 +++---
include/sysemu/hvf_int.h | 8
target/i386/hvf/hvf.c| 4 ++--
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/accel
Currently, there are only 32 memory slots in the fixed size array.
It is not scalable. Instead of using fixed size array, use GTree
(from glib library) and dynamically-allocated structures to store
memory slots.
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-mem.c | 63
not overlap with existing sections.
- Try to align memory sections first before giving up sections that are not
aligned to host page size.
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-accel-ops.c | 1 -
accel/hvf/hvf-mem.c | 211 +++---
include/sysemu
not overlap with existing sections.
- Try to align memory sections first before giving up sections that are not
aligned to host page size.
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-accel-ops.c | 1 -
accel/hvf/hvf-mem.c | 211 +++---
include/sysemu
t the data structures of HVF memory slots
Patches have been tested on Apple Silicon Macs and Intel Macs.
Yan-Jie Wang (9):
hvf: move memory related functions from hvf-accel-ops.c to hvf-mem.c
hvf: simplify data structures and codes of memory related functions
hvf: use correct data types for
It is no need to dirty-track MMIO regions or other readonly regions.
Before we start or stop to dirty-track a memory region, check the type of
the memory region. The region must be a writeable ram to be dirty-tracked.
Signed-off-by: Yan-Jie Wang
---
accel/hvf/hvf-mem.c | 5 +
1 file
Sorry, I made a mistake.
The last line in the function, hvf_find_free_slot, introduced in this
commit "hvf: simplify data structures and codes of memory related
functions" should be "return NULL;"
static hvf_slot *hvf_find_free_slot(void)
{
hvf_slot *slot;
int x;
for (x = 0; x < HVF_NU
For the dirty-tracking part in my patch series, the major difference
between this patch and Alex's patch is that the dirty-tracking logic in
my patch will only mark the page being written dirty instead of marking
the whole memory slot dirty, and will only restore the write permission
to the pag
as input may create
corrupted images in macOS especially for large files, and qemu-img
map may also report wrong things. This patch fixes this undesired
behaviors.
Signed-off-by: Yan-Jie Wang
---
block/file-posix.c | 59 ++
1 file changed, 59 insertions
I have done some experiments and find out that
the behavior of lseek with whence set to SEEK_DATA is different from the
behavior of Linux's lseek.
If the supplied offset is in the middle of a data region, it returns the
start of the next data region. There may be many data regions in a big
file
24 matches
Mail list logo