Hi Lianbo,

On Fri, Aug 29, 2025 at 9:17 PM lijiang <[email protected]> wrote:
>
> On Fri, Aug 29, 2025 at 2:16 PM <[email protected]> 
> wrote:
>>
>> Date: Mon, 11 Aug 2025 05:56:23 +0000
>> From: Ajay Kaher <[email protected]>
>> Subject: [Crash-utility] [PATCH 2/2] vmware_guestdump: support segment
>>         registers
>> To: [email protected]
>> Cc: [email protected],
>>         [email protected], [email protected],
>>         [email protected]
>> Message-ID: <[email protected]>
>>
>> adding support for segment registers for vmware guest dumps.
>>
>> Signed-off-by: Ajay Kaher <[email protected]>
>>
>> ---
>>  vmware_guestdump.c | 17 +++++++++++++++--
>>  1 file changed, 15 insertions(+), 2 deletions(-)
>>
>
> when I tried to apply the patch[2], it failed with the following error. Do 
> you encounter the same issue? Tao.
>
> $ git am 2.patch
> Applying: vmware_guestdump: support segment registers
> error: patch failed: vmware_guestdump.c:107
> error: vmware_guestdump.c: patch does not apply
> Patch failed at 0001 vmware_guestdump: support segment registers
> hint: Use 'git am --show-current-patch=diff' to see the failed patch
> hint: When you have resolved this problem, run "git am --continue".
> hint: If you prefer to skip this patch, run "git am --skip" instead.
> hint: To restore the original branch and stop patching, run "git am --abort".
> hint: Disable this message with "git config set advice.mergeConflict false"
>
Yeah, I saw it. But I can apply it with patch cmd with no problem. I
thought it was due to the restricted issue of git, so I overlooked
it... Anyway, I guess it is not a serious problem and can be fixed
during code merge.

Thanks,
Tao Liu

> Thanks
> Lianbo
>
>>
>> diff --git a/vmware_guestdump.c b/vmware_guestdump.c
>> index d515df5..52a1623 100644
>> --- a/vmware_guestdump.c
>> +++ b/vmware_guestdump.c
>> @@ -107,8 +107,14 @@ struct vcpu_state2 {
>>                 uint64_t eflags;
>>                 uint64_t rsp;
>>                 uint64_t ss;
>> +               uint64_t fs_base;
>> +               uint64_t gs_base;
>> +               uint64_t ds;
>> +               uint64_t es;
>> +               uint64_t fs;
>> +               uint64_t gs;
>>         } regs64;
>> -       uint8_t reserved3[65];
>> +       uint8_t reserved3[17];
>>  } __attribute__((packed));
>>
>>  /*
>> @@ -378,7 +384,14 @@ vmware_guestdump_init(char *filename, FILE *ofp)
>>                 vmss.regs64[i]->cr[4] = vs1.cr4;
>>                 vmss.regs64[i]->rip = vs2.regs64.rip;
>>                 vmss.regs64[i]->rflags = vs2.regs64.eflags;
>> -
>> +               vmss.regs64[i]->es = vs2.regs64.es;
>> +               vmss.regs64[i]->cs = vs2.regs64.cs;
>> +               vmss.regs64[i]->ss = vs2.regs64.ss;
>> +               vmss.regs64[i]->ds = vs2.regs64.ds;
>> +               vmss.regs64[i]->fs = vs2.regs64.fs;
>> +               vmss.regs64[i]->gs = vs2.regs64.gs;
>> +               vmss.regs64[i]->fs_base = vs2.regs64.fs_base;
>> +               vmss.regs64[i]->gs_base = vs2.regs64.gs_base;
>>                 vmss.vcpu_regs[i] = REGS_PRESENT_ALL;
>>         }
>>
>> --
>> 2.40.4
--
Crash-utility mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/
Contribution Guidelines: https://github.com/crash-utility/crash/wiki

Reply via email to