All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: Arwed Meyer <arwed.meyer@gmx.de>,
	qemu-devel@nongnu.org, qemu-stable@nongnu.org,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 4/4] serial: Allow unaligned i/o access
Date: Thu, 8 Sep 2022 07:15:10 -0400	[thread overview]
Message-ID: <20220908071424-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAJ+F1CLX8gTZ_MsDB+nK7Gp4mBe5UDnaEmKYvfsyjNzKzcQw8g@mail.gmail.com>

On Thu, Sep 08, 2022 at 02:11:28PM +0400, Marc-André Lureau wrote:
> Hi
> 
> On Wed, Sep 7, 2022 at 2:03 AM Arwed Meyer <arwed.meyer@gmx.de> wrote:
> 
>     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 <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
>     frequency)
>      const MemoryRegionOps serial_io_ops = {
>          .read = serial_ioport_read,
>          .write = serial_ioport_write,
>     +    .valid = {
>     +        .unaligned = 1,
>     +    },
> 
> 
> I don't get how this can help if both min_access_size & max_access_size are 1.
>  
> 
>          .impl = {
>              .min_access_size = 1,
>              .max_access_size = 1,
>     --
>     2.34.1


Because that's .impl. If access is invalid we don't get as far
as breaking it up to chunks.

> 
> 
> 
> 
> --
> Marc-André Lureau



  reply	other threads:[~2022-09-08 11:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-06 19:47 [PATCH 0/4] Make serial msmouse work Arwed Meyer
2022-09-06 19:47 ` [PATCH 1/4] msmouse: Handle mouse reset Arwed Meyer
2022-09-08  9:45   ` Marc-André Lureau
2022-09-08 17:21     ` Arwed Meyer
2022-09-06 19:47 ` [PATCH 2/4] chardev: src buffer const for write functions Arwed Meyer
2022-09-06 22:41   ` Philippe Mathieu-Daudé via
2022-09-08  9:45   ` Marc-André Lureau
2022-09-06 19:47 ` [PATCH 3/4] msmouse: Add pnp data Arwed Meyer
2022-09-08  9:45   ` Marc-André Lureau
2022-09-06 19:47 ` [PATCH 4/4] serial: Allow unaligned i/o access Arwed Meyer
2022-09-08 10:11   ` Marc-André Lureau
2022-09-08 11:15     ` Michael S. Tsirkin [this message]
2022-09-08 17:19       ` Arwed Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220908071424-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=arwed.meyer@gmx.de \
    --cc=marcandre.lureau@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.