x86/pvh: disable posted interrupts
PATCH 1/1 x86/pvh: disable posted interrupts
Enabling posted interrupts requires the virtual interrupt delivery feature, which is disabled for PVH guests, so make sure posted interrupts are also disabled or else vmlaunch will fail.
--- xen/arch/x86/hvm/vmx/vmcs.c | 4 ++++ 1 file changed, 4 insertions(+)
xen/arch/x86/hvm/vmx/vmcs.c +4 -0
@@ -980,6 +980,10 @@ static int construct_vmcs(struct vcpu *v) v->arch.hvm_vmx.secondary_exec_control &= ~SECONDARY_EXEC_UNRESTRICTED_GUEST ; +/* Disable posted interrupts */ +__vmwrite (PIN_BASED_VM_EXEC_CONTROL , + vmx_pin_based_exec_control & ~PIN_BASED_POSTED_INTERRUPT ); +/* Start in 64-bit mode. PVH 32bitfixme. */ vmentry_ctl |=VM_ENTRY_IA32E_MODE ;/* GUEST_EFER.LME/LMA ignored */
Signature · 7 lines
1.9.5 (Apple Git-50.3) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
xen/arch/x86/hvm/vmx/vmcs.c static int construct_vmcs(struct vcpu *v) · line 985
Quoted 10 lines
Quoted 1 line
Quoted 1 line · On 21.05.15 at 14:14, <[email protected]> wrote:
xen/arch/x86/hvm/vmx/vmcs.c +3
-0@@ -980,6 +980,10 @@ static int construct_vmcs(struct vcpu *v) v->arch.hvm_vmx.secondary_exec_control &= ~SECONDARY_EXEC_UNRESTRICTED_GUEST ; +/* Disable posted interrupts */ +__vmwrite (PIN_BASED_VM_EXEC_CONTROL , + vmx_pin_based_exec_control & ~PIN_BASED_POSTED_INTERRUPT );
To be understandable in a few months/years, this should be moved up a few lines, and the comment should be something like "In turn, disable posted interrupts." (Please also note the stop at its end.)
Jan
Quoted 7 lines
From: Roger Pau Monne [mailto:[email protected]]
Sent: Thursday, May 21, 2015 8:15 PMEnabling posted interrupts requires the virtual interrupt delivery feature, which is disabled for PVH guests, so make sure posted interrupts are also disabled or else vmlaunch will fail.
Quoted 7 lines
Signed-off-by Roger Pau Monné <[email protected]>Reported-and-Tested-by Lars Eggert <[email protected]>Cc Jun Nakajima <[email protected]>Cc Eddie Dong <[email protected]>Cc Kevin Tian <[email protected]>Cc Jan Beulich <[email protected]>Cc Andrew Cooper <[email protected]>
Thanks
Kevin
Quoted 21 lines
--- xen/arch/x86/hvm/vmx/vmcs.c | 4 ++++ 1 file changed, 4 insertions(+)xen/arch/x86/hvm/vmx/vmcs.c +4
-0@@ -980,6 +980,10 @@ static int construct_vmcs(struct vcpu *v) v->arch.hvm_vmx.secondary_exec_control &= ~SECONDARY_EXEC_UNRESTRICTED_GUEST ; +/* Disable posted interrupts */ +__vmwrite (PIN_BASED_VM_EXEC_CONTROL , + vmx_pin_based_exec_control & ~PIN_BASED_POSTED_INTERRUPT ); +/* Start in 64-bit mode. PVH 32bitfixme. */ vmentry_ctl |=VM_ENTRY_IA32E_MODE ;/* GUEST_EFER.LME/LMA ignored */
Quoted 2 lines
--
1.9.5 (Apple Git-50.3)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel