From patchwork Thu Dec 24 07:17:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shmulik Ladkani X-Patchwork-Id: 560810 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 21696140C2C for ; Thu, 24 Dec 2015 18:18:44 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ravellosystems-com.20150623.gappssmtp.com header.i=@ravellosystems-com.20150623.gappssmtp.com header.b=GjHKtDvW; dkim-atps=neutral Received: from localhost ([::1]:59239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aC0Ab-0007eb-Q7 for incoming@patchwork.ozlabs.org; Thu, 24 Dec 2015 02:18:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aC0A5-0006WA-QP for qemu-devel@nongnu.org; Thu, 24 Dec 2015 02:18:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aC0A4-00026h-Vm for qemu-devel@nongnu.org; Thu, 24 Dec 2015 02:18:09 -0500 Received: from mail-wm0-x234.google.com ([2a00:1450:400c:c09::234]:34750) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aC0A4-00026c-Pe for qemu-devel@nongnu.org; Thu, 24 Dec 2015 02:18:08 -0500 Received: by mail-wm0-x234.google.com with SMTP id l126so170736103wml.1 for ; Wed, 23 Dec 2015 23:18:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravellosystems-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1gTgy9DFbq9aTHb3eVvxfYD7sXwsewazhSFJGQ8tXE0=; b=GjHKtDvW6JjgbUBN7KkG2hQUsEbRsMK7Sg4B71ZQWxmADILtHe0HgJrBSCz6aeyZZK r0sOlcECM1xvKKm/ItOzBpcNz3NgfPmkEUhj1dQA3lGXJrJpW/QyUgvAlg/S7gN54sSL Nh/oNglekgIBIqfy9xBeWiA+9GxMKJMw3nJRJt08ymKXzcp012A5BpxrqpTLM0s1YupJ JynmSxX4WLUDSyJwPvvA6opHjymWa9Gnf2tytsKIVl8/s00bJeeE3qDDFadcEqt8AtUy IHJhjK8NkYL0hICokjr7TO3YoXc6k7W+iuQMPXRMoK9aJep70T6VMcbwTyT6kBFcz2gd 6zCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1gTgy9DFbq9aTHb3eVvxfYD7sXwsewazhSFJGQ8tXE0=; b=UHMHyqeiOTVephr5sJLQvacXlBUQonbWByeYjYS2iMyJYgrOlm8tumN6o2nedUrkiJ jmZq8qqDwc42A7kZNWWRay35LVP073T/3yKLoy50ccmEXRjH5myD72A9pcMpqlrPuXGN pKNkO0IH8IiV0yJTME+O3UPe7p0+Jo204vWeo/PO5wjMnEhA82g6gO2BrpegF24WjZUN epWgB7nL8Jkc9YHSRVObE3o4Vq5JibR9lKxTR45QRnGB4RAA7YfP0WlPiTG/D9fcr15H F2pJXEVSW+9vA0UnhS8OR6YXKuQa0koLLFbiLf9EKBU3SBq6YChCTCDWpKbpiObipYG1 9v0w== X-Gm-Message-State: ALoCoQmNRrd5fenNhZPPDzmiUg6kQpQCmb9mJTdQ0XAZXx02VhRU40rInmiDn82FfSZoe6mwevB1N4AA4ttQEDghSVk6UNJqig== X-Received: by 10.194.222.135 with SMTP id qm7mr38174076wjc.106.1450941488319; Wed, 23 Dec 2015 23:18:08 -0800 (PST) Received: from honey.ravello.local ([213.57.127.2]) by smtp.gmail.com with ESMTPSA id ql10sm40370418wjc.23.2015.12.23.23.18.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Dec 2015 23:18:07 -0800 (PST) From: Shmulik Ladkani To: Jason Wang , Dmitry Fleytman Date: Thu, 24 Dec 2015 09:17:36 +0200 Message-Id: <1450941461-26996-3-git-send-email-shmulik.ladkani@ravellosystems.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450941461-26996-1-git-send-email-shmulik.ladkani@ravellosystems.com> References: <1450941461-26996-1-git-send-email-shmulik.ladkani@ravellosystems.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::234 Cc: idan.brown@ravellosystems.com, qemu-devel@nongnu.org, Shmulik Ladkani Subject: [Qemu-devel] [PATCH v4 2/7] vmxnet3: Change the offset of the MSIX PBA table 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 Place the PBA table at 0x1000, as placed by VMware virtual hardware. Signed-off-by: Shmulik Ladkani --- hw/net/vmxnet3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index d323895..97f0aea 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -51,7 +51,8 @@ #define VMXNET3_MSIX_BAR_IDX (2) #define VMXNET3_OFF_MSIX_TABLE (0x000) -#define VMXNET3_OFF_MSIX_PBA (0x800) +#define VMXNET3_OFF_MSIX_PBA(s) \ + ((s)->compat_flags & VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS ? 0x800 : 0x1000) /* Link speed in Mbps should be shifted by 16 */ #define VMXNET3_LINK_SPEED (1000 << 16) @@ -2114,7 +2115,7 @@ vmxnet3_init_msix(VMXNET3State *s) &s->msix_bar, VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_TABLE, &s->msix_bar, - VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA, + VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_PBA(s), VMXNET3_MSIX_OFFSET(s)); if (0 > res) {