Il 10/06/2015 11:13, Fabio Fantoni ha scritto:
Il 09/06/2015 17:21, Paul Durrant ha scritto:
-----Original Message-----
From: Fabio Fantoni [mailto:fabio.fant...@m2r.biz]
Sent: 09 June 2015 15:44
To: Paul Durrant; xen-de...@lists.xenproject.org
Subject: Re: [Xen-devel] [PATCH 00/17] x86/hvm: I/O emulation cleanup and
fix

Il 08/06/2015 16:33, Paul Durrant ha scritto:
This patch series re-works much of the code involved in emulation of port
and memory mapped I/O for HVM guests.

The code has become very convoluted and, at least by inspection, certain
emulations will apparently malfunction.

The series is broken down into 17 patches (which are also available in
my xenbits repo:
http://xenbits.xen.org/gitweb/?p=people/pauldu/xen.git
on the emulation18 branch) as follows:
Big thanks for your work.
I tested them taking the patches from emulation18 branch.
I tried xl create of a window 7 domU but during xl create dom0
istant-reboot and there isn't anything about the problem in the logs
(kern.log, syslog, qemu log, xl log ecc...)
I tried also with linux (hvm) domU and with stdvga instead qxl I had
setted but same result.

For debug the problem I must enable all xen debug in grub entry and
redirect output to serial, similar to debug of dom0 boot problem or I
must do different thing?

Having serial is very useful in these cases. I've been debugging with a 32-bit Win 7 VM so it would be useful if you could bisect bit. There are natural boundaries in the series you could try first:

Apply everything up to and including 'x86/hvm: unify stdvga mmio intercept with standard mmio intercept' Then try everything up to and including ' x86/hvm: remove extraneous parameter from hvmtrace_io_assist()'
Then, if you get that far, try the rest one at a time.

   Paul

Found the patch that cause dom0 insta-reboot:
x86/hvm: remove multiple open coded 'chunking' loops in hvmemul_read/write()

In attachments also xl -vvv create output until the crash if can be useful, I not found useful information in logs after reboot :(

If you need more informations/tests tell me and I'll post them.


Thanks for reply.
I tried to boot with full debug enabled and with serial on lan but server insta-reboot without show error or useful output on redirected output or monitor. I used same parameters of other debug I did long time ago if I remember good, here the grub2 entry:
menuentry 'Wheezy con Linux 3.16.0-0.bpo.4-amd64 e XEN - RAID - Debug su Seriale' --class debian --class gnu-linux --class gnu --class os {
    set root='(RAID-ROOT)'
    echo    'Caricamento Hypervisor Xen...'
multiboot /boot/xen.gz placeholder dom0_mem=2G,max:3G swiotlb=65762 loglvl=all guest_loglvl=all sync_console console_to_ring com2=19200,8n1 console=com2
    echo    'Caricamento Linux 3.16.0-0.bpo.4-amd64...'
linux /boot/vmlinuz-3.16.0-0.bpo.4-amd64 placeholder root=/dev/mapper/RAID-ROOT ro console=hvc0 earlyprintk=xen nomodeset
    echo    'Caricamento ramdisk iniziale...'
    initrd    /boot/initrd.img-3.16.0-0.bpo.4-amd64
}
Here the entry without debug working:

menuentry 'RAID - Debian 7.8 (wheezy) con Linux 3.16.0-0.bpo.4-amd64 e XEN 4.6-unstable' --class debian --class gnu-linux --class gnu --class os --class xen {
    set fallback="1"
    set root='(RAID-ROOT)'
    echo    'Caricamento Hypervisor Xen 4.6-unstable...'
    multiboot    /boot/xen.gz placeholder dom0_mem=2G,max:3G
    echo    'Caricamento Linux 3.16.0-0.bpo.4-amd64 ...'
module /boot/vmlinuz-3.16.0-0.bpo.4-amd64 placeholder root=/dev/mapper/RAID-ROOT ro swiotlb=65762 quiet
    echo    'Caricamento ramdisk iniziale...'
    module    /boot/initrd.img-3.16.0-0.bpo.4-amd64
}
I did something wrong?

Now I'll try to bisect the patch serie following your advice.


Thanks for any reply and sorry for my bad english.

x86/hvm: simplify hvmemul_do_io()
x86/hvm: re-name struct hvm_mmio_handler to hvm_mmio_ops
x86/hvm: unify internal portio and mmio intercepts
x86/hvm: unify dpci portio intercept with standard portio intercept
x86/hvm: unify stdvga mmio intercept with standard mmio intercept
x86/hvm: revert 82ed8716b "fix direct PCI port I/O emulation retry...
x86/hvm: only call hvm_io_assist() from hvm_wait_for_io()
x86/hvm: split I/O completion handling from state model
x86/hvm: remove hvm_io_pending() check in hvmemul_do_io()
x86/hvm: remove HVMIO_dispatched I/O state
x86/hvm: remove hvm_io_state enumeration
x86/hvm: use ioreq_t to track in-flight state
x86/hvm: only acquire RAM pages for emulation when we need to
x86/hvm: remove extraneous parameter from hvmtrace_io_assist()
x86/hvm: make sure translated MMIO reads or writes fall within a page
x86/hvm: remove multiple open coded 'chunking' loops
x86/hvm: track large memory mapped accesses by linear address


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


xl -vvv create /etc/xen/W7.cfg
Parsing config from /etc/xen/W7.cfg
libxl: debug: libxl_create.c:1586:do_domain_create: ao 0x95edc0: create: 
how=(nil) callback=(nil) poller=0x95ee20
libxl: debug: libxl_device.c:269:libxl__device_disk_set_backend: Disk vdev=hda 
spec.backend=unknown
libxl: debug: libxl_device.c:298:libxl__device_disk_set_backend: Disk vdev=hda, 
using backend phy
libxl: debug: libxl_device.c:269:libxl__device_disk_set_backend: Disk vdev=hdb 
spec.backend=unknown
libxl: debug: libxl_device.c:215:disk_try_backend: Disk vdev=hdb, backend phy 
unsuitable as phys path not a block device
libxl: debug: libxl_device.c:298:libxl__device_disk_set_backend: Disk vdev=hdb, 
using backend qdisk
libxl: debug: libxl_create.c:961:initiate_domain_create: running bootloader
libxl: debug: libxl_bootloader.c:323:libxl__bootloader_run: not a PV domain, 
skipping bootloader
libxl: debug: libxl_event.c:652:libxl__ev_xswatch_deregister: watch w=0x95f628: 
deregister unregistered
libxl: detail: libxl_dom.c:254:hvm_set_viridian_features: base group enabled
libxl: detail: libxl_dom.c:254:hvm_set_viridian_features: freq group enabled
libxl: detail: libxl_dom.c:254:hvm_set_viridian_features: time_ref_count group 
enabled
xc: detail: elf_parse_binary: phdr: paddr=0x100000 memsz=0x26e358
xc: detail: elf_parse_binary: memory: 0x100000 -> 0x36e358
xc: detail: VIRTUAL MEMORY ARRANGEMENT:
xc: detail:   Loader:   0000000000100000->000000000036e358
xc: detail:   Modules:  0000000000000000->0000000000000000
xc: detail:   TOTAL:    0000000000000000->0000000078000000
xc: detail:   ENTRY:    0000000000100038
xc: detail: PHYSICAL MEMORY ALLOCATION:
xc: detail:   4KB PAGES: 0x0000000000000200
xc: detail:   2MB PAGES: 0x00000000000003bf
xc: detail:   1GB PAGES: 0x0000000000000000
xc: detail: elf_load_binary: phdr 0 at 0x7f45ec866000 -> 0x7f45ecacb2d4
domainbuilder: detail: xc_dom_gnttab_hvm_seed: called, pfn=0xff000
libxl: debug: libxl_device.c:269:libxl__device_disk_set_backend: Disk vdev=hda 
spec.backend=phy
libxl: debug: libxl_event.c:600:libxl__ev_xswatch_register: watch w=0x961b88 
wpath=/local/domain/0/backend/vbd/1/768/state token=3/0: register slotnum=3
libxl: debug: libxl_device.c:269:libxl__device_disk_set_backend: Disk vdev=hdb 
spec.backend=qdisk
libxl: debug: libxl_device.c:269:libxl__device_disk_set_backend: Disk vdev=hdb 
spec.backend=qdisk
libxl: debug: libxl_event.c:652:libxl__ev_xswatch_deregister: watch w=0x962d00: 
deregister unregistered
libxl: debug: libxl_create.c:1602:do_domain_create: ao 0x95edc0: inprogress: 
poller=0x95ee20, flags=i
libxl: debug: libxl_event.c:537:watchfd_callback: watch w=0x961b88 
wpath=/local/domain/0/backend/vbd/1/768/state token=3/0: event 
epath=/local/domain/0/backend/vbd/1/768/state
libxl: debug: libxl_event.c:841:devstate_watch_callback: backend 
/local/domain/0/backend/vbd/1/768/state wanted state 2 ok
libxl: debug: libxl_event.c:638:libxl__ev_xswatch_deregister: watch w=0x961b88 
wpath=/local/domain/0/backend/vbd/1/768/state token=3/0: deregister slotnum=3
libxl: debug: libxl_event.c:652:libxl__ev_xswatch_deregister: watch w=0x961b88: 
deregister unregistered
libxl: debug: libxl_device.c:1030:device_hotplug: calling hotplug script: 
/etc/xen/scripts/block add
libxl: debug: libxl_aoutils.c:566:libxl__async_exec_start: forking to execute: 
/etc/xen/scripts/block add 
libxl: debug: libxl_event.c:506:watchfd_callback: watch 
epath=/local/domain/0/backend/vbd/1/768/state token=3/0: empty slot
libxl: debug: libxl_event.c:652:libxl__ev_xswatch_deregister: watch w=0x961c10: 
deregister unregistered
libxl: debug: libxl_event.c:652:libxl__ev_xswatch_deregister: watch w=0x961c10: 
deregister unregistered
libxl: debug: libxl_dm.c:1502:libxl__spawn_local_dm: Spawning device-model 
/usr/lib/xen/bin/qemu-system-i386 with arguments:
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
/usr/lib/xen/bin/qemu-system-i386
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -xen-domid
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   1
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -chardev
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-1,server,nowait
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -no-shutdown
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -mon
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
chardev=libxl-cmd,mode=control
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -chardev
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
socket,id=libxenstat-cmd,path=/var/run/xen/qmp-libxenstat-1,server,nowait
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -mon
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
chardev=libxenstat-cmd,mode=control
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -nodefaults
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -name
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   W7
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -vnc
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   none
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -display
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   none
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -k
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   it
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -spice
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
port=6002,tls-port=0,addr=0.0.0.0,disable-ticketing,agent-mouse=on,disable-copy-paste
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   virtio-serial
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -chardev
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
spicevmc,id=vdagent,name=vdagent
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
virtserialport,chardev=vdagent,name=com.redhat.spice.0
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
qxl-vga,vram_size_mb=64,ram_size_mb=64
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -boot
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   order=dc
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
ich9-usb-ehci1,id=usb,addr=0x1d.0x7,multifunction=on
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
ich9-usb-uhci1,masterbus=usb.0,firstport=0,addr=0x1d.0,multifunction=on
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
ich9-usb-uhci2,masterbus=usb.0,firstport=2,addr=0x1d.0x1,multifunction=on
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
ich9-usb-uhci3,masterbus=usb.0,firstport=4,addr=0x1d.0x2,multifunction=on
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -chardev
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
spicevmc,name=usbredir,id=usbrc1
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
usb-redir,chardev=usbrc1,id=usbrc1
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -chardev
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
spicevmc,name=usbredir,id=usbrc2
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
usb-redir,chardev=usbrc2,id=usbrc2
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -chardev
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
spicevmc,name=usbredir,id=usbrc3
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
usb-redir,chardev=usbrc3,id=usbrc3
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -chardev
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
spicevmc,name=usbredir,id=usbrc4
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
usb-redir,chardev=usbrc4,id=usbrc4
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -soundhw
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   hda
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -smp
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   2,maxcpus=2
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
rtl8139,id=nic0,netdev=net0,mac=00:16:3e:42:ae:8f
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -netdev
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
type=tap,id=net0,ifname=vif1.0-emu,script=no,downscript=no
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -machine
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   xenfv
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -m
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   1920
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   ahci,id=ahci0
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -drive
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
file=/mnt/vm/disks/W7.disk1.xm,if=none,id=ahcidisk-0,format=raw,cache=writeback
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
ide-hd,bus=ahci0.0,unit=0,drive=ahcidisk-0
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -drive
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   
if=none,id=ide-832,cache=writeback
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   -device
libxl: debug: libxl_dm.c:1504:libxl__spawn_local_dm:   ide-cd,drive=ide-832
libxl: debug: libxl_event.c:600:libxl__ev_xswatch_register: watch w=0x95f8a8 
wpath=/local/domain/0/device-model/1/state token=3/1: register slotnum=3
libxl: debug: libxl_event.c:537:watchfd_callback: watch w=0x95f8a8 
wpath=/local/domain/0/device-model/1/state token=3/1: event 
epath=/local/domain/0/device-model/1/state
libxl: debug: libxl_event.c:537:watchfd_callback: watch w=0x95f8a8 
wpath=/local/domain/0/device-model/1/state token=3/1: event 
epath=/local/domain/0/device-model/1/state
libxl: debug: libxl_event.c:638:libxl__ev_xswatch_deregister: watch w=0x95f8a8 
wpath=/local/domain/0/device-model/1/state token=3/1: deregister slotnum=3
libxl: debug: libxl_event.c:652:libxl__ev_xswatch_deregister: watch w=0x95f8a8: 
deregister unregistered
libxl: debug: libxl_qmp.c:705:libxl__qmp_initialize: connected to 
/var/run/xen/qmp-libxl-1
libxl: debug: libxl_qmp.c:296:qmp_handle_response: message type: qmp
libxl: debug: libxl_qmp.c:555:qmp_send_prepare: next qmp command: '{
    "execute": "qmp_capabilities",
    "id": 1
}
'
libxl: debug: libxl_qmp.c:296:qmp_handle_response: message type: return
libxl: debug: libxl_qmp.c:555:qmp_send_prepare: next qmp command: '{
    "execute": "query-chardev",
    "id": 2
}
'
libxl: debug: libxl_qmp.c:296:qmp_handle_response: message type: return
libxl: debug: libxl_qmp.c:555:qmp_send_prepare: next qmp command: '{
    "execute": "query-vnc",
    "id": 3
}
'
libxl: debug: libxl_qmp.c:296:qmp_handle_response: message type: return
libxl: debug: libxl_event.c:600:libxl__ev_xswatch_register: watch w=0x967048 
wpath=/local/domain/0/backend/vif/1/0/state token=3/2: register slotnum=3
libxl: debug: libxl_event.c:537:watchfd_callback: watch w=0x967048 
wpath=/local/domain/0/backend/vif/1/0/state token=3/2: event 
epath=/local/domain/0/backend/vif/1/0/state
libxl: debug: libxl_event.c:845:devstate_watch_callback: backend 
/local/domain/0/backend/vif/1/0/state wanted state 2 still waiting state 1
libxl: debug: libxl_event.c:537:watchfd_callback: watch w=0x967048 
wpath=/local/domain/0/backend/vif/1/0/state token=3/2: event 
epath=/local/domain/0/backend/vif/1/0/state
libxl: debug: libxl_event.c:841:devstate_watch_callback: backend 
/local/domain/0/backend/vif/1/0/state wanted state 2 ok
libxl: debug: libxl_event.c:638:libxl__ev_xswatch_deregister: watch w=0x967048 
wpath=/local/domain/0/backend/vif/1/0/state token=3/2: deregister slotnum=3
libxl: debug: libxl_event.c:652:libxl__ev_xswatch_deregister: watch w=0x967048: 
deregister unregistered
libxl: debug: libxl_device.c:1030:device_hotplug: calling hotplug script: 
/etc/xen/scripts/vif-bridge online
libxl: debug: libxl_aoutils.c:566:libxl__async_exec_start: forking to execute: 
/etc/xen/scripts/vif-bridge online 
libxl: debug: libxl_event.c:652:libxl__ev_xswatch_deregister: watch w=0x9670d0: 
deregister unregistered
libxl: debug: libxl_device.c:1030:device_hotplug: calling hotplug script: 
/etc/xen/scripts/vif-bridge add
libxl: debug: libxl_aoutils.c:566:libxl__async_exec_start: forking to execute: 
/etc/xen/scripts/vif-bridge add 
libxl: debug: libxl_event.c:652:libxl__ev_xswatch_deregister: watch w=0x9670d0: 
deregister unregistered
libxl: debug: libxl_event.c:652:libxl__ev_xswatch_deregister: watch w=0x9670d0: 
deregister unregistered
libxl: debug: libxl_event.c:1944:libxl__ao_progress_report: ao 0x95edc0: 
progress report: ignored
libxl: debug: libxl_event.c:1768:libxl__ao_complete: ao 0x95edc0: complete, rc=0
libxl: debug: libxl_event.c:1740:libxl__ao__destroy: ao 0x95edc0: destroy
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to