From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrTKC-0007tR-DH for qemu-devel@nongnu.org; Thu, 20 Nov 2014 10:07:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XrTK7-0004iv-AB for qemu-devel@nongnu.org; Thu, 20 Nov 2014 10:07:12 -0500 From: Don Slutz Message-ID: <546E0398.5030205@terremark.com> Date: Thu, 20 Nov 2014 10:07:04 -0500 MIME-Version: 1.0 References: <1416443890-20263-1-git-send-email-dslutz@verizon.com> <20141120005824.GH3243@thinpad.lan.raisama.net> <546D8450.2080900@redhat.com> In-Reply-To: <546D8450.2080900@redhat.com> Content-Type: multipart/alternative; boundary="------------020802060200080407070202" Subject: Re: [Qemu-devel] [BUGFIX][PATCH for 2.2 v3 1/1] -machine vmport=auto: Fix handling of VMWare ioport emulation for xen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Eduardo Habkost , Don Slutz Cc: Anthony Liguori , "Michael S. Tsirkin" , Michael Tokarev , "Dr. David Alan Gilbert" , "qemu-devel@nongnu.org" , Stefan Hajnoczi This is a multi-part message in MIME format. --------------020802060200080407070202 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit On 11/20/14 01:04, Paolo Bonzini wrote: > > On 20/11/2014 01:58, Eduardo Habkost wrote: >> if (pc_machine->vmport == VMPORT_AUTO) { >> no_vmport = xen_enabled(); >> } else { >> no_vmport = (pc_machine->vmport == VMPORT_ON); >> } > I'm still not sure why the configuration should differ for "-M pc" > depending on whether xen is enabled. > > Paolo The key reason is that with current xen, if vmport is enabled QEMU will crash: -------- Forwarded Message -------- Subject: Re: [Qemu-devel] qemu 2.2 crash on linux hvm domU (full backtrace included) Date: Wed, 19 Nov 2014 15:04:58 +0100 From: Fabio Fantoni To: xen-devel , qemu-devel@nongnu.org , spice-devel@lists.freedesktop.org CC: anthony PERARD , dslutz@verizon.com, Stefano Stabellini Il 14/11/2014 12:25, Fabio Fantoni ha scritto: > dom0 xen-unstable from staging git with "x86/hvm: Extend HVM cpuid > leaf with vcpu id" and "x86/hvm: Add per-vcpu evtchn upcalls" patches, > and qemu 2.2 from spice git (spice/next commit > e779fa0a715530311e6f59fc8adb0f6eca914a89): > https://github.com/Fantu/Xen/commits/rebase/m2r-staging I tried with qemu tag v2.2.0-rc2 and crash still happen, here the full backtrace of latest test: > Program received signal SIGSEGV, Segmentation fault. > 0x0000555555689b07 in vmport_ioport_read (opaque=0x5555564443a0, addr=0, > size=4) at /mnt/vm/xen/Xen/tools/qemu-xen-dir/hw/misc/vmport.c:73 > 73 eax = env->regs[R_EAX]; > (gdb) bt full > #0 0x0000555555689b07 in vmport_ioport_read (opaque=0x5555564443a0, > addr=0, > size=4) at /mnt/vm/xen/Xen/tools/qemu-xen-dir/hw/misc/vmport.c:73 > s = 0x5555564443a0 > cs = 0x0 > cpu = 0x0 > __func__ = "vmport_ioport_read" > env = 0x8250 > command = 0 '\000' > eax = 0 > #1 0x0000555555655fc4 in memory_region_read_accessor (mr=0x555556444428, > addr=0, value=0x7fffffffd8d0, size=4, shift=0, mask=4294967295) > at /mnt/vm/xen/Xen/tools/qemu-xen-dir/memory.c:410 > tmp = 0 > #2 0x00005555556562b7 in access_with_adjusted_size (addr=0, > value=0x7fffffffd8d0, size=4, access_size_min=4, access_size_max=4, > access=0x555555655f62 , > mr=0x555556444428) > at /mnt/vm/xen/Xen/tools/qemu-xen-dir/memory.c:480 > access_mask = 4294967295 > access_size = 4 > i = 0 > #3 0x00005555556590e9 in memory_region_dispatch_read1 > (mr=0x555556444428, > addr=0, size=4) at /mnt/vm/xen/Xen/tools/qemu-xen-dir/memory.c:1077 > data = 0 > #4 0x00005555556591b1 in memory_region_dispatch_read (mr=0x555556444428, > addr=0, pval=0x7fffffffd9a8, size=4) > ---Type to continue, or q to quit--- > at /mnt/vm/xen/Xen/tools/qemu-xen-dir/memory.c:1099 > No locals. ... and in QEMU 2.1 and older it just xen_enabled(). -Don Slutz --------------020802060200080407070202 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit On 11/20/14 01:04, Paolo Bonzini wrote:

On 20/11/2014 01:58, Eduardo Habkost wrote:
    if (pc_machine->vmport == VMPORT_AUTO) {
          no_vmport = xen_enabled();
    } else {
          no_vmport = (pc_machine->vmport == VMPORT_ON);
    }
I'm still not sure why the configuration should differ for "-M pc"
depending on whether xen is enabled.

Paolo

The key reason is that with current xen, if vmport is enabled QEMU will crash:


-------- Forwarded Message --------
Subject: Re: [Qemu-devel] qemu 2.2 crash on linux hvm domU (full backtrace included)
Date: Wed, 19 Nov 2014 15:04:58 +0100
From: Fabio Fantoni <fabio.fantoni@m2r.biz>
To: xen-devel <xen-devel@lists.xensource.com>, qemu-devel@nongnu.org <qemu-devel@nongnu.org>, spice-devel@lists.freedesktop.org
CC: anthony PERARD <anthony.perard@citrix.com>, dslutz@verizon.com, Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>


Il 14/11/2014 12:25, Fabio Fantoni ha scritto:
> dom0 xen-unstable from staging git with "x86/hvm: Extend HVM cpuid 
> leaf with vcpu id" and "x86/hvm: Add per-vcpu evtchn upcalls" patches, 
> and qemu 2.2 from spice git (spice/next commit 
> e779fa0a715530311e6f59fc8adb0f6eca914a89):
> https://github.com/Fantu/Xen/commits/rebase/m2r-staging

I tried with qemu  tag v2.2.0-rc2 and crash still happen, here the full 
backtrace of latest test:
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000555555689b07 in vmport_ioport_read (opaque=0x5555564443a0, addr=0,
>     size=4) at /mnt/vm/xen/Xen/tools/qemu-xen-dir/hw/misc/vmport.c:73
> 73          eax = env->regs[R_EAX];
> (gdb) bt full
> #0  0x0000555555689b07 in vmport_ioport_read (opaque=0x5555564443a0, 
> addr=0,
>     size=4) at /mnt/vm/xen/Xen/tools/qemu-xen-dir/hw/misc/vmport.c:73
>         s = 0x5555564443a0
>         cs = 0x0
>         cpu = 0x0
>         __func__ = "vmport_ioport_read"
>         env = 0x8250
>         command = 0 '\000'
>         eax = 0
> #1  0x0000555555655fc4 in memory_region_read_accessor (mr=0x555556444428,
>     addr=0, value=0x7fffffffd8d0, size=4, shift=0, mask=4294967295)
>     at /mnt/vm/xen/Xen/tools/qemu-xen-dir/memory.c:410
>         tmp = 0
> #2  0x00005555556562b7 in access_with_adjusted_size (addr=0,
>     value=0x7fffffffd8d0, size=4, access_size_min=4, access_size_max=4,
>     access=0x555555655f62 <memory_region_read_accessor>, 
> mr=0x555556444428)
>     at /mnt/vm/xen/Xen/tools/qemu-xen-dir/memory.c:480
>         access_mask = 4294967295
>         access_size = 4
>         i = 0
> #3  0x00005555556590e9 in memory_region_dispatch_read1 
> (mr=0x555556444428,
>     addr=0, size=4) at /mnt/vm/xen/Xen/tools/qemu-xen-dir/memory.c:1077
>         data = 0
> #4  0x00005555556591b1 in memory_region_dispatch_read (mr=0x555556444428,
>     addr=0, pval=0x7fffffffd9a8, size=4)
> ---Type <return> to continue, or q <return> to quit---
>     at /mnt/vm/xen/Xen/tools/qemu-xen-dir/memory.c:1099
> No locals.
...

and in QEMU 2.1 and older it just xen_enabled().

   -Don Slutz
--------------020802060200080407070202--