From: @zhendongchen Reviewed-by: @yorifang Signed-off-by: @yorifang
This commit is contained in:
commit
d4073186bb
80
add-phytium-2000plus-and-s2500-support-on-arm-archit.patch
Normal file
80
add-phytium-2000plus-and-s2500-support-on-arm-archit.patch
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
From 0ef9a886d3d8bd468800ee3d6aadac2231359501 Mon Sep 17 00:00:00 2001
|
||||||
|
From: root <root@openeuleropenstack.dev01>
|
||||||
|
Date: Thu, 4 Feb 2021 17:35:46 +0800
|
||||||
|
Subject: [PATCH] add phytium 2000plus and s2500 support on arm architecture
|
||||||
|
for capability
|
||||||
|
|
||||||
|
---
|
||||||
|
src/cpu_map/Makefile.inc.am | 2 ++
|
||||||
|
src/cpu_map/arm_FT-2000plus.xml | 6 ++++++
|
||||||
|
src/cpu_map/arm_Tengyun-S2500.xml | 6 ++++++
|
||||||
|
src/cpu_map/arm_vendors.xml | 1 +
|
||||||
|
src/cpu_map/index.xml | 4 ++++
|
||||||
|
5 files changed, 19 insertions(+)
|
||||||
|
create mode 100644 src/cpu_map/arm_FT-2000plus.xml
|
||||||
|
create mode 100644 src/cpu_map/arm_Tengyun-S2500.xml
|
||||||
|
|
||||||
|
diff --git a/src/cpu_map/Makefile.inc.am b/src/cpu_map/Makefile.inc.am
|
||||||
|
index 8663877b97..ab5268d94f 100644
|
||||||
|
--- a/src/cpu_map/Makefile.inc.am
|
||||||
|
+++ b/src/cpu_map/Makefile.inc.am
|
||||||
|
@@ -72,6 +72,8 @@ cpumap_DATA = \
|
||||||
|
cpu_map/arm_cortex-a57.xml \
|
||||||
|
cpu_map/arm_cortex-a72.xml \
|
||||||
|
cpu_map/arm_Kunpeng-920.xml \
|
||||||
|
+ cpu_map/arm_FT-2000plus.xml \
|
||||||
|
+ cpu_map/arm_Tengyun-S2500.xml \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
EXTRA_DIST += $(cpumap_DATA)
|
||||||
|
diff --git a/src/cpu_map/arm_FT-2000plus.xml b/src/cpu_map/arm_FT-2000plus.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..b532f65f68
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/cpu_map/arm_FT-2000plus.xml
|
||||||
|
@@ -0,0 +1,6 @@
|
||||||
|
+<cpus>
|
||||||
|
+ <model name='FT-2000+'>
|
||||||
|
+ <vendor name='Phytium'/>
|
||||||
|
+ <pvr value='0x662'/>
|
||||||
|
+ </model>
|
||||||
|
+</cpus>
|
||||||
|
diff --git a/src/cpu_map/arm_Tengyun-S2500.xml b/src/cpu_map/arm_Tengyun-S2500.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000..22b865e368
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/cpu_map/arm_Tengyun-S2500.xml
|
||||||
|
@@ -0,0 +1,6 @@
|
||||||
|
+<cpus>
|
||||||
|
+ <model name='Tengyun-S2500'>
|
||||||
|
+ <vendor name='Phytium'/>
|
||||||
|
+ <pvr value='0x663'/>
|
||||||
|
+ </model>
|
||||||
|
+</cpus>
|
||||||
|
diff --git a/src/cpu_map/arm_vendors.xml b/src/cpu_map/arm_vendors.xml
|
||||||
|
index 840bf9a2f8..05175495a0 100644
|
||||||
|
--- a/src/cpu_map/arm_vendors.xml
|
||||||
|
+++ b/src/cpu_map/arm_vendors.xml
|
||||||
|
@@ -11,4 +11,5 @@
|
||||||
|
<vendor name="Qualcomm" value="0x51"/>
|
||||||
|
<vendor name="Marvell" value="0x56"/>
|
||||||
|
<vendor name="Intel" value="0x69"/>
|
||||||
|
+ <vendor name='Phytium' value='0x70'/>
|
||||||
|
</cpus>
|
||||||
|
diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml
|
||||||
|
index 985af86ba2..672d0a3c92 100644
|
||||||
|
--- a/src/cpu_map/index.xml
|
||||||
|
+++ b/src/cpu_map/index.xml
|
||||||
|
@@ -95,5 +95,9 @@
|
||||||
|
|
||||||
|
<!-- Hisilicon-based CPU models -->
|
||||||
|
<include filename="arm_Kunpeng-920.xml"/>
|
||||||
|
+
|
||||||
|
+ <!-- Phytium-based CPU models -->
|
||||||
|
+ <include filename='arm_FT-2000plus.xml'/>
|
||||||
|
+ <include filename='arm_Tengyun-S2500.xml'/>
|
||||||
|
</arch>
|
||||||
|
</cpus>
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
119
libvirt-Add-retry-support-for-error-policy.patch
Normal file
119
libvirt-Add-retry-support-for-error-policy.patch
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
From 9ba3e54d2b33e1105f5879fff3656c093337e60a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jiahui Cen <cenjiahui@huawei.com>
|
||||||
|
Date: Thu, 25 Feb 2021 18:55:30 +0800
|
||||||
|
Subject: [PATCH] libvirt: Add 'retry' support for error policy
|
||||||
|
|
||||||
|
Introduce error_policy=/rerror_policy='retry' to support
|
||||||
|
werror=/rerror=retry mechanism in qemu.
|
||||||
|
|
||||||
|
Add retry_interval parameter to control the interval between retries.
|
||||||
|
Add retry_timeout parameter to control the total retry times.
|
||||||
|
|
||||||
|
Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
|
||||||
|
Signed-off-by: Ying Fang <fangying1@huawei.com>
|
||||||
|
---
|
||||||
|
src/conf/domain_conf.c | 25 +++++++++++++++++++++++++
|
||||||
|
src/conf/domain_conf.h | 3 +++
|
||||||
|
src/qemu/qemu_command.c | 8 ++++++++
|
||||||
|
src/qemu/qemu_domain.c | 2 ++
|
||||||
|
4 files changed, 38 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
|
||||||
|
index dbc3e103ff..5c469cedd0 100644
|
||||||
|
--- a/src/conf/domain_conf.c
|
||||||
|
+++ b/src/conf/domain_conf.c
|
||||||
|
@@ -355,6 +355,7 @@ VIR_ENUM_IMPL(virDomainDiskErrorPolicy,
|
||||||
|
"report",
|
||||||
|
"ignore",
|
||||||
|
"enospace",
|
||||||
|
+ "retry",
|
||||||
|
);
|
||||||
|
|
||||||
|
VIR_ENUM_IMPL(virDomainDiskIo,
|
||||||
|
@@ -10213,6 +10214,30 @@ virDomainDiskDefDriverParseXML(virDomainDiskDefPtr def,
|
||||||
|
}
|
||||||
|
VIR_FREE(tmp);
|
||||||
|
|
||||||
|
+ def->retry_interval = -1;
|
||||||
|
+ if ((tmp = virXMLPropString(cur, "retry_interval")) &&
|
||||||
|
+ ((def->error_policy != VIR_DOMAIN_DISK_ERROR_POLICY_RETRY &&
|
||||||
|
+ def->rerror_policy != VIR_DOMAIN_DISK_ERROR_POLICY_RETRY) ||
|
||||||
|
+ (virStrToLong_l(tmp, NULL, 10, &def->retry_interval) < 0) ||
|
||||||
|
+ (def->retry_interval < 0))) {
|
||||||
|
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
+ _("unknown disk retry interval '%s'"), tmp);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ VIR_FREE(tmp);
|
||||||
|
+
|
||||||
|
+ def->retry_timeout = -1;
|
||||||
|
+ if ((tmp = virXMLPropString(cur, "retry_timeout")) &&
|
||||||
|
+ ((def->error_policy != VIR_DOMAIN_DISK_ERROR_POLICY_RETRY &&
|
||||||
|
+ def->rerror_policy != VIR_DOMAIN_DISK_ERROR_POLICY_RETRY) ||
|
||||||
|
+ (virStrToLong_l(tmp, NULL, 10, &def->retry_timeout) < 0) ||
|
||||||
|
+ (def->retry_timeout < 0))) {
|
||||||
|
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
+ _("unknown disk retry interval '%s'"), tmp);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ VIR_FREE(tmp);
|
||||||
|
+
|
||||||
|
if ((tmp = virXMLPropString(cur, "io")) &&
|
||||||
|
(def->iomode = virDomainDiskIoTypeFromString(tmp)) <= 0) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
|
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
|
||||||
|
index 16e625331c..86a86d3090 100644
|
||||||
|
--- a/src/conf/domain_conf.h
|
||||||
|
+++ b/src/conf/domain_conf.h
|
||||||
|
@@ -396,6 +396,7 @@ typedef enum {
|
||||||
|
VIR_DOMAIN_DISK_ERROR_POLICY_REPORT,
|
||||||
|
VIR_DOMAIN_DISK_ERROR_POLICY_IGNORE,
|
||||||
|
VIR_DOMAIN_DISK_ERROR_POLICY_ENOSPACE,
|
||||||
|
+ VIR_DOMAIN_DISK_ERROR_POLICY_RETRY,
|
||||||
|
|
||||||
|
VIR_DOMAIN_DISK_ERROR_POLICY_LAST
|
||||||
|
} virDomainDiskErrorPolicy;
|
||||||
|
@@ -561,6 +562,8 @@ struct _virDomainDiskDef {
|
||||||
|
int cachemode; /* enum virDomainDiskCache */
|
||||||
|
int error_policy; /* enum virDomainDiskErrorPolicy */
|
||||||
|
int rerror_policy; /* enum virDomainDiskErrorPolicy */
|
||||||
|
+ long retry_interval;
|
||||||
|
+ long retry_timeout;
|
||||||
|
int iomode; /* enum virDomainDiskIo */
|
||||||
|
int ioeventfd; /* enum virTristateSwitch */
|
||||||
|
int event_idx; /* enum virTristateSwitch */
|
||||||
|
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
|
||||||
|
index 315deb5cfd..c3ad041959 100644
|
||||||
|
--- a/src/qemu/qemu_command.c
|
||||||
|
+++ b/src/qemu/qemu_command.c
|
||||||
|
@@ -1723,6 +1723,14 @@ qemuBuildDiskFrontendAttributeErrorPolicy(virDomainDiskDefPtr disk,
|
||||||
|
virBufferAsprintf(buf, ",werror=%s", wpolicy);
|
||||||
|
if (rpolicy)
|
||||||
|
virBufferAsprintf(buf, ",rerror=%s", rpolicy);
|
||||||
|
+ if ((disk->error_policy == VIR_DOMAIN_DISK_ERROR_POLICY_RETRY ||
|
||||||
|
+ disk->rerror_policy == VIR_DOMAIN_DISK_ERROR_POLICY_RETRY) &&
|
||||||
|
+ disk->retry_interval >= 0)
|
||||||
|
+ virBufferAsprintf(buf, ",retry_interval=%ld", disk->retry_interval);
|
||||||
|
+ if ((disk->error_policy == VIR_DOMAIN_DISK_ERROR_POLICY_RETRY ||
|
||||||
|
+ disk->rerror_policy == VIR_DOMAIN_DISK_ERROR_POLICY_RETRY) &&
|
||||||
|
+ disk->retry_timeout >= 0)
|
||||||
|
+ virBufferAsprintf(buf, ",retry_timeout=%ld", disk->retry_timeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
|
||||||
|
index f89ff20a84..58493706a1 100644
|
||||||
|
--- a/src/qemu/qemu_domain.c
|
||||||
|
+++ b/src/qemu/qemu_domain.c
|
||||||
|
@@ -12308,6 +12308,8 @@ qemuDomainDiskChangeSupported(virDomainDiskDefPtr disk,
|
||||||
|
CHECK_EQ(cachemode, "cache", true);
|
||||||
|
CHECK_EQ(error_policy, "error_policy", true);
|
||||||
|
CHECK_EQ(rerror_policy, "rerror_policy", true);
|
||||||
|
+ CHECK_EQ(retry_interval, "retry_interval", true);
|
||||||
|
+ CHECK_EQ(retry_timeout, "retry_timeout", true);
|
||||||
|
CHECK_EQ(iomode, "io", true);
|
||||||
|
CHECK_EQ(ioeventfd, "ioeventfd", true);
|
||||||
|
CHECK_EQ(event_idx, "event_idx", true);
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
12
libvirt.spec
12
libvirt.spec
@ -99,7 +99,7 @@
|
|||||||
Summary: Library providing a simple virtualization API
|
Summary: Library providing a simple virtualization API
|
||||||
Name: libvirt
|
Name: libvirt
|
||||||
Version: 6.2.0
|
Version: 6.2.0
|
||||||
Release: 15
|
Release: 16
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://libvirt.org/
|
URL: https://libvirt.org/
|
||||||
|
|
||||||
@ -170,6 +170,9 @@ Patch0059: rpc-require-write-acl-for-guest-agent-in-virDomainIn.patch
|
|||||||
Patch0060: qemu-agent-set-ifname-to-NULL-after-freeing.patch
|
Patch0060: qemu-agent-set-ifname-to-NULL-after-freeing.patch
|
||||||
Patch0061: util-Move-virIsDevMapperDevice-to-virdevmapper.c.patch
|
Patch0061: util-Move-virIsDevMapperDevice-to-virdevmapper.c.patch
|
||||||
Patch0062: virdevmapper-Don-t-use-libdevmapper-to-obtain-depend.patch
|
Patch0062: virdevmapper-Don-t-use-libdevmapper-to-obtain-depend.patch
|
||||||
|
Patch0063: libvirt-Add-retry-support-for-error-policy.patch
|
||||||
|
Patch0064: qemu-Support-retry-BLOCK_IO_ERROR-event.patch
|
||||||
|
Patch0065: add-phytium-2000plus-and-s2500-support-on-arm-archit.patch
|
||||||
|
|
||||||
Requires: libvirt-daemon = %{version}-%{release}
|
Requires: libvirt-daemon = %{version}-%{release}
|
||||||
Requires: libvirt-daemon-config-network = %{version}-%{release}
|
Requires: libvirt-daemon-config-network = %{version}-%{release}
|
||||||
@ -1902,6 +1905,13 @@ exit 0
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Feb 27 2021 Huawei Technologies Co., Ltd <alex.chen@huawei.com>
|
||||||
|
- add phytium 2000plus and s2500 support on arm architecture for capability
|
||||||
|
|
||||||
|
* Sat Feb 27 2021 Huawei Technologies Co., Ltd <alex.chen@huawei.com>
|
||||||
|
- libvirt: Add 'retry' support for error policy
|
||||||
|
- qemu: Support 'retry' BLOCK_IO_ERROR event.
|
||||||
|
|
||||||
* Wed Jan 20 2021 Huawei Technologies Co., Ltd <alex.chen@huawei.com>
|
* Wed Jan 20 2021 Huawei Technologies Co., Ltd <alex.chen@huawei.com>
|
||||||
- util: Move virIsDevMapperDevice() to virdevmapper.c
|
- util: Move virIsDevMapperDevice() to virdevmapper.c
|
||||||
- virdevmapper: Don't use libdevmapper to obtain dependencies
|
- virdevmapper: Don't use libdevmapper to obtain dependencies
|
||||||
|
|||||||
57
qemu-Support-retry-BLOCK_IO_ERROR-event.patch
Normal file
57
qemu-Support-retry-BLOCK_IO_ERROR-event.patch
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
From fbe0c3b91ca38be349999a1fab748951ba3331c4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jiahui Cen <cenjiahui@huawei.com>
|
||||||
|
Date: Thu, 25 Feb 2021 18:55:31 +0800
|
||||||
|
Subject: [PATCH] qemu: Support 'retry' BLOCK_IO_ERROR event.
|
||||||
|
|
||||||
|
Accept BLOCK_IO_ERROR event with action='retry' from qemu.
|
||||||
|
|
||||||
|
Signed-off-by: Jiahui Cen <cenjiahui@huawei.com>
|
||||||
|
Signed-off-by: Ying Fang <fangying1@huawei.com>
|
||||||
|
---
|
||||||
|
include/libvirt/libvirt-domain.h | 1 +
|
||||||
|
src/qemu/qemu_monitor_json.c | 2 +-
|
||||||
|
tools/virsh-domain.c | 3 ++-
|
||||||
|
3 files changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
|
||||||
|
index b440818ec2..90cb652db1 100644
|
||||||
|
--- a/include/libvirt/libvirt-domain.h
|
||||||
|
+++ b/include/libvirt/libvirt-domain.h
|
||||||
|
@@ -3701,6 +3701,7 @@ typedef enum {
|
||||||
|
VIR_DOMAIN_EVENT_IO_ERROR_NONE = 0, /* No action, IO error ignored */
|
||||||
|
VIR_DOMAIN_EVENT_IO_ERROR_PAUSE, /* Guest CPUs are paused */
|
||||||
|
VIR_DOMAIN_EVENT_IO_ERROR_REPORT, /* IO error reported to guest OS */
|
||||||
|
+ VIR_DOMAIN_EVENT_IO_ERROR_RETRY, /* Failed IO retried */
|
||||||
|
|
||||||
|
# ifdef VIR_ENUM_SENTINELS
|
||||||
|
VIR_DOMAIN_EVENT_IO_ERROR_LAST
|
||||||
|
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
|
||||||
|
index 619717eae5..ef25764a98 100644
|
||||||
|
--- a/src/qemu/qemu_monitor_json.c
|
||||||
|
+++ b/src/qemu/qemu_monitor_json.c
|
||||||
|
@@ -898,7 +898,7 @@ static void qemuMonitorJSONHandleWatchdog(qemuMonitorPtr mon, virJSONValuePtr da
|
||||||
|
VIR_ENUM_DECL(qemuMonitorIOErrorAction);
|
||||||
|
VIR_ENUM_IMPL(qemuMonitorIOErrorAction,
|
||||||
|
VIR_DOMAIN_EVENT_IO_ERROR_LAST,
|
||||||
|
- "ignore", "stop", "report",
|
||||||
|
+ "ignore", "stop", "report", "retry",
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
|
||||||
|
index 0a623086a4..65d5c831ec 100644
|
||||||
|
--- a/tools/virsh-domain.c
|
||||||
|
+++ b/tools/virsh-domain.c
|
||||||
|
@@ -13065,7 +13065,8 @@ VIR_ENUM_IMPL(virshDomainEventIOError,
|
||||||
|
VIR_DOMAIN_EVENT_IO_ERROR_LAST,
|
||||||
|
N_("none"),
|
||||||
|
N_("pause"),
|
||||||
|
- N_("report"));
|
||||||
|
+ N_("report"),
|
||||||
|
+ N_("retry"));
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
virshDomainEventIOErrorToString(int action)
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user