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.1 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 2E21BC433ED for ; Sun, 16 May 2021 14:05:29 +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 4267C610A1 for ; Sun, 16 May 2021 14:05:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4267C610A1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=greensocs.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36964 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liHOZ-0004BH-4w for qemu-devel@archiver.kernel.org; Sun, 16 May 2021 10:05:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liEhy-0003h2-9S; Sun, 16 May 2021 07:13:18 -0400 Received: from beetle.greensocs.com ([5.135.226.135]:56514) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liEhv-0000z4-9T; Sun, 16 May 2021 07:13:17 -0400 Received: from [192.168.1.6] (b2b-109-90-5-113.unitymedia.biz [109.90.5.113]) by beetle.greensocs.com (Postfix) with ESMTPSA id 4FADA20775; Sun, 16 May 2021 11:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greensocs.com; s=mail; t=1621163586; 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=eRdW3gislWrJzT0HUA2jVFKtCojm7XIvG12VM86NA4o=; b=n+nfn83kTiyPsM93vtkzm2/zcSZ87oddm/myf5uY0z97wz3YqHVYNpV2R5vn5DVHr1wl8h WCNPi8Hx5PAKt6JbW8Uz5+ee/cl3/FSwE4/rUMWlel5Bs4uaRqBkWh0+Y6yl0NTn1b9HrH 7eH0WeLAc4EA6gdjvvkShgS8A9kjDgI= Subject: Re: [PATCH 2/2] QOMify sifive_uart model To: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , =?UTF-8?Q?Lukas_J=c3=bcnger?= , qemu-devel@nongnu.org References: <20210504153456.927083-1-lukas.juenger@greensocs.com> <20210504153456.927083-3-lukas.juenger@greensocs.com> <8471d630-72c1-aef0-a0cf-9f0417334c08@amsat.org> From: =?UTF-8?Q?Lukas_J=c3=bcnger?= Message-ID: <4891435d-2cc2-2109-3fa9-cd826cd23f2b@greensocs.com> Date: Sun, 16 May 2021 13:13:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <8471d630-72c1-aef0-a0cf-9f0417334c08@amsat.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Received-SPF: pass client-ip=5.135.226.135; envelope-from=lukas.junger@greensocs.com; helo=beetle.greensocs.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 16 May 2021 09:58:24 -0400 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: alistair.francis@wdc.com, qemu-riscv@nongnu.org, bin.meng@windriver.com, mark.burton@greensocs.com, palmer@dabbelt.com, marcandre.lureau@redhat.com, pbonzini@redhat.com, luc.michel@greensocs.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 5/11/21 2:26 PM, Philippe Mathieu-Daudé wrote: > Hi Lukas, > > On 5/4/21 5:34 PM, Lukas Jünger wrote: >> Signed-off-by: Lukas Jünger >> --- >> include/hw/char/sifive_uart.h | 6 +-- >> hw/char/sifive_uart.c | 72 ++++++++++++++++++++++++++++++----- >> 2 files changed, 65 insertions(+), 13 deletions(-) >> +static void sifive_uart_realize(DeviceState *dev, Error **errp) >> +{ >> + SiFiveUARTState *s = SIFIVE_UART(dev); >> + >> + qemu_chr_fe_set_handlers(&s->chr, uart_can_rx, uart_rx, uart_event, >> + uart_be_change, s, NULL, true); >> + >> +} >> + >> +static void sifive_uart_class_init(ObjectClass *oc, void *data) >> +{ >> + DeviceClass *dc = DEVICE_CLASS(oc); >> + >> + dc->realize = sifive_uart_realize; >> + device_class_set_props(dc, sifive_uart_properties); >> +} > You forgot to add the migration fields (VMState) of the SiFiveUARTState > structure. You might want to convert to the Fifo8 API (like the > SiFiveSPIState does) previous to this patch. > > Regards, > > Phil. Thank you for your feedback. If I understand correctly, sifive_spi does not support migration currently. Would it be possible to merge this QOMification without the migration feature for now, as not all devices in sifive_u support it at the moment anyways? It seems it would be difficult to test on my end. Best regards, Lukas