qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [BUGFIX][PATCH v7 3/9] vmport: Fix vmport_cmd_ram_size


From: Don Slutz
Subject: [Qemu-devel] [BUGFIX][PATCH v7 3/9] vmport: Fix vmport_cmd_ram_size
Date: Fri, 12 Jun 2015 10:05:50 -0400

Based on

https://sites.google.com/site/chitchatvmback/backdoor

and testing on ESXi, this should be in MB not bytes.

Signed-off-by: Don Slutz <address@hidden>
CC: Don Slutz <address@hidden>
---
 hw/misc/vmport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/misc/vmport.c b/hw/misc/vmport.c
index 203e892..000af18 100644
--- a/hw/misc/vmport.c
+++ b/hw/misc/vmport.c
@@ -113,7 +113,7 @@ static uint32_t vmport_cmd_ram_size(void *opaque, uint32_t 
addr)
     X86CPU *cpu = X86_CPU(current_cpu);
 
     cpu->env.regs[R_EBX] = 0x1177;
-    return ram_size;
+    return ram_size >> 20; /* in MB */
 }
 
 static uint32_t vmport_cmd_xtest(void *opaque, uint32_t addr)
-- 
1.8.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]