summaryrefslogtreecommitdiffstats
path: root/lib/libvmmapi/vmmapi.c
diff options
context:
space:
mode:
authortychon <tychon@FreeBSD.org>2015-04-01 00:15:31 +0000
committertychon <tychon@FreeBSD.org>2015-04-01 00:15:31 +0000
commitb3c521e85228b0e74f7983ca41489dfafd7a424d (patch)
treedb6cabf68a19dd36f98777d6764af82f1969b8c0 /lib/libvmmapi/vmmapi.c
parentcbabb678cae1bc20311261fcd38ceb4a0cc319a9 (diff)
downloadFreeBSD-src-b3c521e85228b0e74f7983ca41489dfafd7a424d.zip
FreeBSD-src-b3c521e85228b0e74f7983ca41489dfafd7a424d.tar.gz
Fix "MOVS" instruction memory to MMIO emulation. Currently updates to
%rdi, %rsi, etc are inadvertently bypassed along with the check to see if the instruction needs to be repeated per the 'rep' prefix. Add "MOVS" instruction support for the 'MMIO to MMIO' case. Reviewed by: neel
Diffstat (limited to 'lib/libvmmapi/vmmapi.c')
-rw-r--r--lib/libvmmapi/vmmapi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c
index 9828876..0c15845 100644
--- a/lib/libvmmapi/vmmapi.c
+++ b/lib/libvmmapi/vmmapi.c
@@ -979,6 +979,18 @@ gla2gpa(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging,
return (error);
}
+int
+vm_gla2gpa(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging,
+ uint64_t gla, int prot, uint64_t *gpa)
+{
+ int error, fault;
+
+ error = gla2gpa(ctx, vcpu, paging, gla, prot, &fault, gpa);
+ if (fault)
+ error = fault;
+ return (error);
+}
+
#ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
OpenPOWER on IntegriCloud