756 Commits

Author SHA1 Message Date
openeuler-ci-bot
d95a35c2e0 !77 Aarch64 support vtpm
Merge pull request !77 from JackJF/master
2020-08-17 18:30:49 +08:00
jiangfangjie
54e09b7986 aarch64 support vtpm
Signed-off-by: jiangfangjie <jiangfangjie@huawei.com>
2020-08-13 13:11:02 -04:00
openeuler-ci-bot
4b2cfa2a18 !73 hw/arm/acpi: enable SHPC native hot plug
Merge pull request !73 from 金泽宇/master
2020-08-13 09:35:24 +08:00
Zeyu Jin
6b320d5441 hw/arm/acpi: enable SHPC native hot plug
backport from upstream:
https://git.qemu.org/?p=qemu.git;a=commit;h=e04c13cdcf5befd9d08df38d4d34494a802cdf63

Signed-off-by: Zeyu Jin <jinzeyu@huawei.com>
2020-08-12 14:10:17 +08:00
openeuler-ci-bot
28beefab32 !64 [bugfix] pick several patches from upstream that fix CVE
Merge pull request !64 from zhanghailiang/master
2020-08-06 19:59:17 +08:00
zhanghailiang
bac79dd0c6 qemu: pick serveral patches from upstream that fix CVE
Fix CVE-2020-13361, CVE-2020-13659, CVE-2020-13800, CVE-2020-13362

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-08-06 17:17:08 +08:00
openeuler-ci-bot
213ba4bb5a !62 Enable werror for qemu and fix a building warning
Merge pull request !62 from FangYing/master
2020-08-06 14:51:01 +08:00
Ying Fang
88bcb3346d spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-08-06 14:23:58 +08:00
Ying Fang
a138fa6057 spec: enable Werror by default
enable Werror by default so that we can check compilation warnnings

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-08-06 14:23:22 +08:00
Ying Fang
dc93470dc0 migration: add missing ram.h for migration/socket.c
ram.h is missing for migration/socket.c, let's add it.
Later we will enable werror for qemu.spec

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-08-06 11:13:53 +08:00
Ying Fang
d5b31b6bcb tests: Disalbe filemonitor testcase
Since filemonitor testcase requires that host kernel being a LTS version,
we cannot guarantee that on OBS system. Let's disable it by default.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-08-06 11:13:53 +08:00
openeuler-ci-bot
5580ce5ce2 !58 增加qemu.spec rbd支持
Merge pull request !58 from 金泽宇/master
2020-07-24 16:24:52 +08:00
Zeyu Jin
f725fc129f spec: increase build-requirement of rbd-devel
Rbd support is default in qemu configure, so we should also add rbd support in qemu.spec .

Signed-off-by: jinzeyu <jinzeyu@huawei.com>
2020-07-23 20:25:38 +08:00
openeuler-ci-bot
e6d072043a !55 [bugfix] fix two patches format and one CVE bug
Merge pull request !55 from zhanghailiang/master
2020-06-20 17:12:23 +08:00
zhanghailiang
6855f47eb2 spec: increase release number
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-06-20 15:39:31 +08:00
zhanghailiang
f261f58550 target/arm: Fix PAuth sbox functions
Fix CVE-2020-10702 bug

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-06-20 15:37:11 +08:00
zhanghailiang
a5d2ec2d8e patch: fix patch format problem which can lead git am failed
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-06-20 15:25:58 +08:00
openeuler-ci-bot
a4372444dd !54 rebase openEuler-20.03-LTS branch to master
Merge pull request !54 from FangYing/master
2020-06-05 10:46:19 +08:00
Ying Fang
8d6b291d5c spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
c588c37f4f target/arm: Add the kvm_adjvtime vcpu property for Cortex-A72
Add the kvm_adjvtime vcpu property for ARM Cortex-A72 cpu model,
so that virtual time adjust will be enabled for it.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
24dd460ad6 Revert "target/arm: add ths missing GENERIC_TIMER"
This reverts commit 665d6b61fd86629272885e281410f512f8e7f32e.
2020-06-01 09:13:39 +00:00
zhanghailiang
ad7a2e0d04 target/arm: add ths missing GENERIC_TIMER
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
fd193c0aa0 spec: Update release version
increase release verison by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
6f41ba9021 vtimer: Drop vtimer virtual timer adjust
This patch drops the vtimer virtual timer adjust, cross version migration
from openEuler qemu-4.0.1 to qemu-4.1.0 is not supported as a consequence.

By default openEuler qemu-4.1.0 use kvm_adjvtime as the virtual timer.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
3b892a3933 spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fanging1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
d68b43587a migration: Compat virtual timer adjust for v4.0.1 and v4.1.0
Vtimer adjust is used in openEuler qemu-4.0.1, however kvm_adjvtime
is introduced in openEuler qemu-4.1.0. To maintain the compatibility
and enable cross version migration, let's enable vtimer adjust only
if kvm_adjvtime is not enabled, otherwise there may be conflicts
between vtimer adjust and kvm_adjvtime.

After this modification:
1: openEuler qemu-4.0.1 use vtimer as the default virtual timer
2: openEuler qemu-4.1.0 use kvm_adjvtime as the defaut virtual timer

Migration from openEuler qemu-4.0.1 to openEuler qemu-4.1.0 will
be ok, but migration path from upstream qemu-4.0.1 to openEuler
qemu-4..0.1 will be broken.

Since openEuler qemu-4.1.0, kvm_adjvtime is used as the default
virtual timer. So please upgrade to openEuler qemu-4.1.0 and
use the virt-4.1 machine.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
b24393ef8e hw/arm/virt: add missing compat for kvm-no-adjvtime
Machine compatibility for kvm-no-adjvtime is missed,
let's add it for virt machine 4.0, thus kvm-no-adjvtime
is supported in v4.1.0.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
7774be8671 vtimer: introduce the vtimer first used in v4.0.1
To support cross version migration, we had to add the vtimer back
which was introduced in openEuler qemu-4.0.1.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
409590df6a Revert: "vtimer: compat cross version migration from v4.0.1"
This reverts commit patch:
vtimer-compat-cross-version-migration-from-v4.0.1.patch

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
a93a929409 spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
67a1d83a9d log: Add some logs on VM runtime path
Add logs on VM runtime path, to make it easier to do trouble shooting.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Leo Fang
95c8ff21d2 CVE: Fix CVE-2018-19665
upstream url:
https://patchwork.kernel.org/patch/10688527/

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
42f23fa4e7 CVE: Fix CVE-2019-15890
this patch fix CVE-2019-15890, upstream patch url:
https://gitlab.freedesktop.org/slirp/libslirp/commit/c5927943

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
67973af4ff arm: drop redunt patch
Drop the redunt patch:
ARM-KVM-Check-KVM_CAP_ARM_IRQ_LINE_LAYOUT_2-for-smp_.patch

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
ce26e77689 CVE: Fix CVE-2020-7211
backport from upstream:
14ec36e107

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
f10dd80ac0 spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
cc6571bce3 CVE: fix CVE-2020-11869
backport from qemu upstream:
https://git.qemu.org/?p=qemu.git;a=commit;h=ac2071c3791b67fc7af78b8ceb320c01ca1b5df7

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
f645d20455 CVE: fix CVE-2019-20175
backport patch from upstream:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=ed78352a59ea7acf7520d4d47a96b9911bae7fc3

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
b7d6ad34b1 spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Keqian Zhu
3e55e426e1 arm/virt: Support CPU cold plug
This adds CPU cold plug support to arm virt machine board.
CPU cold plug means adding CPU by using "-device xx-arm-cpu"
when we bring up Qemu.

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
d2dca0b095 spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Leo Fang
e215d8d12a migration: fix some memleaks
Fix some memleaks for migration.

Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
3e79a91147 spec: Update release version
increase release version number by one

Singed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
288d942a68 vtimer: compat cross version migration from v4.0.1
vtimer feature was added to qemu v4.0.1 to record timer tick when vcpu
is stopped. However this feature is discared and the new virtual time
adjustment is introduced.

This patch add the missing vtimer parameter to ARMCPUState in order
to compat cross version migration fromm v4.0.1 openEuler 2003 lts release.

Singed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
a7eab953ce spec: Update release version
Increase release version number by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
zhengchuan
36efc4445a migration: backport migration patches from upstream
This series patches backport migration patches from upstream.
2020-06-01 09:13:39 +00:00
Keqian Zhu
1c823f0431 arm/virt: Add ACPI CPU hotplug support
This series is an attempt to provide CPU hotplug support on ARM
virt platform. This is based on ACPI GED device.

We should enable ACPI support, and use vGICv3 and 64bit CPU to
support CPU hotplug.

Under KVM accel, the KVM vCPUs is pre-created. Besides, vGIC IRIs
is pre-created too. However, QEMU vCPU objects are defer-created.

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
2020-06-01 09:13:39 +00:00
Keqian Zhu
d01be9927c ARM virt: ACPI memory hotplug support
This series is an attempt to provide device memory hotplug support
on ARM virt platform. This is based on Eric's recent works here[1]
and carries some of the pc-dimm related patches dropped from his
series.

The kernel support for arm64 memory hot add was added recently by
Robin and hence the guest kernel should be => 5.0-rc1.

NVDIM support is not included currently as we still have an unresolved
issue while hot adding NVDIMM[2]. However NVDIMM cold plug patches
can be included, but not done for now, for keeping it simple.

This makes use of GED device to sent hotplug ACPI events to the
Guest. GED code is based on Nemu. Thanks to the efforts of Samuel and
Sebastien to add the hardware-reduced support to Nemu using GED
device[3]. (Please shout if I got the author/signed-off wrong for
those patches or missed any names).

This is sanity tested on a HiSilicon ARM64 platform and appreciate
any further testing.

Note:
Attempted adding dimm_pxm test case to bios-tables-test for arm/virt.
But noticed the issue decribed here[5]. This is under investigation
now.

upstream url: https://patchwork.kernel.org/cover/11150345/

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
0b93ee990c spec: Update release version
Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-06-01 09:13:39 +00:00
Ying Fang
976278e59b target/arm/kvm: Adjust virtual time
v3:
 - Added a target/arm/kvm_arm.h comment cleanup patch (1/6)
 - Minor refactoring of assert_has_feature_enabled/disabled in 4/6,
   kept Richard's r-b.
 - Rewrote kvm-no-adjvtime documentation in 6/6.
 - Reworked approach in 5/6 to properly deal with migration and to
   track running vs. !running, rather than running vs. paused states.

v2:
 - Reworked it enough that I brought back the RFC tag and retitled the
   series. Also had to drop r-b's from a couple of patches, and even
   drop patches.
 - Changed approach from writing the QEMU virtual time to the guest
   vtime counter to saving and restoring the guest vtime counter.
 - Changed the kvm-adjvtime property, which was off by default, to a
   kvm-no-adjvtime property, which is also off by default, meaning the
   effective "adjust vtime" property is now on by default (but only
   for 5.0 virt machine types and later)

v1:
 - move from RFC status to v1
 - put kvm_arm_vm_state_change() in kvm.c to share among kvm32.c and kvm64.c
 - add r-b's from Richard

This series is inspired by a series[1] posted by Bijan Mottahedeh over
a year ago and by the patch[2] posted by Heyi Guo almost a year ago.
The problem described in the cover letter of [1] is easily reproducible
and some users would like to have the option to avoid it. However the
solution, which is to adjust the virtual counter each time the VM
transitions to the running state, introduces a different problem, which
is that the virtual and physical counters diverge. As described in the
cover letter of [1] this divergence is easily observed when comparing
the output of `date` and `hwclock` after suspending the guest, waiting
a while, and then resuming it. Because this different problem may actually
be worse for some users, unlike [1], the series posted here makes the
virtual counter adjustment optional. Besides the adjustment being
optional, this series approaches the needed changes differently to apply
them in more appropriate locations.

Additional notes
----------------

Note 1
------

As described above, when running a guest with kvm-no-adjtime disabled
it will be less likely the guest OS and guest applications get surprise
time jumps when they use the virtual counter.  However the counter will
no longer reflect real time.  It will lag behind.  If this is a problem
then the guest can resynchronize its time from an external source or
even from its physical counter.  If the suspend/resume is done with
libvirt's virsh, and the guest is running the guest agent, then it's
also possible to use a sequence like this

 $ virsh suspend $GUEST
 $ virsh resume $GUEST
 $ virsh domtime --sync $GUEST

in order to resynchronize a guest right after the resume.  Of course
there will still be time when the clock is not right, possibly creating
confusing timestamps in logs, for example, and the guest must still be
tolerant to the time synchronizations.

Note 2
------

Userspace that wants to set KVM_REG_ARM_TIMER_CNT should beware that
the KVM register ID is not correct.  This cannot be fixed because it's
UAPI and if the UAPI headers are used then it can't be a problem.
However, if a userspace attempts to create the ID themselves from the
register's specification, then they will get KVM_REG_ARM_TIMER_CVAL
instead, as the _CNT and _CVAL definitions have their register
parameters swapped.

Note 3
------

I didn't test this with a 32-bit KVM host, but the changes to kvm32.c
are the same as kvm64.c. So what could go wrong? Test results would be
appreciated.

[1] https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg05713.html
[2] https://lists.gnu.org/archive/html/qemu-devel/2019-03/msg03695.html

upstream url:
https://patchwork.kernel.org/cover/11341629/
2020-06-01 09:13:39 +00:00