Message ID | 1539894735-14232-34-git-send-email-pbonzini@redhat.com |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="fV00wJTS"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42bhqt1Qb5z9sC2 for <incoming@patchwork.ozlabs.org>; Fri, 19 Oct 2018 08:23:54 +1100 (AEDT) Received: from localhost ([::1]:44796 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1gDFln-0002LC-NP for incoming@patchwork.ozlabs.org; Thu, 18 Oct 2018 17:23:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1gDEyY-0007bl-9H for qemu-devel@nongnu.org; Thu, 18 Oct 2018 16:33:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1gDEyV-0006Xu-Cc for qemu-devel@nongnu.org; Thu, 18 Oct 2018 16:32:58 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:39911) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <paolo.bonzini@gmail.com>) id 1gDEyV-0006Wr-1r for qemu-devel@nongnu.org; Thu, 18 Oct 2018 16:32:55 -0400 Received: by mail-wr1-x429.google.com with SMTP id 61-v6so35110496wrb.6 for <qemu-devel@nongnu.org>; Thu, 18 Oct 2018 13:32:54 -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; bh=3jMpBjW2RjjaneKFCh4VOi3MYzbeg1SPv8QfUhGFqak=; b=fV00wJTSkJPcPOG6U6XxEMctUqPkOUrOtOSuBeIPX0kgpi6jTlJSpahVmJy5Z34prd FbqY87bI4ng3NgssKuBp8fn1ZknXQA2+Z/8F/TM8XJNZ/k6LcSKqRBSXOi20YE5T2TuT h9r1MrxI6GXPBY/FBbHVc67ZxLiR1TI/30JvSGXQd3tq6Hw/LgcYVADs6KSvGyyoD9XS MuVT3+wDv2jQQCZjakK8XXZpQfNb6bx7Do2lq5eGysMEKEzL2BfnNvgl/4Jbm9mJyfIa 7OOKcNaZe2heI4QzWF0ZSF2C7UTkh6FuZtsaN46MtjE/UOtoCJiqOPuDGv0FxzxZcLMX 64QQ== 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; bh=3jMpBjW2RjjaneKFCh4VOi3MYzbeg1SPv8QfUhGFqak=; b=FI0xo1tZHrJ5ZHq68sJtyiQOPWVSah8+w/Xaw+JsHF30TNuJXNLgt9+weS8kLMRm00 X1jSjGdAJ4Cre3S14XzGe9a8qG/kQqHjAZyNuWsr+vou1yHgA55pAfV0xChvf/4clnno 2BZYh9rrE3HuvOs8GvOrJK0LVZqaYsSyYFTdxhzI/p30Z9944zBCkbANZpoAbDwnwEI+ 54C2WC+MvDA6Nr0b+VubsFoa0xZoONP3mkbmmp0N+PctI0ORMBSdJMrqaB+Ttn4aeCRs toV/VycqgZ5K9p+vP6EJ0Mv03fe0u5HiaQfxF/Et8bnUumc8eHaLVcisxPjlwklvfMaA uyKg== X-Gm-Message-State: ABuFfoi5DNsFgHQck24XLaZjrxvZAkJNjg61HDlo//KTX+jO65DJe2DX DVQgV7ft7MEUX8wvC05kg5tEcjf2 X-Google-Smtp-Source: ACcGV61OoLEa9ZoXkHuTLN4iZZNH+ZPhZo897JoRHj+ntScIR8VdjRuIs0kyqCC3hohQhxNi7oQ/+Q== X-Received: by 2002:adf:92e6:: with SMTP id 93-v6mr32154899wrn.124.1539894773715; Thu, 18 Oct 2018 13:32:53 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-231-174.clienti.tiscali.it. [78.12.231.174]) by smtp.gmail.com with ESMTPSA id a12-v6sm14270952wrr.71.2018.10.18.13.32.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Oct 2018 13:32:52 -0700 (PDT) From: Paolo Bonzini <pbonzini@redhat.com> To: qemu-devel@nongnu.org Date: Thu, 18 Oct 2018 22:32:00 +0200 Message-Id: <1539894735-14232-34-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1539894735-14232-1-git-send-email-pbonzini@redhat.com> References: <1539894735-14232-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::429 Subject: [Qemu-devel] [PULL 33/48] hyperv: make hyperv_vp_index inline X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Roman Kagan <rkagan@virtuozzo.com> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
[PULL,01/48] es1370: more fixes for ADC_FRAMEADR and ADC_FRAMECNT
|
expand
|
diff --git a/target/i386/hyperv.c b/target/i386/hyperv.c index fc537e7..6881664 100644 --- a/target/i386/hyperv.c +++ b/target/i386/hyperv.c @@ -27,14 +27,11 @@ struct HvSintRoute { unsigned refcount; }; -uint32_t hyperv_vp_index(X86CPU *cpu) +static X86CPU *hyperv_find_vcpu(uint32_t vp_index) { - return CPU(cpu)->cpu_index; -} - -X86CPU *hyperv_find_vcpu(uint32_t vp_index) -{ - return X86_CPU(qemu_get_cpu(vp_index)); + X86CPU *cpu = X86_CPU(qemu_get_cpu(vp_index)); + assert(hyperv_vp_index(cpu) == vp_index); + return cpu; } int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit) diff --git a/target/i386/hyperv.h b/target/i386/hyperv.h index 59e9f9a..8d4619c 100644 --- a/target/i386/hyperv.h +++ b/target/i386/hyperv.h @@ -30,7 +30,9 @@ void hyperv_sint_route_unref(HvSintRoute *sint_route); int hyperv_sint_route_set_sint(HvSintRoute *sint_route); -uint32_t hyperv_vp_index(X86CPU *cpu); -X86CPU *hyperv_find_vcpu(uint32_t vp_index); +static inline uint32_t hyperv_vp_index(X86CPU *cpu) +{ + return CPU(cpu)->cpu_index; +} #endif