From: Jan Beulich Date: Fri, 25 Aug 2017 12:12:58 +0000 (+0200) Subject: Revert "x86/hvm: allow guest_request vm_events coming from userspace" X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1606 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=bfd19435bca21d3e6c2cfcbb02a143e0e397e7b3;p=xen.git Revert "x86/hvm: allow guest_request vm_events coming from userspace" This reverts commit 38f21760972a4405d47e4936c91071e073c834c6, which breaks the build on ARM. --- diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 2052ce722a..c7710b8f36 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -2021,7 +2021,7 @@ int xc_monitor_software_breakpoint(xc_interface *xch, domid_t domain_id, int xc_monitor_descriptor_access(xc_interface *xch, domid_t domain_id, bool enable); int xc_monitor_guest_request(xc_interface *xch, domid_t domain_id, - bool enable, bool sync, bool allow_userspace); + bool enable, bool sync); int xc_monitor_debug_exceptions(xc_interface *xch, domid_t domain_id, bool enable, bool sync); int xc_monitor_cpuid(xc_interface *xch, domid_t domain_id, bool enable); diff --git a/tools/libxc/xc_monitor.c b/tools/libxc/xc_monitor.c index a67782009d..b44ce93be7 100644 --- a/tools/libxc/xc_monitor.c +++ b/tools/libxc/xc_monitor.c @@ -147,7 +147,7 @@ int xc_monitor_descriptor_access(xc_interface *xch, domid_t domain_id, } int xc_monitor_guest_request(xc_interface *xch, domid_t domain_id, bool enable, - bool sync, bool allow_userspace) + bool sync) { DECLARE_DOMCTL; @@ -157,7 +157,6 @@ int xc_monitor_guest_request(xc_interface *xch, domid_t domain_id, bool enable, : XEN_DOMCTL_MONITOR_OP_DISABLE; domctl.u.monitor_op.event = XEN_DOMCTL_MONITOR_EVENT_GUEST_REQUEST; domctl.u.monitor_op.u.guest_request.sync = sync; - domctl.u.monitor_op.u.guest_request.allow_userspace = enable ? allow_userspace : false; return do_domctl(xch, &domctl); } diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c index 5742dd1797..e7238ce293 100644 --- a/xen/arch/x86/hvm/hypercall.c +++ b/xen/arch/x86/hvm/hypercall.c @@ -155,11 +155,6 @@ int hvm_hypercall(struct cpu_user_regs *regs) /* Fallthrough to permission check. */ case 4: case 2: - if ( currd->arch.monitor.guest_request_userspace_enabled && - eax == __HYPERVISOR_hvm_op && - (mode == 8 ? regs->rdi : regs->ebx) == HVMOP_guest_request_vm_event ) - break; - if ( unlikely(hvm_get_cpl(curr)) ) { default: diff --git a/xen/common/monitor.c b/xen/common/monitor.c index 20463e01a3..451f42f6c3 100644 --- a/xen/common/monitor.c +++ b/xen/common/monitor.c @@ -75,7 +75,6 @@ int monitor_domctl(struct domain *d, struct xen_domctl_monitor_op *mop) domain_pause(d); d->monitor.guest_request_sync = mop->u.guest_request.sync; d->monitor.guest_request_enabled = requested_status; - d->arch.monitor.guest_request_userspace_enabled = mop->u.guest_request.allow_userspace; domain_unpause(d); break; } diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h index de0250725a..c10522b7f5 100644 --- a/xen/include/asm-x86/domain.h +++ b/xen/include/asm-x86/domain.h @@ -396,16 +396,15 @@ struct arch_domain /* Arch-specific monitor options */ struct { - unsigned int write_ctrlreg_enabled : 4; - unsigned int write_ctrlreg_sync : 4; - unsigned int write_ctrlreg_onchangeonly : 4; - unsigned int singlestep_enabled : 1; - unsigned int software_breakpoint_enabled : 1; - unsigned int debug_exception_enabled : 1; - unsigned int debug_exception_sync : 1; - unsigned int cpuid_enabled : 1; - unsigned int descriptor_access_enabled : 1; - unsigned int guest_request_userspace_enabled : 1; + unsigned int write_ctrlreg_enabled : 4; + unsigned int write_ctrlreg_sync : 4; + unsigned int write_ctrlreg_onchangeonly : 4; + unsigned int singlestep_enabled : 1; + unsigned int software_breakpoint_enabled : 1; + unsigned int debug_exception_enabled : 1; + unsigned int debug_exception_sync : 1; + unsigned int cpuid_enabled : 1; + unsigned int descriptor_access_enabled : 1; struct monitor_msr_bitmap *msr_bitmap; uint64_t write_ctrlreg_mask[4]; } monitor; diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index 984020e73e..0669c3161c 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -1124,7 +1124,6 @@ struct xen_domctl_monitor_op { struct { /* Pause vCPU until response */ uint8_t sync; - uint8_t allow_userspace; } guest_request; struct {