X86 IO ports and Mmio
The I/O is a channel for CPU and peripheral communication, mainly divided into two types, port I/O, and Mmio (Memory mapping I/O). The is the I/O port that we often call, and it should actually be called the I/O address space. The is accessed through the In/out directive for the x86 schema. The PC architecture has a total of 65,536 8bit I/O ports, consisting of the 64ki
Release date:Updated on:
Affected Systems:XenSource Xen 4.xXenSource Xen 3.xDescription:--------------------------------------------------------------------------------Bugtraq id: 54691
Xen is an open-source Virtual Machine monitor developed by
, providing 4 GB address space for the system, that is, up to 4 GB memory can be installed. Although the 4 GB memory can be installed, the 4 GB memory space cannot all be allocated to the memory, because from the top address of the 4 GB space (FFFF_FFFFh) at the beginning, mb-1gb of address space needs to be allocated to other physical memory on the motherboard. We can see that 4 GB address space can be divided into two parts, 0 MB ~ The physical memory top address is allocated to the physical m
, because from the top address of the 4 GB space (ffff_ffffh) at the beginning, mb-1gb of address space needs to be allocated to other physical memory on the motherboard.
We can see that 4 GB address space can be divided into two parts, 0 MB ~ The physical memory top address is allocated to the physical memory installed on the motherboard, 4 GB to the physical memory top address is allocated to the BIOS (ROM) and PCI/PCI-E device memory. Since these memories are basically used for system input
to solve this kind of problem is to use the perf process to sample, and then generate a flame diagram, because it is a good idea to first see where the CPU is consumed.Perf record-a-g-p 36256 sleep 20To generate a flame diagram:Win2008-badIt is clear that the majority of CPU consumption is KVM operation, the most important consumption is vmx_handle_exit. (The real flame diagram is a vector diagram, which is easy to check with a browser). There are two main causes of Vmx_handle_exit:• Access io
(order:4, 65536 bytes)??TCP established hash table entries:65536 (order:7, 524288 bytes)TCP bind hash Table entries:65536 (order:6, 262144 bytes)Tcp:hash tables configured (established 65536 bind 65536)TCP Reno RegisteredNet:registered Protocol Family 1Checking if image is initramfs...it isn ' t (no cpio magic); Looks like an initrdFreeing Initrd memory:22757k freedJFFS2 version 2.2. (NAND) (SUMMARY)? 2001-2006 Red Hat, Inc.Msgmni have been set to 1009IO Scheduler NoOp registered (default)Seria
The topic of this article:Overview of IO VirtualizationDevice Discovery access interception device analog device sharingSoftware-based IO virtualizationIO virtualization based on front-end backendHardware-based IO virtualizationOverviewFrom the processor's point of view, peripherals are accessed through a set of I/O resources (port I/O or Mmio), so the associated virtualization of the device is called I/O virtualization. The idea is that VMM intercept
be readable.-Writing must be idempotent, ordering-independent and access-size-independent.-Writing back a read value must be safe and side-effect-free.-Any side effects due to a write can be delayed until the data is explicitlyFlushed by software.
Anything else will lead to data loss (read: Upload uption) or other "very weird ",Unpredictable things will happen.Regular memory is cache coherent, and DMA (with a few very special casesException that are beyond the scope of this document) is cache c
command is not updated after execution boot.img
Print the log In search Earlyprink/earlycon/bootconsoles, see a print
Found in the program: The reason is only cmdline+ earlyprintk, but not to Earlyprink assignment
if (!BUF) {
Pr_warning ("No earlyprintk arguments passed.\n");
return 0;
}
Kernel-parameters.txt is described in the following
earlycon= [KNL] Output early console device and options. Uart[8250],io,Uart[8250],mmio,Uart[8250],mmi
The qemu memory API simulates the qemu memory, I/O bus, and the corresponding controller. It mainly includes the following simulation parts:• Regular memory• Io ing memory (mmio)• Memory controller (dynamically ing physical memory to different virtual address spaces)
The qemu memory model provides the following functions:• Tracks memory changes on the target machine• Coalesced memory)• Create ioeventfd regions for KVMThe memory of qemu is organized in
accessed with the address, pointer. However, for the Linux kernel, it may be used for different CPUs, so it must be considered in both ways, so it takes a new approach, the I/O map-based or memory-mapped I/O port is known as an I/O region (I/O regions), regardless of which way you use, Must first apply IO area: Request_resource (), release it at the end: Release_resource ().Io region is an IO resource, so it can be described using the resource structure type.There are 2 ways to access the IO po
(MMIO) GAP specificationLinux-based device manufacturers use MMIO gap (also known as PCI Hole) to allocate available physical memory between the Just enough Operating System (JeOS) used to boot the device and the actual software infrastructure of the drive device. Inability to configure MMIO gap causes JeOS to run out of all available memory, making the device's
driver usbfsusbcore:registered new interface driver Hubusbcore:regist Ered new device driver Usbromfs MTD (C) Red Hat, Inc.io Scheduler NoOp Registeredio Scheduler deadline Registeredio s Cheduler CFQ registered (default) Start plist testend plist tests3c-fb s3c-fb:window 0:fbserial:8250/16550 driver, 4 por TS, IRQ sharing disableds3c6400-uart.0:ttysac0 at MMIO 0x7f005000 (IRQ = in) is a s3c6400/10console [ttySAC0] Enableds3c6 400-uart.1:ttysac1 at
layer losts interrups, and don ' t know why!!!+if (Pin_val1 = = 0 | | ntries > Nr_tries)+return irq_handled;+ #undef nr_tires+ #endif 6, if the boot detection succeeds, the add port succeeds and will print: Serial8250.11:ttys0 at MMIO 0x30000000 (IRQ = $) is a 16550aserial8250.11: TtyS1 at MMIO 0x30000008 (IRQ = up) is a 16550aserial8250.11:ttys2 at MMIO 0x30000
because DMA uses physical addresses to access memory, does not go through the MMU, and requires a contiguous buffer, so in order to provide a physically contiguous buffer, a region must be specifically partitioned from the physical address space for DMA.
16m-896m
Zone_normal, the physical page of this area is the kernel direct mapping, that is, kernel space commonly used data such as kernel code, GDT, IDT, PGD, Mem_map array and so on zone_normal, in order to kernel the virt
6550 driver $ revision: 1.90 $4 ports, IRQ sharing enableds3c2440-uart.0: s3c2410_serial0 at mmio 0x50000000 (IRQ = 70) is a S3C2440s3c2440-uart.1: s3c2410_serial1 at mmio 0x50004000 (IRQ = 73) is a S3C2440s3c2440-uart.2: maid at mmio 0x50008000 (IRQ = 76) is a s3c2440ramdisk driver initialized: 16 RAM disks of 4096 K size 1024 blocksizeloop: module loadeddm9000
Precision)Ms gmni has been set to 120Io scheduler Noop registeredIo scheduler anticipatory registered (default)Io scheduler deadline registeredIo scheduler CFQ registeredConsole: switching to color frame buffer device 30x40Fb0: s3c2410fb Frame Buffer DeviceS3c2440-uart.0: s3c2410_serial0 at mmio 0x50000000 (IRQ = 70) is a S3C2440S3c2440-uart.1: s3c2410_serial1 at mmio 0x50004000 (IRQ = 73) is a S3C2440S3c2
executed (except for invlpg, load, and changing the related bit of Cr4 will also cause TLBFlush ). Therefore, the virtual machine only needs to intercept these commands and update the corresponding address translation relationship to vtlb. For example, if the guest OS needs to flush the VA in TLB as 0x11111111, what hypervisor needs to do is to find the physical address PA corresponding to 0x11111111 In the guest OS page table, then, convert the created p2m table (Pa => Ma) to Ma, and fill in v
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.