lkml.org 
[lkml]   [2023]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH RFC v8 40/56] KVM: SVM: Add KVM_EXIT_VMGEXIT
    Date
    For private memslots, GHCB page state change requests will be forwarded
    to userspace for processing. Define a new KVM_EXIT_VMGEXIT for exits of
    this type.

    Signed-off-by: Michael Roth <michael.roth@amd.com>
    ---
    include/uapi/linux/kvm.h | 6 ++++++
    1 file changed, 6 insertions(+)

    diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
    index 2bab08a5b5d7..6e684bf5f723 100644
    --- a/include/uapi/linux/kvm.h
    +++ b/include/uapi/linux/kvm.h
    @@ -279,6 +279,7 @@ struct kvm_xen_exit {
    #define KVM_EXIT_RISCV_CSR 36
    #define KVM_EXIT_NOTIFY 37
    #define KVM_EXIT_MEMORY_FAULT 38
    +#define KVM_EXIT_VMGEXIT 50

    /* For KVM_EXIT_INTERNAL_ERROR */
    /* Emulate instruction failed. */
    @@ -527,6 +528,11 @@ struct kvm_run {
    __u64 gpa;
    __u64 size;
    } memory;
    + /* KVM_EXIT_VMGEXIT */
    + struct {
    + __u64 ghcb_msr; /* GHCB MSR contents */
    + __u8 error; /* user -> kernel */
    + } vmgexit;
    /* Fix the size of the union. */
    char padding[256];
    };
    --
    2.25.1
    \
     
     \ /
      Last update: 2023-03-27 00:29    [W:4.449 / U:0.632 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site