From patchwork Mon May 4 08:33:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1282321 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=2001:470:142::17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=hMxoSTjf; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Fx5J5ZbVz9sRf for ; Mon, 4 May 2020 18:35:48 +1000 (AEST) Received: from localhost ([::1]:42430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVWZm-0006tS-H3 for incoming@patchwork.ozlabs.org; Mon, 04 May 2020 04:35:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVWXs-0003Kp-2I for qemu-devel@nongnu.org; Mon, 04 May 2020 04:33:48 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:38160) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVWXq-0007Rn-Lm for qemu-devel@nongnu.org; Mon, 04 May 2020 04:33:47 -0400 Received: by mail-wr1-x429.google.com with SMTP id x17so19850060wrt.5 for ; Mon, 04 May 2020 01:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fHSKVhvgJ0/ZOfFaf+BP/P6hX2XQjwkZB5BoXLgjiYk=; b=hMxoSTjfJ80sQfPeIaXs98wQXEsQbyGvMOoag6M9eMCmfwFah4SbUvlGvFO9v9RSzk kfxrQscyzsG4RU81fIHbMfP9NAKhsMzJKz/Ve5fqsjlgUJL+1xYM9ysrENiZ5FdhxnYV L6qK8z7Xx28VZjOFawqtxWsY3myems5bXyBwXrbM8ao3nUCpwDcWU6EUUEVqKYPHgQCi 3dEbczUGignSEM458OHUZABs4pFdAUhbqzKGr0Radyn7on25LY9YnuQHvpgAuBkBezRV 5XYThjHzWRX3A3Q8hxc6DyFd/pFasJw+non4fU4Y5Og1ST51S0tXidn67fYgNNCfL21w jhsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fHSKVhvgJ0/ZOfFaf+BP/P6hX2XQjwkZB5BoXLgjiYk=; b=QOMIkMgkpiSUqs78vTCnl8yVB64jZCo5wUK2+lHM81lRzFOZfaeQrqm/wmiXWb/l0l Vhzg/k3G2edqKI+znL2wx3Kz6kt4mIa3C1D9BmIOr/cmasRkpss6ilSecNu8cR8NcLjE Of9yeZHvQr7sDUqhdcr434pDXZ9fVZKt5VcOl3ExZjT+J2FIoh9S5P4cpO08puymga9F oS6tN6BD2rFF6E+3YUQk7B+XL+esZbkO5V2TGhIMppxPY/tqIB1YEwgFy3zzJhqWgTuP krC7Qwax6epucYSojmCdjWNxVKWAIvYnw5rT5/sC35zf610XBH52+VhYjfBr28zdHjOo uA9A== X-Gm-Message-State: AGi0Pub5CDeGOP9Y7AWJEotBzPw8mAVrFm47IhDor16PbJH72cMe8Nqu ESz78ArWTsJ3WgHkLW2H6iLB7T/I X-Google-Smtp-Source: APiQypJd8ySdOwLgwomQkWryWn5gCaTMV526JzY+aSlDmQQbBEIz1vpjUCET/mExAr6C231y8aiA+Q== X-Received: by 2002:a5d:6a04:: with SMTP id m4mr19216874wru.326.1588581225080; Mon, 04 May 2020 01:33:45 -0700 (PDT) Received: from x1w.redhat.com (26.red-88-21-207.staticip.rima-tde.net. [88.21.207.26]) by smtp.gmail.com with ESMTPSA id 2sm13048053wre.25.2020.05.04.01.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 01:33:44 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 1/4] hw/i386/pc: Create 'vmport' device in place Date: Mon, 4 May 2020 10:33:39 +0200 Message-Id: <20200504083342.24273-2-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200504083342.24273-1-f4bug@amsat.org> References: <20200504083342.24273-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x429.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/i386/pc.h | 6 ------ hw/i386/pc.c | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 6ab6eda046..26e2a3d92b 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -132,12 +132,6 @@ GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled); /* vmport.c */ #define TYPE_VMPORT "vmport" typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address); - -static inline void vmport_init(ISABus *bus) -{ - isa_create_simple(bus, TYPE_VMPORT); -} - void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque); void vmmouse_get_data(uint32_t *data); void vmmouse_set_data(const uint32_t *data); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 5143c51653..84669ddc84 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1152,7 +1152,7 @@ static void pc_superio_init(ISABus *isa_bus, bool create_fdctrl, bool no_vmport) i8042 = isa_create_simple(isa_bus, "i8042"); if (!no_vmport) { - vmport_init(isa_bus); + isa_create_simple(isa_bus, TYPE_VMPORT); vmmouse = isa_try_create(isa_bus, "vmmouse"); } else { vmmouse = NULL; From patchwork Mon May 4 08:33:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1282318 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=2001:470:142::17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=UdjlNowg; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Fx3h5GH2z9sSr for ; Mon, 4 May 2020 18:34:24 +1000 (AEST) Received: from localhost ([::1]:34348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVWYQ-0003O0-F5 for incoming@patchwork.ozlabs.org; Mon, 04 May 2020 04:34:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVWXs-0003LP-GA for qemu-devel@nongnu.org; Mon, 04 May 2020 04:33:48 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:52645) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVWXr-0007Rz-RU for qemu-devel@nongnu.org; Mon, 04 May 2020 04:33:48 -0400 Received: by mail-wm1-x343.google.com with SMTP id 188so7449722wmc.2 for ; Mon, 04 May 2020 01:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xU5I2xlUHbp9bQFHtUli8mHPbgdjvZx4MCau2zAPM7A=; b=UdjlNowgafeJMhYBAaIFhSl36blvfWpB3C4x7GKqbkOFTY5gmLDaYDnSjIrXm7Wr57 nipMyVGQHFh53aQNq9N4ptiMxynUzryx2QDwYT3jcVIjc5bQ6GILwbhV0eR3Di0wc09a uWTmZVD+0VtD4toqeUVf6TnyhekXwOsZb64KLjDp9zZ6MPxf0d095mZdT/tXFJ9C1FXx fMIwIxQ6FoQihbEN1lYU4G0CbBJ/J25KcvLtOe2pcEifr8O4qUUZfDHm4fEzrGVdwSkb hlM/5uRpPJJUzucLXccpPCXUje0ix51NRjPujj50JJQBO384YoJJ3jaj2xJp6lmm51jN fF2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=xU5I2xlUHbp9bQFHtUli8mHPbgdjvZx4MCau2zAPM7A=; b=KrOuuHhuCwh3jZGR7bN6yuWam1ryFCZk7ld20h5LzslwmrI5lJebisXYYjTUjoIQ0e 1jRQmOZ1xWzu0lFhpfgp1pPOo1Akvv2yYrptvv8a0te80JBVi8Z0MRKcG96V17v7RJ4O MkD5N1a7nImoxRPqnTsTjFQxuC/cQLkUSDVGuLlBUXOqDYsl4uplo5DTwRFr7HbHMVR7 Ak1c57G5wK+vAkcmG5fX5tULRGwoavMOk7dMuPGG9E4KsbxaFJLsXQMqQ0otFQZbcUGF JYviQqZZfywP5kgfTMTqaYMJpxYWrG0mFuEN7E9LA7QDZmBLBPnHO/8HEIge4nuG0Tl6 AddQ== X-Gm-Message-State: AGi0PuaIW+xbnrE5w77DcQkyZ2w1FYE3m+WpliajYn8apwfOI3fGIP4w VwOIcdNT/9vyN9S5WLz8HkgfQLyw X-Google-Smtp-Source: APiQypKw/oyntCrnijtY+ib4tyKRqtvjtgC/AK1uXkueovrrsp7Af+0gnbNaa/Ejev5yPMYZr6AH0g== X-Received: by 2002:a7b:c213:: with SMTP id x19mr12978382wmi.53.1588581226141; Mon, 04 May 2020 01:33:46 -0700 (PDT) Received: from x1w.redhat.com (26.red-88-21-207.staticip.rima-tde.net. [88.21.207.26]) by smtp.gmail.com with ESMTPSA id 2sm13048053wre.25.2020.05.04.01.33.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 01:33:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/4] hw/i386/vmport: Remove unused 'hw/input/i8042.h' include Date: Mon, 4 May 2020 10:33:40 +0200 Message-Id: <20200504083342.24273-3-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200504083342.24273-1-f4bug@amsat.org> References: <20200504083342.24273-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Remove unused "hw/input/i8042.h" include. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/i386/vmport.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c index 1f31e27c8a..114141c6f3 100644 --- a/hw/i386/vmport.c +++ b/hw/i386/vmport.c @@ -24,7 +24,6 @@ #include "qemu/osdep.h" #include "hw/isa/isa.h" #include "hw/i386/pc.h" -#include "hw/input/i8042.h" #include "sysemu/hw_accel.h" #include "qemu/log.h" #include "trace.h" From patchwork Mon May 4 08:33:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1282322 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=2001:470:142::17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=iMM7CErr; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Fx5J65V3z9sSr for ; Mon, 4 May 2020 18:35:48 +1000 (AEST) Received: from localhost ([::1]:42404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVWZl-0006si-Ob for incoming@patchwork.ozlabs.org; Mon, 04 May 2020 04:35:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40250) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVWXt-0003NQ-VU for qemu-devel@nongnu.org; Mon, 04 May 2020 04:33:50 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:35197) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVWXt-0007S9-8n for qemu-devel@nongnu.org; Mon, 04 May 2020 04:33:49 -0400 Received: by mail-wr1-x442.google.com with SMTP id x18so19872183wrq.2 for ; Mon, 04 May 2020 01:33:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TyhBVROPRuzO0rWk+Br8uL9KdUxWrVxwNNY4fpfIogg=; b=iMM7CErrzcQJI5kDg/k4pIk3TcjArB+JXv/OksqsXoEuBScblFzt0lwZHglDZ3o/LP cAb31cXqwouMJWRm2vZJalE2RLtJdWXz++Xp4qoWiD9tG4zEcop78fp7vksKmOGKhxDo UyE/Zp2gNVbo7kS+BwPeC68bgL9HMwv6l6rabJAnhpERFw2Qu5bY7wz7jleyskLlaVhg EEaIlT4OZTumCRXBRmpCGsHFFCZ0/nTUpnk+vEp8vbe7fI5AJoJM0rDhPX2YUdCwBKBg WCfqsP/ZJTaxtBuqzqlA3uSNcn8ARR/oDOhZMsNjb80o+7RuQCyleVvohnpJvtLPjXS7 6TRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TyhBVROPRuzO0rWk+Br8uL9KdUxWrVxwNNY4fpfIogg=; b=CplFUVseNnKeQRc7eSNPWkA96DxvVV3gTpp0jlEBTV1icD7iTyJREdlBj7Xfr+F6a5 s3qwDnwqqc6SBUr3yxQztSzPWLIu/kXZkm9kgh6zg/XoI6/7/QZlO3UggSrosW32EBqM PeZzgdjCWxTZ1fKb3ghRTGJQYR9fPhDoli+RfqtciWUehRvSDdRaul3seGpdWT/4rqOd +MOZvKHS4tu54yOU01yBqsQyvQ+AH3VOeNrWgxpmtnnv2H4DwhHMlfAfvHRTIhOe9EbP FGqNcw0uyse60t0UN4oJcqnTuTqTebGkxvso3Xc8zpWf1Uz20mAgPIwVOV6vSXwvusZv CusA== X-Gm-Message-State: AGi0PuZXQmPdmZoyLbcc4DNbKvrFhuBjSOo1KeOZqWkgF1gaqTYVL4ym BpUjyqSlNHZTdUA4dCc1q+Y4I09U X-Google-Smtp-Source: APiQypI6vm72sLG7ql+eMbqbz7C8x7LYmJeBq0OGpDLjiFM736DJzczI7388DZgnekTHyoSrj2dtCg== X-Received: by 2002:adf:fac5:: with SMTP id a5mr14328474wrs.210.1588581227454; Mon, 04 May 2020 01:33:47 -0700 (PDT) Received: from x1w.redhat.com (26.red-88-21-207.staticip.rima-tde.net. [88.21.207.26]) by smtp.gmail.com with ESMTPSA id 2sm13048053wre.25.2020.05.04.01.33.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 01:33:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/4] hw/i386: Add 'vmport.h' local header Date: Mon, 4 May 2020 10:33:41 +0200 Message-Id: <20200504083342.24273-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200504083342.24273-1-f4bug@amsat.org> References: <20200504083342.24273-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Move 'vmport' related declarations in a target-specific header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/i386/vmport.h | 34 ++++++++++++++++++++++++++++++++++ include/hw/i386/pc.h | 3 --- hw/i386/pc.c | 1 + hw/i386/vmmouse.c | 1 + hw/i386/vmport.c | 1 + 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 hw/i386/vmport.h diff --git a/hw/i386/vmport.h b/hw/i386/vmport.h new file mode 100644 index 0000000000..47eda7a22b --- /dev/null +++ b/hw/i386/vmport.h @@ -0,0 +1,34 @@ +/* + * QEMU VMPort emulation + * + * Copyright (C) 2007 Hervé Poussineau + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef HW_I386_VMPORT_H +#define HW_I386_VMPORT_H + +#define TYPE_VMPORT "vmport" + +typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address); + +void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque); + +#endif diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 26e2a3d92b..de49a57506 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -130,9 +130,6 @@ typedef struct PCMachineClass { GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled); /* vmport.c */ -#define TYPE_VMPORT "vmport" -typedef uint32_t (VMPortReadFunc)(void *opaque, uint32_t address); -void vmport_register(unsigned char command, VMPortReadFunc *func, void *opaque); void vmmouse_get_data(uint32_t *data); void vmmouse_set_data(const uint32_t *data); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 84669ddc84..f6b8431c8b 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -91,6 +91,7 @@ #include "qapi/qmp/qerror.h" #include "config-devices.h" #include "e820_memory_layout.h" +#include "vmport.h" #include "fw_cfg.h" #include "trace.h" diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c index e8e62bd96b..78b36f6f5d 100644 --- a/hw/i386/vmmouse.c +++ b/hw/i386/vmmouse.c @@ -29,6 +29,7 @@ #include "hw/input/i8042.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" +#include "vmport.h" /* debug only vmmouse */ //#define DEBUG_VMMOUSE diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c index 114141c6f3..00d47e0c4c 100644 --- a/hw/i386/vmport.c +++ b/hw/i386/vmport.c @@ -26,6 +26,7 @@ #include "hw/i386/pc.h" #include "sysemu/hw_accel.h" #include "qemu/log.h" +#include "vmport.h" #include "trace.h" #define VMPORT_CMD_GETVERSION 0x0a From patchwork Mon May 4 08:33:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1282319 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=2001:470:142::17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=dmBwTTt8; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Fx3l2vTHz9sRf for ; Mon, 4 May 2020 18:34:27 +1000 (AEST) Received: from localhost ([::1]:34586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jVWYT-0003VK-2y for incoming@patchwork.ozlabs.org; Mon, 04 May 2020 04:34:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jVWXv-0003Qc-CG for qemu-devel@nongnu.org; Mon, 04 May 2020 04:33:51 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:41790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jVWXu-0007SH-96 for qemu-devel@nongnu.org; Mon, 04 May 2020 04:33:51 -0400 Received: by mail-wr1-x430.google.com with SMTP id g13so19828773wrb.8 for ; Mon, 04 May 2020 01:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wjlVRGkMMBwX1c1DhJs0bovGn/YH+9pT7jecXBlciV4=; b=dmBwTTt8wkr83YhTxJlTiwDXk2fu3KlOk3hi6R2sjVHSQlBZWeN9x3t/IWIUeL/pAf JdyCQj7ACfvtLp4PS0bPXyOAIb/Dm82iwxOQ/XSEnDmjW/eVFNOFjI+ce1j9X2I36bkL JjOrIhJxOycUwcnwyVyQgK8ZsF076KVE3VsDs6AW71eng33tDVpybHPuFi1nlUbMvcIo 5Lb6raLcU8leR4Our6Km0QtZvAY1gZiGIuk63g7nXIN3rPlNh3Cw/m7mOH4p5KQQgvEx ZxESH1pQpqZJjc7EhBGrWPUfysRj0+XbxgC73X+gEplr9O8djVTkTQHIq8EUpJXpXuIq iVVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=wjlVRGkMMBwX1c1DhJs0bovGn/YH+9pT7jecXBlciV4=; b=BDRN1mR5iFJD6kWXALOewMJnOmzFUgzSgaO0GZh8muHBEP2Tm7R1Gd3H/8JBagoPDG FeomNSzae+uAT9MVJa+0ZFxPVuHzULTkYjtRrJA6GuJkBF7oV090xyqqruFqaHsLZUN5 tHloQNW5zj4lJY/3iOtj/7Zv5ic6TUr6GWj2rW1tmtdkYHh8FCxtSBxUegAjO0sZXnVU I9s1JrHex94Gr/Udrc/cJZ/rs1Ct5jsvguwYNQMq0s+9tLsEd7A/wTBQX5oOFd/4vg1e cVRjvh+MJjRdLvCxAXr5pf/pZuM0+qadApTdu9wpEztXGtounrjR9ke3odyK7xCIdQ85 +TmQ== X-Gm-Message-State: AGi0Pua14p9xytQLjJxN0HOp0mfruNg6/rtArkp/2lXG4Kt8tK1WqUII 0sdbOfbLSqioFb7MSlnHCfl46lkW X-Google-Smtp-Source: APiQypKKN24hGLA1QcCqHGfFTQW/tP2Vl4u4+0fyjr0V0QMw5qM+Lv1Ao33h2BYijMCkgJwSuriUmA== X-Received: by 2002:a5d:4f06:: with SMTP id c6mr19144238wru.12.1588581228719; Mon, 04 May 2020 01:33:48 -0700 (PDT) Received: from x1w.redhat.com (26.red-88-21-207.staticip.rima-tde.net. [88.21.207.26]) by smtp.gmail.com with ESMTPSA id 2sm13048053wre.25.2020.05.04.01.33.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 May 2020 01:33:48 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 4/4] hw/i386: Make vmmouse helpers static Date: Mon, 4 May 2020 10:33:42 +0200 Message-Id: <20200504083342.24273-5-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200504083342.24273-1-f4bug@amsat.org> References: <20200504083342.24273-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x430.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Habkost , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Paolo Bonzini , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The vmmouse helpers are only used in hw/i386/vmmouse.c, make them static. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 4 ---- hw/i386/vmmouse.c | 22 +++++++++++++++++++++- hw/i386/vmport.c | 23 +---------------------- 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index de49a57506..05e19455bb 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -129,10 +129,6 @@ typedef struct PCMachineClass { GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled); -/* vmport.c */ -void vmmouse_get_data(uint32_t *data); -void vmmouse_set_data(const uint32_t *data); - /* pc.c */ extern int fd_bootchk; diff --git a/hw/i386/vmmouse.c b/hw/i386/vmmouse.c index 78b36f6f5d..b3aef41327 100644 --- a/hw/i386/vmmouse.c +++ b/hw/i386/vmmouse.c @@ -25,11 +25,11 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "ui/console.h" -#include "hw/i386/pc.h" #include "hw/input/i8042.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "vmport.h" +#include "cpu.h" /* debug only vmmouse */ //#define DEBUG_VMMOUSE @@ -71,6 +71,26 @@ typedef struct VMMouseState ISAKBDState *i8042; } VMMouseState; +static void vmmouse_get_data(uint32_t *data) +{ + X86CPU *cpu = X86_CPU(current_cpu); + CPUX86State *env = &cpu->env; + + data[0] = env->regs[R_EAX]; data[1] = env->regs[R_EBX]; + data[2] = env->regs[R_ECX]; data[3] = env->regs[R_EDX]; + data[4] = env->regs[R_ESI]; data[5] = env->regs[R_EDI]; +} + +static void vmmouse_set_data(const uint32_t *data) +{ + X86CPU *cpu = X86_CPU(current_cpu); + CPUX86State *env = &cpu->env; + + env->regs[R_EAX] = data[0]; env->regs[R_EBX] = data[1]; + env->regs[R_ECX] = data[2]; env->regs[R_EDX] = data[3]; + env->regs[R_ESI] = data[4]; env->regs[R_EDI] = data[5]; +} + static uint32_t vmmouse_get_status(VMMouseState *s) { DPRINTF("vmmouse_get_status()\n"); diff --git a/hw/i386/vmport.c b/hw/i386/vmport.c index 00d47e0c4c..1aaaab691a 100644 --- a/hw/i386/vmport.c +++ b/hw/i386/vmport.c @@ -23,10 +23,10 @@ */ #include "qemu/osdep.h" #include "hw/isa/isa.h" -#include "hw/i386/pc.h" #include "sysemu/hw_accel.h" #include "qemu/log.h" #include "vmport.h" +#include "cpu.h" #include "trace.h" #define VMPORT_CMD_GETVERSION 0x0a @@ -109,27 +109,6 @@ static uint32_t vmport_cmd_ram_size(void *opaque, uint32_t addr) return ram_size; } -/* vmmouse helpers */ -void vmmouse_get_data(uint32_t *data) -{ - X86CPU *cpu = X86_CPU(current_cpu); - CPUX86State *env = &cpu->env; - - data[0] = env->regs[R_EAX]; data[1] = env->regs[R_EBX]; - data[2] = env->regs[R_ECX]; data[3] = env->regs[R_EDX]; - data[4] = env->regs[R_ESI]; data[5] = env->regs[R_EDI]; -} - -void vmmouse_set_data(const uint32_t *data) -{ - X86CPU *cpu = X86_CPU(current_cpu); - CPUX86State *env = &cpu->env; - - env->regs[R_EAX] = data[0]; env->regs[R_EBX] = data[1]; - env->regs[R_ECX] = data[2]; env->regs[R_EDX] = data[3]; - env->regs[R_ESI] = data[4]; env->regs[R_EDI] = data[5]; -} - static const MemoryRegionOps vmport_ops = { .read = vmport_ioport_read, .write = vmport_ioport_write,