523 Commits

Author SHA1 Message Date
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
openeuler-ci-bot
f7f5af3a7a !360 Modify the bad date in spec file that caused compile error.
From: @tom0392
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-08-31 09:12:30 +00:00
tangzhongrui
81ad349e4d Modify the bad date in spec file that caused compile error.
Signed-off-by:  Zhongrui Tang <tangzhongrui@cmss.chinamobile.com>
2021-08-31 13:59:24 +08:00
openeuler-ci-bot
0bfd6f8287 !359 删除spec文件中changelog有重复且日期乱序的记录
From: @tom0392
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-08-31 03:30:39 +00:00
tangzhongrui
710fa3214a Modify the spec file to specify the package version of zstd and zstd-devel that qemu depends on.
Signed-off-by:  Zhongrui Tang <tangzhongrui@cmss.chinamobile.com>
2021-08-30 17:01:21 +08:00
tangzhongrui
29a47b91a6 Remove duplicate and disorderly changelogs which will cause compilation errors.
Signed-off-by:  Zhongrui Tang <tangzhongrui@cmss.chinamobile.com>
2021-08-30 16:51:48 +08:00
openeuler-ci-bot
2a25f30bbe !354 【SP1分支同步】block_curl: add bolck_curl package
From: @lijiajie128
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-08-20 02:27:12 +00:00
Jiajie Li
0978d96786 block_curl: add bolck_curl package
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-08-19 13:43:41 +08:00
openeuler-ci-bot
d60ae9a499 !349 Automatically generate code patches with openeuler !185
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-08-16 10:45:43 +00:00
Chen Qun
0e5958c788 spec: Update release version with !185
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-08-16 11:29:58 +08:00
Chen Qun
ce72a2174d 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>
2021-08-16 11:29:37 +08:00
Chen Qun
47c21ec4a9 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>
2021-08-16 11:29:37 +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
Chen Qun
b94d8926ee spec: Update patch and changelog with !183 Support VFIO migration manual clear interface & vSMMUv3/pSMMUv3 2 stage VFIO integration & Support migration in SMMUv3 nested mode !183
vfio: Support host translation granule size
vfio/migrate: Move switch of dirty tracking into vfio_memory_listener
vfio: Fix unregister SaveVMHandler in vfio_migration_finalize
migration/ram: Reduce unnecessary rate limiting
migration/ram: Optimize ram_save_host_page()
qdev/monitors: Fix reundant error_setg of qdev_add_device
linux-headers: update against 5.10 and manual clear vfio dirty log series
vfio: Maintain DMA mapping range for the container
vfio/migration: Add support for manual clear vfio dirty log
hw/arm/smmuv3: Support 16K translation granule
hw/arm/smmuv3: Set the restoration priority of the vSMMUv3 explicitly
hw/vfio/common: trace vfio_connect_container operations
update-linux-headers: Import iommu.h
vfio.h and iommu.h header update against 5.10
memory: Add new fields in IOTLBEntry
hw/arm/smmuv3: Improve stage1 ASID invalidation
hw/arm/smmu-common: Allow domain invalidation for NH_ALL/NSNH_ALL
memory: Add IOMMU_ATTR_VFIO_NESTED IOMMU memory region attribute
memory: Add IOMMU_ATTR_MSI_TRANSLATE IOMMU memory region attribute
memory: Introduce IOMMU Memory Region inject_faults API
iommu: Introduce generic header
pci: introduce PCIPASIDOps to PCIDevice
vfio: Force nested if iommu requires it
vfio: Introduce hostwin_from_range helper
vfio: Introduce helpers to DMA map/unmap a RAM section
vfio: Set up nested stage mappings
vfio: Pass stage 1 MSI bindings to the host
vfio: Helper to get IRQ info including capabilities
vfio/pci: Register handler for iommu fault
vfio/pci: Set up the DMA FAULT region
vfio/pci: Implement the DMA fault handler
hw/arm/smmuv3: Advertise MSI_TRANSLATE attribute
hw/arm/smmuv3: Store the PASID table GPA in the translation config
hw/arm/smmuv3: Fill the IOTLBEntry arch_id on NH_VA invalidation
hw/arm/smmuv3: Fill the IOTLBEntry leaf field on NH_VA invalidation
hw/arm/smmuv3: Pass stage 1 configurations to the host
hw/arm/smmuv3: Implement fault injection
hw/arm/smmuv3: Allow MAP notifiers
pci: Add return_page_response pci ops
vfio/pci: Implement return_page_response page response callback
vfio/common: Avoid unmap ram section at vfio_listener_region_del() in nested mode
vfio: Introduce helpers to mark dirty pages of a RAM section
vfio: Add vfio_prereg_listener_log_sync in nested stage
vfio: Add vfio_prereg_listener_log_clear to re-enable mark dirty pages
vfio: Add vfio_prereg_listener_global_log_start/stop in nested stage
hw/arm/smmuv3: Post-load stage 1 configurations to the host

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-08-04 11:28:28 +08:00
Chen Qun
b06e551676 hw/arm/smmuv3: Post-load stage 1 configurations to the host
In nested mode, we call the set_pasid_table() callback on each
STE update to pass the guest stage 1 configuration to the host
and apply it at physical level.

In the case of live migration, we need to manually call the
set_pasid_table() to load the guest stage 1 configurations to
the host. If this operation fails, the migration fails.

Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
2021-08-04 11:28:28 +08:00
Chen Qun
7644dd1549 vfio: Add vfio_prereg_listener_global_log_start/stop in nested stage
In nested mode, we set up the stage 2 and stage 1 separately. In my
opinion, vfio_memory_prereg_listener is used for stage 2 and
vfio_memory_listener is used for stage 1. So it feels weird to call
the global_log_start/stop interface in vfio_memory_listener to switch
dirty tracking, although this won't cause any errors. Add
global_log_start/stop interface in vfio_memory_prereg_listener
can separate stage 2 from stage 1.

Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
2021-08-04 11:28:28 +08:00
Chen Qun
38c3954435 vfio: Add vfio_prereg_listener_log_clear to re-enable mark dirty pages
When tracking dirty pages, we just need to pay attention to stage 2
mappings. Legacy vfio_listener_log_clear cannot be used in nested
stage. This patch adds vfio_prereg_listener_log_clear to re-enable
dirty pages in nested mode.

Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
2021-08-04 11:28:28 +08:00
Chen Qun
eae456de7c vfio: Add vfio_prereg_listener_log_sync in nested stage
In nested mode, we set up the stage 2 (gpa->hpa)and stage 1
(giova->gpa) separately by vfio_prereg_listener_region_add()
and vfio_listener_region_add(). So when marking dirty pages
we just need to pay attention to stage 2 mappings.

Legacy vfio_listener_log_sync cannot be used in nested stage.
This patch adds vfio_prereg_listener_log_sync to mark dirty
pages in nested mode.

Signed-off-by: Kunkun Jiang <jiangkunkun@huawei.com>
2021-08-04 11:28:28 +08:00