to 4.12.2025 klo 0.16 Dave Voutila ([email protected]) kirjoitti:
> > Hannu Vuolasaho <[email protected]> writes: > > > ke 3.12.2025 klo 1.42 Dave Voutila ([email protected]) kirjoitti: > > > > Hannu Vuolasaho <[email protected]> writes: > > > > > > > > So this is probably something processor specific. > > > > > > I haven't started goofing around the kernel yet but if someone has some good \
> > > ideas, let me know.
> > > > I have zero familiarity with what Linux kernel Arch builds/ships in its
> > distro. Do other distros like Alpine work?
> > > > Yesterday I would have said yes, but today Alpine has made a new release and it \
> > fails for the same reason: vmd: invalid fault_type 2
> > Unfortunately it doesn't print anything. just dies. Something more for the \
> > parameter line is needed for more verbose boot.
> > > > Any chance you have an Intel-cpu system to try it on as well?

Boots with APU2 7.8 stable:  hw.model=AMD GX-412TC SOC
and with Thinkpad L450 less than month current: hw.model=Intel(R)
Core(TM) i5-5200U CPU @ 2.20GHz

Best regards,
Hannu Vuolasaho

Since I also have a Ryzen CPU I tried with MMIO_NOTYET 1 (which didn't work, see x86_vm.c). With that change the arch iso boots into the installer and I can login as root.

I did not dare to go down the arch install path.

Output after removing the MMIO_NOTYET ifs:

<snip>
vm/test: i8259_write_datareg: master pic, reset IRQ vector to 0x30
vm/test: i8259_write_datareg: slave pic, reset IRQ vector to 0x38
vm/test: vcpu_process_com_lcr: set baudrate = 115200
vm/test: vcpu_process_com_lcr: set baudrate = 115200
vm/test: vcpu_process_com_data: guest reading com1 when not ready
vm/test: vmd: cpu mode LONG detected
vmd: got bytes: [ 8b 07 e9 b2 97 56 ff 83 e8 01 48 89 fe 48 c7 ]
vm/test: vmd: prefixes {g1: 0x00, g2: 0x00, g3: 0x00, g4: 0x00, rex: 0x00 }
vm/test: vmd: found opcode MOV (operand encoding RM) (MORE)
vm/test: vmd: found ModRM 0x07 (MORE)
vm/test: insn_decode: final instruction length is 2
vm/test: instruction { MOV, enc=RM, len=2, mod=0x07, (reg=RAX, addr=0xffffd2a0c003d3c0) sib=0x00 }
vm/test: insn_decode: modrm: {mod: 0, regop: 0, rm: 7}
vm/test: vmd: RAX 0xffffd2a0c003d3c0
vm/test: vmd: RCX 0xfed803c3
vm/test: vmd: RDX 0xfffff
vm/test: vmd: RBX 0xffffd2a0c003d3c0
vm/test: vmd: RSP 0xffffd2a0c000bdd8
vm/test: vmd: RBP 0xffff8af901373f00
vm/test: vmd: RSI 0xfed803c0
vm/test: vmd: RDI 0xffffd2a0c003d3c0
vm/test: vmd:  R8 0x0
vm/test: vmd:  R9 0xfed80
vm/test: vmd: R10 0xfed80
vm/test: vmd: R11 0xfed81000
vm/test: vmd: R12 0xffffd2a0c000be00
vm/test: vmd: R13 0xffffffff9aeb6710
vm/test: vmd: R14 0xffffd2a0c000bf48
vm/test: vmd: R15 0x0
vm/test: vmd: RIP 0xffffffff98d9a952
vm/test: vmd: RFLAGS 0x292
vm/test: vmd: ES { sel: 0x0000, lim: 0x00000000, ar: 0x00000000, base: 0x0 }
vm/test: vmd: CS { sel: 0x0010, lim: 0xffffffff, ar: 0x0000209b, base: 0x0 }
vm/test: vmd: GS { sel: 0x0018, lim: 0xffffffff, ar: 0x0000c093, base: 0x0 }
vm/test: vmd: DS { sel: 0x0000, lim: 0x00000000, ar: 0x00000000, base: 0x0 }
vm/test: vmd: FS { sel: 0x0000, lim: 0x00000000, ar: 0x00000000, base: 0x0 }
vm/test: vmd: GS { sel: 0x0000, lim: 0x00000000, ar: 0x00000000, base: 0xffff8af995909000 } vm/test: vmd: LDTR { sel: 0x0000, lim: 0x00000000, ar: 0x00000000, base: 0x0 } vm/test: vmd: TR { sel: 0x0040, lim: 0x00004087, ar: 0x00000089, base: 0xfffffe72d51c6000 }
<snip>

diff --git vm.c vm.c
index b971c4688b4..c7cfa1b04ab 100644
--- vm.c
+++ vm.c
@@ -42,7 +42,7 @@
 #include "virtio.h"
 #include "vmd.h"

-#define MMIO_NOTYET 0
+#define MMIO_NOTYET 1

 static int run_vm(struct vmop_create_params *, struct vcpu_reg_state *);
 static void vm_dispatch_vmm(int, short, void *);
diff --git x86_vm.c x86_vm.c
index ff02fd9a351..1ccb69fe813 100644
--- x86_vm.c
+++ x86_vm.c
@@ -15,6 +15,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */

+#include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/types.h>

@@ -37,6 +38,7 @@
 #include "i8259.h"
 #include "loadfile.h"
 #include "mc146818.h"
+#include "mmio.h"
 #include "ns8250.h"
 #include "pci.h"
 #include "virtio.h"
@@ -573,16 +575,14 @@ vcpu_exit_eptviolation(struct vm_run_params *vrp)
 {
        struct vm_exit *ve = vrp->vrp_exit;
        int ret = 0;
-#if MMIO_NOTYET
+
        struct x86_insn insn;
        uint64_t va, pa;
        size_t len = 15;                /* Max instruction length in x86. */
-#endif /* MMIO_NOTYET */
        switch (ve->vee.vee_fault_type) {
        case VEE_FAULT_HANDLED:
                break;

-#if MMIO_NOTYET
        case VEE_FAULT_MMIO_ASSIST:
                /* Intel VMX might give us the length of the instruction. */
                if (ve->vee.vee_insn_info & VEE_LEN_VALID)
@@ -625,7 +625,6 @@ vcpu_exit_eptviolation(struct vm_run_params *vrp)
                if (ret == 0)
                        ret = insn_emulate(ve, &insn);
                break;
-#endif /* MMIO_NOTYET */

        case VEE_FAULT_PROTECT:
                log_debug("EPT Violation: rip=0x%llx",


Reply via email to