当前region比较的实现如下:
impl PartialEq for FlatRange {
fn eq(&self, other: &Self) -> bool {
self.addr_range == other.addr_range
&& self.owner.region_type == other.owner.region_type
&& self.rom_dev_romd.unwrap_or(false) == other.rom_dev_romd.unwrap_or(false)
&& self.owner == other.owner
&& self.offset_in_region == other.offset_in_region
}
}
采用字段的地址值比较,有缺陷。如果采用value比较也会有问题。需要增加唯一id进行区分
Hi li-huachao, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Virt, and any of the maintainers: @朱科潜 , @frankyj915 , @Bin Wu , @ZhiGang , @alexchen , @Chuan , @imxcc , @ZhangBo , @yezengruan , @limingwang , @sujerry , @李华超
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
此issue建议分类到X86架构下
您好,我在尝试完成此issue, 可以请您到我的下游仓库中先简单的review一下吗? @李华超
https://gitee.com/anti-entropy123/stratovirt/commit/697c71a4dcfcbd6de1226b1c67f11b1b4f1656e0
登录 后才可以发表评论