qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 00/14] Convert Sun devices to memory API.


From: Benoît Canet
Subject: Re: [Qemu-devel] [PATCH 00/14] Convert Sun devices to memory API.
Date: Tue, 15 Nov 2011 16:22:38 +0100

When converting lines like :

-    cpu_register_physical_memory_offset(0x1f800000, 0x1000,
-                                        sh7750_io_memory, 0x1f800000);
-    cpu_register_physical_memory_offset(0xff800000, 0x1000,
-                                        sh7750_io_memory, 0x1f800000);

I'm tempted to do :

+    memory_region_init_alias(&s->iomem_1f8, "memory-1f8",
+                             &s->iomem, 0x1f800000, 0x1000);
+    memory_region_add_subregion(sysmem, 0x1f800000, &s->iomem_1f8);
+
+    memory_region_init_alias(&s->iomem_ff8, "memory-ff8",
+                             &s->iomem, 0xff800000, 0x1000);
+    memory_region_add_subregion(sysmem, 0xff800000, &s->iomem_ff8);

but I'm affraid to loose some information contained in the offset different from the base address (0xff800000 != 0x1f800000).

What is the current recommendation regarding such conversions ?

Benoît


2011/11/15 Avi Kivity <address@hidden>
On 11/15/2011 01:13 PM, Benoît Canet wrote:
> .valid was used where the access size is specified like in
> http://www.ibiblio.org/pub/historic-linux/early-ports/Sparc/NCR/NCR89C105.txt
> .impl was used when the behavior is not known.

Thanks, all applied except:

>   sun4c_intctl: convert to memory API
>   sun4m_iommu: convert to memory API

Where we had raced - I just wrote those two conversions as well.  As it
happens, these were the only two patches that used .impl, which is a
behaviour change; please avoid behaviour changes and do them as separate
patches.

Note I don't think .impl works well when .min_access_size = 4 - it
requires RMW which we don't do yet.

>   esp: Fix memory API conversion
>

Thanks for that too.  Will fold it into the bad patch.

--
error compiling committee.c: too many arguments to function



reply via email to

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