From patchwork Mon Oct 20 19:49:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Don Slutz X-Patchwork-Id: 401238 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 0573814008C for ; Tue, 21 Oct 2014 06:51:03 +1100 (AEDT) Received: from localhost ([::1]:46585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgIyq-0003HN-Pz for incoming@patchwork.ozlabs.org; Mon, 20 Oct 2014 15:51:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56139) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgIxO-0001xr-8W for qemu-devel@nongnu.org; Mon, 20 Oct 2014 15:49:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgIxE-00085h-Pm for qemu-devel@nongnu.org; Mon, 20 Oct 2014 15:49:30 -0400 Received: from fldsmtpe04.verizon.com ([140.108.26.143]:13594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgIxE-00085X-Hy for qemu-devel@nongnu.org; Mon, 20 Oct 2014 15:49:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verizon.com; i=dslutz@verizon.com; q=dns/txt; s=corp; t=1413834560; x=1445370560; h=from:to:cc:subject:date:message-id; bh=6ZcMvEwZwgRk3xcFT8e+TmDhJqfB8v2CMyfRAFgcWvg=; b=WXSQUsjnBrbT/uFxB9kdHYY4gPWHV2hv8ESaGlD7gNQCWLSy0mtmI0yR lBrqFapnImiuP/1KtSmMPhvlLcJOn4nyABgLElOKH4oabgXbVe/BBZo3X Iwfpqwn8SzVAADbAXu51Zgvn0rVlqhBEwiF5iY63HPrfIDt30b1SrsCjt c=; X-IronPort-Anti-Spam-Filtered: false Received: from unknown (HELO fldsmtpi03.verizon.com) ([166.68.71.145]) by fldsmtpe04.verizon.com with ESMTP; 20 Oct 2014 19:49:18 +0000 X-VzAPP: 1 X-IronPort-AV: E=Sophos;i="5.04,757,1406592000"; d="scan'208";a="850570414" Received: from unknown (HELO don-760.CloudSwitch.com) ([162.47.2.238]) by fldsmtpi03.verizon.com with ESMTP; 20 Oct 2014 19:49:16 +0000 From: Don Slutz To: , Paul Durrant Date: Mon, 20 Oct 2014 15:49:11 -0400 Message-Id: <1413834552-32291-1-git-send-email-dslutz@verizon.com> X-Mailer: git-send-email 1.8.4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 140.108.26.143 Cc: xen-devel@lists.xensource.com, Marcel Apfelbaum , "Michael S. Tsirkin" , Alexander Graf , Don Slutz , Markus Armbruster , Anthony Liguori , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Stefano Stabellini Subject: [Qemu-devel] [PATCH v7 0/1] Add support for Xen access to vmport X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Changes v6 to v7: Stefano Stabellini Use QEMU_BUILD_BUG_ON, please do not define your own. Switched to QEMU_BUILD_BUG_ON. Dropped Reviewed-by: Paul Durrant (moved below ---) Changes v5 to v6: Paul Durrant Do we need a forward declaration? Nope. Drooped. Added Reviewed-by. Changes v4 to v5: Paul Durrant vmware_ioreq_t struct is not really a request any more. Maybe vmware_regs_t? Renamed various parts from vmware_ioreq to vmware_regs. Also HVM_PARAM_VMPORT_IOREQ_PFN to HVM_PARAM_VMPORT_REGS_PFN. cpu_by_ioreq_id name implies the array is indexed by an id carries in the ioreq. Renamed cpu_by_ioreq_id to cpu_by_vcpu_id. Is cpu_get_vmport_ioreq_from_shared_memory worth its own function? Moved in-line. I don't think you need the barrier anyway. Dropped the barrier. Oh, I now realize you mean the same theoretical rather than actual limit, in which case this can be a build time check anyway. Switch to build time check, move to a better place. You could avoid passing state to both of them by setting current_cpu here couldn't you? Yes, moved state usage to handle_vmport_ioreq(). Stefano Stabellini Error out if it fails with error != -ENOSYS. Done. Changes RFC-v2x to v4: Stefano Stabellini Please try to get rid of the #ifdefs. Moved 2 #ifdefs into hw/xen/xen_common.h Changes v2 to RFC-v2x: Paul Durrant Use a 2nd shared page. Added HVM_PARAM_VMPORT_IOREQ_PFN usage. Changes v1 to v2: More info in commit message. Stefano Stabellini the registers being passes explicitely by Xen rather than "hiding" them into other ioreq fields. Added vmware_ioreq_t Paolo Bonzini & Alexander Graf Fixup env access Added cpu_by_ioreq_id. Set current_cpu in regs_to_cpu(), clear in regs_from_cpu(). Drop all changes to vmport.c Note: to use this with Xen either a version of: [Qemu-devel] [PATCH] -machine vmport=off: Allow disabling of VMWare ioport emulation or From f70663d9fb86914144ba340b6186cb1e67ac6eec Mon Sep 17 00:00:00 2001 From: Don Slutz Date: Fri, 26 Sep 2014 08:11:39 -0400 Subject: [PATCH 1/2] hack: force enable vmport Signed-off-by: Don Slutz --- hw/i386/pc_piix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 103d756..b76dfbc 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -234,7 +234,7 @@ static void pc_init1(MachineState *machine, pc_vga_init(isa_bus, pci_enabled ? pci_bus : NULL); /* init basic PC hardware */ - pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, xen_enabled(), + pc_basic_device_init(isa_bus, gsi, &rtc_state, &floppy, false, 0x4); pc_nic_init(isa_bus, pci_bus);