Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-15 Thread George Dunlap
> On Feb 15, 2019, at 2:02 PM, Jan Beulich wrote: > On 15.02.19 at 14:51, wrote: > >> >>> On Feb 15, 2019, at 1:47 PM, Andrew Cooper >>> wrote: >>> >>> On 15/02/2019 13:37, George Dunlap wrote: >> The one issue is that domain_pause_except_self() currently is actually a

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-15 Thread Jan Beulich
>>> On 15.02.19 at 14:51, wrote: > >> On Feb 15, 2019, at 1:47 PM, Andrew Cooper wrote: >> >> On 15/02/2019 13:37, George Dunlap wrote: >>> > The one issue is that domain_pause_except_self() currently is actually a > deadlock risk if two different vcpus start it at the same time. I

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-15 Thread Razvan Cojocaru
On 2/15/19 3:37 PM, George Dunlap wrote: On Feb 15, 2019, at 1:24 PM, Jan Beulich wrote: On 15.02.19 at 13:52, wrote: On Feb 12, 2019, at 11:42 AM, Razvan Cojocaru wrote: HVMOP_altp2m_set_domain_state does not domain_pause(), presumably on purpose (as it was originally supposed to

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-15 Thread George Dunlap
> On Feb 15, 2019, at 1:47 PM, Andrew Cooper wrote: > > On 15/02/2019 13:37, George Dunlap wrote: >> The one issue is that domain_pause_except_self() currently is actually a deadlock risk if two different vcpus start it at the same time. I think the attached patch

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-15 Thread Andrew Cooper
On 15/02/2019 13:37, George Dunlap wrote: > >>> The one issue is that domain_pause_except_self() currently is actually a >>> deadlock risk if two different vcpus start it at the same time. I think >>> the >>> attached patch (compile-tested only) should fix this issue; after this >>> patch

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-15 Thread Jan Beulich
>>> On 15.02.19 at 14:37, wrote: >> On Feb 15, 2019, at 1:24 PM, Jan Beulich wrote: >> And two cosmetic remarks - there's no need to re-specify >> __must_check on the function definition, as the function >> declaration ought to be in scope anyway. And there's a stray >> blank inside the likely()

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-15 Thread George Dunlap
> On Feb 15, 2019, at 1:24 PM, Jan Beulich wrote: > On 15.02.19 at 13:52, wrote: >>> On Feb 12, 2019, at 11:42 AM, Razvan Cojocaru >>> wrote: >>> >>> HVMOP_altp2m_set_domain_state does not domain_pause(), presumably >>> on purpose (as it was originally supposed to cater to a in-guest

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-15 Thread Razvan Cojocaru
On Feb 12, 2019, at 11:42 AM, Razvan Cojocaru wrote: HVMOP_altp2m_set_domain_state does not domain_pause(), presumably on purpose (as it was originally supposed to cater to a in-guest agent, and a domain pausing itself is not a good idea). Sorry to come in here on v4 and suggest changing

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-15 Thread Jan Beulich
>>> On 15.02.19 at 13:52, wrote: >> On Feb 12, 2019, at 11:42 AM, Razvan Cojocaru >> wrote: >> >> HVMOP_altp2m_set_domain_state does not domain_pause(), presumably >> on purpose (as it was originally supposed to cater to a in-guest >> agent, and a domain pausing itself is not a good idea). >

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-15 Thread George Dunlap
> On Feb 12, 2019, at 11:42 AM, Razvan Cojocaru > wrote: > > HVMOP_altp2m_set_domain_state does not domain_pause(), presumably > on purpose (as it was originally supposed to cater to a in-guest > agent, and a domain pausing itself is not a good idea). Sorry to come in here on v4 and suggest

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-14 Thread Razvan Cojocaru
On 2/14/19 8:06 PM, George Dunlap wrote: > On 2/12/19 11:42 AM, Razvan Cojocaru wrote: >> HVMOP_altp2m_set_domain_state does not domain_pause(), presumably >> on purpose (as it was originally supposed to cater to a in-guest >> agent, and a domain pausing itself is not a good idea). >> >> This can

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-14 Thread George Dunlap
On 2/12/19 11:42 AM, Razvan Cojocaru wrote: > HVMOP_altp2m_set_domain_state does not domain_pause(), presumably > on purpose (as it was originally supposed to cater to a in-guest > agent, and a domain pausing itself is not a good idea). > > This can lead to domain crashes in the

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-12 Thread Razvan Cojocaru
On 2/12/19 2:57 PM, Jan Beulich wrote: On 12.02.19 at 12:42, wrote: HVMOP_altp2m_set_domain_state does not domain_pause(), presumably on purpose (as it was originally supposed to cater to a in-guest agent, and a domain pausing itself is not a good idea). This can lead to domain crashes in the

Re: [Xen-devel] [PATCH for-4.12 V4] x86/altp2m: fix HVMOP_altp2m_set_domain_state race

2019-02-12 Thread Jan Beulich
>>> On 12.02.19 at 12:42, wrote: > HVMOP_altp2m_set_domain_state does not domain_pause(), presumably > on purpose (as it was originally supposed to cater to a in-guest > agent, and a domain pausing itself is not a good idea). > > This can lead to domain crashes in the vmx_vmexit_handler() code >