(per
Jan's commets), I have reworked the patch to make the pci device
read only and also included the MMIO range to mmio_ro_ranges.
This seems to work fine and does not throw any dom0 stack trace
either.. (Am sending this out as V6)
In case you are still curious, here is the stack trace from dom0
when I used iomem_deny_access -
(XEN)
mm.c:785:d0 Non-privileged (0) attempt to map I/O space
000d003f
[
13.726130] resource map sanity check conflict: 0xd0030000
0xd003ffff 0xd0031000 0xd003ffff reserved
[
13.758008] ------------[ cut here ]------------
[
13.758231] WARNING: CPU: 31 PID: 1 at
arch/x86/mm/ioremap.c:171 __ioremap_caller+0x2f2/0x380()
[
13.759200] Info: mapping multiple BARs. Your kernel is fine.
[
13.760048] Modules linked in:
[
13.790037] CPU: 31 PID: 1 Comm: swapper/0 Not tainted
3.12.0-rc5+ #7
[
13.790984] Hardware name: empty empty/ S8237 , BIOS V1.0B
07/23/2013
[
13.791214] 0000000000000009 ffff880828cbf948 ffffffff816f867d
ffff880828cbf990
[
13.792269] ffff880828cbf980 ffffffff81067a3c ffffc900036a0000
00000000d0040000
[
13.823332] 00000000d0030000 00000000000d0040 0000000000010000
ffff880828cbf9e0
[
13.824280] Call Trace:
[
13.824987] [<ffffffff816f867d>] dump_stack+0x45/0x56
[
13.825183] [<ffffffff81067a3c>]
warn_slowpath_common+0x8c/0xc0
[
13.855176] [<ffffffff81067b2c>]
warn_slowpath_fmt+0x4c/0x50
[
13.856003] [<ffffffff810580c2>]
__ioremap_caller+0x2f2/0x380
[
13.856218] [<ffffffff810581a7>]
ioremap_nocache+0x17/0x20
[
13.888203] [<ffffffff8146598f>] setup_port+0x10f/0x130
[
13.888403] [<ffffffff81465c01>]
pci_default_setup+0x91/0xb0
[
13.889244] [<ffffffff81465c32>]
pci_brcm_trumanage_setup+0x12/0x30
[
13.890151] [<ffffffff81466f47>]
pciserial_init_ports+0x147/0x210
[
13.913649] [<ffffffff814670e9>]
pciserial_init_one+0xd9/0x1e0
[
13.913870] [<ffffffff813a21cb>]
local_pci_probe+0x4b/0x80
[
13.915128] [<ffffffff813a2421>]
pci_device_probe+0x111/0x120
[
13.915370] [<ffffffff81484e37>]
driver_probe_device+0x77/0x240
[
13.915632] [<ffffffff814850ab>]
__driver_attach+0xab/0xb0
[
13.916893] [<ffffffff81485000>] ?
driver_probe_device+0x240/0x240
[
13.917122] [<ffffffff81482f3d>]
bus_for_each_dev+0x5d/0xa0
[
13.918376] [<ffffffff8148491e>] driver_attach+0x1e/0x20
[
13.918579] [<ffffffff81484434>]
bus_add_driver+0x104/0x290
[
13.918788] [<ffffffff814857c4>]
driver_register+0x64/0xf0
[
13.920076] [<ffffffff81d60e66>] ?
early_serial_setup+0x129/0x129
[
13.920330] [<ffffffff813a12fc>]
__pci_register_driver+0x4c/0x50
[
13.921617] [<ffffffff81d60e7f>]
serial_pci_driver_init+0x19/0x1b
[
13.921844] [<ffffffff8100217a>]
do_one_initcall+0x12a/0x190
[
13.922093] [<ffffffff81088ffb>] ?
parse_args+0x1fb/0x350
[
13.923385] [<ffffffff81d1a047>]
kernel_init_freeable+0x139/0x1cb
[
13.923611] [<ffffffff81d19815>] ? loglevel+0x31/0x31
[
13.924843] [<ffffffff816e8e70>] ? rest_init+0x80/0x80
[
13.925040] [<ffffffff816e8e7e>] kernel_init+0xe/0xf0
[
13.925262] [<ffffffff8170803c>] ret_from_fork+0x7c/0xb0
[
13.925468] [<ffffffff816e8e70>] ? rest_init+0x80/0x80
[
13.926690] ---[ end trace 6d7c17d875f132f5 ]---
(Apologies for the late reply.. )