Re: [PATCH v3] KVM, SEV: Add KVM_EXIT_SHUTDOWN metadata for SEV-ES

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 31, 2022 at 11:27 AM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote:
>
> On 3/31/22 19:11, Sean Christopherson wrote:
> >               /* KVM_EXIT_SYSTEM_EVENT */
> >               struct {
> > #define KVM_SYSTEM_EVENT_SHUTDOWN       1
> > #define KVM_SYSTEM_EVENT_RESET          2
> > #define KVM_SYSTEM_EVENT_CRASH          3
> >                       __u32 type;
> >                       __u64 flags;
> >               } system_event;
> >
> > Though looking at system_event, isn't that missing padding after type?  Ah, KVM
> > doesn't actually populate flags, wonderful.  Maybe we can get away with tweaking
> > it to:
> >
> >               struct {
> >                       __u32 type;
> >                       __u32 ndata;
> >                       __u64 data[16];
> >               } system_event;
>
> Yes, you can do that and say that the ndata is only valid e.g. if bit 31
> is set in type.
>
> I agree with reusing KVM_EXIT_SYSTEM_EVENT, that would be a much smaller
> patch.  Sorry about that Peter.

KVM_EXIT_SYSTEM_EVENT makes sense. No worries, I appreciate the very
detailed feedback. I'll update this for a V4 and have a second patch
to address the pr_info()

>
> Paolo
>



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux