Skip to content

Kernel patch fails on OpenBSD 6.5 #1

@Xylemon

Description

@Xylemon

The kernel patch fails to apply with the latest OpenBSD release:

"6" -DX86EMU -DONEWIREVERBOSE -DMULTIPROCESSOR -DMAXUSERS=80 -D_KERNEL -MD -MP  -c /usr/src/sys/arch/amd64/amd64/vmx.c
/usr/src/sys/arch/amd64/amd64/svm.c:1114:13: error: too many arguments to
      function call, expected 0, have 1
    preempt(NULL);
    ~~~~~~~ ^~~~
/usr/src/sys/sys/_null.h:10:14: note: expanded from macro 'NULL'
#define NULL    ((void *)0)
                ^~~~~~~~~~~
/usr/src/sys/sys/proc.h:550:1: note: 'preempt' declared here
void    preempt(void);
^
1 error generated.
*** Error 1 in target 'svm.o'
/usr/src/sys/arch/amd64/amd64/vmx.c:1743:13: error: too many arguments to
      function call, expected 0, have 1
    preempt(NULL);
    ~~~~~~~ ^~~~
/usr/src/sys/sys/_null.h:10:14: note: expanded from macro 'NULL'
#define NULL    ((void *)0)
                ^~~~~~~~~~~
/usr/src/sys/sys/proc.h:550:1: note: 'preempt' declared here
void    preempt(void);
^
1 error generated.
*** Error 1 in target 'vmx.o'
*** Error 1 in /usr/src/sys/arch/amd64/compile/GENERIC.MP (Makefile:1109 'vmx.o')
*** Error 1 (Makefile:1109 'svm.o')

After fixing the preempt() call parameters in /usr/src/sys/arch/amd64/amd64/svm.c:1114 and
/usr/src/sys/arch/amd64/amd64/vmx.c:1743 I'm running into this ASM specific problem:

/usr/src/sys/arch/amd64/amd64/vmx.c:1466:17: error: invalid operand for instruction asm volatile("mov %%ss, %%bx;" ^ <inline asm>:1:80: note: instantiated into assembly here ...%rsp, %rcx;andq $0xfffffffffffffff0, %rsp;mov %cs, %dx;pushq %bx;pushq %... ^~~~ /usr/src/sys/arch/amd64/amd64/vmx.c:1466:17: error: invalid operand for instruction asm volatile("mov %%ss, %%bx;" ^ <inline asm>:1:108: note: instantiated into assembly here ...%rsp;mov %cs, %dx;pushq %bx;pushq %rcx;pushfq;pushq %dx;cli;callq *%rax;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions