Re: [PATCH kernel v2 2/3] KVM: SEV: Enable data breakpoints in SEV-ES

Tom Lendacky
2023-01-12T14:45:20Z

On 1/12/23 05:28, Borislav Petkov wrote:
> On Thu, Jan 12, 2023 at 04:45:34PM +1100, Alexey Kardashevskiy wrote:
>> Well, SEV-ES KVM (ES == Encrypted State) does not save/restore them for the
>> guest (well, as I would expect) as the guest registers are not visible to
>> host to save, they are intercepted and the VM does this GHCB dance with
>> VMGEXIT(SVM_EXIT_WRITE_DR7).
>
> But they're saved in the VMSA, as Table B-3 says.

Correct, when this feature is enabled, the VMRUN execution will restore
the guest debug registers on guest entry and save them on guest exit.

Thanks,
Tom

>
>> Well, the only place in APM is that "Table B-3. Swap Types and the AMD APM
>> volume 2", and it is pretty brief, do I miss something?
>
> I don't understand that question - please elaborate.
>
> Thx.
>