aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/stdvga.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-02-20 14:36:45 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-02-20 14:36:45 +0000
commit3bb4f99d8cec90c3d7731d004333dd03998e2287 (patch)
tree106e622cfc9218e44d1c25a29c3409172a55acb0 /xen/arch/x86/hvm/stdvga.c
parent10d08139c54258700129aebe4193b86efdd94f13 (diff)
downloadxen-3bb4f99d8cec90c3d7731d004333dd03998e2287.tar.gz
xen-3bb4f99d8cec90c3d7731d004333dd03998e2287.tar.bz2
xen-3bb4f99d8cec90c3d7731d004333dd03998e2287.zip
x86 hvm: Replace old MMIO emulator with x86_emulate()-based harness.
Re-factor VMX real-mode emulation to use the same harness. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/hvm/stdvga.c')
-rw-r--r--xen/arch/x86/hvm/stdvga.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/xen/arch/x86/hvm/stdvga.c b/xen/arch/x86/hvm/stdvga.c
index 86a036c4fc..56260c5c77 100644
--- a/xen/arch/x86/hvm/stdvga.c
+++ b/xen/arch/x86/hvm/stdvga.c
@@ -458,33 +458,6 @@ static int mmio_move(struct hvm_hw_stdvga *s, ioreq_t *p)
return 1;
}
-static uint32_t op_and(uint32_t a, uint32_t b) { return a & b; }
-static uint32_t op_or (uint32_t a, uint32_t b) { return a | b; }
-static uint32_t op_xor(uint32_t a, uint32_t b) { return a ^ b; }
-static uint32_t op_add(uint32_t a, uint32_t b) { return a + b; }
-static uint32_t op_sub(uint32_t a, uint32_t b) { return a - b; }
-static uint32_t (*op_array[])(uint32_t, uint32_t) = {
- [IOREQ_TYPE_AND] = op_and,
- [IOREQ_TYPE_OR ] = op_or,
- [IOREQ_TYPE_XOR] = op_xor,
- [IOREQ_TYPE_ADD] = op_add,
- [IOREQ_TYPE_SUB] = op_sub
-};
-
-static int mmio_op(struct hvm_hw_stdvga *s, ioreq_t *p)
-{
- uint32_t orig, mod = 0;
- orig = stdvga_mem_read(p->addr, p->size);
-
- if ( p->dir == IOREQ_WRITE )
- {
- mod = (op_array[p->type])(orig, p->data);
- stdvga_mem_write(p->addr, mod, p->size);
- }
-
- return 0; /* Don't try to buffer these operations */
-}
-
int stdvga_intercept_mmio(ioreq_t *p)
{
struct domain *d = current->domain;
@@ -506,13 +479,6 @@ int stdvga_intercept_mmio(ioreq_t *p)
case IOREQ_TYPE_COPY:
buf = mmio_move(s, p);
break;
- case IOREQ_TYPE_AND:
- case IOREQ_TYPE_OR:
- case IOREQ_TYPE_XOR:
- case IOREQ_TYPE_ADD:
- case IOREQ_TYPE_SUB:
- buf = mmio_op(s, p);
- break;
default:
gdprintk(XENLOG_WARNING, "unsupported mmio request type:%d "
"addr:0x%04x data:0x%04x size:%d count:%d state:%d "