From patchwork Fri Jan 25 11:41:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vitaly Kuznetsov X-Patchwork-Id: 10781245 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0B7D4139A for ; Fri, 25 Jan 2019 11:46:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDCF22F147 for ; Fri, 25 Jan 2019 11:46:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E25662F201; Fri, 25 Jan 2019 11:46:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 84C8E2F147 for ; Fri, 25 Jan 2019 11:46:01 +0000 (UTC) Received: from localhost ([127.0.0.1]:43023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmzvs-0006D3-Nx for patchwork-qemu-devel@patchwork.kernel.org; Fri, 25 Jan 2019 06:46:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmzs6-0002xZ-U1 for qemu-devel@nongnu.org; Fri, 25 Jan 2019 06:42:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmzs5-00073f-PB for qemu-devel@nongnu.org; Fri, 25 Jan 2019 06:42:06 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:32950) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gmzs5-00070i-HI for qemu-devel@nongnu.org; Fri, 25 Jan 2019 06:42:05 -0500 Received: by mail-wr1-f65.google.com with SMTP id p7so9992492wru.0 for ; Fri, 25 Jan 2019 03:42:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/DeCcXwJUkApxgtVIYuloLr73LGjAo/ScEg3LsKWr90=; b=AJgCA/b/ifVuVzgwzWptfCbV1aIBvy/RoQ5PPnDQtmuBa3ppeAN+xVDHlIizGDRFfJ 8WAjpvjB7c9s3r4U27QeskaZzCFS/OgVvcbOGVmHVY2GHQWKMaM4rDV7aoG6RAmNzQzX vYJjq9MDPhpHT/2fVPS1YxBk0GboOhIrljYTYxcw5GvnFBz6gAQxq7rVKAf61bwzfMpy GQTgBed+u12fIr3CDN3ecBdMqZdo6xbpASaocy5hINIQWOrkI4FYIp3QKSflQR+wrWJr LSSpJ30HiCoDsjkUVs76vjvBvNbr99ZfrtP1YPPVKBL0sfX94Z72yLPbC7aTodGfa6Fx 1p4g== X-Gm-Message-State: AJcUukcvfIIlQydYRGA/Ahuj7VdEkwvFloaE65ZKYO9a7/OBy22bQonx f10GYgtjoxMa4dGy9SzIDo2y4chTCcF90Q== X-Google-Smtp-Source: ALg8bN7NCHUNmwHwB9hckZOcoxqVAgnE0txuXXUdXtGrfC+2W5d5x2Dd6T7ImvPQNFp0JdHXD0O2QQ== X-Received: by 2002:a5d:6aca:: with SMTP id u10mr10791213wrw.310.1548416523063; Fri, 25 Jan 2019 03:42:03 -0800 (PST) Received: from vitty.brq.redhat.com.cz ([147.229.117.36]) by smtp.gmail.com with ESMTPSA id x81sm64944415wmg.17.2019.01.25.03.42.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Jan 2019 03:42:01 -0800 (PST) From: Vitaly Kuznetsov To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 12:41:47 +0100 Message-Id: <20190125114155.32062-1-vkuznets@redhat.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.221.65 Subject: [Qemu-devel] [PATCH RFC 0/8] i386/kvm/hyper-v: refactor and implement 'hv-stimer-direct' and 'hv-all' enlightenments X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Marcelo Tosatti , Roman Kagan , Eduardo Habkost , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The recently introduced Direct Mode for Hyper-V synthetic timers enlightenment is only exposed through KVM_GET_SUPPORTED_HV_CPUID ioctl. Take the opportunity and re-implement the way we handle Hyper-V enlightenments in QEMU, add support for hv-stimer-direct and 'hv-all' pass-through mode, add missing dependencies between enlightenments. RFC: we could've been more conservative and only use KVM_GET_SUPPORTED_HV_CPUID for new enlightenments. I'd also like to know what you think about the 'pass-through' approach taken to implement 'hv-all' mode: we could've kept QEMU filling in signature, vendor,... but we take CPUIDs passed by KVM 'as-is'. Vitaly Kuznetsov (8): Update linux headers (5.0-rc2) i386/kvm: add support for KVM_GET_SUPPORTED_HV_CPUID i386/kvm: move Hyper-V CPUID filling to hyperv_handle_properties() i386/kvm: Implement 'hv-all' pass-through mode i386/kvm: hv-evmcs requires hv-vapic i386/kvm: hv-stimer requires hv-time and hv-synic i386/kvm: hv-tlbflush/ipi require hv-vpindex i386/kvm: add support for Direct Mode for Hyper-V synthetic timers include/standard-headers/drm/drm_fourcc.h | 63 + include/standard-headers/linux/ethtool.h | 19 +- .../linux/input-event-codes.h | 19 + include/standard-headers/linux/pci_regs.h | 1 + .../standard-headers/linux/virtio_balloon.h | 8 + include/standard-headers/linux/virtio_blk.h | 54 + .../standard-headers/linux/virtio_config.h | 3 + include/standard-headers/linux/virtio_gpu.h | 18 + include/standard-headers/linux/virtio_ring.h | 52 + linux-headers/asm-arm/unistd-common.h | 1 + linux-headers/asm-arm64/unistd.h | 1 + linux-headers/asm-generic/unistd.h | 10 +- linux-headers/asm-mips/sgidefs.h | 8 - linux-headers/asm-mips/unistd.h | 1074 +---------------- linux-headers/asm-mips/unistd_n64.h | 334 +++++ linux-headers/asm-mips/unistd_o32.h | 374 ++++++ linux-headers/asm-powerpc/unistd.h | 389 +----- linux-headers/asm-powerpc/unistd_32.h | 381 ++++++ linux-headers/asm-powerpc/unistd_64.h | 372 ++++++ linux-headers/linux/kvm.h | 29 + linux-headers/linux/vfio.h | 92 ++ linux-headers/linux/vhost.h | 113 +- linux-headers/linux/vhost_types.h | 128 ++ scripts/update-linux-headers.sh | 10 +- target/i386/cpu.c | 2 + target/i386/cpu.h | 2 + target/i386/hyperv-proto.h | 1 + target/i386/kvm.c | 749 +++++++++--- 28 files changed, 2533 insertions(+), 1774 deletions(-) create mode 100644 linux-headers/asm-mips/unistd_n64.h create mode 100644 linux-headers/asm-mips/unistd_o32.h create mode 100644 linux-headers/asm-powerpc/unistd_32.h create mode 100644 linux-headers/asm-powerpc/unistd_64.h create mode 100644 linux-headers/linux/vhost_types.h