qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH RFC 2/3] hw/pci: add MemoryRegion ops for unassi


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH RFC 2/3] hw/pci: add MemoryRegion ops for unassigned pci addresses
Date: Mon, 2 Sep 2013 15:42:30 +0100

On 2 September 2013 15:13, Marcel Apfelbaum <address@hidden> wrote:
> +const MemoryRegionOps pci_unassigned_mem_ops = {
> +    .valid.accepts = pci_unassigned_mem_accepts,
> +    .endianness = DEVICE_NATIVE_ENDIAN,
> +};

This is wrong -- you want reads and writes to result in
your PCI-spec-defined behaviour, but if you provide
an accepts callback and it returns false then you get
"machine dependent behaviour such as a machine check
exception". What you want is to provide .read and .write
callbacks which behave as the PCI spec mandates.

Also this should probably be static, not global, and you
should put it in the same patch as the one which actually
creates the memory region.

-- PMM



reply via email to

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