qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/1] Dirty page rate and dirty page limit 20240617 patches
@ 2024-06-17 15:49 Hyman Huang
  2024-06-17 15:49 ` [PULL 1/1] migration/dirtyrate: Fix segmentation fault Hyman Huang
  2024-06-17 21:22 ` [PULL 0/1] Dirty page rate and dirty page limit 20240617 patches Richard Henderson
  0 siblings, 2 replies; 3+ messages in thread
From: Hyman Huang @ 2024-06-17 15:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Hyman Huang

The following changes since commit 05ad1440b8428b0ade9b8e5c01469adb8fbf83e3:

  Merge tag 'virtio-grants-v8-tag' of https://gitlab.com/sstabellini/qemu into staging (2024-06-15 20:13:06 -0700)

are available in the Git repository at:

  https://github.com/newfriday/qemu.git tags/dirtylimit-dirtyrate-pull-request-20240617

for you to fetch changes up to e65152d5483b2c847ec7a947ed52650152cfdcc0:

  migration/dirtyrate: Fix segmentation fault (2024-06-17 23:29:21 +0800)

----------------------------------------------------------------
dirtylimit-dirtyrate-pull-request-20240617: Fix a segmentation fault

Please apply, thanks, Yong.

----------------------------------------------------------------
Masato Imai (1):
      migration/dirtyrate: Fix segmentation fault

 accel/kvm/kvm-all.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.39.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PULL 1/1] migration/dirtyrate: Fix segmentation fault
  2024-06-17 15:49 [PULL 0/1] Dirty page rate and dirty page limit 20240617 patches Hyman Huang
@ 2024-06-17 15:49 ` Hyman Huang
  2024-06-17 21:22 ` [PULL 0/1] Dirty page rate and dirty page limit 20240617 patches Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Hyman Huang @ 2024-06-17 15:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: Masato Imai, Hyman Huang

From: Masato Imai <mii@sfc.wide.ad.jp>

Since the kvm_dirty_ring_enabled function accesses a null kvm_state
pointer when the KVM acceleration parameter is not specified, running
calc_dirty_rate with the -r or -b option causes a segmentation fault.

Signed-off-by: Masato Imai <mii@sfc.wide.ad.jp>
Message-ID: <20240507025010.1968881-1-mii@sfc.wide.ad.jp>
[Assert kvm_state when kvm_dirty_ring_enabled was called to fix it. - Hyman]
Signed-off-by: Hyman Huang <yong.huang@smartx.com>
---
 accel/kvm/kvm-all.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 009b49de44..854cb86b22 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -2329,7 +2329,7 @@ bool kvm_vcpu_id_is_valid(int vcpu_id)
 
 bool kvm_dirty_ring_enabled(void)
 {
-    return kvm_state->kvm_dirty_ring_size ? true : false;
+    return kvm_state && kvm_state->kvm_dirty_ring_size;
 }
 
 static void query_stats_cb(StatsResultList **result, StatsTarget target,
-- 
2.39.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PULL 0/1] Dirty page rate and dirty page limit 20240617 patches
  2024-06-17 15:49 [PULL 0/1] Dirty page rate and dirty page limit 20240617 patches Hyman Huang
  2024-06-17 15:49 ` [PULL 1/1] migration/dirtyrate: Fix segmentation fault Hyman Huang
@ 2024-06-17 21:22 ` Richard Henderson
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2024-06-17 21:22 UTC (permalink / raw)
  To: Hyman Huang, qemu-devel

On 6/17/24 08:49, Hyman Huang wrote:
> The following changes since commit 05ad1440b8428b0ade9b8e5c01469adb8fbf83e3:
> 
>    Merge tag 'virtio-grants-v8-tag' ofhttps://gitlab.com/sstabellini/qemu  into staging (2024-06-15 20:13:06 -0700)
> 
> are available in the Git repository at:
> 
>    https://github.com/newfriday/qemu.git  tags/dirtylimit-dirtyrate-pull-request-20240617
> 
> for you to fetch changes up to e65152d5483b2c847ec7a947ed52650152cfdcc0:
> 
>    migration/dirtyrate: Fix segmentation fault (2024-06-17 23:29:21 +0800)

Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/9.1 as appropriate.


r~



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-17 21:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 15:49 [PULL 0/1] Dirty page rate and dirty page limit 20240617 patches Hyman Huang
2024-06-17 15:49 ` [PULL 1/1] migration/dirtyrate: Fix segmentation fault Hyman Huang
2024-06-17 21:22 ` [PULL 0/1] Dirty page rate and dirty page limit 20240617 patches Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).