[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] x86/hvm: Correct error message in check_segment()


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 2 Oct 2020 12:30:12 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 02 Oct 2020 11:30:53 +0000
  • Ironport-sdr: goJ9Yi/246u1J3b5DSRDg54+JZMFdCm17xpnULr0EByx8xUAKQXtjNAAfzMZ70FivXxFnyGwMZ lqfP7VFAHAGCKbBM2cT3H0CsN6/PC6IIStMhA8YFKaq5xlrXVzAOYBPpBtykF2F93TGAuhuAIA XGG0NqKB4ZFD1PBTmTsBlEHS/Q+izF90UnkhHvfYdvmkN2V+rrhn0PIO9Ro7E2plJU6ynKdCVP O61pfmvLtHojPlPd7gtiKgKnTniv9vzRtKPXMZoul6igIOPUByWLHmB8rqSM/ZYT0zMBrXCluI +Qo=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The error message is wrong (given AMD's older interpretation of what a NUL
segment should contain, attribute wise), and actively unhelpful because you
only get it in response to a hypercall where the one piece of information you
cannot provide is the segment selector.

Fix the message to talk about segment attributes, rather than the selector.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
---
 xen/arch/x86/hvm/domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/domain.c b/xen/arch/x86/hvm/domain.c
index 8e3375265c..ffe952c2df 100644
--- a/xen/arch/x86/hvm/domain.c
+++ b/xen/arch/x86/hvm/domain.c
@@ -39,7 +39,7 @@ static int check_segment(struct segment_register *reg, enum 
x86_segment seg)
     {
         if ( seg != x86_seg_ds && seg != x86_seg_es )
         {
-            gprintk(XENLOG_ERR, "Null selector provided for CS, SS or TR\n");
+            gprintk(XENLOG_ERR, "Empty segment attributes for CS, SS or TR\n");
             return -EINVAL;
         }
         return 0;
-- 
2.11.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.