541 Commits

Author SHA1 Message Date
Chen Qun
e6eb2724a2 block: disallow block jobs when there is a BDRV_O_INACTIVE flag
Currently, migration will put a BDRV_O_INACTIVE flag
on bs's open_flags until another resume being called. In that case,
any IO from vm or block jobs will cause a qemu crash with an assert
'assert(!(bs->open_flags & BDRV_O_INACTIVE))' failure in bdrv_co_pwritev
function. we hereby disallow block jobs by faking a blocker.

Signed-off-by: wangjian161 <wangjian161@huawei.com>
2022-03-19 14:42:31 +08:00
Chen Qun
05acb1318d block: enable cache mode of empty cdrom
enable cache mode even if cdrom is empty

Signed-off-by: wangjian161 <wangjian161@huawei.com>
2022-03-19 14:42:31 +08:00
Chen Qun
95206472cc qemu-pr: fixed ioctl failed for multipath disk
We use ioctl to detect multipath devices.  However, we only set flags in
struct dm_ioctl (the argument to ioctl) and left other fields in random,
which may cause the failure of calling ioctl.  Hence, we set other
fields to 0 to avoid the failure.

Signed-off-by: wangjian161 <wangjian161@huawei.com>
2022-03-19 14:42:31 +08:00
Chen Qun
5f9b6047bd qemu-nbd: set timeout to qemu-nbd socket
In case of insufficient memory and kill-9,
the NBD socket cannot be processed and stuck all the time.

Signed-off-by: wangjian161 <wangjian161@huawei.com>
2022-03-19 14:42:31 +08:00
Chen Qun
ec87f83a2e qemu-nbd: make native as the default aio mode
When the file system is dealing with multithreading concurrent writing to a file,
the performance will be degraded because of the lock.
At present, the default AIO mode of QEMU NBD is threads. In the case of large blocks,
because IO is divided into small pieces and multiple queues, it will become multithreading
concurrent writing the same file. Due to the file system, the performance will be greatly reduced.
If you change to native mode, this problem will not exist.

Signed-off-by: wangjian161 <wangjian161@huawei.com>
2022-03-19 14:42:31 +08:00
Chen Qun
3f9841ed96 nbd/server.c: fix invalid read after client was already free
In the process of NBD equipment pressurization, executing QEMU NBD will
lead to the failure of IO distribution and go to NBD_ Out process of trip().
If two or more IO go to the out process, client NBD will release in nbd_request_put().
The user after free problem that is read again in close().
Through the NBD_ Save the value of client > closing before the out process in trip
to solve the use after free problem.

Signed-off-by: wangjian161 <wangjian161@huawei.com>
2022-03-19 14:42:31 +08:00
imxcc
42a3ff7919 Update Release with openeuler !226 !231 !227 !228
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-03-19 14:42:31 +08:00
imxcc
92f8ca0f24 Update patch and changelog with openeuler !228
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-03-19 14:42:31 +08:00
imxcc
54733e3d90 Update patch and changelog with openeuler !227
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-03-19 14:42:31 +08:00
imxcc
baab1dcfbb Update patch and changelog with openeuler !231
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-03-19 14:42:31 +08:00
imxcc
f0de605f36 Update patch and changelog with openeuler !226
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-03-19 14:42:31 +08:00
Yan Wang
1dfcba926c log: disable qemu_log function for "make check V=1"
Lots of patches will use qemu_log, it will cause "make check V=1"
failure. So disable qemu_log when calling "make check V=1".

Signed-off-by: Yan Wang <wangyan122@huawei.com>
2022-03-19 14:42:31 +08:00
Yan Wang
cb1e6efc6e chardev/baum: disable unused brlapi
disable unused brlapi.

Signed-off-by: Yan Wang <wangyan122@huawei.com>
2022-03-19 14:42:31 +08:00
imxcc
aca5683fc4 Update with openEuler !230
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-03-19 14:42:31 +08:00
imxcc
6b0777d910 sync from openeuler/pulls/221 and 222
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-03-19 14:42:31 +08:00
Chen Qun
8dba2ce743 spec: Update release version with !225
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2022-03-19 14:42:31 +08:00
Chen Qun
d52f975c7d spec: Update patch and changelog with !225 回合openEuler CPU model 自研patch Merge pull request !225 from limingwang/qemu-6.2.0 !225
cpu: parse +/- feature to avoid failure
cpu: add Kunpeng-920 cpu support
cpu: add Cortex-A72 processor kvm target support
add Phytium's CPU models: FT-2000+ and Tengyun-S2500.

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2022-03-19 14:42:31 +08:00
Chen Qun
ac48c0f1e8 add Phytium's CPU models: FT-2000+ and Tengyun-S2500.
Signed-off-by: Jiadong Zeng <zengjiadong@phytium.com.cn>
Signed-off-by: Mingwang Li <limingwang@huawei.com>
2022-03-19 14:42:31 +08:00
Chen Qun
a06c9a7f18 cpu: add Cortex-A72 processor kvm target support
The ARM Cortex-A72 is ARMv8-A micro-architecture,
add kvm target to ARM Cortex-A72 processor definition.

Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
Signed-off-by: Mingwang Li <limingwang@huawei.com>
2022-03-19 14:42:31 +08:00
Chen Qun
324e05ef61 cpu: add Kunpeng-920 cpu support
Add the Kunpeng-920 CPU model

Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
Signed-off-by: Mingwang Li <limingwang@huawei.com>
2022-03-19 14:42:31 +08:00
Chen Qun
5f141f43f0 cpu: parse +/- feature to avoid failure
To avoid cpu feature parse failure, +/- feature is added.

Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
Signed-off-by: Mingwang Li <limingwang@huawei.com>
2022-03-19 14:42:31 +08:00
liuxiangdong
db2c567699 qemu-6.2.0 compilation init
add net-dump.c-Suppress-spurious-compiler-warning.patch
2022-03-19 14:34:46 +08:00
liuxiangdong
787ea25064 Package init
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-03-19 14:31:23 +08:00
openeuler-ci-bot
cff59dc576
!411 Automatically generate code patches with openeuler !208 !213 !211
Merge pull request !411 from KuhnChen/master
2022-01-18 08:41:57 +00:00
Chen Qun
ff7588196f spec: Update release version with !208 !213 !211
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-12-21 21:28:08 +08:00
Chen Qun
e61a706223 spec: Update patch and changelog with !211 add Phytium's CPU models: FT-2000+ and Tengyun-S2500. Merge pull request !211 from 曾佳栋/qemu-4.1.0 !211
add Phytium's CPU models: FT-2000+ and Tengyun-S2500.

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-12-21 21:28:05 +08:00
Chen Qun
8a4ebc892a add Phytium's CPU models: FT-2000+ and Tengyun-S2500.
Signed-off-by: Jiadong Zeng <zengjiadong@phytium.com.cn>
2021-12-21 21:28:05 +08:00
Chen Qun
005d9d40c2 spec: Update patch and changelog with !213 virtio-balloon: apply upstream patch. !213
virtio-balloon: apply upstream patch.

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-12-21 21:28:03 +08:00
Chen Qun
7941e858a5 virtio-balloon: apply upstream patch.
Signed-off-by: Ming Yang <yangming73@huawei.com>
2021-12-21 21:28:03 +08:00
Chen Qun
14a75ddc3c spec: Update patch and changelog with !208 sync from SP1 !208
fix cve-2020-35504
fix cve-2020-35505

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-12-21 21:28:00 +08:00
Chen Qun
da2b6f4f92 fix cve-2020-35505
esp: ensure cmdfifo is not empty and current_dev is non-NULL

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-12-21 21:28:00 +08:00
Chen Qun
a327e9e928 fix cve-2020-35504
esp: always check current_req is not NULL before use in DMA callbacks

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-12-21 21:28:00 +08:00
openeuler-ci-bot
774b9773fa !393 修复qemu的3个cve:cve-2021-3592 cve-2021-3593 cve-2021-3595
From: @bobychen
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-10-27 02:38:56 +00:00
bobychen
5a2a43fcb1 fix cve-2021-3592 cve-2021-3593 cve-2021-3595
fix submodule slirp cve-2021-3592 cve-2021-3593 and cve-2021-3595

Signed-off-by: imxcc <xingchaochao@huawei.com>
Signed-off-by: bobychen <boby.chen@huawei.com>
2021-10-27 09:23:26 +08:00
openeuler-ci-bot
867add67af !380 Automatically generate code patches with openeuler !204
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-09-26 09:38:47 +00:00
Chen Qun
19a7a3c4d7 spec: Update release version with !204
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-09-26 16:28:48 +08:00
Chen Qun
37d0d9e897 spec: Update patch and changelog with !204 fix CVE-2021-3748 !204
virtio-net: fix use after unmap/free for sg

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-09-26 16:28:36 +08:00
Chen Qun
d22f4b0b0c virtio-net: fix use after unmap/free for sg
When mergeable buffer is enabled, we try to set the num_buffers after
the virtqueue elem has been unmapped. This will lead several issues,
E.g a use after free when the descriptor has an address which belongs
to the non direct access region. In this case we use bounce buffer
that is allocated during address_space_map() and freed during
address_space_unmap().

Fixing this by storing the elems temporarily in an array and delay the
unmap after we set the the num_buffers.

This addresses CVE-2021-3748.

Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: fbe78f4f55c6 ("virtio-net support")
Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-09-26 16:28:35 +08:00
openeuler-ci-bot
9b3e5f5993 !375 Automatically generate code patches with openeuler !199
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-09-16 07:13:21 +00:00
Chen Qun
0aee04daf1 spec: Update release version with !199
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-09-16 11:27:46 +08:00
Chen Qun
5edc11eb3b spec: Update patch and changelog with !199 fix CVE-2021-3713 !199
uas: add stream number sanity checks.

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-09-16 11:27:41 +08:00
Chen Qun
61768948c9 uas: add stream number sanity checks.
The device uses the guest-supplied stream number unchecked, which can
lead to guest-triggered out-of-band access to the UASDevice->data3 and
UASDevice->status3 fields.  Add the missing checks.

Fixes: CVE-2021-3713
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reported-by: Chen Zhe <chenzhe@huawei.com>
Reported-by: Tan Jingguo <tanjingguo@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210818120505.1258262-2-kraxel@redhat.com>
2021-09-16 11:27:41 +08:00
openeuler-ci-bot
ff8228c763 !371 Automatically generate code patches with openeuler !195
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-09-15 01:12:15 +00:00
Chen Qun
df900e5923 spec: Update release version with !195
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-09-14 21:28:11 +08:00
Chen Qun
b87fe562da spec: Update patch and changelog with !195 vfio/common: Add address alignment check in vfio_listener_region_del !195
vfio/common: Add address alignment check in vfio_listener_region_del

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-09-14 21:28:09 +08:00
Chen Qun
d8c06892e0 vfio/common: Add address alignment check in vfio_listener_region_del
Both vfio_listener_region_add and vfio_listener_region_del have
reference counting operations on ram section->mr. If the 'iova'
and 'llend' of the ram section do not pass the alignment
check, the ram section should not be mapped or unmapped. It means
that the reference counting should not be changed.

However, the address alignment check is missing in
vfio_listener_region_del. This makes memory_region_unref will
be unconditional called and causes unintended problems in some
scenarios.

Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
2021-09-14 21:28:09 +08:00
openeuler-ci-bot
a0baaba962 !369 Automatically generate code patches with openeuler !192
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-09-09 01:20:10 +00:00
Chen Qun
333296b131 spec: Update release version with !192
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-09-08 11:27:55 +08:00
Chen Qun
5f67e5fb45 spec: Update patch and changelog with !192 vfio/common: Fix incorrect address alignment in vfio_dma_map_ram_section !192
vfio/common: Fix incorrect address alignment in vfio_dma_map_ram_section

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-09-08 11:27:53 +08:00
Chen Qun
01187ec9bc vfio/common: Fix incorrect address alignment in vfio_dma_map_ram_section
The 'iova' will be passed to host kernel for mapping with the
HPA. It is related to the host page size. So TARGET_PAGE_ALIGN
should be replaced by REAL_HOST_PAGE_ALIGN. In the case of
large granularity (64K), it may return early when map MMIO RAM
section. And because of the inconsistency with
vfio_dma_unmap_ram_section, it may cause 'assert(qrange)'
in vfio_dma_unmap.

Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
2021-09-08 11:27:53 +08:00