qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH master/stable-1.0] pci: fix corrupted pci conf i


From: Michael Tokarev
Subject: Re: [Qemu-devel] [PATCH master/stable-1.0] pci: fix corrupted pci conf index register by unaligned write
Date: Sat, 14 Apr 2012 19:15:31 +0400
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:10.0.3) Gecko/20120329 Icedove/10.0.3

Ping?

Its been 4 months ago, and NetBSD still can't be booted in qemu...

I understand this can be done differently, but the patch in
question changed behavour and it caused a visible regression,
so let's fix this regression by restoring previous working
behavour and start thinking how it should be made better
after that... okay?  ;)

Thank you!

On 04.01.2012 18:28, Avi Kivity wrote:
> Commit d0ed8076cbdc261 converted the PCI config access to the memory
> API, but also inadvertantly changed it to accept unaligned writes,
> and corrupt the index register in the process.  This causes a regression
> booting NetBSD.
> 
> Fix by ignoring unaligned or non-dword writes.
> 
> https://bugs.launchpad.net/qemu/+bug/897771
> 
> Reported-by: Andreas Gustafsson <address@hidden>
> Signed-off-by: Avi Kivity <address@hidden>
> ---
> 
>  hw/pci_host.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/pci_host.c b/hw/pci_host.c
> index 44c6c20..8041778 100644
> --- a/hw/pci_host.c
> +++ b/hw/pci_host.c
> @@ -101,6 +101,9 @@ static void pci_host_config_write(void *opaque, 
> target_phys_addr_t addr,
>  
>      PCI_DPRINTF("%s addr " TARGET_FMT_plx " len %d val %"PRIx64"\n",
>                  __func__, addr, len, val);
> +    if (addr != 0 || len != 4) {
> +        return;
> +    }
>      s->config_reg = val;
>  }
>  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]