From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11F77C07E95 for ; Tue, 13 Jul 2021 07:13:15 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9DF15611C1 for ; Tue, 13 Jul 2021 07:13:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DF15611C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3CbR-0008B7-Lc for qemu-devel@archiver.kernel.org; Tue, 13 Jul 2021 03:13:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3CRu-0001wN-NS for qemu-devel@nongnu.org; Tue, 13 Jul 2021 03:03:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43298) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3CRp-0004kQ-Ah for qemu-devel@nongnu.org; Tue, 13 Jul 2021 03:03:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626159794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=koKdVjo2QqaZo96dRBCfvYG2LdBqxiCmnymcDVoaY7o=; b=B53tIUsBf70fBE+/6r2XkaLAO0VDdVvAW5BWgV2g/j7K7VlmgznFbzRdAPB2dmJBx48HVb foDMTjunz1nVm0l1UROi/JwicKMSPgnZ/4XLA357TbtyW3/V628I6FK4ZxR7VF4HwxAZyW fv77KTqXlRDM/xRwLHSZf/Zzli8oYFs= Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-66-DbGjONSaNXeLljArH7K1gg-1; Tue, 13 Jul 2021 03:03:12 -0400 X-MC-Unique: DbGjONSaNXeLljArH7K1gg-1 Received: by mail-pg1-f198.google.com with SMTP id b15-20020a631b4f0000b029022ca62fda1aso4024413pgm.5 for ; Tue, 13 Jul 2021 00:03:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=koKdVjo2QqaZo96dRBCfvYG2LdBqxiCmnymcDVoaY7o=; b=iUq2kUt9kVTGd476Jfh7iFvBPw8SBYKO/yOV8T+JCfdzUJjiBoSsbUAwRylvL9l1Fu 9QdHiLFjntuA+v6oVTwExSmyzcGFB0O2fhbegJTqEnUKl/FrHNAt9tC1YU1QfPh/m64X OdLu3qJ2ycGmp2tFmBg4s+i/ci7YPtsFZmV2k7q/X2BvWAizxiSV2mCOQTe067GhZ8Un CROM2ULoRp9hM+50dil8gOZyCWOQn3aBBu6+B3iEq1npc/XVye8WgbWjumDBUUdQNaWB fkV/gIAgAQmxD2IehIZCP2mNFGQdAUT2o0tF5zudzU8rTNok9iOmphwVk5FbUuzFPz6I 6FZA== X-Gm-Message-State: AOAM530nHnzz4Y+UR0iB1V/qS0/bY4d6rYs2KjS12/V+PiY5XqVPdvG6 mNWrnKslbvkLq0/d6m9ZLiC7EUy8L5/Txd/WxNwgteOku9cJn6zNjvXJVrFmO0yjYcE/024+3iR /ekzBX75Rx4WCAcQ= X-Received: by 2002:a17:902:8ec7:b029:11b:acb4:ac43 with SMTP id x7-20020a1709028ec7b029011bacb4ac43mr2364380plo.1.1626159791361; Tue, 13 Jul 2021 00:03:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIYGFyhnWsahtuIOYKDIHdviYElgw9GwdNk/gneYKdnIbMrzE5/VHAnZcYthHpmKjZcOoE0g== X-Received: by 2002:a17:902:8ec7:b029:11b:acb4:ac43 with SMTP id x7-20020a1709028ec7b029011bacb4ac43mr2364364plo.1.1626159791068; Tue, 13 Jul 2021 00:03:11 -0700 (PDT) Received: from wangxiaodeMacBook-Air.local ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id p40sm16925509pfw.79.2021.07.13.00.03.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 13 Jul 2021 00:03:10 -0700 (PDT) Subject: Re: [PATCH v2 1/3] hw/net: e1000: Correct the initial value of VET register To: Bin Meng References: <20210702092427.1323667-1-bmeng.cn@gmail.com> <434daef6-4afb-c796-9b63-f72cca403314@redhat.com> From: Jason Wang Message-ID: <63ff5849-d830-87cc-486c-7fc292220424@redhat.com> Date: Tue, 13 Jul 2021 15:03:05 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jasowang@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=170.10.133.124; envelope-from=jasowang@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -49 X-Spam_score: -5.0 X-Spam_bar: ----- X-Spam_report: (-5.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.699, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-1.479, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no 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: Bin Meng , Christina Wang , "qemu-devel@nongnu.org Developers" , Markus Carlstedt Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 在 2021/7/13 上午7:06, Bin Meng 写道: > On Mon, Jul 5, 2021 at 1:57 PM Bin Meng wrote: >> On Mon, Jul 5, 2021 at 12:21 PM Jason Wang wrote: >>> >>> 在 2021/7/2 下午5:24, Bin Meng 写道: >>>> From: Christina Wang >>>> >>>> The initial value of VLAN Ether Type (VET) register is 0x8100, as per >>>> the manual and real hardware. >>>> >>>> While Linux e1000 driver always writes VET register to 0x8100, it is >>>> not always the case for everyone. Drivers relying on the reset value >>>> of VET won't be able to transmit and receive VLAN frames in QEMU. >>>> >>>> Reported-by: Markus Carlstedt >>>> Signed-off-by: Christina Wang >>>> Signed-off-by: Bin Meng >>>> --- >>>> >>>> (no changes since v1) >>>> >>>> hw/net/e1000.c | 2 ++ >>>> 1 file changed, 2 insertions(+) >>>> >>>> diff --git a/hw/net/e1000.c b/hw/net/e1000.c >>>> index 4f75b44cfc..20cbba6411 100644 >>>> --- a/hw/net/e1000.c >>>> +++ b/hw/net/e1000.c >>>> @@ -29,6 +29,7 @@ >>>> #include "hw/pci/pci.h" >>>> #include "hw/qdev-properties.h" >>>> #include "migration/vmstate.h" >>>> +#include "net/eth.h" >>>> #include "net/net.h" >>>> #include "net/checksum.h" >>>> #include "sysemu/sysemu.h" >>>> @@ -254,6 +255,7 @@ static const uint32_t mac_reg_init[] = { >>>> [MANC] = E1000_MANC_EN_MNG2HOST | E1000_MANC_RCV_TCO_EN | >>>> E1000_MANC_ARP_EN | E1000_MANC_0298_EN | >>>> E1000_MANC_RMCP_EN, >>>> + [VET] = ETH_P_VLAN, >>> >>> I wonder if we need a compat flag for this, since we change the behavior. >>> >>> (See e1000_properties[]) >>> >> No we don't need to since it does not break migration. > Ping? I admit migration "works" but it doesn't mean it's not broken. It changes the guest visible default value of VET register, so it may break things silently for the guest. For old machine types, we should stick the value to the one without this fix. Thanks >