diff mbox

[3/4] x86/traps: undo the PVHv1 bodge in NMI delivery path

Message ID 20170317110223.25130-4-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu March 17, 2017, 11:02 a.m. UTC
A bodge was added in 21c9fce8efb to skip delivering NMI to PVHv1 guest.
Now that PVHv1 is gone, undo that bodge and remove the fixme.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 xen/arch/x86/traps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Cooper March 17, 2017, 11:06 a.m. UTC | #1
On 17/03/17 11:02, Wei Liu wrote:
> A bodge was added in 21c9fce8efb to skip delivering NMI to PVHv1 guest.
> Now that PVHv1 is gone, undo that bodge and remove the fixme.
>
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

This unfortunately needs to stay, although perhaps it wants rewording.

send_guest_trap() just out of context below is PV-specific, making this
path unsuitable for any HVM guests.

~Andrew

> ---
>  xen/arch/x86/traps.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
> index 0d54baf20e..c785b3f353 100644
> --- a/xen/arch/x86/traps.c
> +++ b/xen/arch/x86/traps.c
> @@ -3537,7 +3537,7 @@ static void nmi_hwdom_report(unsigned int reason_idx)
>  {
>      struct domain *d = hardware_domain;
>  
> -    if ( !d || !d->vcpu || !d->vcpu[0] || !is_pv_domain(d) /* PVH fixme */ )
> +    if ( !d || !d->vcpu || !d->vcpu[0] )
>          return;
>  
>      set_bit(reason_idx, nmi_reason(d));
Wei Liu March 17, 2017, 11:10 a.m. UTC | #2
On Fri, Mar 17, 2017 at 11:06:41AM +0000, Andrew Cooper wrote:
> On 17/03/17 11:02, Wei Liu wrote:
> > A bodge was added in 21c9fce8efb to skip delivering NMI to PVHv1 guest.
> > Now that PVHv1 is gone, undo that bodge and remove the fixme.
> >
> > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> 
> This unfortunately needs to stay, although perhaps it wants rewording.
> 
> send_guest_trap() just out of context below is PV-specific, making this
> path unsuitable for any HVM guests.
> 

Just removing the comment should be fine then.
Andrew Cooper March 17, 2017, 11:11 a.m. UTC | #3
On 17/03/17 11:10, Wei Liu wrote:
> On Fri, Mar 17, 2017 at 11:06:41AM +0000, Andrew Cooper wrote:
>> On 17/03/17 11:02, Wei Liu wrote:
>>> A bodge was added in 21c9fce8efb to skip delivering NMI to PVHv1 guest.
>>> Now that PVHv1 is gone, undo that bodge and remove the fixme.
>>>
>>> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
>> This unfortunately needs to stay, although perhaps it wants rewording.
>>
>> send_guest_trap() just out of context below is PV-specific, making this
>> path unsuitable for any HVM guests.
>>
> Just removing the comment should be fine then.

Ok then.

~Andrew
Roger Pau Monné March 17, 2017, 11:22 a.m. UTC | #4
On Fri, Mar 17, 2017 at 11:10:19AM +0000, Wei Liu wrote:
> On Fri, Mar 17, 2017 at 11:06:41AM +0000, Andrew Cooper wrote:
> > On 17/03/17 11:02, Wei Liu wrote:
> > > A bodge was added in 21c9fce8efb to skip delivering NMI to PVHv1 guest.
> > > Now that PVHv1 is gone, undo that bodge and remove the fixme.
> > >
> > > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > 
> > This unfortunately needs to stay, although perhaps it wants rewording.
> > 
> > send_guest_trap() just out of context below is PV-specific, making this
> > path unsuitable for any HVM guests.
> > 
> 
> Just removing the comment should be fine then.

This has reminded me that I should send a patch to prevent using nmi=dom0 with
dom0=pvh.

Roger.
diff mbox

Patch

diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 0d54baf20e..c785b3f353 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3537,7 +3537,7 @@  static void nmi_hwdom_report(unsigned int reason_idx)
 {
     struct domain *d = hardware_domain;
 
-    if ( !d || !d->vcpu || !d->vcpu[0] || !is_pv_domain(d) /* PVH fixme */ )
+    if ( !d || !d->vcpu || !d->vcpu[0] )
         return;
 
     set_bit(reason_idx, nmi_reason(d));