Re: [PATCH] KVM: x86: Reinstate userspace hypercall support

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

 



On 30/11/20 23:42, David Woodhouse wrote:
Yes, good point.

Xen*does*  allow one hypercall (HVMOP_guest_request_vm_event) from
!CPL0 so I don't think I can get away with allowing only CPL0 like
kvm_hv_hypercall() does.

So unless I'm going to do that filtering in kernel (ick) I think we do
need to capture and pass up the CPL, as you say. Which means it doesn't
fit in the existing kvm_run->hypercall structure unless I'm prepared to
rename/abuse the ->hypercall.pad for it.

I'll just use Joao's version of the hypercall support, and add cpl to
struct kvm_xen_exit.hcall. Userspace can inject the UD# where
appropriate.

Or you can use sync regs perhaps. For your specific use I don't expect many exits to userspace other than Xen hypercalls, so it should be okay to always run with KVM_SYNC_X86_REGS|KVM_SYNC_X86_SREGS in kvm_run->kvm_valid_regs.

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