All of lore.kernel.org
 help / color / mirror / Atom feed
* qemu panic on OSX 10.15.6
@ 2020-09-01 12:45 David Cohen
  2020-09-02  8:17 ` Christian Schoenebeck
  0 siblings, 1 reply; 3+ messages in thread
From: David Cohen @ 2020-09-01 12:45 UTC (permalink / raw)
  To: qemu-devel

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: qemu panic on OSX 10.15.6
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Schoenebeck @ 2020-09-02  8:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: David Cohen, Cameron Esfahani, Roman Bolshakov

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.

Best regards,
Christian Schoenebeck




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: qemu panic on OSX 10.15.6
  2020-09-02  8:17 ` Christian Schoenebeck
@ 2020-09-03 14:50   ` Roman Bolshakov
  0 siblings, 0 replies; 3+ messages in thread
From: Roman Bolshakov @ 2020-09-03 14:50 UTC (permalink / raw)
  To: Christian Schoenebeck; +Cc: David Cohen, qemu-devel, Cameron Esfahani

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-03 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.