qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Roman Bolshakov <r.bolshakov@yadro.com>
To: Christian Schoenebeck <qemu_oss@crudebyte.com>
Cc: David Cohen <dacohen@zohomail.com>,
	qemu-devel@nongnu.org, Cameron Esfahani <dirty@apple.com>
Subject: Re: qemu panic on OSX 10.15.6
Date: Thu, 3 Sep 2020 17:50:34 +0300	[thread overview]
Message-ID: <20200903145034.GA52559@SPB-NB-133.local> (raw)
In-Reply-To: <1645171.kiFi0bBsqf@silver>

On Wed, Sep 02, 2020 at 10:17:01AM +0200, Christian Schoenebeck wrote:
> On Dienstag, 1. September 2020 14:45:55 CEST David Cohen wrote:
> > Hi,
> > 
> > I'm trying to use qemu on OSX Catalina using HVF hypervisor, but it's
> > currently panic'ing upon booting Linux guest.
> > 
> > These are the args I'm using:
> > build % ./qemu-system-x86_64 -cdrom
> > ~/Downloads/archlinux-2020.08.01-x86_64.iso -smp 4 -m 4G -vga virtio
> > -accel hvf -cpu host
> > 
> > I could trace the failure to test_pt_entry(), in this exact position:
> > 
> > build % git diff
> > diff --git a/target/i386/hvf/x86_mmu.c b/target/i386/hvf/x86_mmu.c
> > index 65d4603dbf..8f04a94cc6 100644
> > --- a/target/i386/hvf/x86_mmu.c
> > +++ b/target/i386/hvf/x86_mmu.c
> > @@ -113,6 +113,7 @@ static bool test_pt_entry(struct CPUState *cpu,
> > struct gpt_translation *pt,
> >       }
> > 
> >       if (!pte_present(pte)) {
> > +        printf("Code is failing here");
> >           return false;
> >       }
> > 
> > 
> > Is anyone aware of this issue?
> > 
> > Br, David Cohen
> 
> CCing Cameron and Roman, just in case.
> 

Hi Christian, David,

Are we talking about the issue?

$ $QEMU -cdrom ~/Downloads/archlinux-2020.08.01-x86_64.iso -smp 4 -m 4G -vga virtio -accel hvf -cpu host
vmx_write_mem: mmu_gva_to_gpa ffff8ecf3b150000 failed
[1]    24888 abort      $QEMU -cdrom ~/Downloads/archlinux-2020.08.01-x86_64.iso -smp 4 -m 4G -vga

It might be a dup of:
https://bugs.launchpad.net/qemu/+bug/1838390

The likely cause of the issue is HVF doesn't generate #PF to the guest
when it emulates an instruction and finds a page that's not in memory,
instead it just aborts. setjmp()/longjmp() in hvf_vcpu_exec() might be
used to raise the CPU exception similar to TCG, that would fix the
ticket.

But I'm also seeing a kernel panic in the guest on TSC read in the
guest. It doesn't happen if -cpu host is not used.

Thanks,
Roman


      reply	other threads:[~2020-09-03 14:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01 12:45 qemu panic on OSX 10.15.6 David Cohen
2020-09-02  8:17 ` Christian Schoenebeck
2020-09-03 14:50   ` Roman Bolshakov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200903145034.GA52559@SPB-NB-133.local \
    --to=r.bolshakov@yadro.com \
    --cc=dacohen@zohomail.com \
    --cc=dirty@apple.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu_oss@crudebyte.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).