From nobody Tue Feb 10 06:58:18 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664450591; cv=none; d=zohomail.com; s=zohoarc; b=Nbc/wUO74VTSAaCt7AyRxbLvlb1T5Tw24PULshNpp/Zbjg+WWofe9yZ0ke1+vIC2GxuzyxsrFbkVhQDZplNwRqvXmMjnHt2l3FoqGkV7f2eWphGb5ebIUnyzpjAgwaAjxuzspYagLbXnwhpOfd+yC3mVg0y2to+FMgt9vbDf39I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664450591; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oG/PB1KRyUcZqqWhh8GisayAgLoEnGDi0gH30odmnTg=; b=DMNtSWLUYlpF+E0f8n4aNaM0Zll0cd9dWp4crqQQh9YJoHVfk756WCCSfo34osMTFJkH+JQjZruhvwJXQOaHzYIzuiBc5V2651eniYdhGFEV4a9kQxGYUrJuv30XO+Nxaaw/JbqenV4Sdaom4sUF8rdiu8btFshBWeonE6rE8pU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1664450591255778.6777613329252; Thu, 29 Sep 2022 04:23:11 -0700 (PDT) Received: from localhost ([::1]:45858 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odrdA-00004s-3x for importer@patchew.org; Thu, 29 Sep 2022 07:23:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odrMK-0001F6-E4 for qemu-devel@nongnu.org; Thu, 29 Sep 2022 07:05:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:44497) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1odrMI-0001yY-SH for qemu-devel@nongnu.org; Thu, 29 Sep 2022 07:05:40 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-411-6UEsBaFeOg-CZQ71caUXJw-1; Thu, 29 Sep 2022 07:05:33 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A631B1C05AC2; Thu, 29 Sep 2022 11:05:32 +0000 (UTC) Received: from localhost (unknown [10.39.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBAC61121339; Thu, 29 Sep 2022 11:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664449538; 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=oG/PB1KRyUcZqqWhh8GisayAgLoEnGDi0gH30odmnTg=; b=If3Z7n95zpcF8jzOe7A3mlxe/z26wqNohK0zNlEeOhEoVSBTFndQZxO/DSuMVdgkcEgCnq V86MtE3YytpCiEHI5+YLD/w7JVqAxCBoL4rnb3YAlr1AMjNZDF6ZfL59JwjxmUJx92MpsM 4tT7bD3Q5dn5c/tkcLyFtfFjvcuy+hs= X-MC-Unique: 6UEsBaFeOg-CZQ71caUXJw-1 From: marcandre.lureau@redhat.com To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, Arwed Meyer , "Michael S. Tsirkin" , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PULL 5/8] serial: Allow unaligned i/o access Date: Thu, 29 Sep 2022 15:05:05 +0400 Message-Id: <20220929110508.1323529-6-marcandre.lureau@redhat.com> In-Reply-To: <20220929110508.1323529-1-marcandre.lureau@redhat.com> References: <20220929110508.1323529-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=marcandre.lureau@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.08, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664450593106100001 From: Arwed Meyer Unaligned i/o access on serial UART works on real PCs. This is used for example by FreeDOS CTMouse driver. Without this it can't reset and detect serial mice. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/77 Signed-off-by: Arwed Meyer Reviewed-by: Marc-Andr=C3=A9 Lureau Message-Id: <20220911181840.8933-6-arwed.meyer@gmx.de> --- hw/char/serial.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/char/serial.c b/hw/char/serial.c index 7061aacbce..41b5e61977 100644 --- a/hw/char/serial.c +++ b/hw/char/serial.c @@ -961,6 +961,9 @@ void serial_set_frequency(SerialState *s, uint32_t freq= uency) const MemoryRegionOps serial_io_ops =3D { .read =3D serial_ioport_read, .write =3D serial_ioport_write, + .valid =3D { + .unaligned =3D 1, + }, .impl =3D { .min_access_size =3D 1, .max_access_size =3D 1, --=20 2.37.3