64 Commits

Author SHA1 Message Date
Ying Fang
4f814f3518 CVE: Fix CVE-2020-7211
backport from upstream:
14ec36e107

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-15 16:51:37 +08:00
Ying Fang
e74fdc8bef spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-15 15:49:58 +08:00
Ying Fang
6fc286684c 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-05-15 15:47:11 +08:00
Ying Fang
ec1a227b48 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-05-15 15:33:14 +08:00
Ying Fang
dd9af1f5f4 spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-12 17:24:19 +08:00
Keqian Zhu
c9fb301ff1 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-05-12 17:19:50 +08:00
Ying Fang
b46aa5167c spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-12 11:33:01 +08:00
Leo Fang
e352239c1d migration: fix some memleaks
Fix some memleaks for migration.

Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
2020-05-12 11:33:01 +08:00
Ying Fang
39af0bd53c spec: Update release version
increase release version number by one

Singed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-12 11:33:01 +08:00
Ying Fang
7c553b71a4 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-05-12 11:33:00 +08:00
Ying Fang
999a8108cb spec: Update release version
Increase release version number by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-12 11:33:00 +08:00
zhengchuan
298c1ecc77 migration: backport migration patches from upstream
This series patches backport migration patches from upstream.
2020-05-12 11:33:00 +08:00
Keqian Zhu
785d06afe8 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-05-12 11:33:00 +08:00
Keqian Zhu
7265c59053 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-05-12 11:33:00 +08:00
Ying Fang
8e45adc2e9 spec: Update release version
Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-12 11:33:00 +08:00
Ying Fang
96149d7be3 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-05-12 11:33:00 +08:00
Ying Fang
38fe554b56 spec: Add release number by one
Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-12 11:33:00 +08:00
Ying Fang
4ed2e8773c Backport: backport form upstream stable v4.1.1
This patch backports bugfix patch series from qemu upstream v4.1.1

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-12 11:33:00 +08:00
Ying Fang
0b90f5bb05 Rebase qemu to 4.1.0 version
Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-12 11:33:00 +08:00
openeuler-ci-bot
4c55cf2f58 !36 [bugfix] nbd: backport nbd fix from qemu upstream
Merge pull request !36 from panny060/openEuler-20.03-LTS
2020-04-26 09:46:19 +08:00
Pan Nengyuan
527d495377 nbd: backport nbd fix from qemu upstream
-nbd: Fix regression with multiple meta contexts

Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
2020-04-24 16:34:27 +08:00
openeuler-ci-bot
5d35483efb !34 Fix CVE-2020-1983
Merge pull request !34 from FangYing/openEuler-20.03-LTS
2020-04-24 15:45:48 +08:00
Ying Fang
a83a262a67 slirp: Fix CVE-2020-1983
upstream url:
9bd6c59132

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-04-24 15:10:23 +08:00
openeuler-ci-bot
55d6e334dc !30 asyn-fix-qemu-hang-PR-for-LTS-branch
Merge pull request !30 from FangYing/openEuler-20.03-LTS
2020-04-14 08:41:44 +08:00
Ying Fang
235154df9e async: Fix qemu main thread hang on weak ordered platfrom
aio-wait: delegate polling of main AioContext if BQL not held
upstream_url: https://patchwork.kernel.org/patch/11482099/

async: use explicit memory barriers
upstream_url: https://patchwork.kernel.org/patch/11482103/

Signed-off-by: Ying Fang <fanging1@huawei.com>
2020-04-11 08:52:38 +08:00
openeuler-ci-bot
890f828d19 !25 Add pcie-root-port fast hotplg/unplug feature
Merge pull request !25 from FangYing/pcie-hotplug-unplug
2020-03-18 17:56:19 +08:00
Leo Fang
b3ccd965a7 pcie: Add pcie-root-port deivce fast plug/unplug feature
If a device is plugged in the pcie-root-port when VM kernel is
booting, the kernel may wrongly disable the device.
This bug was brought in by two patches of the linux kernel:

https://patchwork.kernel.org/patch/10575355/
https://patchwork.kernel.org/patch/10766219/

VM runtime like kata uses this feature to boot microVM,
so we must fix it up. We hack into the pcie native hotplug
patch so that hotplug/unplug will work under this circumstance.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-03-18 17:27:28 +08:00
openeuler-ci-bot
f2bc77071c !24 [feature] put linuxboot_dma.bin into x86 package
Merge pull request !24 from zhanghailiang/put-linuxboot-dma.bin
2020-03-18 10:28:21 +08:00
zhanghailiang
79d0c59389 spec: include linuxboot_dma.bin and pvh.bin in x86 package
linuxboot_dma.bin will be used by kata. Let's put it back
into x86 package.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-03-17 16:48:40 +08:00
openeuler-ci-bot
a7318b6b26 !23 backport-from-qemu-4.1.1
Merge pull request !23 from FangYing/backport-from-qemu-4.1.1
2020-03-16 23:05:14 +08:00
Ying Fang
db47ea85b4 qemu: backport some bug fixing patches from upstream
We backport some bug fixing patches form qemu-stable-4.1.1
branch of upstream.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-03-16 22:39:17 +08:00
openeuler-ci-bot
eccf220ed1 !18 [bugfix] fix some memleak for monitor
Merge pull request !18 from benchroot/master
2020-03-16 16:10:01 +08:00
Chen Qun
f2082b3f2f fix some issue for monitor and iscsi
block/iscsi: use MIN() between mx_sb_len and sb_len_wr
monitor: fix memory leak in monitor_fdset_dup_fd_find_remove

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2020-03-16 15:59:10 +08:00
openeuler-ci-bot
93db242cdd !17 Fix-CVE-2020-7039-and-CVE-2020-8068
Merge pull request !17 from FangYing/fix-CVE-2020-7039-and-CVE-2020-8608
2020-03-12 20:44:45 +08:00
Ying Fang
9b341be807 slirp: Fix libslirp CVE-2020-8608
Picked from libslirp upstream:

tcp_emu: fix unsafe snprintf() usages
68ccb8021a

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-03-12 15:37:08 +08:00
Ying Fang
fb21ed7696 slirp: Fix libslirp CVE-2020-7039
Picked from libslirp upstream:

tcp_emu: Fix oob access
2655fffed7

slirp: use correct size while emulating IRC commands
ce131029d6

slirp: use correct size while emulating commands
82ebe9c370

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-03-12 15:34:32 +08:00
openeuler-ci-bot
a3315051ea !13 Fix-CVE-2020-1711
Merge pull request !13 from FangYing/fix-CVE-2020-1711
2020-03-10 11:07:38 +08:00
Ying Fang
046e9d4f2c spec: Fix patch number mismatch
Patch numbers are mismatched when QEMU is rebased from v4.0.0 to v4.0.1,
this patch is introduced to have it fixed.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-03-10 10:35:50 +08:00
Ying Fang
b047726c50 iscsi: Cap block count from GET LBA STATUS (CVE-2020-1711)
Pick patch from upstream to fix CVE-2020-1711
upstream url:
https://git.qemu.org/?p=qemu.git;a=commit;h=693fd2acdf14dd86c0bf852610f1c2cca80a74dc

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-03-10 10:28:53 +08:00
openeuler-ci-bot
a7a219f0e2 !11 spec: Build qemu with python3
Merge pull request !11 from FangYing/rebase-qemu-4.0.1
2020-02-26 14:17:06 +08:00
Ying Fang
23f09debc1 spec: Build qemu with python3 support
Python2 will reach the end of its life, it's time to build qemu
with python3 support.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-02-26 11:00:38 +08:00
openeuler-ci-bot
5bb93099f4 !10 rebase qemu from qemu-4.0.0 to qemu-4.0.1
Merge pull request !10 from FangYing/rebase-qemu-4.0.1
2020-02-24 15:45:37 +08:00
Ying Fang
e4766d9eee docs: Enable build and install of our rST docs
drop Revert-Enable-build-and-install-of-our-rST-docs.patch
to enable python-sphnix doc support.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-02-21 18:34:23 +08:00
Ying Fang
87b139ea79 qemu: Rebase from qemu-4.0.0 to qemu-4.0.1
Rebase to qemu-4.0.1 and drop redunt patches.
Update release version info.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-02-21 18:34:15 +08:00
Ying Fang
ac7cc5760b spec: remove patches that already been merge into 4.0.1 base line
Prepare for upgrading base package from 4.0.0 to 4.0.1.

Remove all the patches that have been contained in 4.0.1 base package.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-02-21 18:34:08 +08:00
Ying Fang
750a7e3757 9pfs: Update 9pfs-local-Fix-possible patch format
Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-02-21 18:33:57 +08:00
openeuler-ci-bot
c3e6d825f6 !9 [bugfix] Remove unused fno-inline option in spec
Merge pull request !9 from zhanghailiang/fix-spec
2020-02-06 11:34:47 +08:00
zhanghailiang
8116423248 spec: remove fno-inline option
fno-inline option is need by hot-patch, but we didn't support
hot-patch in this version, remove it.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-02-06 10:08:20 +08:00
openeuler-ci-bot
bf8b118e4d !8 [bugfix] block: fix memleaks in bdrv_refresh_filename
Merge pull request !8 from panny060/master
2020-02-05 11:38:03 +08:00
panny060
ab90d4b6f1 update block-fix-memleaks-in-bdrv_refresh_filename.patch. 2020-02-05 11:05:27 +08:00