Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print MicrovmState from vmstate file of snapshot #4205

Merged
merged 5 commits into from
Nov 1, 2023

Conversation

sudanl0
Copy link
Contributor

@sudanl0 sudanl0 commented Oct 28, 2023

Changes

Add subcommand in InfoVmStateSubCommand to print the VmState.

Reason

Printing MicrovmState from vmstate file of snapshot makes snapshot comparison easier to read.
The command can be used as below on 2 different snapshot files and the output when compared using any diff tool (e.g. vimdiff) is lot easier to read.

An example run on aarch64
snapshot-editor info-vmstate vm-state --vmstate-path vmstate.snap1 > readable_vmstate.snap1
[~]$ cat readable_vmstate.snap1 
MicrovmState {
    vm_info: VmInfo {
        mem_size_mib: 128,
        smt: false,
        cpu_template: None,
        boot_source: BootSourceConfig {
            kernel_image_path: "./vmlinux",
            initrd_path: Some(
                "./initrd.cpio",
            ),
            boot_args: Some(
                "ro console=ttyS0 noapic reboot=k panic=1 pci=off nomodule random.trust_cpu=on i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd tsc=reliable ipv6.disable=1",
            ),
        },
    },
    memory_state: GuestMemoryState {
        regions: [
            GuestMemoryRegionState {
                base_address: 2147483648,
                size: 134217728,
                offset: 0,
            },
        ],
    },
    vm_state: VmState {
        gic: GicState {
            dist: [
                GicRegState {
                    chunks: [
                        80,
                    ],
                },
                GicRegState {
                    chunks: [
                        4294967295,
                    ],
                },
                GicRegState {
                    chunks: [
                        0,
                        0,
                        0,
                    ],
                },
                GicRegState {
                    chunks: [
                        0,
                        0,
                        0,
                    ],
                },
                GicRegState {
                    chunks: [
                        4294967295,
                        4294967295,
                        4294967295,
                    ],
                },
                GicRegState {
                    chunks: [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                    ],
                },
                GicRegState {
                    chunks: [
                        2863311530,
                        2863311530,
                        2863311530,
                        2863311530,
                        2863311530,
                        2863311530,
                    ],
                },
                GicRegState {
                    chunks: [
                        0,
                        0,
                        0,
                    ],
                },
                GicRegState {
                    chunks: [
                        0,
                        0,
                        0,
                    ],
                },
                GicRegState {
                    chunks: [
                        0,
                        0,
                        0,
                    ],
                },
                GicRegState {
                    chunks: [
                        0,
                        0,
                        0,
                    ],
                },
                GicRegState {
                    chunks: [
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                        0,
                    ],
                },
            ],
            gic_vcpu_states: [
                GicVcpuState {
                    rdist: [
                        GicRegState {
                            chunks: [
                                0,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                0,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                0,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                0,
                                0,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                1408,
                                0,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                4294967295,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                65535,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                65535,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                2863311530,
                                0,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                0,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                0,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                0,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                0,
                            ],
                        },
                        GicRegState {
                            chunks: [
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                            ],
                        },
                    ],
                    icc: VgicSysRegsState {
                        main_icc_regs: [
                            GicRegState {
                                chunks: [
                                    7,
                                ],
                            },
                            GicRegState {
                                chunks: [
                                    33792,
                                ],
                            },
                            GicRegState {
                                chunks: [
                                    0,
                                ],
                            },
                            GicRegState {
                                chunks: [
                                    0,
                                ],
                            },
                            GicRegState {
                                chunks: [
                                    0,
                                ],
                            },
                            GicRegState {
                                chunks: [
                                    2,
                                ],
                            },
                            GicRegState {
                                chunks: [
                                    3,
                                ],
                            },
                        ],
                        ap_icc_regs: [
                            Some(
                                GicRegState {
                                    chunks: [
                                        0,
                                    ],
                                },
                            ),
                            None,
                            None,
                            None,
                            Some(
                                GicRegState {
                                    chunks: [
                                        0,
                                    ],
                                },
                            ),
                            None,
                            None,
                            None,
                        ],
                    },
                },
            ],
        },
        kvm_cap_modifiers: [],
    },
    vcpu_states: [
        kvm_mp_state: 0x0
        mpidr: 0x80000000
        0x6030000000100000 0xfffffffefe5ff00
        0x6030000000100002 0xfffffffefe5ff00
        0x6030000000100004 0x00000002e
        0x6030000000100006 0x00000002
        0x6030000000100008 0xffffffc01043abc0
        0x603000000010000a 0x00000000
        0x603000000010000c 0xffffffc010fb321f
        0x603000000010000e 0x65762078756e694c
        0x6030000000100010 0x2e35206e6f697372
        0x6030000000100012 0x7e3175746e756275
        0x6030000000100014 0x31202934302e3232
        0x6030000000100016 0x2075746e75625528
        0x6030000000100018 0x312d302e342e3131
        0x603000000010001a 0x6230646665666636
        0x603000000010001c 0x2063636728202937
        0x603000000010001e 0xffffffc090853bd7
        0x6030000000100020 0x000000180
        0x6030000000100022 0x00004440689d
        0x6030000000100024 0xffffffffffffffff
        0x6030000000100026 0xffffffc010f87bc8
        0x6030000000100028 0xffffffc01043ade0
        0x603000000010002a 0xffffffc010f87bc8
        0x603000000010002c 0xffffffc010fb32c1
        0x603000000010002e 0xffffffc010fb36a0
        0x6030000000100030 0xffffffc010fb2c90
        0x6030000000100032 0xffffffc01085ab0
        0x6030000000100034 0xffffffc010f87dc0
        0x6030000000100036 0xffffffc01086e690
        0x6030000000100038 0xffffffc010fb3210
        0x603000000010003a 0xffffffc010853ba0
        0x603000000010003c 0xffffffc01043ae0
        0x603000000010003e 0xffffffc01086380
        0x6030000000100040 0xffffffc01043acc0
        0x6030000000100042 0x00006001c5
        0x6030000000100044 0xffffffc010853ba0
        0x6030000000100046 0x00000000
        0x6030000000100048 0x00000000
        0x603000000010004a 0x00000000
        0x603000000010004c 0x00000000
        0x603000000010004e 0x00000000
        0x6030000000100050 0x00000000
        0x6040000000100054 0x0000000000000000
        0x6040000000100058 0x0000000000000000
        0x604000000010005c 0x0000000000000000
        0x6040000000100060 0x0000000000000000
        0x6040000000100064 0x0000000000000000
        0x6040000000100068 0x0000000000000000
        0x604000000010006c 0x0000000000000000
        0x6040000000100070 0x0000000000000000
        0x6040000000100074 0x0000000000000000
        0x6040000000100078 0x0000000000000000
        0x604000000010007c 0x0000000000000000
        0x6040000000100080 0x0000000000000000
        0x6040000000100084 0x0000000000000000
        0x6040000000100088 0x0000000000000000
        0x604000000010008c 0x0000000000000000
        0x6040000000100090 0x0000000000000000
        0x6040000000100094 0x0000000000000000
        0x6040000000100098 0x0000000000000000
        0x604000000010009c 0x0000000000000000
        0x60400000001000a0 0x0000000000000000
        0x60400000001000a4 0x0000000000000000
        0x60400000001000a8 0x0000000000000000
        0x60400000001000ac 0x0000000000000000
        0x60400000001000b0 0x0000000000000000
        0x60400000001000b4 0x0000000000000000
        0x60400000001000b8 0x0000000000000000
        0x60400000001000bc 0x0000000000000000
        0x60400000001000c0 0x0000000000000000
        0x60400000001000c4 0x0000000000000000
        0x60400000001000c8 0x0000000000000000
        0x60400000001000cc 0x0000000000000000
        0x60400000001000d0 0x0000000000000000
        0x60200000001000d4 0x0000
        0x60200000001000d5 0x0000
        0x6030000000140000 0x00000100
        0x6030000000140001 0x00000002
        0x6030000000140002 0x00000000
        0x6030000000140003 0x00000001
        0x603000000013df19 0x00000004
        0x603000000013df1a 0x000001f7bb5
        0x603000000013df02 0x00000000
        0x603000000013c000 0x0000413fd0c1
        0x603000000013c006 0x0000000ff
        0x603000000013c801 0x0000820023
        0x603000000013c807 0x00000000
        0x603000000013d801 0x0000b444c04
        0x6030000000138004 0x00000000
        0x6030000000138005 0x00000000
        0x6030000000138006 0x00000000
        0x6030000000138007 0x00000000
        0x603000000013800c 0x00000000
        0x603000000013800d 0x00000000
        0x603000000013800e 0x00000000
        0x603000000013800f 0x00000000
        0x6030000000138010 0x00000000
        0x6030000000138012 0x000000100
        0x6030000000138014 0x00000000
        0x6030000000138015 0x00000000
        0x6030000000138016 0x00000000
        0x6030000000138017 0x00000000
        0x603000000013801c 0x00000000
        0x603000000013801d 0x00000000
        0x603000000013801e 0x00000000
        0x603000000013801f 0x00000000
        0x6030000000138024 0x00000000
        0x6030000000138025 0x00000000
        0x6030000000138026 0x00000000
        0x6030000000138027 0x00000000
        0x603000000013802c 0x00000000
        0x603000000013802d 0x00000000
        0x603000000013802e 0x00000000
        0x603000000013802f 0x00000000
        0x6030000000138034 0x00000000
        0x6030000000138035 0x00000000
        0x6030000000138036 0x00000000
        0x6030000000138037 0x00000000
        0x603000000013803c 0x00000000
        0x603000000013803d 0x00000000
        0x603000000013803e 0x00000000
        0x603000000013803f 0x00000000
        0x6030000000138044 0x00000000
        0x6030000000138045 0x00000000
        0x6030000000138046 0x00000000
        0x6030000000138047 0x00000000
        0x603000000013804c 0x00000000
        0x603000000013804d 0x00000000
        0x603000000013804e 0x00000000
        0x603000000013804f 0x00000000
        0x6030000000138054 0x00000000
        0x6030000000138055 0x00000000
        0x6030000000138056 0x00000000
        0x6030000000138057 0x00000000
        0x603000000013805c 0x00000000
        0x603000000013805d 0x00000000
        0x603000000013805e 0x00000000
        0x603000000013805f 0x00000000
        0x6030000000138064 0x00000000
        0x6030000000138065 0x00000000
        0x6030000000138066 0x00000000
        0x6030000000138067 0x00000000
        0x603000000013806c 0x00000000
        0x603000000013806d 0x00000000
        0x603000000013806e 0x00000000
        0x603000000013806f 0x00000000
        0x6030000000138074 0x00000000
        0x6030000000138075 0x00000000
        0x6030000000138076 0x00000000
        0x6030000000138077 0x00000000
        0x603000000013807c 0x00000000
        0x603000000013807d 0x00000000
        0x603000000013807e 0x00000000
        0x603000000013807f 0x00000000
        0x603000000013a038 0x00000000
        0x603000000013c005 0x000080000
        0x603000000013c008 0x000001131
        0x603000000013c009 0x000010100
        0x603000000013c00a 0x000041088
        0x603000000013c00b 0x00000000
        0x603000000013c00c 0x00001020115
        0x603000000013c00d 0x000040000
        0x603000000013c00e 0x000012600
        0x603000000013c00f 0x00002122211
        0x603000000013c010 0x00002101110
        0x603000000013c011 0x000013112111
        0x603000000013c012 0x000021232042
        0x603000000013c013 0x00001112131
        0x603000000013c014 0x000001142
        0x603000000013c015 0x0000111121
        0x603000000013c016 0x0000021110
        0x603000000013c017 0x000000010
        0x603000000013c018 0x00001011222
        0x603000000013c019 0x000013211111
        0x603000000013c01a 0x000000043
        0x603000000013c01b 0x00000000
        0x603000000013c01c 0x000000011
        0x603000000013c01d 0x00000000
        0x603000000013c01e 0x00000000
        0x603000000013c01f 0x00000000
        0x603000000013c020 0x1100011111112
        0x603000000013c021 0x000000020
        0x603000000013c022 0x00000000
        0x603000000013c023 0x00000000
        0x603000000013c024 0x00000000
        0x603000000013c025 0x00000000
        0x603000000013c026 0x00000000
        0x603000000013c027 0x00000000
        0x603000000013c028 0x00011030548
        0x603000000013c029 0x00000000
        0x603000000013c02a 0x00000000
        0x603000000013c02b 0x00000000
        0x603000000013c02c 0x00000000
        0x603000000013c02d 0x00000000
        0x603000000013c02e 0x00000000
        0x603000000013c02f 0x00000000
        0x603000000013c030 0x0010010211120
        0x603000000013c031 0x000001001
        0x603000000013c032 0x00000000
        0x603000000013c033 0x00000000
        0x603000000013c034 0x00000000
        0x603000000013c035 0x00000000
        0x603000000013c036 0x00000000
        0x603000000013c037 0x00000000
        0x603000000013c038 0x00000101125
        0x603000000013c039 0x000010212122
        0x603000000013c03a 0x100000011
        0x603000000013c03b 0x00000000
        0x603000000013c03c 0x00000000
        0x603000000013c03d 0x00000000
        0x603000000013c03e 0x00000000
        0x603000000013c03f 0x00000000
        0x603000000013c080 0x000034d4d91d
        0x603000000013c081 0x00000000
        0x603000000013c082 0x000003000
        0x603000000013c100 0x00008075e00
        0x603000000013c101 0x00008128300
        0x603000000013c102 0x000b5b5593519
        0x603000000013c288 0x00000000
        0x603000000013c289 0x00000000
        0x603000000013c290 0x0000dbadc0de
        0x603000000013c300 0x1de7ec7edbadc0de
        0x603000000013c3a0 0x1d0ec7edbadc8de
        0x603000000013c4f1 0x1de7ec7edbadc0de
        0x603000000013c4f2 0x1de7ec7edbadc0de
        0x603000000013c510 0x0c40bb44ffff
        0x603000000013c518 0x00000000
        0x603000000013c600 0xffffffc010180
        0x603000000013c609 0x00000000
        0x603000000013c681 0x00000000
        0x603000000013c684 0x00000000
        0x603000000013c708 0x00000000
        0x603000000013d000 0x00000004
        0x603000000013dce0 0x000041c30ac
        0x603000000013dce1 0x1de7ec7edbadc0de
        0x603000000013dce2 0x1de7ec7edbadc0de
        0x603000000013dce3 0x1de7ec7edbadc0de
        0x603000000013dce4 0x1de7ec7edbadc0de
        0x603000000013dce5 0x1de7ec7edbadc0de
        0x603000000013dce8 0x1de7ec7edbadc0de
        0x603000000013dcf0 0x00000000
        0x603000000013dcf3 0x1de7ec7edbadc0de
        0x603000000013de82 0x1de7ec7edbadc0de
        0x603000000013de83 0x1de7ec7edbadc0de
        0x603000000013df40 0x1de7ec7edbadc0de
        0x603000000013df41 0x1de7ec7edbadc0de
        0x603000000013df42 0x1de7ec7edbadc0de
        0x603000000013df43 0x1de7ec7edbadc0de
        0x603000000013df44 0x1de7ec7edbadc0de
        0x603000000013df45 0x1de7ec7edbadc0de
        0x603000000013df46 0x1de7ec7edbadc0de
        0x603000000013df47 0x1de7ec7edbadc0de
        0x603000000013df48 0x1de7ec7edbadc0de
        0x603000000013df49 0x1de7ec7edbadc0de
        0x603000000013df4a 0x1de7ec7edbadc0de
        0x603000000013df4b 0x1de7ec7edbadc0de
        0x603000000013df4c 0x1de7ec7edbadc0de
        0x603000000013df4d 0x1de7ec7edbadc0de
        0x603000000013df4e 0x1de7ec7edbadc0de
        0x603000000013df4f 0x1de7ec7edbadc0de
        0x603000000013df50 0x1de7ec7edbadc0de
        0x603000000013df51 0x1de7ec7edbadc0de
        0x603000000013df52 0x1de7ec7edbadc0de
        0x603000000013df53 0x1de7ec7edbadc0de
        0x603000000013df54 0x1de7ec7edbadc0de
        0x603000000013df55 0x1de7ec7edbadc0de
        0x603000000013df56 0x1de7ec7edbadc0de
        0x603000000013df57 0x1de7ec7edbadc0de
        0x603000000013df58 0x1de7ec7edbadc0de
        0x603000000013df59 0x1de7ec7edbadc0de
        0x603000000013df5a 0x1de7ec7edbadc0de
        0x603000000013df5b 0x1de7ec7edbadc0de
        0x603000000013df5c 0x1de7ec7edbadc0de
        0x603000000013df5d 0x1de7ec7edbadc0de
        0x603000000013df5e 0x1de7ec7edbadc0de
        0x603000000013df60 0x1de7ec7edbadc0de
        0x603000000013df61 0x1de7ec7edbadc0de
        0x603000000013df62 0x1de7ec7edbadc0de
        0x603000000013df63 0x1de7ec7edbadc0de
        0x603000000013df64 0x1de7ec7edbadc0de
        0x603000000013df65 0x1de7ec7edbadc0de
        0x603000000013df66 0x1de7ec7edbadc0de
        0x603000000013df67 0x1de7ec7edbadc0de
        0x603000000013df68 0x1de7ec7edbadc0de
        0x603000000013df69 0x1de7ec7edbadc0de
        0x603000000013df6a 0x1de7ec7edbadc0de
        0x603000000013df6b 0x1de7ec7edbadc0de
        0x603000000013df6c 0x1de7ec7edbadc0de
        0x603000000013df6d 0x1de7ec7edbadc0de
        0x603000000013df6e 0x1de7ec7edbadc0de
        0x603000000013df6f 0x1de7ec7edbadc0de
        0x603000000013df70 0x1de7ec7edbadc0de
        0x603000000013df71 0x1de7ec7edbadc0de
        0x603000000013df72 0x1de7ec7edbadc0de
        0x603000000013df73 0x1de7ec7edbadc0de
        0x603000000013df74 0x1de7ec7edbadc0de
        0x603000000013df75 0x1de7ec7edbadc0de
        0x603000000013df76 0x1de7ec7edbadc0de
        0x603000000013df77 0x1de7ec7edbadc0de
        0x603000000013df78 0x1de7ec7edbadc0de
        0x603000000013df79 0x1de7ec7edbadc0de
        0x603000000013df7a 0x1de7ec7edbadc0de
        0x603000000013df7b 0x1de7ec7edbadc0de
        0x603000000013df7c 0x1de7ec7edbadc0de
        0x603000000013df7d 0x1de7ec7edbadc0de
        0x603000000013df7e 0x1de7ec7edbadc0de
        0x603000000013df7f 0x00000000
        0x603000000013e180 0x1de7ec7edbadc0de
        0x603000000013e281 0x1de7ec7edbadc0de
        0x603000000013e298 0x00000070
        0x6020000000110000 0x701fe01a
        0x6020000000110001 0x201fe01a
        0x6020000000110002 0x70ffe03a
        ,
    ],
    device_states: DeviceStates {
        legacy_devices: [
            ConnectedLegacyState {
                type_: Rtc,
                device_info: MMIODeviceInfo {
                    addr: 1073745920,
                    len: 4096,
                    irqs: [
                        33,
                    ],
                },
            },
            ConnectedLegacyState {
                type_: Serial,
                device_info: MMIODeviceInfo {
                    addr: 1073741824,
                    len: 4096,
                    irqs: [
                        32,
                    ],
                },
            },
        ],
        block_devices: [],
        net_devices: [],
        vsock_device: None,
        balloon_device: None,
        mmds_version: None,
        entropy_device: None,
    },
}

Output on x86_64 is too big so not posting it here.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following
Developer Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.

PR Checklist

  • [ ] If a specific issue led to this PR, this PR closes the issue.
  • The description of changes is clear and encompassing.
  • Any required documentation changes (code and docs) are included in this PR.
  • [ ] API changes follow the Runbook for Firecracker API changes.
  • [ ] User-facing changes are mentioned in CHANGELOG.md.
  • All added/changed functionality is tested.
  • [ ] New TODOs link to an issue.
  • [ ] Commits meet contribution quality standards.

  • This functionality cannot be added in rust-vmm.

@codecov
Copy link

codecov bot commented Oct 28, 2023

Codecov Report

Attention: 43 lines in your changes are missing coverage. Please review.

Comparison is base (5502430) 82.96% compared to head (74519f9) 82.86%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4205      +/-   ##
==========================================
- Coverage   82.96%   82.86%   -0.10%     
==========================================
  Files         222      222              
  Lines       28299    28330      +31     
==========================================
  Hits        23477    23477              
- Misses       4822     4853      +31     
Flag Coverage Δ
4.14-c7g.metal 78.35% <4.34%> (-0.03%) ⬇️
4.14-m5d.metal 80.20% <3.44%> (-0.11%) ⬇️
4.14-m6a.metal 79.33% <3.44%> (-0.12%) ⬇️
4.14-m6g.metal 78.35% <4.34%> (-0.04%) ⬇️
4.14-m6i.metal 80.19% <3.44%> (-0.12%) ⬇️
5.10-c7g.metal 81.30% <4.34%> (-0.04%) ⬇️
5.10-m5d.metal 82.91% <3.44%> (-0.12%) ⬇️
5.10-m6a.metal 82.13% <3.44%> (-0.13%) ⬇️
5.10-m6g.metal 81.30% <4.34%> (-0.04%) ⬇️
5.10-m6i.metal 82.89% <3.44%> (-0.12%) ⬇️
6.1-c7g.metal 81.30% <4.34%> (-0.04%) ⬇️
6.1-m5d.metal 82.91% <3.44%> (-0.12%) ⬇️
6.1-m6a.metal 82.13% <3.44%> (-0.13%) ⬇️
6.1-m6g.metal 81.30% <4.34%> (-0.04%) ⬇️
6.1-m6i.metal 82.89% <3.44%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/snapshot-editor/src/info.rs 0.00% <0.00%> (ø)
src/vmm/src/vstate/vcpu/aarch64.rs 84.37% <6.25%> (-8.73%) ⬇️
src/vmm/src/vstate/vcpu/x86_64.rs 88.61% <4.54%> (-7.16%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sudanl0 sudanl0 force-pushed the info-vmstate branch 6 times, most recently from 0582e67 to 8db714f Compare October 28, 2023 23:59
@sudanl0 sudanl0 self-assigned this Oct 29, 2023
@sudanl0 sudanl0 added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Oct 29, 2023
src/snapshot-editor/src/info.rs Outdated Show resolved Hide resolved
src/snapshot-editor/src/info.rs Show resolved Hide resolved
@sudanl0 sudanl0 force-pushed the info-vmstate branch 4 times, most recently from 0ed8c40 to 4b81147 Compare October 30, 2023 18:55
docs/snapshotting/snapshot-editor.md Outdated Show resolved Hide resolved
src/snapshot-editor/src/info.rs Outdated Show resolved Hide resolved
ShadowCurse
ShadowCurse previously approved these changes Oct 31, 2023
@kalyazin
Copy link
Contributor

kalyazin commented Nov 1, 2023

It looks like we may need a changelog entry for this.

ShadowCurse
ShadowCurse previously approved these changes Nov 1, 2023
kalyazin
kalyazin previously approved these changes Nov 1, 2023
Sort VcpuState.saved_msrs by 1st the nmsrs & 2nd by pad field
so that we get a better diff of MicrovmState of 2 or more snapshots.

Signed-off-by: Sudan Landge <sudanl@amazon.com>
Add subcommand in InfoVmStateSubCommand to print the VmState.
The output of this command can be used to diff between 2 different
snapshot files.

Signed-off-by: Sudan Landge <sudanl@amazon.com>
Add steps on how to use the new subcommand to print
vmstate in human readable format.
Improve readability of subcommand sections.

Signed-off-by: Sudan Landge <sudanl@amazon.com>
Since x86 now has vcpu states printable, make
info_vcpu_states available on x86 as well.

Signed-off-by: Sudan Landge <sudanl@amazon.com>
Update CHANGELOG to publish addition of new command to print
MicrovmState from vmstate snapshot files and that vcpu-states
is now available on X86_64 as well.

Signed-off-by: Sudan Landge <sudanl@amazon.com>
@sudanl0 sudanl0 merged commit 4a9382d into firecracker-microvm:main Nov 1, 2023
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting review Indicates that a pull request is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants