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

[xen staging] x86: hvm: hypercall: use define instead of const in hvm_hypercall()



commit 89780711438a6f18ad565ad6b241e5ace062cf10
Author:     Grygorii Strashko <grygorii_strashko@xxxxxxxx>
AuthorDate: Fri Sep 12 09:47:03 2025 +0000
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Tue Nov 11 11:32:18 2025 +0000

    x86: hvm: hypercall: use define instead of const in hvm_hypercall()
    
    Use define X86_MODE_64BIT instead of constant in hvm_hypercall() for "mode"
    conditional check to improve code readability.
    
    Signed-off-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/hvm/hypercall.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c
index 6f8dfdff4a..b254b3e2f7 100644
--- a/xen/arch/x86/hvm/hypercall.c
+++ b/xen/arch/x86/hvm/hypercall.c
@@ -155,7 +155,7 @@ int hvm_hypercall(struct cpu_user_regs *regs)
 
     curr->hcall_preempted = false;
 
-    if ( mode == 8 )
+    if ( mode == X86_MODE_64BIT )
     {
         HVM_DBG_LOG(DBG_LEVEL_HCALL, "hcall%lu(%lx, %lx, %lx, %lx, %lx)",
                     eax, regs->rdi, regs->rsi, regs->rdx, regs->r10, regs->r8);
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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