From patchwork Sun May 5 20:51:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 2521331 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 1E8F7DF2A2 for ; Sun, 5 May 2013 20:52:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752201Ab3EEUwz (ORCPT ); Sun, 5 May 2013 16:52:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59875 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752143Ab3EEUwy (ORCPT ); Sun, 5 May 2013 16:52:54 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r45Kqp6E013099 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 5 May 2013 16:52:51 -0400 Received: from amt.cnet (vpn1-4-52.gru2.redhat.com [10.97.4.52]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r45Kqo0W002197; Sun, 5 May 2013 16:52:51 -0400 Received: from amt.cnet (localhost [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 5A54A102BF5; Sun, 5 May 2013 17:51:51 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.6/8.14.6/Submit) id r45KpoBD002070; Sun, 5 May 2013 17:51:50 -0300 Date: Sun, 5 May 2013 17:51:49 -0300 From: Marcelo Tosatti To: Jan Kiszka Cc: qemu-devel , kvm-devel Subject: [uq/master PATCH] kvmvapic: add ioport read accessor Message-ID: <20130505205149.GA2032@amt.cnet> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Necessary since memory region accessor assumes read and write methods are registered. Otherwise reading I/O port 0x7e segfaults. https://bugzilla.redhat.com/show_bug.cgi?id=954306 Signed-off-by: Marcelo Tosatti Reviewed-by: Jan Kiszka --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index 5b558aa..655483b 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -687,8 +687,14 @@ static void vapic_write(void *opaque, hwaddr addr, uint64_t data, } } +static uint64_t vapic_read(void *opaque, hwaddr addr, unsigned size) +{ + return 0xffffffff; +} + static const MemoryRegionOps vapic_ops = { .write = vapic_write, + .read = vapic_read, .endianness = DEVICE_NATIVE_ENDIAN, };