Hello,
I tried out this patch:
>> diff --git a/hypervisor/arch/x86/apic.c b/hypervisor/arch/x86/apic.c
>> index d36c2033..5160d37d 100644
>> --- a/hypervisor/arch/x86/apic.c
>> +++ b/hypervisor/arch/x86/apic.c
>> @@ -350,7 +350,7 @@ void apic_clear(void)
>>
>> /* Finally, reset the TPR again and disable the APIC */
>> apic_ops.write(APIC_REG_TPR, 0);
>> - apic_ops.write(APIC_REG_SVR, 0xff);
>> + //apic_ops.write(APIC_REG_SVR, 0xff);
>> }
>>
>> static void apic_send_ipi(unsigned int target_cpu_id, u32 orig_icr_hi,
but now i am stuck witch another kind of error:
FATAL: Unhandled MSR read: c0002001.
FATAL: Unhandled MSR read: c0002011.
FATAL: Unhandled MSR read: c0002021.
FATAL: Unhandled MSR read: c0002031.
FATAL: Unhandled MSR read: c0002041.
FATAL: Unhandled MSR read: c0002051.
FATAL: Unhandled MSR read: c0002061.
FATAL: Unhandled MSR read: c0002071.
FATAL: Unhandled MSR read: c0002081.
FATAL: Unhandled MSR read: c0002091.
FATAL: Unhandled MSR read: c00020a1.
FATAL: Unhandled MSR read: c00020b1.
FATAL: Unhandled MSR read: c00020c1.
FATAL: Unhandled MSR read: c00020d1.
FATAL: Unhandled MSR read: c00020e1.
FATAL: Unhandled MSR read: c00020f1.
So i got back to my intel machine. There i am able to boot non-root linux but
the boot process gets stuck at
[ 15.618062] e1000e 0000:00:1f.6: can't find IRQ for PCI INT A; probably
buggy MP table
...
[ 20.724004] random: dropbear: uninitialized urandom read (32 bytes read)]
forever.
This error appears, when i run the root cell without any devices (except
serial, ivshmem (demo), and ivshmem-net)
and when i add an ethernet controller. lspci for the ethernet controller gives
me the following output.
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (5) I219-V
(rev 31)
Subsystem: Lenovo Ethernet Connection (5) I219-V
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping-
SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
<MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 127
Region 0: Memory at f2100000 (32-bit, non-prefetchable) [size=128K]
Capabilities: [c8] Power Management version 3
Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=1 PME-
Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
Address: 00000000fee002b8 Data: 0000
Capabilities: [e0] PCI Advanced Features
AFCap: TP+ FLR+
AFCtrl: FLR-
AFStatus: TP-
Kernel driver in use: e1000e
Kernel modules: e1000e
It seems, that there is an issue, adding the device to the non-root cell, and
there is not enougth entropy to fully boot up linux.
Do you have any suggestions how to get linux fully booted?
I have attached the config files for the root (wifi.c) an non-root cell
(linux-x86.c), as well as the full log at /dev/jailhouse (log.txt).
Moritz
________________________________
Von: Jan Kiszka <[email protected]>
Gesendet: Mittwoch, 8. Juli 2020 15:39
An: Andrej Utz <[email protected]>; Ralf Ramsauer
<[email protected]>; Moritz Walker <[email protected]>;
[email protected] <[email protected]>
Betreff: Re: Need help to run Linux in non-root cell
On 08.07.20 16:37, Andrej Utz wrote:
> Hi all,
>
> On 02/07/2020 18:26, Ralf Ramsauer wrote:
>>
>>
>> On 02/07/2020 18:17, Jan Kiszka wrote:
>>> On 02.07.20 18:07, Moritz Walker wrote:
>>>>>> Smells like a regression in that branch for non-root Linux. Is that
>>>>>> 562b04e51bb5e2f04bf175383080333237067c63? Can you share you kernel
>>>>>> config?
>>>>
>>>> Yes, its 562b04e51bb5e2f04bf175383080333237067c63. I attached the
>>>> kernel config.
>>>> I also tried the kernel from jailhouse-images (Linux version 5.4.17)
>>>> which leads to the same error
>>>> on my AMD-machine:
>>>
>>> Ah, AMD! Please see
>>
>> Yeah, AMD. It isn't always only Intel. :-)
>>
>>> https://groups.google.com/forum/#!msg/jailhouse-dev/1wRKIiGN0GA/_p_NSIBpDwAJ
>>>
>>> - in fact a known issue (hardware misbehavior) that we didn't workaround
>>> yet.
>>
>> Yes, just wanted to mention! Looks familiar.
>>
>>>
>>> Ralf, Andrej, any news here.
>>
>> Andrej?
>> It's already been a while. Didn't we already have some preliminary
>> patches for Linux?
>>
>> As a hacky workaround, you can try:
>>
>> diff --git a/hypervisor/arch/x86/apic.c b/hypervisor/arch/x86/apic.c
>> index d36c2033..5160d37d 100644
>> --- a/hypervisor/arch/x86/apic.c
>> +++ b/hypervisor/arch/x86/apic.c
>> @@ -350,7 +350,7 @@ void apic_clear(void)
>>
>> /* Finally, reset the TPR again and disable the APIC */
>> apic_ops.write(APIC_REG_TPR, 0);
>> - apic_ops.write(APIC_REG_SVR, 0xff);
>> + //apic_ops.write(APIC_REG_SVR, 0xff);
>> }
>>
>> static void apic_send_ipi(unsigned int target_cpu_id, u32 orig_icr_hi,
>>
>
> Or as an alternative apply the following patch to the kernel:
> https://groups.google.com/d/msg/jailhouse-dev/1wRKIiGN0GA/P5YeS3oqAQAJ
>
> @Jan: Any ideas how to bring the mentioned patch (or something
> equivalent) upstream? I know its a hack and will add proper CPU family
> checks, but the linux-x86 folks still may not even touch it. Meanwhile
> AMD gains market share and as such more people will try to run non-root
> Linux with their CPUs, run into this bug and request support here or
> decide to use other hypervisors.
Code-wise, I think you can simply set the mask bit unconditionally right
after enabling if that is the software-expected state and that is just
not available on all CPUs. That code path is not timing sensitive.
But, in order to explain where this comes from and what will happen if
not doing that - at least over Jailhouse -, a verbose commit message and
likely also a code comment will be needed.
Jan
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/AM0PR07MB542635593444EA2E8226A9D2B2640%40AM0PR07MB5426.eurprd07.prod.outlook.com.
fffffff0000050
Using x2APIC
Page pool usage after early setup: mem 50/580, remap 0/131072
Initializing processors:
CPU 1... (APIC ID 2) OK
CPU 2... (APIC ID 4) OK
CPU 3... (APIC ID 6) OK
CPU 0... (APIC ID 0) OK
Initializing unit: VT-d
DMAR unit @0xfed90000/0x1000
DMAR unit @0xfed91000/0x1000
Reserving 120 interrupt(s) for device f0:1f.0 at index 0
Initializing unit: IOAPIC
Initializing unit: Cache Allocation Technology
Initializing unit: PCI
Adding PCI device 00:00.0 to cell "RootCell"
Adding PCI device 00:01.0 to cell "RootCell"
Reserving 1 interrupt(s) for device 00:01.0 at index 120
Adding PCI device 00:01.2 to cell "RootCell"
Reserving 1 interrupt(s) for device 00:01.2 at index 121
Adding PCI device 00:02.0 to cell "RootCell"
Reserving 1 interrupt(s) for device 00:02.0 at index 122
Adding PCI device 00:14.0 to cell "RootCell"
Reserving 8 interrupt(s) for device 00:14.0 at index 123
Adding PCI device 00:14.2 to cell "RootCell"
Reserving 1 interrupt(s) for device 00:14.2 at index 131
Adding PCI device 00:16.0 to cell "RootCell"
Reserving 1 interrupt(s) for device 00:16.0 at index 132
Adding PCI device 00:17.0 to cell "RootCell"
Reserving 1 interrupt(s) for device 00:17.0 at index 133
Adding PCI device 00:1c.0 to cell "RootCell"
Reserving 1 interrupt(s) for device 00:1c.0 at index 134
Adding PCI device 00:1f.0 to cell "RootCell"
Adding PCI device 00:1f.2 to cell "RootCell"
Adding PCI device 00:1f.3 to cell "RootCell"
Reserving 1 interrupt(s) for device 00:1f.3 at index 135
Adding PCI device 00:1f.4 to cell "RootCell"
Adding PCI device 00:1f.6 to cell "RootCell"
Reserving 1 interrupt(s) for device 00:1f.6 at index 136
Adding PCI device 02:00.0 to cell "RootCell"
Reserving 1 interrupt(s) for device 02:00.0 at index 137
Adding PCI device 03:00.0 to cell "RootCell"
Reserving 1 interrupt(s) for device 03:00.0 at index 138
Adding virtual PCI device 00:0d.0 to cell "RootCell"
Adding virtual PCI device 00:0e.0 to cell "RootCell"
Page pool usage after late setup: mem 272/580, remap 16393/131072
Activating hypervisor
Adding virtual PCI device 00:0d.0 to cell "linux-x86"
Shared memory connection established, peer cells:
"RootCell"
Adding virtual PCI device 00:0e.0 to cell "linux-x86"
Shared memory connection established, peer cells:
"RootCell"
Removing PCI device 00:1f.6 from cell "RootCell"
Freeing 1 interrupt(s) for device 00:1f.6 at index 136
Adding PCI device 00:1f.6 to cell "linux-x86"
Reserving 1 interrupt(s) for device 00:1f.6 at index 136
Created cell "linux-x86"
Page pool usage after cell creation: mem 366/580, remap 16393/131072
Cell "linux-x86" can be loaded
CPU 2 received SIPI, vector 100
CPU 3 received SIPI, vector 100
Started cell "linux-x86"
[ 0.000000] Linux version 5.4.17 (builder@481b3c0f15e7) (gcc version 8.3.0
(Debian 8.3.0-6)) #1 SMP Wed Jul 8 23:29:50 UTC 2020
[ 0.000000] Command line: console=ttyS0,9600 console=jailhouse
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point
registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: xstate_offset[3]: 832, xstate_sizes[3]: 64
[ 0.000000] x86/fpu: xstate_offset[4]: 896, xstate_sizes[4]: 64
[ 0.000000] x86/fpu: Enabled xstate features 0x1f, context size is 960
bytes, using 'compacted' format.
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x00000000000fffff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000000100fff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000200000-0x00000000048fffff] usable
[ 0.000000] earlycon: jailhouse0 at I/O port 0x0 (options '')
[ 0.000000] printk: bootconsole [jailhouse0] enabled
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] extended physical RAM map:
[ 0.000000] reserve setup_data: [mem 0x0000000000000000-0x0000000000001fff]
usable
[ 0.000000] reserve setup_data: [mem 0x0000000000002000-0x000000000000212b]
usable
[ 0.000000] reserve setup_data: [mem 0x000000000000212c-0x00000000000fffff]
usable
[ 0.000000] reserve setup_data: [mem 0x0000000000100000-0x0000000000100fff]
reserved
[ 0.000000] reserve setup_data: [mem 0x0000000000200000-0x00000000048fffff]
usable
[ 0.000000] DMI not present or invalid.
[ 0.000000] Hypervisor detected: Jailhouse
[ 0.000000] tsc: Detected 2807.971 MHz processor
[ 0.000019] last_pfn = 0x4900 max_arch_pfn = 0x400000000
[ 0.010386] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.021006] x2apic: enabled by BIOS, switching to x2apic ops
[ 0.046204] Using GB pages for direct mapping
[ 0.056362] RAMDISK: [mem 0x03ab8000-0x0431efff]
[ 0.066501] Zone ranges:
[ 0.076502] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.086527] DMA32 [mem 0x0000000001000000-0x00000000048fffff]
[ 0.096556] Normal empty
[ 0.106553] Movable zone start for each node
[ 0.116562] Early memory node ranges
[ 0.126603] node 0: [mem 0x0000000000001000-0x000000000009ffff]
[ 0.136640] node 0: [mem 0x0000000000200000-0x00000000048fffff]
[ 0.146717] Zeroed struct page in unavailable ranges: 353 pages
[ 0.146719] Initmem setup node 0 [mem 0x0000000000001000-0x00000000048fffff]
[ 0.166989] Setting APIC routing to physical x2apic.
[ 0.177082] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-119
[ 0.187115] smpboot: Allowing 2 CPUs, 0 hotplug CPUs
[ 0.197142] [mem 0x04900000-0xffffffff] available for PCI devices
[ 0.207170] Booting paravirtualized kernel on bare hardware
[ 0.217192] clocksource: refined-jiffies: mask: 0xffffffff max_cycles:
0xffffffff, max_idle_ns: 7645519600211568 ns
[ 0.311731] setup_percpu: NR_CPUS:96 nr_cpumask_bits:96 nr_cpu_ids:2
nr_node_ids:1
[ 0.321935] percpu: Embedded 50 pages/cpu s166296 r8192 d30312 u1048576
[ 0.332054] Built 1 zonelists, mobility grouping on. Total pages: 18061
[ 0.342130] Kernel command line: console=ttyS0,9600 console=jailhouse
[ 0.352262] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes,
linear)
[ 0.362314] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes,
linear)
[ 0.372407] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.382616] Memory: 39408K/73340K available (10243K kernel code, 1320K
rwdata, 2560K rodata, 1204K init, 1164K bss, 33932K reserved, 0K cma-reserved)
[ 0.392789] Kernel/User page tables isolation: enabled
[ 0.402860] rcu: Hierarchical RCU implementation.
[ 0.412879] rcu: RCU event tracing is enabled.
[ 0.422896] rcu: RCU restricting CPUs from NR_CPUS=96 to nr_cpu_ids=2.
[ 0.432935] rcu: RCU calculated value of scheduler-enlistment delay is 25
jiffies.
[ 0.442996] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.455631] NR_IRQS: 6400, nr_irqs: 512, preallocated irqs: 0
[ 0.465982] random: get_random_bytes called from start_kernel+0x31d/0x504
with crng_init=0
[ 0.476155] Console: colour dummy device 80x25
[ 0.486175] Enabling UART0 (port 0x3f8)
[ 0.000000] Linux version 5.4.17 (builder@481b3c0f15e7) (gcc version 8.3.0
(Debian 8.3.0-6)) #1 SMP Wed Jul 8 23:29:50 UTC 2020
[ 0.000000] Command line: console=ttyS0,9600 console=jailhouse
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point
registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: xstate_offset[3]: 832, xstate_sizes[3]: 64
[ 0.000000] x86/fpu: xstate_offset[4]: 896, xstate_sizes[4]: 64
[ 0.000000] x86/fpu: Enabled xstate features 0x1f, context size is 960
bytes, using 'compacted' format.
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x00000000000fffff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x0000000000100fff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000200000-0x00000000048fffff] usable
[ 0.000000] earlycon: jailhouse0 at I/O port 0x0 (options '')
[ 0.000000] printk: bootconsole [jailhouse0] enabled
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] extended physical RAM map:
[ 0.000000] reserve setup_data: [mem 0x0000000000000000-0x0000000000001fff]
usable
[ 0.000000] reserve setup_data: [mem 0x0000000000002000-0x000000000000212b]
usable
[ 0.000000] reserve setup_data: [mem 0x000000000000212c-0x00000000000fffff]
usable
[ 0.000000] reserve setup_data: [mem 0x0000000000100000-0x0000000000100fff]
reserved
[ 0.000000] reserve setup_data: [mem 0x0000000000200000-0x00000000048fffff]
usable
[ 0.000000] DMI not present or invalid.
[ 0.000000] Hypervisor detected: Jailhouse
[ 0.000000] tsc: Detected 2807.971 MHz processor
[ 0.000019] last_pfn = 0x4900 max_arch_pfn = 0x400000000
[ 0.010386] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.021006] x2apic: enabled by BIOS, switching to x2apic ops
[ 0.046204] Using GB pages for direct mapping
[ 0.056362] RAMDISK: [mem 0x03ab8000-0x0431efff]
[ 0.066501] Zone ranges:
[ 0.076502] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.086527] DMA32 [mem 0x0000000001000000-0x00000000048fffff]
[ 0.096556] Normal empty
[ 0.106553] Movable zone start for each node
[ 0.116562] Early memory node ranges
[ 0.126603] node 0: [mem 0x0000000000001000-0x000000000009ffff]
[ 0.136640] node 0: [mem 0x0000000000200000-0x00000000048fffff]
[ 0.146717] Zeroed struct page in unavailable ranges: 353 pages
[ 0.146719] Initmem setup node 0 [mem 0x0000000000001000-0x00000000048fffff]
[ 0.166989] Setting APIC routing to physical x2apic.
[ 0.177082] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-119
[ 0.187115] smpboot: Allowing 2 CPUs, 0 hotplug CPUs
[ 0.197142] [mem 0x04900000-0xffffffff] available for PCI devices
[ 0.207170] Booting paravirtualized kernel on bare hardware
[ 0.217192] clocksource: refined-jiffies: mask: 0xffffffff max_cycles:
0xffffffff, max_idle_ns: 7645519600211568 ns
[ 0.311731] setup_percpu: NR_CPUS:96 nr_cpumask_bits:96 nr_cpu_ids:2
nr_node_ids:1
[ 0.321935] percpu: Embedded 50 pages/cpu s166296 r8192 d30312 u1048576
[ 0.332054] Built 1 zonelists, mobility grouping on. Total pages: 18061
[ 0.342130] Kernel command line: console=ttyS0,9600 console=jailhouse
[ 0.352262] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes,
linear)
[ 0.362314] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes,
linear)
[ 0.372407] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.382616] Memory: 39408K/73340K available (10243K kernel code, 1320K
rwdata, 2560K rodata, 1204K init, 1164K bss, 33932K reserved, 0K cma-reserved)
[ 0.392789] Kernel/User page tables isolation: enabled
[ 0.402860] rcu: Hierarchical RCU implementation.
[ 0.412879] rcu: RCU event tracing is enabled.
[ 0.422896] rcu: RCU restricting CPUs from NR_CPUS=96 to nr_cpu_ids=2.
[ 0.432935] rcu: RCU calculated value of scheduler-enlistment delay is 25
jiffies.
[ 0.442996] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[ 0.455631] NR_IRQS: 6400, nr_irqs: 512, preallocated irqs: 0
[ 0.465982] random: get_random_bytes called from start_kernel+0x31d/0x504
with crng_init=0
[ 0.476155] Console: colour dummy device 80x25
[ 0.486175] Enabling UART0 (port 0x3f8)
[ 6.034832] printk: console [ttyS0] enabled
[ 6.094597] APIC: Switch to symmetric I/O mode setup
[ 6.166909] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles:
0x2879aabdd06, max_idle_ns: 440795342522 ns
[ 6.302376] Calibrating delay loop (skipped), value calculated using timer
frequency.. 5615.94 BogoMIPS (lpj=11231884)
[ 6.306371] pid_max: default: 32768 minimum: 301
[ 6.306371] LSM: Security Framework initializing
[ 6.306371] SELinux: Initializing.
[ 6.306371] Mount-cache hash table entries: 512 (order: 0, 4096 bytes,
linear)
[ 6.306371] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes,
linear)
[ 6.306371] process: using mwait in idle threads
[ 6.306371] Last level iTLB entries: 4KB 128, 2MB 8, 4MB 8
[ 6.306371] Last level dTLB entries: 4KB 64, 2MB 0, 4MB 0, 1GB 4
[ 6.306371] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user
pointer sanitization
[ 6.306371] Spectre V2 : Mitigation: Full generic retpoline
[ 6.306371] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on
context switch
[ 6.306371] Spectre V2 : Enabling Restricted Speculation for firmware calls
[ 6.306371] Spectre V2 : mitigation: Enabling conditional Indirect Branch
Prediction Barrier
[ 6.306371] Spectre V2 : User space: Mitigation: STIBP via seccomp and prctl
[ 6.306371] Speculative Store Bypass: Mitigation: Speculative Store Bypass
disabled via prctl and seccomp
[ 6.306371] MDS: Mitigation: Clear CPU buffers
[ 6.306371] Freeing SMP alternatives memory: 16K
[ 6.306371] smpboot: CPU0: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
(family: 0x6, model: 0x9e, stepping: 0x9)
[ 6.306496] Performance Events: PEBS fmt3+, Skylake events, 32-deep LBR,
full-width counters, Intel PMU driver.
[ 6.310379] ... version: 4
[ 6.314375] ... bit width: 48
[ 6.318375] ... generic registers: 8
[ 6.322373] ... value mask: 0000ffffffffffff
[ 6.326376] ... max period: 00007fffffffffff
[ 6.330375] ... fixed-purpose events: 3
[ 6.334375] ... event mask: 00000007000000ff
[ 6.338442] rcu: Hierarchical SRCU implementation.
[ 6.342487] smp: Bringing up secondary CPUs ...
[ 6.346520] x86: Booting SMP configuration:
CPU 3 received SIPI, vector 9a
[ 6.350381] .... node #0, CPUs: #1
[ 6.360919] smp: Brought up 1 node, 2 CPUs
[ 6.366376] smpboot: Max logical packages: 1
[ 6.370376] smpboot: Total of 2 processors activated (11231.88 BogoMIPS)
[ 6.374796] devtmpfs: initialized
[ 6.422541] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff,
max_idle_ns: 7645041785100000 ns
[ 6.550384] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[ 6.638447] xor: automatically using best checksumming function avx
[ 6.734483] NET: Registered protocol family 16
[ 6.738443] audit: initializing netlink subsys (disabled)
[ 6.742402] audit: type=2000 audit(0.440:1): state=initialized
audit_enabled=0 res=1
[ 6.842385] cpuidle: using governor ladder
[ 6.902400] cpuidle: using governor menu
[ 6.906422] PCI: Using configuration type 1 for base access
[ 6.910381] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem
0xf8000000-0x107ffffff] (base 0xf8000000)
[ 6.982373] raid6: avx2x4 gen() 25017 MB/s
[ 7.110372] raid6: avx2x4 xor() 18845 MB/s
[ 7.238372] raid6: avx2x2 gen() 25195 MB/s
[ 7.326375] clocksource: timekeeping watchdog on CPU1: Marking clocksource
'tsc-early' as unstable because the skew is too large:
[ 7.474377] clocksource: 'refined-jiffies' wd_now:
fffedc08 wd_last: fffedb88 mask: ffffffff
[ 7.606376] clocksource: 'tsc-early' cs_now:
8e0bcc5233 cs_last: 8d8cf7e330 mask: ffffffffffffffff
[ 7.746376] tsc: Marking TSC unstable due to clocksource watchdog
[ 7.830385] raid6: avx2x2 xor() 6145 MB/s
[ 7.958372] raid6: avx2x1 gen() 20508 MB/s
[ 8.085406] raid6: avx2x1 xor() 13187 MB/s
[ 8.214374] raid6: sse2x4 gen() 12198 MB/s
[ 8.342374] raid6: sse2x4 xor() 7785 MB/s
[ 8.470374] raid6: sse2x2 gen() 10389 MB/s
[ 8.598372] raid6: sse2x2 xor() 6840 MB/s
[ 8.725411] raid6: sse2x1 gen() 9135 MB/s
[ 8.854375] raid6: sse2x1 xor() 5161 MB/s
[ 8.914376] raid6: using algorithm avx2x2 gen() 25195 MB/s
[ 8.990376] raid6: .... xor() 6145 MB/s, rmw enabled
[ 9.058376] raid6: using avx2x2 recovery algorithm
[ 9.126411] ACPI: Interpreter disabled.
[ 9.182396] iommu: Default domain type: Translated
[ 9.250416] vgaarb: loaded
[ 9.290454] SCSI subsystem initialized
[ 9.346430] usbcore: registered new interface driver usbfs
[ 9.422414] usbcore: registered new interface driver hub
[ 9.494396] usbcore: registered new device driver usb
[ 9.566404] pps_core: LinuxPPS API ver. 1 registered
[ 9.634375] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo
Giometti <[email protected]>
[ 9.754389] PTP clock support registered
[ 9.810413] PCI: Probing PCI hardware
[ 9.866411] PCI host bridge to bus 0000:00
[ 9.922379] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 10.006381] pci_bus 0000:00: root bus resource [mem 0x00000000-0x7fffffffff]
[ 10.102378] pci_bus 0000:00: No busn resource found for root bus, will use
[bus 00-ff]
[ 10.206512] pci 0000:00:0d.0: [110a:4106] type 00 class 0xff0001
[ 10.286398] pci 0000:00:0d.0: reg 0x10: [mem 0x00000000-0x00000fff]
[ 10.374388] pci 0000:00:0d.0: reg 0x14: [mem 0x00000000-0x000001ff]
[ 10.458491] pci 0000:00:0e.0: [110a:4106] type 00 class 0xff0000
[ 10.538397] pci 0000:00:0e.0: reg 0x10: [mem 0x00000000-0x00000fff]
[ 10.626386] pci 0000:00:0e.0: reg 0x14: [mem 0x00000000-0x000001ff]
[ 10.710663] pci 0000:00:1f.6: [8086:15d6] type 00 class 0x020000
[ 10.790426] pci 0000:00:1f.6: reg 0x10: [mem 0xf2100000-0xf211ffff]
[ 10.874517] pci 0000:00:1f.6: PME# supported from D0 D3hot D3cold
[ 10.958467] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[ 11.106541] clocksource: Switched to clocksource refined-jiffies
[ 11.336727] VFS: Disk quotas dquot_6.6.0
[ 11.394412] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 11.486434] pnp: PnP ACPI: disabled
[ 11.538436] thermal_sys: Registered thermal governor 'step_wise'
[ 11.546400] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff,
max_idle_ns: 2085701024 ns
[ 11.742427] clocksource: Switched to clocksource acpi_pm
[ 11.815706] pci 0000:00:0d.0: BAR 0: assigned [mem 0x08000000-0x08000fff]
[ 11.906631] pci 0000:00:0e.0: BAR 0: assigned [mem 0x08001000-0x08001fff]
[ 11.997524] pci 0000:00:0d.0: BAR 1: assigned [mem 0x08002000-0x080021ff]
[ 12.088416] pci 0000:00:0e.0: BAR 1: assigned [mem 0x08002200-0x080023ff]
[ 12.179308] pci_bus 0000:00: resource 4 [io 0x0000-0xffff]
[ 12.255689] pci_bus 0000:00: resource 5 [mem 0x00000000-0x7fffffffff]
[ 12.342481] NET: Registered protocol family 2
[ 12.404457] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096
bytes, linear)
[ 12.514003] TCP established hash table entries: 1024 (order: 1, 8192 bytes,
linear)
[ 12.615257] TCP bind hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 12.710286] TCP: Hash tables configured (established 1024 bind 1024)
[ 12.796021] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 12.883812] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 12.976839] NET: Registered protocol family 1
[ 13.038867] RPC: Registered named UNIX socket transport module.
[ 13.119396] RPC: Registered udp transport module.
[ 13.185403] RPC: Registered tcp transport module.
[ 13.251454] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 13.338216] PCI: CLS 0 bytes, default 64
[ 13.394974] Trying to unpack rootfs image as initramfs...
[ 13.476931] Freeing initrd memory: 8604K
[ 13.533885] RAPL PMU: API unit is 2^-32 Joules, 5 fixed counters, 655360 ms
ovfl timer
[ 13.638265] RAPL PMU: hw unit of domain pp0-core 2^-14 Joules
[ 13.716712] RAPL PMU: hw unit of domain package 2^-14 Joules
[ 13.794128] RAPL PMU: hw unit of domain dram 2^-14 Joules
[ 13.868428] RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules
[ 13.945838] RAPL PMU: hw unit of domain psys 2^-14 Joules
[ 14.020447] Initialise system trusted keyrings
[ 14.083439] workingset: timestamp_bits=62 max_order=14 bucket_order=0
[ 14.170514] NFS: Registering the id_resolver key type
[ 14.240696] Key type id_resolver registered
[ 14.300483] Key type id_legacy registered
[ 14.358200] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 14.448098] 9p: Installing v9fs 9p2000 file system support
[ 14.523638] Key type asymmetric registered
[ 14.582415] Asymmetric key parser 'x509' registered
[ 14.650523] Block layer SCSI generic (bsg) driver version 0.4 loaded (major
251)
[ 14.748690] io scheduler mq-deadline registered
[ 14.812654] io scheduler kyber registered
[ 14.880611] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 14.986344] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is
a 16550A
[ 15.088973] Linux agpgart interface v0.103
[ 15.147751] AMD-Vi: AMD IOMMUv2 driver by Joerg Roedel <[email protected]>
[ 15.237611] AMD-Vi: AMD IOMMUv2 functionality not available on this system
[ 15.331085] brd: module loaded
[ 15.377471] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 15.456958] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 15.537544] e1000e 0000:00:1f.6: enabling device (0400 -> 0402)
[ 15.618062] e1000e 0000:00:1f.6: can't find IRQ for PCI INT A; probably
buggy MP table
[ 15.722517] e1000e 0000:00:1f.6: Interrupt Throttling Rate (ints/sec) set to
dynamic conservative mode
[ 16.046383] e1000e 0000:00:1f.6 0000:00:1f.6 (uninitialized): registered PHC
clock
[ 16.214207] e1000e 0000:00:1f.6 eth0: (PCI Express:2.5GT/s:Width x1)
54:e1:ad:15:3a:ef
[ 16.318564] e1000e 0000:00:1f.6 eth0: Intel(R) PRO/1000 Network Connection
[ 16.410613] e1000e 0000:00:1f.6 eth0: MAC: 12, PHY: 12, PBA No: FFFFFF-0FF
[ 16.502602] usbcore: registered new interface driver asix
[ 16.576919] usbcore: registered new interface driver ax88179_178a
[ 16.659530] usbcore: registered new interface driver cdc_ether
[ 16.739039] usbcore: registered new interface driver cdc_eem
[ 16.816472] usbcore: registered new interface driver dm9601
[ 16.892866] usbcore: registered new interface driver sr9700
[ 16.969263] usbcore: registered new interface driver CoreChips
[ 17.048768] usbcore: registered new interface driver smsc75xx
[ 17.127239] usbcore: registered new interface driver smsc95xx
[ 17.205701] usbcore: registered new interface driver gl620a
[ 17.282090] usbcore: registered new interface driver net1080
[ 17.359519] usbcore: registered new interface driver plusb
[ 17.434862] usbcore: registered new interface driver rndis_host
[ 17.515431] usbcore: registered new interface driver cdc_subset
[ 17.595964] usbcore: registered new interface driver zaurus
[ 17.672351] usbcore: registered new interface driver MOSCHIP usb-ethernet
driver
[ 17.770524] usbcore: registered new interface driver cdc_ncm
[ 17.847942] usbcore: registered new interface driver huawei_cdc_ncm
[ 17.932627] usbcore: registered new interface driver cdc_mbim
[ 18.011083] ivshmem-net 0000:00:0d.0: enabling device (0000 -> 0002)
[ 18.096826] ivshmem-net 0000:00:0d.0: TX memory at 0x000000003a680000, size
0x000000000007f000
[ 18.209487] ivshmem-net 0000:00:0d.0: RX memory at 0x000000003a601000, size
0x000000000007f000
[ 18.322447] uio_ivshmem 0000:00:0e.0: enabling device (0000 -> 0002)
[ 18.408187] uio_ivshmem 0000:00:0e.0: state_table at 0x000000003a700000,
size 0x0000000000001000
[ 18.522928] uio_ivshmem 0000:00:0e.0: rw_section at 0x000000003a701000, size
0x0000000000009000
[ 18.636650] uio_ivshmem 0000:00:0e.0: input_sections at 0x000000003a70a000,
size 0x0000000000004000
[ 18.754499] uio_ivshmem 0000:00:0e.0: output_section at 0x000000003a70c000,
size 0x0000000000002000
[ 18.873158] usbcore: registered new interface driver cdc_wdm
[ 18.950788] usbcore: registered new interface driver usb-storage
[ 19.032630] mousedev: PS/2 mouse device common for all mice
[ 19.109220] intel_pstate: Intel P-state driver initializing
[ 19.185924] intel_pstate: HWP enabled
[ 19.239519] sdhci: Secure Digital Host Controller Interface driver
[ 19.323160] sdhci: Copyright(c) Pierre Ossman
[ 19.385055] printk: console [jailhouse0] enabled
[ 19.385055] printk: console [jailhouse0] enabled
[ 19.460073] printk: bootconsole [jailhouse0] disabled
[ 19.460073] printk: bootconsole [jailhouse0] disabled
[ 19.540344] 9pnet: Installing 9P2000 support
[ 19.601218] Key type dns_resolver registered
[ 19.662073] IPI shorthand broadcast: enabled
[ 19.723004] registered taskstats version 1
[ 19.781783] Loading compiled-in X.509 certificates
[ 19.848978] Btrfs loaded, crc32c=crc32c-generic
[ 19.913207] Unstable clock detected, switching default tracing clock to
"global"
[ 19.913207] If you want to keep using the local clock, then add:
[ 19.913207] "trace_clock=local"
[ 19.913207] on the kernel command line
[ 20.197406] Freeing unused kernel image memory: 1204K
[ 20.274386] Write protecting the kernel read-only data: 16384k
[ 20.354328] Freeing unused kernel image memory: 2028K
[ 20.424774] Freeing unused kernel image memory: 1536K
[ 20.494956] rodata_test: all tests were successful
[ 20.562010] Run /init as init process
[ 20.635155] random: dd: uninitialized urandom read (512 bytes read)
[ 20.724004] random: dropbear: uninitialized urandom read (32 bytes read)
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
* Configuration for Linux inmate, 1 CPU, 74 MB RAM, ~1MB shmem, serial ports
*
* Copyright (c) Siemens AG, 2013-2015
*
* Authors:
* Jan Kiszka <[email protected]>
*
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
*/
#include <jailhouse/types.h>
#include <jailhouse/cell-config.h>
struct {
struct jailhouse_cell_desc cell;
__u64 cpus[1];
struct jailhouse_memory mem_regions[11];
struct jailhouse_cache cache_regions[1];
struct jailhouse_irqchip irqchips[1];
struct jailhouse_pio pio_regions[1];
struct jailhouse_pci_device pci_devices[2];
struct jailhouse_pci_capability pci_caps[0];
} __attribute__((packed)) config = {
.cell = {
.signature = JAILHOUSE_CELL_DESC_SIGNATURE,
.revision = JAILHOUSE_CONFIG_REVISION,
.name = "linux-x86",
.flags = JAILHOUSE_CELL_PASSIVE_COMMREG |
JAILHOUSE_CELL_VIRTUAL_CONSOLE_ACTIVE,
.cpu_set_size = sizeof(config.cpus),
.num_memory_regions = ARRAY_SIZE(config.mem_regions),
.num_cache_regions = ARRAY_SIZE(config.cache_regions),
.num_irqchips = ARRAY_SIZE(config.irqchips),
.num_pio_regions = ARRAY_SIZE(config.pio_regions),
.num_pci_devices = ARRAY_SIZE(config.pci_devices),
.num_pci_caps = ARRAY_SIZE(config.pci_caps),
},
.cpus = {
0b1100,
},
.mem_regions = {
/* 0 .. 3 IVSHMEM networking */
JAILHOUSE_SHMEM_NET_REGIONS(0x3a600000, 1),
/* 4 IVSHMEM shared memory regions (demo) */
{
.phys_start = 0x3a700000,
.virt_start = 0x3a700000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED,
},
/* 5 */
{
.phys_start = 0x3a701000,
.virt_start = 0x3a701000,
.size = 0x9000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_ROOTSHARED,
},
/* 6 */
{
.phys_start = 0x3a70a000,
.virt_start = 0x3a70a000,
.size = 0x2000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED,
},
/* 7 */
{
.phys_start = 0x3a70c000,
.virt_start = 0x3a70c000,
.size = 0x2000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_ROOTSHARED,
},
/* 8 low RAM */ {
.phys_start = 0x3A71F000,
.virt_start = 0,
.size = 0x00100000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA |
JAILHOUSE_MEM_LOADABLE,
},
/* 9 communication region */ {
.virt_start = 0x00100000,
.size = 0x00001000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_COMM_REGION,
},
/* 10 high RAM */ {
.phys_start = 0x3a81f000,
.virt_start = 0x00200000,
.size = 0x4700000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA |
JAILHOUSE_MEM_LOADABLE,
},
/* 20 MemRegion: f2100000-f211ffff : e1000e
{
.phys_start = 0xf2100000,
.virt_start = 0xf2100000,
.size = 0x20000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
*/
},
.cache_regions = {
{
.start = 0,
.size = 2,
.type = JAILHOUSE_CACHE_L3,
},
},
.irqchips = {
//IOAPIC
{
.address = 0xfec00000,
.id = 0x1f0f8,
.pin_bitmap = {
(1 << 3),0,0,0
},
},
},
.pio_regions = {
//PIO_RANGE(0x2f8, 8), /* serial 2 */
PIO_RANGE(0x3f8, 8), /* serial 1 */
//PIO_RANGE(0x4, 0xf),
//PIO_RANGE(0x80, 0x10),/* dma page reg */
//PIO_RANGE(0xe010, 8), /* OXPCIe952 serial1 */
},
.pci_devices = {
/*
{
.type = JAILHOUSE_PCI_TYPE_IVSHMEM,
.domain = 0x0,
.bdf = 0x0c << 3,
.bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_MSIX,
.num_msix_vectors = 2,
.shmem_regions_start = 0,
.shmem_dev_id = 1,
.shmem_peers = 2,
.shmem_protocol = JAILHOUSE_SHMEM_PROTO_VIRTIO_FRONT +
VIRTIO_DEV_BLOCK,
},
{
.type = JAILHOUSE_PCI_TYPE_IVSHMEM,
.domain = 0x0,
.bdf = 0x0d << 3,
.bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_MSIX,
.num_msix_vectors = 3,
.shmem_regions_start = 4,
.shmem_dev_id = 1,
.shmem_peers = 2,
.shmem_protocol = JAILHOUSE_SHMEM_PROTO_VIRTIO_FRONT +
VIRTIO_DEV_CONSOLE,
},
*/
{ // IVSHMEM (networking)
.type = JAILHOUSE_PCI_TYPE_IVSHMEM,
.domain = 0x0,
.iommu = 1,
.bdf = 0x0d << 3,
.bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_MSIX,
.num_msix_vectors = 2,
.shmem_regions_start = 0,
.shmem_dev_id = 1,
.shmem_peers = 2,
.shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH,
},
{ /* IVSHMEM (demo) */
.type = JAILHOUSE_PCI_TYPE_IVSHMEM,
.iommu = 1,
.domain = 0x0000,
.bdf = 0x0e << 3,
.bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_MSIX,
.num_msix_vectors = 16,
.shmem_regions_start = 4,
.shmem_dev_id = 1,
.shmem_peers = 2,
.shmem_protocol = JAILHOUSE_SHMEM_PROTO_UNDEFINED,
},
/* PCIDevice: 00:1f.6
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 1,
.domain = 0x0,
.bdf = 0xfe,
.bar_mask = {
0xfffe0000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
.caps_start = 0,
.num_caps = 5,
.num_msi_vectors = 1,
.msi_64bits = 1,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},*/
},
.pci_caps = {
/*
{
.id = PCI_CAP_ID_PM,
.start = 0xc8,
.len = 0x8,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_MSI,
.start = 0xd0,
.len = 0xe,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_AF,
.start = 0xe0,
.len = 0x2,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_ERR | JAILHOUSE_PCI_EXT_CAP,
.start = 0x100,
.len = 4,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_DSN | JAILHOUSE_PCI_EXT_CAP,
.start = 0x140,
.len = 4,
.flags = 0,
},
*/
}
};
/*
* Jailhouse, a Linux-based partitioning hypervisor
*
* Copyright (c) Siemens AG, 2014-2017
*
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
*
* Alternatively, you can use or redistribute this file under the following
* BSD license:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
* Configuration for LENOVO 20J6CTO1WW
* created with '/usr/local/libexec/jailhouse/jailhouse config create configs/x86/wifi.c'
*
* NOTE: This config expects the following to be appended to your kernel cmdline
* "memmap=0x5200000$0x3a000000"
*/
#include <jailhouse/types.h>
#include <jailhouse/cell-config.h>
struct {
struct jailhouse_system header;
__u64 cpus[1];
struct jailhouse_memory mem_regions[66];
struct jailhouse_irqchip irqchips[1];
struct jailhouse_pio pio_regions[44];
struct jailhouse_pci_device pci_devices[18];
struct jailhouse_pci_capability pci_caps[55];
} __attribute__((packed)) config = {
.header = {
.signature = JAILHOUSE_SYSTEM_SIGNATURE,
.revision = JAILHOUSE_CONFIG_REVISION,
.flags = JAILHOUSE_SYS_VIRTUAL_DEBUG_CONSOLE,
.hypervisor_memory = {
.phys_start = 0x3a000000,
.size = 0x600000,
},
.debug_console = {
.address = 0xe0000000,
.size = 0x10000000,
.type = JAILHOUSE_CON_TYPE_EFIFB,
.flags = JAILHOUSE_CON_ACCESS_MMIO | JAILHOUSE_CON_FB_1024x768,
},
.platform_info = {
.pci_mmconfig_base = 0xf8000000,
.pci_mmconfig_end_bus = 0x3f,
.iommu_units = {
{
.type = JAILHOUSE_IOMMU_INTEL,
.base = 0xfed90000,
.size = 0x1000,
},
{
.type = JAILHOUSE_IOMMU_INTEL,
.base = 0xfed91000,
.size = 0x1000,
},
},
.x86 = {
.pm_timer_address = 0x1808,
.vtd_interrupt_limit = 256,
},
},
.root_cell = {
.name = "RootCell",
.cpu_set_size = sizeof(config.cpus),
.num_memory_regions = ARRAY_SIZE(config.mem_regions),
.num_irqchips = ARRAY_SIZE(config.irqchips),
.num_pio_regions = ARRAY_SIZE(config.pio_regions),
.num_pci_devices = ARRAY_SIZE(config.pci_devices),
.num_pci_caps = ARRAY_SIZE(config.pci_caps),
},
},
.cpus = {
0x000000000000000f,
},
.mem_regions = {
/* 0 MemRegion: 00000000-00057fff : System RAM */
{
.phys_start = 0x0,
.virt_start = 0x0,
.size = 0x58000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: 00059000-0008bfff : System RAM */
{
.phys_start = 0x59000,
.virt_start = 0x59000,
.size = 0x33000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: 00100000-39ffffff : System RAM */
{
.phys_start = 0x100000,
.virt_start = 0x100000,
.size = 0x39f00000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: 3f300000-8f200000 : System RAM */
{
.phys_start = 0x3f300000,
.virt_start = 0x3f300000,
.size = 0x4ff00000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: 8f222000-8fe8afff : System RAM */
{
.phys_start = 0x8f222000,
.virt_start = 0x8f222000,
.size = 0xc69000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* 5 MemRegion: 8fe8c000-91daf017 : System RAM */
{
.phys_start = 0x8fe8c000,
.virt_start = 0x8fe8c000,
.size = 0x1f24000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: 91daf018-91dbf057 : System RAM */
{
.phys_start = 0x91daf018,
.virt_start = 0x91daf018,
.size = 0x11000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: 91dbf058-93e3afff : System RAM */
{
.phys_start = 0x91dbf058,
.virt_start = 0x91dbf058,
.size = 0x207c000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: 93e3b000-93e3bfff : ACPI Non-volatile Storage */
{
.phys_start = 0x93e3b000,
.virt_start = 0x93e3b000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: 93e3d000-9d77cfff : System RAM */
{
.phys_start = 0x93e3d000,
.virt_start = 0x93e3d000,
.size = 0x9940000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* 10 9d77d000-9f41f000*/
{
.phys_start = 0x9d77d000,
.virt_start = 0x9d77d000,
.size = 0x1CA2000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: 9fe9a000-9ff99fff : ACPI Non-volatile Storage */
{
.phys_start = 0x9fe9a000,
.virt_start = 0x9fe9a000,
.size = 0x100000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: 9ff9a000-9fffefff : ACPI Tables */
{
.phys_start = 0x9ff9a000,
.virt_start = 0x9ff9a000,
.size = 0x65000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: 9ffff000-9fffffff : System RAM */
{
.phys_start = 0x9ffff000,
.virt_start = 0x9ffff000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: c0000000-cfffffff : 0000:02:00.0 */
{
.phys_start = 0xc0000000,
.virt_start = 0xc0000000,
.size = 0x10000000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* 15 MemRegion: d0000000-d1ffffff : 0000:02:00.0 */
{
.phys_start = 0xd0000000,
.virt_start = 0xd0000000,
.size = 0x2000000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: e0000000-efffffff : 0000:00:02.0 */
{
.phys_start = 0xe0000000,
.virt_start = 0xe0000000,
.size = 0x10000000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: f0000000-f0ffffff : 0000:00:02.0 */
{
.phys_start = 0xf0000000,
.virt_start = 0xf0000000,
.size = 0x1000000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: f1000000-f1ffffff : 0000:02:00.0 */
{
.phys_start = 0xf1000000,
.virt_start = 0xf1000000,
.size = 0x1000000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: f2000000-f2001fff : iwlwifi */
{
.phys_start = 0xf2000000,
.virt_start = 0xf2000000,
.size = 0x2000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* 20 MemRegion: f2100000-f211ffff : e1000e */
{
.phys_start = 0xf2100000,
.virt_start = 0xf2100000,
.size = 0x20000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_DMA | JAILHOUSE_MEM_EXECUTE,
},
/* MemRegion: f2120000-f212ffff : xhci-hcd */
{
.phys_start = 0xf2120000,
.virt_start = 0xf2120000,
.size = 0x10000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_DMA,
},
/* MemRegion: f2130000-f213ffff : ICH HD audio */
{
.phys_start = 0xf2130000,
.virt_start = 0xf2130000,
.size = 0x10000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: f2140000-f2143fff : ICH HD audio */
{
.phys_start = 0xf2140000,
.virt_start = 0xf2140000,
.size = 0x4000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: f2144000-f2147fff : 0000:00:1f.2 */
{
.phys_start = 0xf2144000,
.virt_start = 0xf2144000,
.size = 0x4000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: f2148000-f2149fff : ahci */
{
.phys_start = 0xf2148000,
.virt_start = 0xf2148000,
.size = 0x2000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: f214a000-f214afff : Intel PCH thermal driver */
{
.phys_start = 0xf214a000,
.virt_start = 0xf214a000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: f214b000-f214bfff : mei_me */
{
.phys_start = 0xf214b000,
.virt_start = 0xf214b000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: f214c000-f214c7ff : ahci */
{
.phys_start = 0xf214c000,
.virt_start = 0xf214c000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: f214d000-f214d0ff : 0000:00:1f.4 */
{
.phys_start = 0xf214d000,
.virt_start = 0xf214d000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* 30 MemRegion: f214e000-f214e0ff : ahci */
{
.phys_start = 0xf214e000,
.virt_start = 0xf214e000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: f7fe0000-f7ffffff : pnp 00:0a */
{
.phys_start = 0xf7fe0000,
.virt_start = 0xf7fe0000,
.size = 0x20000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: fd000000-fdabffff : pnp 00:00 */
{
.phys_start = 0xfd000000,
.virt_start = 0xfd000000,
.size = 0xac0000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: fdac0000-fdacffff : pnp 00:09 */
{
.phys_start = 0xfdac0000,
.virt_start = 0xfdac0000,
.size = 0x10000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: fdad0000-fdadffff : pnp 00:00 */
{
.phys_start = 0xfdad0000,
.virt_start = 0xfdad0000,
.size = 0x10000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* 35 MemRegion: fdae0000-fdaeffff : pnp 00:09 */
{
.phys_start = 0xfdae0000,
.virt_start = 0xfdae0000,
.size = 0x10000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: fdaf0000-fdafffff : pnp 00:09 */
{
.phys_start = 0xfdaf0000,
.virt_start = 0xfdaf0000,
.size = 0x10000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: fdb00000-fdffffff : pnp 00:00 */
{
.phys_start = 0xfdb00000,
.virt_start = 0xfdb00000,
.size = 0x500000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: fddc1000-fddcffff : Custom */
// {
// .phys_start = 0xfddc1000,
// .virt_start = 0xfddc1000,
// .size = 0x10000,
// .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
// },
/* MemRegion: fe036000-fe03bfff : pnp 00:00 */
{
.phys_start = 0xfe036000,
.virt_start = 0xfe036000,
.size = 0x6000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: fe03d000-fe3fffff : pnp 00:00 */
{
.phys_start = 0xfe03d000,
.virt_start = 0xfe03d000,
.size = 0x3c3000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* 40 MemRegion: fe410000-fe7fffff : pnp 00:00 */
{
.phys_start = 0xfe410000,
.virt_start = 0xfe410000,
.size = 0x3f0000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: feb00000-febfffff : pnp 00:08 */
{
.phys_start = 0xfeb00000,
.virt_start = 0xfeb00000,
.size = 0x100000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: fed00000-fed003ff : PNP0103:00 */
{
.phys_start = 0xfed00000,
.virt_start = 0xfed00000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: fed10000-fed13fff : pnp 00:08 */
{
.phys_start = 0xfed10000,
.virt_start = 0xfed10000,
.size = 0x4000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: fed18000-fed18fff : pnp 00:0a */
{
.phys_start = 0xfed18000,
.virt_start = 0xfed18000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* 45 MemRegion: fed19000-fed19fff : pnp 00:0a */
{
.phys_start = 0xfed19000,
.virt_start = 0xfed19000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: fed20000-fed3ffff : pnp 00:0a */
{
.phys_start = 0xfed20000,
.virt_start = 0xfed20000,
.size = 0x20000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: fed45000-fed8ffff : pnp 00:0a */
{
.phys_start = 0xfed45000,
.virt_start = 0xfed45000,
.size = 0x4b000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: ff000000-ffffffff : pnp 00:0a */
{
.phys_start = 0xff000000,
.virt_start = 0xff000000,
.size = 0x1000000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* MemRegion: 100000000-1217fffff : System RAM */
{
.phys_start = 0x100000000,
.virt_start = 0x100000000,
.size = 0x21800000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* 50 MemRegion: 121800000-123ffffff : Kernel */
{
.phys_start = 0x121800000,
.virt_start = 0x121800000,
.size = 0x2800000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: 124000000-4527fffff : System RAM */
{
.phys_start = 0x124000000,
.virt_start = 0x124000000,
.size = 0x32e800000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: 452800000-453ffffff : RAM buffer */
{
.phys_start = 0x452800000,
.virt_start = 0x452800000,
.size = 0x1800000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: 9f41f000-9f43efff : ACPI DMAR RMRR */
/* PCI device: 00:14.0 */
{
.phys_start = 0x9f41f000,
.virt_start = 0x9f41f000,
.size = 0x20000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* MemRegion: aa000000-ac7fffff : ACPI DMAR RMRR */
/* PCI device: 00:02.0 */
{
.phys_start = 0xaa000000,
.virt_start = 0xaa000000,
.size = 0x2800000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
},
/* 55 MemRegion: 3a710000-3f1fffff : JAILHOUSE Inmate Memoy */
{
.phys_start = 0x3A71F000,
.virt_start = 0x3A71F000,
.size = 0x4AE1000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* 56-59 IVSHMEM networking */
/* 3a600000 - 3a6fffff*/
JAILHOUSE_SHMEM_NET_REGIONS(0x3a600000, 0),
/* 60 3a700000 - 0x3a701000 IVSHMEM demo*/
{
.phys_start = 0x3a700000,
.virt_start = 0x3a700000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ,
},
/* 61 3a701000 - 0x3a70a000*/
{
.phys_start = 0x3a701000,
.virt_start = 0x3a701000,
.size = 0x9000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* 62 3a70a000 - 0x3a70c000*/
{
.phys_start = 0x3a70a000,
.virt_start = 0x3a70a000,
.size = 0x2000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
/* 63 3a70c000 - 3a70e000 */
{
.phys_start = 0x3a70c000,
.virt_start = 0x3a70c000,
.size = 0x2000,
.flags = JAILHOUSE_MEM_READ,
},
/* IVSHMEM shared memory region (virtio-con back-end) */
{
.phys_start = 0x3a70e000,
.virt_start = 0x3a70e000,
.size = 0x1000,
.flags = JAILHOUSE_MEM_READ,
},
{
.phys_start = 0x3a70f000,
.virt_start = 0x3a70f000,
.size = 0xf000,
.flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
},
},
.irqchips = {
/* IOAPIC 2, GSI base 0 */
{
.address = 0xfec00000,
.id = 0x1f0f8,
.pin_bitmap = {
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
},
},
},
.pio_regions = {
/* Port I/O: 0000-001f : dma1 */
PIO_RANGE(0x0, 0x20),
/* Port I/O: 0020-0021 : pic1 */
PIO_RANGE(0x20, 0x2),
/* Port I/O: 0040-0043 : timer0 */
PIO_RANGE(0x40, 0x4),
/* Port I/O: 0050-0053 : timer1 */
PIO_RANGE(0x50, 0x4),
/* Port I/O: 0060-0060 : keyboard */
PIO_RANGE(0x60, 0x1),
/* Port I/O: 0061-0061 : PNP0800:00 */
PIO_RANGE(0x61, 0x1),
/* Port I/O: 0062-0062 : EC data */
PIO_RANGE(0x62, 0x1),
/* Port I/O: 0064-0064 : keyboard */
PIO_RANGE(0x64, 0x1),
/* Port I/O: 0066-0066 : EC cmd */
PIO_RANGE(0x66, 0x1),
/* Port I/O: 0070-0077 : rtc0 */
PIO_RANGE(0x70, 0x8),
/* Port I/O: 0080-008f : dma page reg */
PIO_RANGE(0x80, 0x10),
/* Port I/O: 00a0-00a1 : pic2 */
PIO_RANGE(0xa0, 0x2),
/* Port I/O: 00c0-00df : power */
PIO_RANGE(0xb2, 0x1),
PIO_RANGE(0xe0, 0x20),
/* Port I/O: 00c0-00df : dma2 */
PIO_RANGE(0xc0, 0x20),
/* Port I/O: 00f0-00f0 : PNP0C04:00 */
PIO_RANGE(0xf0, 0x1),
PIO_RANGE(0x3c0, 0x10),
/* Port I/O: 03f8-03ff : serial */
PIO_RANGE(0x3f8, 0x8),
/* Port I/O: 0400-041f : iTCO_wdt */
PIO_RANGE(0x400, 0x20),
/* Port I/O: 0680-069f : pnp 00:02 */
PIO_RANGE(0x680, 0x20),
/* Port I/O: 0800-087f : pnp 00:08 */
PIO_RANGE(0x800, 0x80),
/* Port I/O: 0880-08ff : pnp 00:08 */
PIO_RANGE(0x880, 0x80),
/* Port I/O: 0900-097f : pnp 00:08 */
PIO_RANGE(0x900, 0x80),
/* Port I/O: 0980-09ff : pnp 00:08 */
PIO_RANGE(0x980, 0x80),
/* Port I/O: 0a00-0a7f : pnp 00:08 */
PIO_RANGE(0xa00, 0x80),
/* Port I/O: 0a80-0aff : pnp 00:08 */
PIO_RANGE(0xa80, 0x80),
/* Port I/O: 0b00-0b7f : pnp 00:08 */
PIO_RANGE(0xb00, 0x80),
/* Port I/O: 0b80-0bff : pnp 00:08 */
PIO_RANGE(0xb80, 0x80),
/* 15e0-15ef : pnp 00:08*/
PIO_RANGE(0x15e0, 0x10),
/* 164e-164f : pnp 00:02*/
PIO_RANGE(0x164e, 0x2),
/* 1800-1803 : ACPI PM1a_EVT_BL*/
PIO_RANGE(0x1800, 0x4),
/* 1804-1805 : ACPI PM1a_CNT_BL*/
PIO_RANGE(0x1804, 0x2),
/* 1808-180b : ACPI PM_TM*/
PIO_RANGE(0x1808, 0xb),
/* 1810-1815 : ACPI CPU throttl*/
PIO_RANGE(0x1810, 0x6),
/* 1830-1833 : iTCO_wdt */
PIO_RANGE(0x1830, 0x4),
/* 1850-1850 : ACPI PM2_CNT_BL*/
PIO_RANGE(0x1880, 0x20),
/* 1854-1857 : pnp 00:05*/
PIO_RANGE(0x1880, 0x20),
/* PIO_RANGE(1880-189f) */
PIO_RANGE(0x1880, 0x20),
/* Port I/O: d000-d07f : 0000:02:00.0 */
PIO_RANGE(0xd000, 0x80),
/* Port I/O: e000-e03f : 0000:00:02.0 */
PIO_RANGE(0xe000, 0x40),
/* Port I/O: e060-e07f : 0000:00:17.0 */
PIO_RANGE(0xe060, 0x20),
/* Port I/O: e080-e087 : 0000:00:17.0 */
PIO_RANGE(0xe080, 0x8),
/* Port I/O: e088-e08b : 0000:00:17.0 */
PIO_RANGE(0xe088, 0x4),
/* Port I/O: efa0-efbf : 0000:00:1f.4 */
PIO_RANGE(0xefa0, 0x20),
},
.pci_devices = {
/* PCIDevice: 00:00.0 */
{
.type = JAILHOUSE_PCI_TYPE_BRIDGE,
.iommu = 1,
.domain = 0x0,
.bdf = 0x0,
.bar_mask = {
0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
.caps_start = 0,
.num_caps = 3,
.num_msi_vectors = 0,
.msi_64bits = 0,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:01.0 */
{
.type = JAILHOUSE_PCI_TYPE_BRIDGE,
.iommu = 1,
.domain = 0x0,
.bdf = 0x8,
.bar_mask = {
0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
.caps_start = 1,
.num_caps = 7+2,
.num_msi_vectors = 1,
.msi_64bits = 0,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:01.2 */
{
.type = JAILHOUSE_PCI_TYPE_BRIDGE,
.iommu = 1,
.domain = 0x0,
.bdf = 0xa,
.bar_mask = {
0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
.caps_start = 1+1,
.num_caps = 7,
.num_msi_vectors = 1,
.msi_64bits = 0,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:02.0 */
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 0,
.domain = 0x0,
.bdf = 0x10,
.bar_mask = {
0xff000000, 0xffffffff, 0xf0000000,
0xffffffff, 0xffffffc0, 0x00000000,
},
.caps_start = 8+2,
.num_caps = 7,
.num_msi_vectors = 1,
.msi_64bits = 0,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:14.0 */
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 1,
.domain = 0x0,
.bdf = 0xa0,
.bar_mask = {
0xffff0000, 0xffffffff, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
.caps_start = 15+2,
.num_caps = 2,
.num_msi_vectors = 8,
.msi_64bits = 1,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:14.2 */
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 1,
.domain = 0x0,
.bdf = 0xa2,
.bar_mask = {
0xfffff000, 0xffffffff, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
.caps_start = 17+2,
.num_caps = 2,
.num_msi_vectors = 1,
.msi_64bits = 0,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:16.0 */
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 1,
.domain = 0x0,
.bdf = 0xb0,
.bar_mask = {
0xfffff000, 0xffffffff, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
.caps_start = 19+2,
.num_caps = 2,
.num_msi_vectors = 1,
.msi_64bits = 1,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:17.0 */
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 1,
.domain = 0x0,
.bdf = 0xb8,
.bar_mask = {
0xffffe000, 0xffffff00, 0xfffffff8,
0xfffffffc, 0xffffffe0, 0xfffff800,
},
.caps_start = 21+2,
.num_caps = 3,
.num_msi_vectors = 1,
.msi_64bits = 0,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:1c.0 */
{
.type = JAILHOUSE_PCI_TYPE_BRIDGE,
.iommu = 1,
.domain = 0x0,
.bdf = 0xe0,
.bar_mask = {
0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
.caps_start = 24+2,
.num_caps = 8,
.num_msi_vectors = 1,
.msi_64bits = 0,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:1f.0 */
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 1,
.domain = 0x0,
.bdf = 0xf8,
.bar_mask = {
0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
.caps_start = 0,
.num_caps = 0,
.num_msi_vectors = 0,
.msi_64bits = 0,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:1f.2 */
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 1,
.domain = 0x0,
.bdf = 0xfa,
.bar_mask = {
0xffffc000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
.caps_start = 0,
.num_caps = 0,
.num_msi_vectors = 0,
.msi_64bits = 0,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:1f.3 */
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 1,
.domain = 0x0,
.bdf = 0xfb,
.bar_mask = {
0xffffc000, 0xffffffff, 0x00000000,
0x00000000, 0xffff0000, 0xffffffff,
},
.caps_start = 32+2,
.num_caps = 2,
.num_msi_vectors = 1,
.msi_64bits = 1,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:1f.4 */
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 1,
.domain = 0x0,
.bdf = 0xfc,
.bar_mask = {
0xffffff00, 0xffffffff, 0x00000000,
0x00000000, 0xffffffe0, 0x00000000,
},
.caps_start = 0,
.num_caps = 0,
.num_msi_vectors = 0,
.msi_64bits = 0,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 00:1f.6 */
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 1,
.domain = 0x0,
.bdf = 0xfe,
.bar_mask = {
0xfffe0000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
.caps_start = 34+2,
.num_caps = 3,
.num_msi_vectors = 1,
.msi_64bits = 1,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 02:00.0 */
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 1,
.domain = 0x0,
.bdf = 0x200,
.bar_mask = {
0xff000000, 0xf0000000, 0xffffffff,
0xfe000000, 0xffffffff, 0xffffff80,
},
.caps_start = 37+2,
.num_caps = 9,
.num_msi_vectors = 1,
.msi_64bits = 1,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
/* PCIDevice: 03:00.0 */
{
.type = JAILHOUSE_PCI_TYPE_DEVICE,
.iommu = 1,
.domain = 0x0,
.bdf = 0x300,
.bar_mask = {
0xffffe000, 0xffffffff, 0x00000000,
0x00000000, 0x00000000, 0x00000000,
},
.caps_start = 46+2,
.num_caps = 7,
.num_msi_vectors = 1,
.msi_64bits = 1,
.msi_maskable = 0,
.num_msix_vectors = 0,
.msix_region_size = 0x0,
.msix_address = 0x0,
},
{ // IVSHMEM (networking)
.type = JAILHOUSE_PCI_TYPE_IVSHMEM,
.iommu = 1,
.domain = 0x0000,
.bdf = 0x0d << 3,
.bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_MSIX,
.num_msix_vectors = 2,
.shmem_regions_start = 56,
.shmem_dev_id = 0,
.shmem_peers = 2,
.shmem_protocol = JAILHOUSE_SHMEM_PROTO_VETH,
},
{ //IVSHMEM (demo) 16
.type = JAILHOUSE_PCI_TYPE_IVSHMEM,
.iommu = 1,
.domain = 0x0000,
.bdf = 0x0e << 3,
.bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_MSIX,
.num_msix_vectors = 16,
.shmem_regions_start = 60,
.shmem_dev_id = 0,
.shmem_peers = 2,
.shmem_protocol = JAILHOUSE_SHMEM_PROTO_UNDEFINED,
},
/*
{ // IVSHMEM (virtio-con back-end)
.type = JAILHOUSE_PCI_TYPE_IVSHMEM,
//.iommu = 1,
.domain = 0x0,
.bdf = 0x0c << 3,
.bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_MSIX,
.num_msix_vectors = 3,
.shmem_regions_start = 64,
.shmem_dev_id = 0,
.shmem_peers = 2,
.shmem_protocol = JAILHOUSE_SHMEM_PROTO_VIRTIO_BACK +
VIRTIO_DEV_CONSOLE,
},*/
},
.pci_caps = {
/* PCIDevice: 00:00.0 */
{
.id = PCI_CAP_ID_VNDR,
.start = 0xe0,
.len = 0x2,
.flags = 0,
},
{
.id = PCI_CAP_ID_VNDR,
.start = 0x20,
.len = 0x10,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
/* PCIDevice: 00:01.0 */
/* PCIDevice: 00:01.2 */
{
.id = PCI_CAP_ID_SSVID,
.start = 0x88,
.len = 0x10,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_PM,
.start = 0x80,
.len = 0x8,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_MSI,
.start = 0x90,
.len = 0xa,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_EXP,
.start = 0xa0,
.len = 0x3c,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_EXT_CAP_ID_VC | JAILHOUSE_PCI_EXT_CAP,
.start = 0x100,
.len = 0x20,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_EXT_CAP_ID_RCLD | JAILHOUSE_PCI_EXT_CAP,
.start = 0x140,
.len = 0x4,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_SECPCI | JAILHOUSE_PCI_EXT_CAP,
.start = 0xd94,
.len = 0x10,
.flags = 0,
},
{
.id = PCI_CAP_ID_VNDR,
.start = 0x240,
.len = 0x10,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
/* PCIDevice: 00:02.0 */
{
.id = PCI_CAP_ID_VNDR,
.start = 0x40,
.len = 0x2,
.flags = 0,
},
{
.id = PCI_CAP_ID_EXP,
.start = 0x70,
.len = 0x3c,
.flags = 0,
},
{
.id = PCI_CAP_ID_MSI,
.start = 0xac,
.len = 0xa,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_PM,
.start = 0xd0,
.len = 0x20,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_EXT_CAP_ID_PASID | JAILHOUSE_PCI_EXT_CAP,
.start = 0x100,
.len = 0x8,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_ATS | JAILHOUSE_PCI_EXT_CAP,
.start = 0x200,
.len = 0x4,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_PRI | JAILHOUSE_PCI_EXT_CAP,
.start = 0x300,
.len = 0x4,
.flags = 0,
},
/* PCIDevice: 00:14.0 */
{
.id = PCI_CAP_ID_PM,
.start = 0x70,
.len = 0x8,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_MSI,
.start = 0x80,
.len = 0xe,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
/* PCIDevice: 00:14.2 */
{
.id = PCI_CAP_ID_PM,
.start = 0x50,
.len = 0x8,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_MSI,
.start = 0x80,
.len = 0xa,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
/* PCIDevice: 00:16.0 */
{
.id = PCI_CAP_ID_PM,
.start = 0x50,
.len = 0x8,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_MSI,
.start = 0x8c,
.len = 0xe,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
/* PCIDevice: 00:17.0 */
{
.id = PCI_CAP_ID_MSI,
.start = 0x80,
.len = 0xa,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_PM,
.start = 0x70,
.len = 0x8,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_SATA,
.start = 0xa8,
.len = 0x2,
.flags = 0,
},
/* PCIDevice: 00:1c.0 */
{
.id = PCI_CAP_ID_EXP,
.start = 0x40,
.len = 0x3c,
.flags = 0,
},
{
.id = PCI_CAP_ID_MSI,
.start = 0x80,
.len = 0xa,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_SSVID,
.start = 0x90,
.len = 0x2,
.flags = 0,
},
{
.id = PCI_CAP_ID_PM,
.start = 0xa0,
.len = 0x8,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_EXT_CAP_ID_ERR | JAILHOUSE_PCI_EXT_CAP,
.start = 0x100,
.len = 0x40,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_ACS | JAILHOUSE_PCI_EXT_CAP,
.start = 0x140,
.len = 0x8,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_L1SS | JAILHOUSE_PCI_EXT_CAP,
.start = 0x200,
.len = 0x4,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_SECPCI | JAILHOUSE_PCI_EXT_CAP,
.start = 0x220,
.len = 0x10,
.flags = 0,
},
/* PCIDevice: 00:1f.3 */
{
.id = PCI_CAP_ID_PM,
.start = 0x50,
.len = 0x8,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_MSI,
.start = 0x60,
.len = 0xe,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
/* PCIDevice: 00:1f.6 */
{
.id = PCI_CAP_ID_PM,
.start = 0xc8,
.len = 0x8,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_MSI,
.start = 0xd0,
.len = 0xe,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_AF,
.start = 0xe0,
.len = 0x2,
.flags = 0,
},
/* PCIDevice: 02:00.0 */
{
.id = PCI_CAP_ID_PM,
.start = 0x60,
.len = 0x8,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_MSI,
.start = 0x68,
.len = 0xe,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_EXP,
.start = 0x78,
.len = 0x3c,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_VC | JAILHOUSE_PCI_EXT_CAP,
.start = 0x100,
.len = 0x10,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_LTR | JAILHOUSE_PCI_EXT_CAP,
.start = 0x250,
.len = 0x8,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_L1SS | JAILHOUSE_PCI_EXT_CAP,
.start = 0x258,
.len = 0x4,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_PWR | JAILHOUSE_PCI_EXT_CAP,
.start = 0x128,
.len = 0x10,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_VNDR | JAILHOUSE_PCI_EXT_CAP,
.start = 0x600,
.len = 0x28,
.flags = 0,
},
{
.id = PCI_EXT_CAP_ID_SECPCI | JAILHOUSE_PCI_EXT_CAP,
.start = 0x900,
.len = 0x10,
.flags = 0,
},
/* PCIDevice: 03:00.0 */
{
.id = PCI_CAP_ID_PM,
.start = 0xc8,
.len = 0x8,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_MSI,
.start = 0xd0,
.len = 0xe,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_CAP_ID_EXP,
.start = 0x40,
.len = 0x3c,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_EXT_CAP_ID_ERR | JAILHOUSE_PCI_EXT_CAP,
.start = 0x100,
.len = 0x40,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_EXT_CAP_ID_DSN | JAILHOUSE_PCI_EXT_CAP,
.start = 0x140,
.len = 0xc,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_EXT_CAP_ID_LTR | JAILHOUSE_PCI_EXT_CAP,
.start = 0x14c,
.len = 0x8,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
{
.id = PCI_EXT_CAP_ID_L1SS | JAILHOUSE_PCI_EXT_CAP,
.start = 0x154,
.len = 0x4,
.flags = JAILHOUSE_PCICAPS_WRITE,
},
},
};