x86/vm_event: block interrupt injection for sync vm_events
PATCH v3 1/1 x86/vm_event: block interrupt injection for sync vm_events
Block interrupts (in vmx_intr_assist()) for the duration of processing a sync vm_event (similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by a vm_event reply may legitimately need to call e.g. hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.
The sync vm_event handling path on x86/VMX is (roughly):monitor_traps() -> process vm_event -> vmx_intr_assist() (possibly writing VM_ENTRY_INTR_INFO) -> hvm_vm_event_do_resume() -> hvm_emulate_one_vm_event() (possibly overwriting the VM_ENTRY_INTR_INFO value).
This patch may also be helpful for the future removal of may_defer in hvm_set_cr{0,3,4} and hvm_set_msr().
---
Changes since V2:
- Renamed intr_block to sync_event and vm_event_block_interrupts() to vm_event_sync_event().
- Rephrased and / or removed stale comments.
- Added more details to the commit description.
--- xen/arch/x86/hvm/svm/intr.c | 5 +++++ xen/arch/x86/hvm/vm_event.c | 2 ++ xen/arch/x86/hvm/vmx/intr.c | 5 +++++ xen/arch/x86/vm_event.c | 5 +++++ xen/common/monitor.c | 1 + xen/include/asm-arm/vm_event.h | 6 ++++++ xen/include/asm-x86/vm_event.h | 4 ++++ 7 files changed, 28 insertions(+)
xen/arch/x86/hvm/svm/intr.c +5 -0
@@ -32,6 +32,7 @@#include <asm/hvm/svm/svm.h> #include <asm/hvm/svm/intr.h> #include <asm/hvm/nestedhvm.h> /* for nestedhvm_vcpu_in_guestmode */ +#include <asm/vm_event.h> #include <xen/event.h> #include <xen/kernel.h> #include <public/hvm/ioreq.h>
@@ -137,6 +138,10 @@ void svm_intr_assist(void)struct hvm_intack intack;enum hvm_intblk intblk; +/* Block event injection while handling a sync vm_event. */ +if (unlikely (v->arch.vm_event) && v->arch.vm_event->sync_event ) +return ; +/* Crank the handle on interrupt state. */ pt_update_irq (v);
xen/arch/x86/hvm/vm_event.c +2 -0
@@ -124,6 +124,8 @@ void hvm_vm_event_do_resume(struct vcpu *v) w->do_write.msr =0 ; } + +vm_event_sync_event (v, false); }/*
xen/arch/x86/hvm/vmx/intr.c +5 -0
@@ -37,6 +37,7 @@#include <asm/hvm/nestedhvm.h> #include <public/hvm/ioreq.h> #include <asm/hvm/trace.h> +#include <asm/vm_event.h> /* * A few notes on virtual NMI and INTR delivery, and interactions with
@@ -239,6 +240,10 @@ void vmx_intr_assist(void)return ; } +/* Block event injection while handling a sync vm_event. */ +if (unlikely (v->arch.vm_event) && v->arch.vm_event->sync_event ) +return ; +/* Crank the handle on interrupt state. */ pt_vector =pt_update_irq (v);
xen/arch/x86/vm_event.c +5 -0
@@ -122,6 +122,11 @@ void vm_event_monitor_next_interrupt(struct vcpu *v) v->arch.monitor.next_interrupt_enabled = true; } +void vm_event_sync_event (struct vcpu *v,bool value) +{ + v->arch.vm_event->sync_event = value; +} +#ifdef CONFIG_HVM static void vm_event_pack_segment_register (enum x86_segment segment,struct vm_event_regs_x86 *reg)
xen/common/monitor.c +1 -0
@@ -113,6 +113,7 @@ int monitor_traps(struct vcpu *v, bool sync, vm_event_request_t *req)if ( sync ) { req->flags |=VM_EVENT_FLAG_VCPU_PAUSED ; +vm_event_sync_event (v, true);vm_event_vcpu_pause (v); rc =1 ; }
xen/include/asm-arm/vm_event.h +6 -0
@@ -52,4 +52,10 @@ void vm_event_emulate_check(struct vcpu *v, vm_event_response_t *rsp) /* Not supported on ARM. */ } +static inline +void vm_event_sync_event (struct vcpu *v,bool value) +{ +/* Not supported on ARM. */ +} +#endif /* __ASM_ARM_VM_EVENT_H__ */
xen/include/asm-x86/vm_event.h +4 -0
@@ -34,6 +34,8 @@ struct arch_vm_event {struct monitor_write_data write_data;struct vm_event_regs_x86 gprs;bool set_gprs; +/* A sync vm_event has been sent and we're not done handling it. */ +bool sync_event; };int vm_event_init_domain (struct domain *d);
@@ -47,4 +49,6 @@ void vm_event_register_write_resume(struct vcpu *v, vm_event_response_t *rsp);void vm_event_emulate_check (struct vcpu *v,vm_event_response_t *rsp); +void vm_event_sync_event (struct vcpu *v,bool value); +#endif /* __ASM_X86_VM_EVENT_H__ */
Signature · 7 lines
2.7.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 17 lines
From: Razvan Cojocaru [mailto:[email protected]]
Sent: Friday, December 14, 2018 7:50 PMBlock interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).
Quoted 5 lines
This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().Signed-off-by Razvan Cojocaru <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 17 lines · Kevin
Quoted 17 lines
From: Razvan Cojocaru [mailto:[email protected]]
Sent: Friday, December 14, 2018 7:50 PMBlock interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).
Quoted 7 lines
Quoted 5 lines
This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().Signed-off-by Razvan Cojocaru <[email protected]>Reviewed-by Kevin Tian <[email protected]>
Ping?
Thanks,
Razvan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 15 lines · Razvan Cojocaru
Block interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).
Quoted 4 lines
This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().Signed-off-by Razvan Cojocaru <[email protected]>
Thanks.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 14 lines · Razvan Cojocaru
Block interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).
Quoted 4 lines
This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().Signed-off-by Razvan Cojocaru <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 15 lines · Boris Ostrovsky
Quoted 14 lines · Razvan Cojocaru
Block interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).
Quoted 7 lines
Quoted 4 lines
This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().Signed-off-by Razvan Cojocaru <[email protected]>Reviewed-by Boris Ostrovsky <[email protected]>
Thanks! So now we have three reviewed-bys, if I'm not mistaken all we need is Tamas' (for the vm_event part) and Julien / Stefano's (for ARM) acks (or otherwise).
Could you please take a look?
Thanks,
Razvan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 20 lines
Quoted 1 line
Quoted 1 line · On 14.01.19 at 10:34, <[email protected]> wrote:
Quoted 18 lines · Boris Ostrovsky
Quoted 17 lines · Razvan Cojocaru
Block interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Razvan Cojocaru <[email protected]>Reviewed-by Boris Ostrovsky <[email protected]>Thanks! So now we have three reviewed-bys, if I'm not mistaken all we need is Tamas' (for the
vm_eventpart) and Julien / Stefano's (for ARM) acks (or otherwise).
And you'd need to talk Jürgen into allowing this in, now that we're past the freeze point.
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 23 lines · Jan Beulich
Quoted 23 lines
Quoted 1 line
Quoted 1 line · On 14.01.19 at 10:34, <[email protected]> wrote:
Quoted 21 lines · Boris Ostrovsky
Quoted 18 lines · Razvan Cojocaru
Block interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().Signed-off-by Razvan Cojocaru <[email protected]>
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Reviewed-by Boris Ostrovsky <[email protected]>Thanks! So now we have three reviewed-bys, if I'm not mistaken all we need is Tamas' (for the
vm_eventpart) and Julien / Stefano's (for ARM) acks (or otherwise).And you'd need to talk Jürgen into allowing this in, now that we're past the freeze point.
(Adding Jürgen to the conversation.)
Right, that would be ideal if possible - the code has absolutely no impact on anything unless vm_event is active on the domain, which is never the case for the use-cases considered for a Xen release.
So the case I'm making for the patch to go in 4.12 is that:
1. It's perfectly harmless (it affects nothing, except for introspection).
2. It's trivial and thus very easy to see that it's correct.
3. It fixes a major headache for us, and thus it is a great improvement from an introspection standpoint (fixes OS crashes / hangs which we'd otherwise need to work around in rather painful ways).
4. V3 of the patch has been sent out on Dec 14th - it's just that reviewers have had other priorities and it did not gather all acks in time.
However, if it's not possible or desirable to allow this in the next best thing is to at least have all the acks necessary for it to go in first thing once the freeze is over.
From Julien's reply I understand that the last ack necessary is Tamas'.
Thanks,
Razvan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 49 lines · Razvan Cojocaru
Quoted 23 lines · Jan Beulich
Quoted 23 lines
Quoted 1 line
Quoted 1 line · On 14.01.19 at 10:34, <[email protected]> wrote:
Quoted 21 lines · Boris Ostrovsky
Quoted 18 lines · Razvan Cojocaru
Block interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().Signed-off-by Razvan Cojocaru <[email protected]>Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Reviewed-by Boris Ostrovsky <[email protected]>Thanks! So now we have three reviewed-bys, if I'm not mistaken all we need is Tamas' (for the
vm_eventpart) and Julien / Stefano's (for ARM) acks (or otherwise).And you'd need to talk Jürgen into allowing this in, now that we're past the freeze point.
(Adding Jürgen to the conversation.)
Right, that would be ideal if possible - the code has absolutely no impact on anything unless
vm_eventis active on the domain, which is never the case for the use-cases considered for a Xen release.So the case I'm making for the patch to go in 4.12 is that:
1. It's perfectly harmless (it affects nothing, except for introspection).
2. It's trivial and thus very easy to see that it's correct.
3. It fixes a major headache for us, and thus it is a great improvement from an introspection standpoint (fixes OS crashes / hangs which we'd otherwise need to work around in rather painful ways).
Quoted 8 lines
4. V3 of the patch has been sent out on Dec 14th - it's just that reviewers have had other priorities and it did not gather all acks in time.
However, if it's not possible or desirable to allow this in the next best thing is to at least have all the acks necessary for it to go in first thing once the freeze is over.
From Julien's reply I understand that the last ack necessary is Tamas'.
With that ack just arrived:
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 57 lines · Juergen Gross
Quoted 56 lines · Razvan Cojocaru
Quoted 23 lines · Jan Beulich
Quoted 23 lines
Quoted 1 line
Quoted 1 line · On 14.01.19 at 10:34, <[email protected]> wrote:
Quoted 21 lines · Boris Ostrovsky
Quoted 18 lines · Razvan Cojocaru
Block interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().Signed-off-by Razvan Cojocaru <[email protected]>Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Reviewed-by Boris Ostrovsky <[email protected]>Thanks! So now we have three reviewed-bys, if I'm not mistaken all we need is Tamas' (for the
vm_eventpart) and Julien / Stefano's (for ARM) acks (or otherwise).And you'd need to talk Jürgen into allowing this in, now that we're past the freeze point.
(Adding Jürgen to the conversation.)
Right, that would be ideal if possible - the code has absolutely no impact on anything unless
vm_eventis active on the domain, which is never the case for the use-cases considered for a Xen release.So the case I'm making for the patch to go in 4.12 is that:
1. It's perfectly harmless (it affects nothing, except for introspection).
2. It's trivial and thus very easy to see that it's correct.
3. It fixes a major headache for us, and thus it is a great improvement from an introspection standpoint (fixes OS crashes / hangs which we'd otherwise need to work around in rather painful ways).
4. V3 of the patch has been sent out on Dec 14th - it's just that reviewers have had other priorities and it did not gather all acks in time.
However, if it's not possible or desirable to allow this in the next best thing is to at least have all the acks necessary for it to go in first thing once the freeze is over.
Quoted 5 lines
Quoted 1 line
From Julien's reply I understand that the last ack necessary is Tamas'.
With that ack just arrived:
Release-acked-by Juergen Gross <[email protected]>
Thanks! Very much appreciated.
Razvan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 57 lines · Juergen Gross
Quoted 56 lines · Razvan Cojocaru
Quoted 23 lines · Jan Beulich
Quoted 23 lines
Quoted 1 line
Quoted 1 line · On 14.01.19 at 10:34, <[email protected]> wrote:
Quoted 21 lines · Boris Ostrovsky
Quoted 18 lines · Razvan Cojocaru
Block interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().Signed-off-by Razvan Cojocaru <[email protected]>Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Reviewed-by Boris Ostrovsky <[email protected]>Thanks! So now we have three reviewed-bys, if I'm not mistaken all we need is Tamas' (for the
vm_eventpart) and Julien / Stefano's (for ARM) acks (or otherwise).And you'd need to talk Jürgen into allowing this in, now that we're past the freeze point.
(Adding Jürgen to the conversation.)
Right, that would be ideal if possible - the code has absolutely no impact on anything unless
vm_eventis active on the domain, which is never the case for the use-cases considered for a Xen release.So the case I'm making for the patch to go in 4.12 is that:
1. It's perfectly harmless (it affects nothing, except for introspection).
2. It's trivial and thus very easy to see that it's correct.
3. It fixes a major headache for us, and thus it is a great improvement from an introspection standpoint (fixes OS crashes / hangs which we'd otherwise need to work around in rather painful ways).
4. V3 of the patch has been sent out on Dec 14th - it's just that reviewers have had other priorities and it did not gather all acks in time.
However, if it's not possible or desirable to allow this in the next best thing is to at least have all the acks necessary for it to go in first thing once the freeze is over.
Quoted 5 lines
Quoted 1 line
From Julien's reply I understand that the last ack necessary is Tamas'.
With that ack just arrived:
Release-acked-by Juergen Gross <[email protected]>
AFAICT this is fine to apply to staging now, am I incorrect?
Thanks,
Razvan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 59 lines
Quoted 1 line
Quoted 1 line · On 16.01.19 at 08:10, <[email protected]> wrote:
Quoted 57 lines · Juergen Gross
Quoted 56 lines · Razvan Cojocaru
Quoted 23 lines · Jan Beulich
Quoted 23 lines
Quoted 1 line
Quoted 1 line · On 14.01.19 at 10:34, <[email protected]> wrote:
Quoted 21 lines · Boris Ostrovsky
Quoted 18 lines · Razvan Cojocaru
Block interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().Signed-off-by Razvan Cojocaru <[email protected]>Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Reviewed-by Boris Ostrovsky <[email protected]>Thanks! So now we have three reviewed-bys, if I'm not mistaken all we need is Tamas' (for the
vm_eventpart) and Julien / Stefano's (for ARM) acks (or otherwise).And you'd need to talk Jürgen into allowing this in, now that we're past the freeze point.
(Adding Jürgen to the conversation.)
Right, that would be ideal if possible - the code has absolutely no impact on anything unless
vm_eventis active on the domain, which is never the case for the use-cases considered for a Xen release.So the case I'm making for the patch to go in 4.12 is that:
1. It's perfectly harmless (it affects nothing, except for introspection).
2. It's trivial and thus very easy to see that it's correct.
3. It fixes a major headache for us, and thus it is a great improvement from an introspection standpoint (fixes OS crashes / hangs which we'd otherwise need to work around in rather painful ways).
4. V3 of the patch has been sent out on Dec 14th - it's just that reviewers have had other priorities and it did not gather all acks in time.
However, if it's not possible or desirable to allow this in the next best thing is to at least have all the acks necessary for it to go in first thing once the freeze is over.
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
From Julien's reply I understand that the last ack necessary is Tamas'.
With that ack just arrived:
Release-acked-by Juergen Gross <[email protected]>AFAICT this is fine to apply to staging now, am I incorrect?
Yes, but may I ask that you be a little more patient?
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 59 lines · Jan Beulich
Quoted 59 lines
Quoted 1 line
Quoted 1 line · On 16.01.19 at 08:10, <[email protected]> wrote:
Quoted 57 lines · Juergen Gross
Quoted 56 lines · Razvan Cojocaru
Quoted 23 lines · Jan Beulich
Quoted 23 lines
Quoted 1 line
Quoted 1 line · On 14.01.19 at 10:34, <[email protected]> wrote:
Quoted 21 lines · Boris Ostrovsky
Quoted 18 lines · Razvan Cojocaru
Block interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().Signed-off-by Razvan Cojocaru <[email protected]>Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Reviewed-by Boris Ostrovsky <[email protected]>Thanks! So now we have three reviewed-bys, if I'm not mistaken all we need is Tamas' (for the
vm_eventpart) and Julien / Stefano's (for ARM) acks (or otherwise).And you'd need to talk Jürgen into allowing this in, now that we're past the freeze point.
(Adding Jürgen to the conversation.)
Right, that would be ideal if possible - the code has absolutely no impact on anything unless
vm_eventis active on the domain, which is never the case for the use-cases considered for a Xen release.So the case I'm making for the patch to go in 4.12 is that:
1. It's perfectly harmless (it affects nothing, except for introspection).
2. It's trivial and thus very easy to see that it's correct.
3. It fixes a major headache for us, and thus it is a great improvement from an introspection standpoint (fixes OS crashes / hangs which we'd otherwise need to work around in rather painful ways).
4. V3 of the patch has been sent out on Dec 14th - it's just that reviewers have had other priorities and it did not gather all acks in time.
However, if it's not possible or desirable to allow this in the next best thing is to at least have all the acks necessary for it to go in first thing once the freeze is over.
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
From Julien's reply I understand that the last ack necessary is Tamas'.
With that ack just arrived:
Release-acked-by Juergen Gross <[email protected]>AFAICT this is fine to apply to staging now, am I incorrect?
Yes, but may I ask that you be a little more patient?
Of course, apologies. I was just unsure if further action was required on my part.
Thank you,
Razvan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Hi,
Quoted 19 lines · Razvan Cojocaru
Quoted 18 lines · Boris Ostrovsky
Quoted 17 lines · Razvan Cojocaru
Block interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Razvan Cojocaru <[email protected]>Reviewed-by Boris Ostrovsky <[email protected]>Thanks! So now we have three reviewed-bys, if I'm not mistaken all we need is Tamas' (for the
vm_eventpart) and Julien / Stefano's (for ARM) acks (or otherwise).Could you please take a look?
All the Arm code modified falls under "VM EVENT, MEM ACCESS and MONITOR". So I don't think you need an ack from Stefano or I.
Cheers,
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 15 lines · Razvan Cojocaru
Block interrupts (in
vmx_intr_assist()) for the duration of processing a syncvm_event(similarly to the strategy currently used for single-stepping). Otherwise, attempting to emulate an instruction when requested by avm_eventreply may legitimately need to call e.g.hvm_inject_page_fault(), which then overwrites the active interrupt in the VMCS.The sync
vm_eventhandling path on x86/VMX is (roughly):monitor_traps()-> processvm_event->vmx_intr_assist()(possibly writingVM_ENTRY_INTR_INFO) ->hvm_vm_event_do_resume()->hvm_emulate_one_vm_event()(possibly overwriting theVM_ENTRY_INTR_INFOvalue).
Quoted 4 lines
This patch may also be helpful for the future removal of
may_deferin hvm_set_cr{0,3,4} andhvm_set_msr().Signed-off-by Razvan Cojocaru <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel