528 Commits

Author SHA1 Message Date
Chen Qun
ee2579bcd3 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-02-11 21:01:17 +08:00
Chen Qun
ca68a3cb8e 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-02-11 21:01:17 +08:00
openeuler-ci-bot
73ce79af22
!442 Update Release with openeuler !226 !231 !227 !228
From: @imxcc 
Reviewed-by: @Chuan-Zheng 
Signed-off-by: @Chuan-Zheng
2022-02-11 12:57:50 +00:00
imxcc
f58e631f66 Update Release with openeuler !226 !231 !227 !228
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-02-11 19:54:23 +08:00
imxcc
4e30eed4eb Update patch and changelog with openeuler !228
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-02-11 19:54:11 +08:00
imxcc
7926d61eee Update patch and changelog with openeuler !227
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-02-11 19:54:01 +08:00
imxcc
f5e461f0bc Update patch and changelog with openeuler !231
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-02-11 19:53:50 +08:00
imxcc
c16b3ded55 Update patch and changelog with openeuler !226
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-02-11 19:53:40 +08:00
openeuler-ci-bot
8714bea185
!440 适配spec文件
From: @sujerry1991 
Reviewed-by: @imxcc 
Signed-off-by: @imxcc
2022-02-11 09:58:06 +00:00
Yan Wang
4c2875bf71 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-02-11 17:05:50 +08:00
Yan Wang
fd1bdb93ed chardev/baum: disable unused brlapi
disable unused brlapi.

Signed-off-by: Yan Wang <wangyan122@huawei.com>
2022-02-11 17:05:43 +08:00
openeuler-ci-bot
8023012e9d
!436 generate code patches with openeuler !230
From: @imxcc 
Reviewed-by: @Chuan-Zheng 
Signed-off-by: @Chuan-Zheng
2022-02-11 08:57:41 +00:00
imxcc
9f7d6d7696 Update with openEuler !230
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-02-11 15:36:54 +08:00
openeuler-ci-bot
ea7377c0b3
!433 sync from openeuler pulls 221 and 222
From: @imxcc 
Reviewed-by: @Chuan-Zheng 
Signed-off-by: @Chuan-Zheng
2022-02-11 06:19:59 +00:00
imxcc
b1e815b6d7 sync from openeuler/pulls/221 and 222
Signed-off-by: imxcc <xingchaochao@huawei.com>
2022-02-10 21:33:12 +08:00
openeuler-ci-bot
3579de59f1
!428 Automatically generate code patches with openeuler !225
From: @kuhnchen18 
Reviewed-by: @imxcc 
Signed-off-by: @imxcc
2022-02-10 10:06:22 +00:00
Chen Qun
c4b7370a79 spec: Update release version with !225
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2022-02-09 11:51:03 +08:00
Chen Qun
d7b5ffe160 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-02-09 11:51:01 +08:00
Chen Qun
d27426660c 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-02-09 11:51:01 +08:00
Chen Qun
4cbee3a6ae 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-02-09 11:51:01 +08:00
Chen Qun
a619469084 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-02-09 11:51:01 +08:00
Chen Qun
60e5a09642 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-02-09 11:51:01 +08:00
openeuler-ci-bot
518edcfbb3
!422 Qemu6.2.0 compilation init
Merge pull request !422 from avenLiu/openEuler-22.03-LTS-Next
2022-02-09 03:30:42 +00:00
liuxiangdong
ae364c45a7 qemu-6.2.0 compilation init
add net-dump.c-Suppress-spurious-compiler-warning.patch
2022-02-08 21:12:42 +08:00
openeuler-ci-bot
f97cd371db
!417 Qemu6.2.0 Package init
Merge pull request !417 from avenLiu/openEuler-22.03-LTS-Next
2022-01-30 07:06:58 +00:00
liuxiangdong
701a2b0a08 Package init 2022-01-29 09:56:33 +08:00
openeuler-ci-bot
ea7ac02e25 !381 Automatically generate code patches with openeuler !204
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-09-26 09:18:17 +00:00
Chen Qun
e7c93b74e5 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:51 +08:00
Chen Qun
ed707fa278 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:37 +08:00
Chen Qun
1060a0ef70 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:37 +08:00
openeuler-ci-bot
365bb244c7 !376 Automatically generate code patches with openeuler !199
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-09-16 07:13:09 +00:00
Chen Qun
f0153a2c8b 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:50 +08:00
Chen Qun
ba90f16b51 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:43 +08:00
Chen Qun
cbbb5bb05b 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:43 +08:00
openeuler-ci-bot
728ad4d77f !372 Automatically generate code patches with openeuler !195
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-09-14 13:59:27 +00:00
Chen Qun
c85bfe7537 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:14 +08:00
Chen Qun
0e5f414f81 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:11 +08:00
Chen Qun
5d72f15424 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:10 +08:00
openeuler-ci-bot
081cc30f09 !370 Automatically generate code patches with openeuler !192
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-09-09 01:19:55 +00:00
Chen Qun
3855c40a82 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:58 +08:00
Chen Qun
74e23e648f 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:55 +08:00
Chen Qun
45118f2eba 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:55 +08:00
openeuler-ci-bot
792b9397eb !355 【SP1分支同步】block_curl: add bolck_curl package
From: @lijiajie128
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-08-20 02:28:46 +00:00
Jiajie Li
eea7bf7286 block_curl: add bolck_curl package
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-08-19 13:45:46 +08:00
openeuler-ci-bot
81cdabec6a !353 [sync] PR-349: Automatically generate code patches with openeuler !185
From: @openeuler-sync-bot
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-08-17 06:10:09 +00:00
Chen Qun
f799026b2a spec: Update release version with !185
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
(cherry picked from commit 0e5958c788620868a24fa106e2295ffec6bd24c8)
2021-08-17 12:01:24 +08:00
Chen Qun
0d820dd09b spec: Update patch and changelog with !185 fix CVE-2021-3682 #I45H4H !185
usbredir: fix free call

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
(cherry picked from commit ce72a2174d52519bca8b951d63d50d1e9c039583)
2021-08-17 12:01:24 +08:00
Chen Qun
071da4bb78 usbredir: fix free call
data might point into the middle of a larger buffer, there is a separate
free_on_destroy pointer passed into bufp_alloc() to handle that.  It is
only used in the normal workflow though, not when dropping packets due
to the queue being full.  Fix that.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/491
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210722072756.647673-1-kraxel@redhat.com>
Signed-off-by: imxcc <xingchaochao@huawei.com>
(cherry picked from commit 47c21ec4a9ab183f402ec611e82f49bc020aaab6)
2021-08-17 12:01:24 +08:00
openeuler-ci-bot
d1cc9da786 !346 Automatically generate code patches with openeuler !183
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-08-05 07:54:15 +00:00
Chen Qun
216918bb04 spec: Update release version with !183
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-08-04 11:28:28 +08:00