1 Star 0 Fork 120

Chenxi Mao/qemu

forked from src-openEuler/qemu 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
target-i386-kvm-fix-kvmclock_current_nsec-Assertion-.patch 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
yezengruan 提交于 2022-11-22 17:45 . Qemu update to version 6.2.0-59
From f53c352a12a0785ff4e83aaeaec7245384538d6a Mon Sep 17 00:00:00 2001
From: cmss_dx <dingxiang@cmss.chinamobile.com>
Date: Mon, 28 Nov 2022 03:10:06 +0000
Subject: [PATCH 29/29] target/i386/kvm: fix kvmclock_current_nsec: Assertion
`time.tsc_timestamp <= migration_tsc' failed mainline inclusion from
mainline-v7.2.0-rc2 commit c4ef867f2949bf2a2ae18a4e27cf1a34bbc8aecb category:
bugfix
--------------------------------
New KVM_CLOCK flags were added in the kernel.(c68dc1b577eabd5605c6c7c08f3e07ae18d30d5d)
```
+ #define KVM_CLOCK_VALID_FLAGS \
+ (KVM_CLOCK_TSC_STABLE | KVM_CLOCK_REALTIME | KVM_CLOCK_HOST_TSC)
case KVM_CAP_ADJUST_CLOCK:
- r = KVM_CLOCK_TSC_STABLE;
+ r = KVM_CLOCK_VALID_FLAGS;
```
kvm_has_adjust_clock_stable needs to handle additional flags,
so that s->clock_is_reliable can be true and kvmclock_current_nsec doesn't need to be called.
Signed-off-by: Ray Zhang <zhanglei002@gmail.com>
Message-Id: <20220922100523.2362205-1-zhanglei002@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: cmss_dx <dingxiang@cmss.chinamobile.com>
---
target/i386/kvm/kvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 20e418463d..5b15e0430b 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -151,7 +151,7 @@ bool kvm_has_adjust_clock_stable(void)
{
int ret = kvm_check_extension(kvm_state, KVM_CAP_ADJUST_CLOCK);
- return (ret == KVM_CLOCK_TSC_STABLE);
+ return (ret & KVM_CLOCK_TSC_STABLE);
}
bool kvm_has_adjust_clock(void)
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chenxi-mao/qemu.git
git@gitee.com:chenxi-mao/qemu.git
chenxi-mao
qemu
qemu
master

搜索帮助