Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ipipe
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • xenomaixenomai
  • ipipe
  • Repository
Switch branch/tag
  • ipipe
  • arch
  • x86
  • kvm
  • x86.c
Find file BlameHistoryPermalink
  • Guo Chao's avatar
    KVM: x86: fix return value of kvm_vm_ioctl_set_tss_addr() · 951179ce
    Guo Chao authored Nov 02, 2012
    
    
    Return value of this function will be that of ioctl().
    
    #include <stdio.h>
    #include <linux/kvm.h>
    
    int main () {
    	int fd;
    	fd = open ("/dev/kvm", 0);
    	fd = ioctl (fd, KVM_CREATE_VM, 0);
    	ioctl (fd, KVM_SET_TSS_ADDR, 0xfffff000);
    	perror ("");
    	return 0;
    }
    
    Output is "Operation not permitted". That's not what
    we want.
    
    Return -EINVAL in this case.
    
    Signed-off-by: default avatarGuo Chao <yan@linux.vnet.ibm.com>
    Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
    951179ce

Imprint & Privacy Policy