cpufreq governors : schedutil missing - resource-governor

In my linux machine, only only performance and powersave are avaliable. How I can enable schedutil?
available cpufreq governors: performance, powersave

Related

iMX6: MSI-X not working in Linux PCIe device driver

I'm trying to get MSI-X working on an iMX6 (Freescale/NXP/Qualcomm) CPU in Linux v4.1 for a PCIe character device driver. Whenever I call either pci_enable_msix() or pci_enable_msix_range() or pci_enable_msix_exact() I get an EINVAL value returned. I do have the CONFIG_PCI_MSI option selected in the kernel configuration and I am also able to get single MSI working with pci_enable_msi(), but I cannot get multiple MSI working either.
I have tested my driver code on an Intel i7 running kernel v3 with the same PCIe hardware attached and I was able to get MSI-X working without any problems so I know my code is correctly written and the hardware is correctly functioning.
When running on the iMX6 I can use lspci -v to view that the hardware has MSI-X capabilities and see the number of IRQs it allows. I can even get the same correct number in my driver when calling pci_msix_vec_count().Questions
Are there any other kernel configuration flags I need to set?
Is there anything specific to the iMX6 CPU I need to consider?
Does anyone have any experience with the iMX6 and either MSI-X or
multiple MSI?

Is WinDbg's vertarget command always accurate?

I wonder because running it on a client's minidump it reports a different Windows version than the client repeatedly told me she had, and the version I'm being reported happens to be exactly the same version I'm running WinDbg on.
So I wonder, can vertarget always be trusted (and clients not) or the information it relies on may be absent with some dump generation options and when it is it reports the version WinDbg is currently running on, or maybe just some default that happens to coincide with my OS version?
I'm using WinDbg 6.12.
In all my cases so far, vertarget has been correct and the customer/client made a mistake - and vertarget is one of the commands I use for every dump, exactly for the purpose of checking if the dump contains what I need.
But perhaps, things can potentially go wrong here as well, so let's evaluate some options:
vertarget also reports debug session time and system uptime. Do those also match your system? Reboot your system in order to get a low system uptime and check again. Is it still your PC's uptime?
vertarget also reports the number of CPUs. Does that number match your number?
Get a virtual machine which does not have your OS, e.g. one from Modern.IE (Microsoft). Copy WinDbg and the dump to the VM and check the output of vertarget again.
WinDbg 6.12 is a bit old. Do newer versions (6.2.9200 / 6.3.9600 or even 10.0) provide the same information or was there a bug fixed already?
And even check some other information:
Is it a dump of the correct application? Use | (pipe)
Is it a dump of the version you are expecting? Use lm vm <exename>
Does it have the flags which can be expected for the method used for taking the dump? Use .dumpdebug.
Other than that I observe (not representative) that many client OS version dumps (Windows 7, 8, 8.1) have all latest service packs installed, while administrators seem to follow the "never change a running system" approach for server OS (Windows Server 2012, R2). So it might just be a coincident.

remote debug with xdebug on centos 6.4

I try remote debug php application with phpstorm. I use centos 6.4, php5.3 and apache 2.2 on vmware virtual machine, and phpstorm with firefox on real ubuntu.
xdebug is really installed:
Installed Packages
Name : php-pecl-xdebug
Arch : i686
Version : 2.1.4
Release : 1.el6
Size : 580 k
Repo : installed
From repo : epel
Summary : PECL package for debugging PHP scripts
URL : http://pecl.php.net/package/xdebug
License : PHP
And phpinfo confirm this too:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.1.4, Copyright (c) 2002-2012, by Derick Rethans
When i run script (simple hello world) from console via ssh my script is stopped, i get connection to mu ide from xdebug and xdebug write info in own log.
But when i run script from browsen - is has no effect, even in xdebug log.
I try use firefox extension to start debug session, i try use xdebug.remote_autostart=1 option, tru turn off iptables in centos, but no effect too.
What i do wrong?
xdebug config:
; Enable xdebug extension module
zend_extension=/usr/lib/php/modules/xdebug.so
;xdebug.remote_host=10.0.0.1
xdebug.remote_connect_back=1
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
;xdebug.remote_mode=req
;xdebug.profiler_enable=1
;xdebug.profiler_enable_trigger=1
;xdebug.remote_autostart=1
;xdebug.idekey=PHPSTORM
xdebug.remote_log="/tmp/xdebug.log"
Oh my god, problem solved. It's all selinux.
setsebool httpd_can_network_connect=1, nttpd restart - and phpstorm get connection from xdebug.
etc/selinux/config change
This file controls the state of SELinux on the system.
SELINUX= can take one of these three values:
enforcing - SELinux security policy is enforced.
permissive - SELinux prints warnings instead of enforcing.
disabled - No SELinux policy is loaded.
SELINUX=enforcing
SELINUXTYPE= can take one of three two values:
targeted - Targeted processes are protected,
minimum - Modification of targeted policy. Only selected processes are
protected.
mls - Multi Level Security protection.
SELINUXTYPE=targeted
to
This file controls the state of SELinux on the system.
SELINUX= can take one of these three values:
enforcing - SELinux security policy is enforced.
permissive - SELinux prints warnings instead of enforcing.
disabled - No SELinux policy is loaded.
SELINUX=disabled
SELINUXTYPE= can take one of three two values:
targeted - Targeted processes are protected,
minimum - Modification of targeted policy. Only selected processes are
protected.
mls - Multi Level Security protection.
SELINUXTYPE=targeted

Virtualization CPU Emulation

I have a question about CPU virtualization from a virtual machine. I am not able to understand the difference between on-the-fly to native code translation and trap-and-emulate translation.
As far as I understand, in the first case suppose I emulate binary code from a different platform the code is converted to the equivalent x86 instruction if I have an x86 CPU. Now in the trap-and-emulate method the virtual machine receives the ISA call from the guest OS and translates it to the equivalent ISA call for the host OS.
Why do we need to translate from ISA to ISA? Suppose I am running an Ubuntu guest on a Windows host. The Ubuntu ISA call is different from the Windows ISA call? I understand that the Guest is not able to access System ISA on the host, only the monitor can do that. But why there is a need of conversion to the Host ISA? The ISA depends also on the operating system?
"On-the-fly to native" translation (often called JIT compilation/translation) is used when running code from one ISA on another ISA, such as running M68K code on an x86 CPU.
It's in no way virtualization, but emulation.
Trap-and-emulate is a way to run "privileged" code in an unprivileged environment (example: running a kernel as an application).
The way it works is that you start executing the privileged code, and once it tries to execute a privileged instruction (lidt in x86 for example), the host OS will issue a trap. In the handler for that trap, you could emulate that specific privileged instruction, and then let the guest kernel continue executing.
The advantage of this is that you will reach close to native speeds for CPU emulation.
However, just emulating the ISA is only a "small" part of emulating a complete system. Emulating/virtualization of the MMU is much more complex to get right, and to get running fast.

Start service in kernel mode (Vista)

I'd like to start service before user mode is loaded (in kernel mode).
The reason is I wanna run several system applications(asm code to write data to BIOS) that are not allowed in user mode (privileges problem).
That's why I got an idea: 1. Write windows service 2. Start and run it in kernel mode
Is it possible?
Are there any other ways to solve the problem?
I don't usually use Vista (use linux instead), that's why I'm asking.
Windows services are user-mode applications. To run in kernel-mode you should write a driver. (So-called "legacy" driver will be enough, see Driver Development Part 1: Introduction to Drivers).