From 33a576ced002faa57a574b373b3150beb338f02e Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Thu, 1 Apr 2010 17:18:58 +0300 Subject: [PATCH] kvm: Ignore math co-processor reset I/O writes The Linux kernel resets math co-processor when entering protected mode. Ignore the reset for now so kernel boot doesn't stop there. Signed-off-by: Pekka Enberg --- tools/kvm/ioport.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/kvm/ioport.c b/tools/kvm/ioport.c index f78674dcfb3d..d59436d74cf3 100644 --- a/tools/kvm/ioport.c +++ b/tools/kvm/ioport.c @@ -30,8 +30,21 @@ static struct ioport_operations cmos_ram_rtc_ops = { .io_out = cmos_ram_rtc_io_out, }; +static bool dummy_io_out(struct kvm *self, uint16_t port, void *data, int size, uint32_t count) +{ + return true; +} + +static struct ioport_operations dummy_write_only_ioport_ops = { + .io_out = dummy_io_out, +}; + static struct ioport_operations *ioport_ops[USHRT_MAX] = { [0x70] = &cmos_ram_rtc_ops, + + /* 0x00F0 - 0x00FF - Math co-processor */ + [0xF0] = &dummy_write_only_ioport_ops, + [0xF1] = &dummy_write_only_ioport_ops, }; static const char *to_direction(int direction) -- 2.39.5