Port-xen archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
NetBSD PVH on XenServer
This leads on from:
https://mail-index.netbsd.org/port-xen/2023/11/13/msg010466.html
Recap:
1) To get the paravirtualised devices to work, viridian (a VM setting in
XenServer) must be set to false otherwise it thinks it is on Hyper-V.
Surely this should not be necessary as the Hyper-V state is clearly
wrong:
Hyper-V Version: 0.0.0 [SP0]
Features=0x870<APIC,HYPERCALL,VPINDEX,TMFREQ>
PM Features=0 [C0]
Features3=0x8<PCPUDPE>
Recommends: 00000000 00000000
Limits: Vcpu:0 Lcpu:0 Int:0
HW Features: 0000000b, AMD: 00000000
It should be able to probe that it is on Xen in xen_hvm_init() without
having to force viridian=false in the hypervisor.
With viridian=true, you can install on the emulated HDD (either wd0 on
piixide in BIOS mode or ld0 on nvme0 in uEFI mode) from the emulated cd0
(piixide0:1:1)
2) With viridian=false, piixide is disabled:
piixide0: I/O access disabled at device
and the HDD is at xbd0
Because piixide as a whole is disabled (not just wd0), the emulated cd
(was at piixide0:1:1) no longer works and now appears as a broken wd0
on isa0:
isa0 at pcib0
wdc1 at isa0 port 0x170-0x177 irq 15
atabus0 at wdc1 channel 0
wd0 at atabus0 drive 0
wd0: <ST506>
wd0: drive supports 1-sector PIO transfers, chs addressing
wd0: 69632 KB, 1024 cyl, 8 head, 17 sec, 512 bytes/sect x 139264 sectors
wd0d: error reading fsbn 0 (wd0 bn 0; cn 0 tn 0 sn 0), xfer 38, retry 0
wd0: (aborted command)
3) Exposing the cdrom block device as a PV xbd is explicitly disabled in
xenbus_probe.c because of xbd hanging if the device is not ready rather
than returning an error (such as EIO or ENODEV).
If the "disabled if cdrom" check is removed and the VM is booted with an
ISO inserted, there is no hang and everything works.
On Linux, the cdrom device is explicitly enabled at piix (i.e. like
NetBSD, the CD device is emulated):
kernel: vbd vbd-5696: 19 xenbus_dev_probe on device/vbd/5696
kernel: ata_piix 0000:00:01.1: version 2.13
kernel: ata_piix 0000:00:01.1: enabling device (0000 -> 0001)
The solutions appear to be:
- fix xen probing with viridian=true
- Don't disable the whole of piixide, enable the cdrom devices
--
Stephen
Home |
Main Index |
Thread Index |
Old Index