0x7fca423e8ecc in kvm_handle_io
28 0x7fca423ecb48 in kvm_cpu_exec
29 0x7fca424279d5 in qemu_kvm_cpu_thread_fn
30 0x7fca423c9480 in qemu_thread_start
31 0x7fca4257ff3b in ?? () from /usr/lib64/libpthread.so.0
32 0x7fca4270b550 in clone () from /usr/lib64/libc.so.6
Signed-off-by: Ji
`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
s add req_has_ua to avoid this kind of thing.
Signed-off-by: suruifeng
Signed-off-by: Jie Wang
---
hw/scsi/scsi-bus.c | 10 --
include/hw/scsi/scsi.h | 1 +
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index 2a0a98cac9..20ec4
if execute qemu_open success, have no branch to free the fd,
so unlink it inadvance, let it free by process exit.
Signed-off-by: Jie Wang
---
util/oslib-posix.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 36820fec16..fa881f2ee8 100644
--- a
if execute qemu_open success, have no branch to free the fd,
so unlink it inadvance, let it free by process exit.
Signed-off-by: Jie Wang
---
util/oslib-posix.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 36820fec16..30bf39bf4f 100644
--- a
On 2019/5/2 0:38, Stefan Hajnoczi wrote:
> On Tue, Apr 30, 2019 at 02:10:14PM +0800, Jie Wang wrote:
>> remove the dead code
>>
>> Signed-off-by: Jie Wang
>> ---
>> hw/virtio/vhost.c | 1 -
>> 1 file changed, 1 deletion(-)
> Reviewed-by: Stefan Hajnoczi
On 2019/5/2 0:40, Stefan Hajnoczi wrote:
> On Tue, Apr 30, 2019 at 03:15:00PM +0800, Jie Wang wrote:
>> fix memory leak in vhost_user_scsi_realize
>>
>> Signed-off-by: Jie Wang
>> ---
>> hw/scsi/vhost-user-scsi.c | 3 +++
>> 1 file changed, 3 insertions(+)
> Reviewed-by: Stefan Hajnoczi
wrote:
> On 5/28/19 7:45 PM, Paolo Bonzini wrote:
>> On 28/05/19 15:06, Jie Wang wrote:
>>> if pr-helper been killed and qemu send disconnect event to libvirt
>>> and libvirt started a new pr-helper process, the new pr-heleper
>>> been killed again when qemu is c
-off-by: Jie Wang
---
scsi/pr-manager-helper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/scsi/pr-manager-helper.c b/scsi/pr-manager-helper.c
index 438380fced..b7341b8f47 100644
--- a/scsi/pr-manager-helper.c
+++ b/scsi/pr-manager-helper.c
@@ -120,6 +120,7 @@ static int
fix memory leak in vhost_user_scsi_realize
Signed-off-by: Jie Wang
---
hw/scsi/vhost-user-scsi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/scsi/vhost-user-scsi.c b/hw/scsi/vhost-user-scsi.c
index 8b1e6876db..a9fd8ea305 100644
--- a/hw/scsi/vhost-user-scsi.c
+++ b/hw/scsi/vhost
fix incorrect print type in vhost_virtqueue_stop
Signed-off-by: Jie Wang
---
hw/virtio/vhost.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 7f61018f2a..286bb27c65 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1081,7
remove the dead code
Signed-off-by: Jie Wang
---
hw/virtio/vhost.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 7f61018f2a..2303a8c206 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1650,7 +1650,6 @@ fail_vq
Does qemu-pr-helper have its own log files?
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
I also met this bug
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1779120
Title:
disk missing in the guest contingently when hotplug several virtio
scsi disks consecutively
Status in QEMU:
New
if laio_init create linux_aio failed and return NULL, NULL pointer
dereference will occur when laio_attach_aio_context dereference
linux_aio in aio_get_linux_aio. Let's avoid it and report error.
Signed-off-by: Jie Wang
---
block/file-posix.c | 19 +--
util/async.c
if laio_init create linux_aio failed and return NULL, NULL pointer
dereference will occur when laio_attach_aio_context dereference
linux_aio in aio_get_linux_aio. Let's avoid it and report error.
Signed-off-by: Jie Wang
---
block/file-posix.c | 19 +--
util/async.c
if laio_init create linux_aio failed and return NULL, NULL pointer
dereference will occur when laio_attach_aio_context dereference
linux_aio in aio_get_linux_aio, so add assert to avoid it.
Signed-off-by: Jie Wang
---
util/async.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/util/async.c
epoll_available will only be set if epollfd != -1, os we
can swap the two variables in aio_epoll_disable, and
aio_context_destroy can call aio_epoll_disable directly.
Signed-off-by: Jie Wang
---
util/aio-posix.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/util
When we call addIOThread, the epollfd created in aio_context_setup,
but not close it in the process of delIOThread, so the epollfd will leak.
Signed-off-by: Jie Wang
---
include/block/aio.h | 8
util/aio-posix.c| 9 +
util/aio-win32.c| 4
util/async.c| 1
When we call addIOThread, the epollfd created in aio_context_setup,
but not close it in the process of delIOThread, so the epollfd will leak.
Signed-off-by: Jie Wang
---
include/block/aio.h | 8
util/aio-posix.c| 13 ++---
util/aio-win32.c| 4
util/async.c
When we call addIOThread, the epollfd created in aio_context_setup,
but not close it in the process of delIOThread, so the epollfd will leak.
Signed-off-by: Jie Wang
---
include/block/aio.h | 8
util/aio-posix.c| 9 +
util/aio-win32.c| 4
util/async.c| 1
From: w00251574
When we call addIOThread, the epollfd created in aio_context_setup,
but not close it in the process of delIOThread, so the epollfd will leak.
Signed-off-by: Jie Wang
---
include/block/aio.h | 8
util/aio-posix.c| 9 +
util/aio-win32.c| 4
util
From: w00251574
When we call addIOThread, the epollfd created in aio_context_setup,
but not close it in the process of delIOThread, so the epollfd will leak.
Signed-off-by: Jie Wang
---
include/block/aio.h | 8
util/aio-posix.c| 7 +++
util/aio-win32.c| 4
util
When we call addIOThread, the epollfd created in aio_context_setup,
but not close it in the process of delIOThread, so the epollfd will leak.
Signed-off-by: Jie Wang
---
iothread.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/iothread.c b/iothread.c
index aff1281..23ac0a8 100644
--- a
Signed-off-by: Jie Wang
---
tests/Makefile.include| 3 ++
tests/drive-mirror-test.c | 96 +++
2 files changed, 99 insertions(+)
create mode 100755 tests/drive-mirror-test.c
diff --git a/tests/Makefile.include b/tests/Makefile.include
index
Signed-off-by: Jie Wang
---
tests/Makefile.include| 3 ++
tests/drive-mirror-test.c | 96 +++
2 files changed, 99 insertions(+)
create mode 100755 tests/drive-mirror-test.c
diff --git a/tests/Makefile.include b/tests/Makefile.include
index
49 matches
Mail list logo