906 Commits

Author SHA1 Message Date
openeuler-ci-bot
ef91d7e09d
!595 hw/nvme: fix CVE-2021-3929 (openeuler !313)
From: @yezengruan 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-06-23 01:57:28 +00:00
yezengruan
36eaeb0b27 hw/nvme: fix CVE-2021-3929 (openeuler !313)
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-06-22 10:38:05 +08:00
openeuler-ci-bot
0bac9fa8ce
!592 spec: Add qemu-system-riscv rpm package
From: @saarloos 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-06-20 13:48:21 +00:00
saarloos
1bf06bf4ad Add riscv rpm include qemu-system-riscv32 and qemu-system-riscv64 2022-06-20 20:28:47 +08:00
openeuler-ci-bot
4d1ce28a1b
!589 fix CVE-2021-3611
From: @yezengruan 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-06-11 01:52:46 +00:00
yezengruan
cbe2a01c81 fix CVE-2021-3611
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-06-09 17:10:50 +08:00
openeuler-ci-bot
5fcb2de04b
!581 fix CVE-2021-3507 and fix -acpitable regression (openeuler !300!301)
From: @yezengruan 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-05-31 02:26:01 +00:00
yezengruan
ba8cdf7ac0 fix CVE-2021-3507 and fix -acpitable regression (openeuler !300!301)
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-05-31 09:17:56 +08:00
openeuler-ci-bot
accd81d09e
!566 增加system-aarch64 system-arm system-x86_64包生成
From: @saarloos 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-05-30 13:03:32 +00:00
saarloos
666acae1c3 add qemu-system-x86_64 qemu-system-arm qemu-system-aarch64 rpm 2022-05-30 14:39:26 +08:00
openeuler-ci-bot
9a3434c7e7
!574 spec中删除不需要的依赖包
From: @junyang-suse 
Reviewed-by: @yezengruan, @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-05-30 01:19:41 +00:00
Jun Yang
d9686f6f3e qemu: remove unnecessary dependency of kernel package
Signed-off-by: Jun Yang <jun.yang@suse.com>
2022-05-26 19:20:58 +08:00
openeuler-ci-bot
5fd6f62213
!571 fix CVE-2021-3750 (openeuler !293)
From: @yezengruan 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-05-23 12:38:52 +00:00
yezengruan
b39643dc6e fix CVE-2021-3750 (openeuler !293)
hw/intc/arm_gicv3: Check for !MEMTX_OK instead of MEMTX_ERROR (CVE-2021-3750)
softmmu/physmem: Simplify flatview_write and address_space_access_valid
softmmu/physmem: Introduce MemTxAttrs::memory field and MEMTX_ACCESS_ERROR
2022-05-21 14:45:11 +08:00
openeuler-ci-bot
74c6c057fa
!553 fix CVE-2021-4207 and CVE-2021-4206 (openeuler !287)
From: @yezengruan 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-05-11 09:01:05 +00:00
yezengruan
dec7c9d2cf fix CVE-2021-4207 and CVE-2021-4206 (openeuler !287)
display/qxl-render: fix race condition in qxl_cursor (CVE-2021-4207)
ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206)
2022-05-10 21:27:52 +08:00
openeuler-ci-bot
17d220f656
!549 spec文件changelog格式更新
From: @yezengruan 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-05-05 07:31:16 +00:00
yezengruan
af63dcf8b2 update changelog
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-04-27 20:17:55 +08:00
openeuler-ci-bot
1418bdf979
!546 vfio/pci: Ascend710 change to bar2 quirk
From: @yezengruan 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-04-27 06:52:16 +00:00
yezengruan
ce1ce575d6 vfio/pci: Ascend710 change to bar2 quirk
Change Ascend710's quirk regions to bar2 for internal causes.
And support Ascend710 2P format now.

Signed-off-by: Wu Binfeng <wubinfeng@huawei.com>
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-04-27 10:04:21 +08:00
openeuler-ci-bot
db5b94ea78
!542 fix CVE-2022-26354 and CVE-2022-26353
From: @yezengruan 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-04-16 01:17:40 +00:00
yezengruan
b07ad26dc2 fix CVE-2022-26354 and CVE-2022-26353
vhost-vsock: detach the virqueue element in case of error (CVE-2022-26354)
virtio-net: fix map leaking on error during receive (CVE-2022-26353)

Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-04-15 17:26:10 +08:00
openeuler-ci-bot
82c2908da2
!524 sync from branch 22.03-LTS with !505!512!523
From: @yezengruan 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-04-06 02:23:24 +00:00
yezengruan
cf2a6631e6 spec: Update release version with !273
fix some IO hang bugs

Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-03-30 10:22:16 +08:00
yezengruan
90f33cc473 fix some IO hang bugs
scsi-bus: fix incorrect call for blk_error_retry_reset_timeout()
Revert "monitor: limit io error qmp event to at most once per 60s"

Signed-off-by: Yan Wang <wangyan122@huawei.com>
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-03-30 10:22:03 +08:00
Jinhua Cao
f0684b551e qemu-img create: cache paramter only use for reg file image
The paramter 'cache' is invalid for host device(/dev/xxx). If
'qemu-img create' operator performed on host device, the host
device not support 'cache' would result 'qemu-img create excute'
failed.

Signed-off-by: Jinhua Cao <caojinhua1@huawei.com>
2022-03-30 10:21:32 +08:00
Yan Wang
d3ad6ab6ba spec: add hw-usb-host rpm package
Signed-off-by: Yan Wang <wangyan122@huawei.com>
2022-03-30 10:21:21 +08:00
openeuler-ci-bot
393705cbda
!501 [sync] master branch upgrade to version 6.2.0
From: @yezengruan 
Reviewed-by: @imxcc 
Signed-off-by: @imxcc
2022-03-20 09:28:22 +00:00
yezengruan
5d70d132d5 spec: Update release version with !266 and support sw64
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-03-19 14:42:32 +08:00
jiang-dawei15
71483c8a97 coro: support live patch for libcare
Description:
For coroutine live patch, we need find all coroutines stack and check them
before patching. There is no structure to manage all coroutines in qemu. So we
add a list which contain all running coroutines to accelerate libcare live
patch.

Signed-off-by: jiang-dawei15 <jiangdawei15@huawei.com>
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-03-19 14:42:32 +08:00
yezengruan
d9dc01751d add patch for sw64 support
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-03-19 14:42:32 +08:00
jiang-dawei15
a2bda2ea92 cflages: add cflags '-ftls-model=initial-exec'
This option changes the thread local storage (TLS) model. Thread-local storage
is a mechanism by which variables are allocated in a way that causes one instance
of the variable per extant thread.

i.global-dynamic

Generates a generic TLS code. The code can be used everywhere and the code can access
variables defined anywhere else. This setting causes the largest size code to be generated
and uses the most run time to produce.

ii.local-dynamic

Generates an optimized TLS code. To use this setting, the thread-local variables must be
defined in the same object in which they are referenced.

iii.initial-exec

Generates a restrictive, optimized TLS code. To use this setting, the thread-local variables
accessed must be defined in one of the modules available to the program.

iv.local-exec

Generates the most restrictive TLS code. To use this setting, the thread-local variables
must be defined in the executable.

Optimize qemu cflags with '-ftls-model=initial-exec' which means we use initial-exec
mode.
2022-03-19 14:42:32 +08:00
yezengruan
efd1f8a7bf spec: Update release version with !265
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-03-19 14:42:32 +08:00
yezengruan
3238aa5a64 sw_64: Add sw64 architecture support
Signed-off-by: Lu Feifei <lufeifei@wxiat.com>
Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-03-19 14:42:32 +08:00
jiang-dawei15
a0a3c6a357 qemu.spec: add "--enable-debug" parameter to configure.
(cherry picked from commit 64b9ff905211b4a6f318d77e6183bac89873cf59)
2022-03-19 14:42:32 +08:00
Chen Qun
f7e17bbe44 spec: Update release version with !263 !264
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2022-03-19 14:42:32 +08:00
Chen Qun
b00a57bdfa spec: Update patch and changelog with !264 tools/virtiofsd: Add rseq syscall to the seccomp allowlist !264
tools/virtiofsd: Add rseq syscall to the seccomp allowlist

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2022-03-19 14:42:32 +08:00
Chen Qun
4f0d0fe2ea tools/virtiofsd: Add rseq syscall to the seccomp allowlist
The virtiofsd currently crashes when used with glibc 2.35.
That is due to the rseq system call being added to every thread
creation [1][2].

[1]: https://www.efficios.com/blog/2019/02/08/linux-restartable-sequences/
[2]: https://sourceware.org/pipermail/libc-alpha/2022-February/136040.html

This happens not at daemon start, but when a guest connects

    /usr/lib/qemu/virtiofsd -f --socket-path=/tmp/testvfsd -o sandbox=chroot \
        -o source=/var/guests/j-virtiofs --socket-group=kvm
    virtio_session_mount: Waiting for vhost-user socket connection...
    # start ok, now guest will connect
    virtio_session_mount: Received vhost-user socket connection
    virtio_loop: Entry
    fv_queue_set_started: qidx=0 started=1
    fv_queue_set_started: qidx=1 started=1
    Bad system call (core dumped)

We have to put rseq on the seccomp allowlist to avoid that the daemon
is crashing in this case.

Reported-by: Michael Hudson-Doyle <michael.hudson@canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-id: 20220209111456.3328420-1-christian.ehrhardt@canonical.com

[Moved rseq to its alphabetically ordered position in the seccomp
allowlist.
--Stefan]
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: qinyu <qinyu16@huawei.com>
2022-03-19 14:42:32 +08:00
Chen Qun
9cb44f2d1d spec: Update patch and changelog with !263 【6.2.0】修改object_unref导致的abort问题 !263
scsi-bus: fix unmatched object_unref()

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2022-03-19 14:42:32 +08:00
Chen Qun
8d34e515a0 scsi-bus: fix unmatched object_unref()
Fix commit 391dd8f1("scsi-bus: Refactor the code that retries requests"),
which split scsi_dma_restart_bh(), but the object_unref() belongs to
scsi_dma_restart_bh().
So, we should mv object_unref() from scsi_retry_requests() to
scsi_dma_restart_bh().

Signed-off-by: Yan Wang <wangyan122@huawei.com>
2022-03-19 14:42:32 +08:00
Yan Wang
846e2a19aa spec: Update release version with !220
increase release version by one

Signed-off-by: Yan Wang <wangyan122@huawei.com>
2022-03-19 14:42:32 +08:00
Yan Wang
59d4491bda spec: Update patch and changelog with !220
pl011-reset-read-FIFO-when-UARTTIMSC-0-UARTICR-0xfff.patch
qcow2-fix-memory-leak-in-qcow2_read_extensions.patch
scsi-disk-define-props-in-scsi_block_disk-to-avoid-m.patch
pcie-Add-pcie-root-port-fast-plug-unplug-feature.patch
pcie-Compat-with-devices-which-do-not-support-Link-W.patch

Signed-off-by: Yan Wang <wangyan122@huawei.com>
2022-03-19 14:42:32 +08:00
Yan Wang
e40499de24 pcie: Compat with devices which do not support Link Width, such as ioh3420
We hack into PCI_EXP_LNKCAP to support device fast plug/unplug
for pcie-root-port. However some devices like ioh3420 does not
suport it, so PCI_EXP_LNKCAP is not set for such devices.

Signed-off-by: Ying Fang <fangying1@huawei.com>
Signed-off-by: Yan Wang <wangyan122@huawei.com>
2022-03-19 14:42:32 +08:00
Yan Wang
00144ede80 pcie: Add pcie-root-port 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>
Signed-off-by: Yan Wang <wangyan122@huawei.com>
2022-03-19 14:42:32 +08:00
Yan Wang
0be66912ec scsi-disk: define props in scsi_block_disk to avoid memleaks
scsi_block_realize() use scsi_realize() to init some props, but
these props is not defined in scsi_block_disk_properties, so they will
not be freed.

This patch defines these prop in scsi_block_disk_properties to avoid memleaks.

Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Signed-off-by: Yan Wang <wangyan122@huawei.com>
2022-03-19 14:42:32 +08:00
Yan Wang
65dd3d084e qcow2: fix memory leak in qcow2_read_extensions
Free feature_table if it is failed in bdrv_pread.

Signed-off-by: fangyi <eric.fangyi@huawei.com>
Signed-off-by: Yan Wang <wangyan122@huawei.com>
2022-03-19 14:42:32 +08:00
Yan Wang
d2f4ee0ae7 pl011: reset read FIFO when UARTTIMSC=0 & UARTICR=0xffff
We can enable ACPI when AArch64 Linux is booted with QEMU and UEFI (AAVMF).
When VM is booting and the SBSA driver has not initialized, writting data
that exceds 32 bytes will cause the read FIFO full and proceeding data will
be lost. The searil port appears to be stuck in this abnormal situation.

A hack to reset read FIFO when UARTTIMSC=0 & UARTICR=0xffff appears to
resolve the issue.

The question is fully discussed at
https://www.spinics.net/lists/linux-serial/msg23163.html

Signed-off-by: Haibin Wang <wanghaibin.wang@huawei.com>
Reviewed-by: Shannon Zhao <shannon.zhaosl@gmail.com>
Reviewed-by: Ying Fang <fangying1@huawei.com>
Signed-off-by: Yan Wang <wangyan122@huawei.com>
2022-03-19 14:42:32 +08:00
Chen Qun
71bd18e462 spec: Update release version with !257
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
(cherry picked from commit 185b204119d6955d15deaba8f441880eacfa3f8f)
2022-03-19 14:42:32 +08:00
Chen Qun
f5a6f5b203 spec: Update patch and changelog with !257 add vcpu hotplug feature from 4.1 to 6.2 !257
acpi/madt: Factor out the building of MADT GICC struct
hw/arm/virt: Assign virt_madt_cpu_entry to acpi_ged madt_cpu hook
arm/virt/acpi: Factor out CPPC building from DSDT CPU aml
acpi/cpu: Prepare build_cpus_aml for arm virt
acpi/ged: Extend ACPI GED to support CPU hotplug
arm/cpu: assign arm_get_arch_id handler to get_arch_id hook
tests/acpi/bios-tables-test: Allow changes to virt/DSDT file
arm/virt: Attach ACPI CPU hotplug support to virt
tests/acpi/bios-table-test: Update expected virt/DSDT file
arm/virt: Add CPU hotplug framework
arm/virt: Add CPU topology support
test/numa: Adjust aarch64 numa test
hw/arm/virt: Factor out some CPU init codes to pre_plug hook
hw/arm/boot: Add manually register and trigger of CPU reset
arm/virt/gic: Construct irqs connection from create_gic
intc/gicv3_common: Factor out arm_gicv3_common_cpu_realize
intc/gicv3_cpuif: Factor out gicv3_init_one_cpuif
intc/kvm_gicv3: Factor out kvm_arm_gicv3_cpu_realize
hw/intc/gicv3: Add CPU hotplug realize hook
accel/kvm: Add pre-park vCPU support
intc/gicv3: Add pre-sizing capability to GICv3
acpi/madt: Add pre-sizing capability to MADT GICC struct
arm/virt: Add cpu_hotplug_enabled field
arm/virt/acpi: Extend cpufreq to support max_cpus
arm/virt: Pre-sizing MADT-GICC GICv3 and Pre-park KVM vCPU
arm/virt: Start up CPU hot-plug and cold-plug

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
(cherry picked from commit 9390aa07e450024769ceb3bb3ab481af8911a77b)
2022-03-19 14:42:32 +08:00
Chen Qun
eba2406898 arm/virt: Start up CPU hot-plug and cold-plug
All the CPU hotplug facilities are ready. Assemble them
to start up CPU hot-plug capability for arm/virt.

This also 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: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
(cherry picked from commit d5d118431a64c4202cb28c27bdea0f8667beb5dd)
2022-03-19 14:42:32 +08:00