Re: [Qemu-devel] qemu git (f03d07d46) / e100 / sending large packets causes SIGABRT
Stefan Hajnoczi writes: > Oleksii, are you able to test Paolo's patch? Issue goes away with the patch applied to the current git. At least, it doesn't reproduce with large packets.
[Qemu-devel] qemu git (f03d07d46) / e100 / sending large packets causes SIGABRT
1. qemu-kvm -sdl -nodefaults -name NP1-C1 \ -uuid b71057e9-5705-420b-a780-52339afa6ed9\ -boot c \ -hda np1UD.disk \ -hdb fat:exchange \ -device i82559c,netdev=vin0,romfile="",mac="00:11:22:33:44:54"\ -netdev tap,id=vin0,ifname=vin0,script=no \ -device cirrus-vga\ -serial pty \ & 2. ping -s 65000 3. Program received signal SIGABRT, Aborted. #0 0x7f9aa35e62a9 in __GI_raise (sig=sig@entry=0x6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56 #1 0x7f9aa35e7608 in __GI_abort () at abort.c:90 #2 0x7f9aa97cb9ac in address_space_rw (as=as@entry=0x7f9aac086a40, addr=0x86fa453c, addr@entry=0x86fa4000, buf=0x7f9a97ffe55e "\327\060\061\061\272?32\330\061\062\062\276@43\331\062\063\063\302A54\332\063\064\064\306B65\333\064\065\065\312C76\334\065\066\066\316D87\335\066\067\067\322E98\336\067\070\070\326F:9\337\070\071\071\332G;:\340\071::\336H<;\341:;;\342I=<\342;<<\346J>=\343<==\352K?>\344=>>", '\377' ..., buf@entry=0x7f9a97ffe022 '\377' ..., len=0x3, len@entry=0x53f, is_write=is_write@entry=0x0) at /tmp/portage/app-emulation/qemu-/work/qemu-/exec.c:2005 #3 0x7f9aa96d6349 in dma_memory_rw_relaxed (dir=DMA_DIRECTION_TO_DEVICE, len=0x53f, buf=0x7f9a97ffe022, addr=0x86fa4000, as=0x7f9aac086a40) at /tmp/portage/app-emulation/qemu-/work/qemu-/include/sysemu/dma.h:90 #4 dma_memory_rw (dir=DMA_DIRECTION_TO_DEVICE, len=0x53f, buf=0x7f9a97ffe022, addr=0x86fa4000, as=0x7f9aac086a40) at /tmp/portage/app-emulation/qemu-/work/qemu-/include/sysemu/dma.h:112 #5 pci_dma_rw (dir=DMA_DIRECTION_TO_DEVICE, len=0x53f, buf=0x7f9a97ffe022, addr=0x86fa4000, dev=0x7f9aac086820) at /tmp/portage/app-emulation/qemu-/work/qemu-/include/hw/pci/pci.h:652 #6 pci_dma_read (len=0x53f, buf=0x7f9a97ffe022, addr=0x86fa4000, dev=0x7f9aac086820) at /tmp/portage/app-emulation/qemu-/work/qemu-/include/hw/pci/pci.h:659 #7 tx_command (s=s@entry=0x7f9aac086820) at /tmp/portage/app-emulation/qemu-/work/qemu-/hw/net/eepro100.c:804 #8 0x7f9aa96d6e38 in action_command (s=s@entry=0x7f9aac086820) at /tmp/portage/app-emulation/qemu-/work/qemu-/hw/net/eepro100.c:906 #9 0x7f9aa96d70fb in eepro100_cu_command (s=s@entry=0x7f9aac086820, val=val@entry=0x20) at /tmp/portage/app-emulation/qemu-/work/qemu-/hw/net/eepro100.c:980 #10 0x7f9aa96d8065 in eepro100_write_command (val=, s=0x7f9aac086820) at /tmp/portage/app-emulation/qemu-/work/qemu-/hw/net/eepro100.c:1074 #11 eepro100_write1 (s=0x7f9aac086820, addr=, val=) at /tmp/portage/app-emulation/qemu-/work/qemu-/hw/net/eepro100.c:1457 #12 0x7f9aa981d012 in access_with_adjusted_size (addr=addr@entry=0x2, value=value@entry=0x7f9a97ffeba0, size=size@entry=0x1, access_size_min=, access_size_max=, access=0x7f9aa981d1c0 , opaque=0x7f9aac086fd8) at /tmp/portage/app-emulation/qemu-/work/qemu-/memory.c:436 #13 0x7f9aa9822153 in memory_region_dispatch_write (size=0x1, data=0x20, addr=0x2, mr=0x7f9aac086fd8) at /tmp/portage/app-emulation/qemu-/work/qemu-/memory.c:978 #14 io_mem_write (mr=mr@entry=0x7f9aac086fd8, addr=0x2, val=, size=size@entry=0x1) at /tmp/portage/app-emulation/qemu-/work/qemu-/memory.c:1737 #15 0x7f9aa97cb9fd in address_space_rw (as=as@entry=0x7f9aa9fa1080 , addr=0xfe001002, buf=buf@entry=0x7f9aa956b028 " \242\005\272", len=0x1, is_write=0x1) at /tmp/portage/app-emulation/qemu-/work/qemu-/exec.c:1967 #16 0x7f9aa97cbcb5 in cpu_physical_memory_rw (addr=, buf=buf@entry=0x7f9aa956b028 " \242\005\272", len=, is_write=) at /tmp/portage/app-emulation/qemu-/work/qemu-/exec.c:2036 #17 0x7f9aa981bfe5 in kvm_cpu_exec (cpu=cpu@entry=0x7f9aabfe1550) at /tmp/portage/app-emulation/qemu-/work/qemu-/kvm-all.c:1673 #18 0x7f9aa97c1f7a in qemu_kvm_cpu_thread_fn (arg=0x7f9aabfe1550) at /tmp/portage/app-emulation/qemu-/work/qemu-/cpus.c:785 #19 0x7f9aa70b5d63 in start_thread (arg=0x7f9a97fff700) at pthread_create.c:308 #20 0x7f9aa3698cfd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
[Qemu-devel] support using KVM_MEM_READONLY flag for regions commit and OVMF UEFI incompatibility
I tried do run QEMU with OVMF UEFI bios (QEMU and EDK2 trunk). It hangs while booting: qemu-kvm -L . -bios OVMF.fd --enable-kvm -debugcon file:/tmp/debug -global isa-debugcon.iobase=0x402 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 SecCoreStartupWithStack(0xFFFE6000, 0x8) File->Type: 0xB Section->Type: 0x2 Section->Type: 0x19 Section->Type (0x19) != SectionType (0x17) Section->Type: 0x17 File->Type: 0x2 File->Type (0x2) != FileType (0x4) File->Type: 0xF0 File->Type (0xF0) != FileType (0x4) File->Type: 0x4 Section->Type: 0x19 Section->Type (0x19) != SectionType (0x10) Section->Type: 0x10 Register PPI Notify: DCD0BE23-9586-40F4-B643-06522CED4EDE Install PPI: 8C8CE578-8A3D-4F1C-9935-896185C32DD3 Install PPI: 5473C07A-3DCB-4DCA-BD6F-1E9689E7349A The 0th FV start address is 0x080, size is 0x0080, handle is 0x80 Register PPI Notify: 49EDB1C1-BF21-4761-BB12-EB0031AABB39 Install PPI: B9E0ABFE-5979-4914-977F-6DEE78C278A6 Install PPI: DBE23AA9-A345-4B97-85B6-B226F1617389 Loading PEIM at 0x0815220 EntryPoint=0x0815480 PcdPeim.efi Install PPI: 06E81C58-4AD7-44BC-8390-F10265F72480 Install PPI: 01F34D25-4DE2-23AD-3FF3-36353FF323F1 Loading PEIM at 0x081C920 EntryPoint=0x081CB80 StatusCodePei.efi Install PPI: 229832D3-7A30-4B36-B827-F40CB7D45436 Loading PEIM at 0x080 EntryPoint=0x0822480 PlatformPei.efi Platform PEIM Loaded CMOS: 00:% > strace -e open qemu-kvm -L . -bios OVMF.fd --enable-kvm -debugcon > file:/tmp/debug -global isa-debugcon.iobase=0x402 -global > PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 2>&1 | grep bin open("/usr/bin/qemu-kvm", O_RDONLY) = 3 open("/usr/share/qemu/kvmvapic.bin", O_RDONLY) = 11 open("/usr/share/qemu/vgabios-cirrus.bin", O_RDONLY) = 11 open("/usr/share/qemu/vgabios-cirrus.bin", O_RDONLY) = 11 > file -L "/usr/share/qemu/vgabios-cirrus.bin" /usr/share/qemu/vgabios-cirrus.bin: BIOS (ia32) ROM Ext. IBM comp. Video (71*512) I managed to run it without KVM, while it successfully runnings with KVM in qemu 1.4.2. Bisecting showed, that regression introduced with commit 235e8982ad393e5611cb892df54881c872eea9e1: Author: Jordan Justen Date: Wed May 29 01:27:26 2013 -0700 kvm: support using KVM_MEM_READONLY flag for regions For readonly memory regions and rom devices in romd_mode, we make use of the KVM_MEM_READONLY. A slot that uses KVM_MEM_READONLY can be read from and code can execute from the region, but writes will exit to qemu. For rom devices with !romd_mode, we force the slot to be removed so reads or writes to the region will exit to qemu. (Note that a memory region in this state is not executable within kvm.) v7: * Update for readable => romd_mode rename (5f9a5ea1) Signed-off-by: Jordan Justen Reviewed-by: Xiao Guangrong (v4) Reviewed-by: Paolo Bonzini (v5) Message-id: 1369816047-16384-4-git-send-email-jordan.l.jus...@intel.com Signed-off-by: Anthony Liguori :100644 100644 327ae12f08b9dddc796d753d8adfb1f70c78b2c1 8e7bbf8698f6bcaa5ae945ef86e7b51effde06fe M kvm-all.c
[Qemu-devel] support using KVM_MEM_READONLY flag for regions commit and OVMF UEFI incompatibility
I tried do run QEMU with OVMF UEFI bios (QEMU and EDK2 trunk). It hangs while booting: qemu-kvm -L . -bios OVMF.fd --enable-kvm -debugcon file:/tmp/debug -global isa-debugcon.iobase=0x402 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 SecCoreStartupWithStack(0xFFFE6000, 0x8) File->Type: 0xB Section->Type: 0x2 Section->Type: 0x19 Section->Type (0x19) != SectionType (0x17) Section->Type: 0x17 File->Type: 0x2 File->Type (0x2) != FileType (0x4) File->Type: 0xF0 File->Type (0xF0) != FileType (0x4) File->Type: 0x4 Section->Type: 0x19 Section->Type (0x19) != SectionType (0x10) Section->Type: 0x10 Register PPI Notify: DCD0BE23-9586-40F4-B643-06522CED4EDE Install PPI: 8C8CE578-8A3D-4F1C-9935-896185C32DD3 Install PPI: 5473C07A-3DCB-4DCA-BD6F-1E9689E7349A The 0th FV start address is 0x080, size is 0x0080, handle is 0x80 Register PPI Notify: 49EDB1C1-BF21-4761-BB12-EB0031AABB39 Install PPI: B9E0ABFE-5979-4914-977F-6DEE78C278A6 Install PPI: DBE23AA9-A345-4B97-85B6-B226F1617389 Loading PEIM at 0x0815220 EntryPoint=0x0815480 PcdPeim.efi Install PPI: 06E81C58-4AD7-44BC-8390-F10265F72480 Install PPI: 01F34D25-4DE2-23AD-3FF3-36353FF323F1 Loading PEIM at 0x081C920 EntryPoint=0x081CB80 StatusCodePei.efi Install PPI: 229832D3-7A30-4B36-B827-F40CB7D45436 Loading PEIM at 0x080 EntryPoint=0x0822480 PlatformPei.efi Platform PEIM Loaded CMOS: 00:% > strace -e open qemu-kvm -L . -bios OVMF.fd --enable-kvm -debugcon > file:/tmp/debug -global isa-debugcon.iobase=0x402 -global > PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 2>&1 | grep bin open("/usr/bin/qemu-kvm", O_RDONLY) = 3 open("/usr/share/qemu/kvmvapic.bin", O_RDONLY) = 11 open("/usr/share/qemu/vgabios-cirrus.bin", O_RDONLY) = 11 open("/usr/share/qemu/vgabios-cirrus.bin", O_RDONLY) = 11 > file -L "/usr/share/qemu/vgabios-cirrus.bin" /usr/share/qemu/vgabios-cirrus.bin: BIOS (ia32) ROM Ext. IBM comp. Video (71*512) I managed to run it without KVM, while it successfully runnings with KVM in qemu 1.4.2. Bisecting showed, that regression introduced with commit 235e8982ad393e5611cb892df54881c872eea9e1: Author: Jordan Justen Date: Wed May 29 01:27:26 2013 -0700 kvm: support using KVM_MEM_READONLY flag for regions For readonly memory regions and rom devices in romd_mode, we make use of the KVM_MEM_READONLY. A slot that uses KVM_MEM_READONLY can be read from and code can execute from the region, but writes will exit to qemu. For rom devices with !romd_mode, we force the slot to be removed so reads or writes to the region will exit to qemu. (Note that a memory region in this state is not executable within kvm.) v7: * Update for readable => romd_mode rename (5f9a5ea1) Signed-off-by: Jordan Justen Reviewed-by: Xiao Guangrong (v4) Reviewed-by: Paolo Bonzini (v5) Message-id: 1369816047-16384-4-git-send-email-jordan.l.jus...@intel.com Signed-off-by: Anthony Liguori :100644 100644 327ae12f08b9dddc796d753d8adfb1f70c78b2c1 8e7bbf8698f6bcaa5ae945ef86e7b51effde06fe M kvm-all.c