mbox

[PULL,v2,0/10] xenpvh

Message ID alpine.DEB.2.22.394.2302141541100.2025117@ubuntu-linux-20-04-desktop
State New
Headers show

Pull-request

https://gitlab.com/sstabellini/qemu xenpvh2

Message

Stefano Stabellini Feb. 14, 2023, 11:43 p.m. UTC
The following changes since commit 6a50f64ca01d0a7b97f14f069762bfd88160f31e:

  Merge tag 'pull-request-2023-02-14' of https://gitlab.com/thuth/qemu into staging (2023-02-14 14:46:10 +0000)

are available in the Git repository at:

  https://gitlab.com/sstabellini/qemu xenpvh2

for you to fetch changes up to 86b01d58ca2840bea6e4e7260aad450a660fbd46:

  meson.build: enable xenpv machine build for ARM (2023-02-14 15:39:25 -0800)

----------------------------------------------------------------
Stefano Stabellini (5):
      hw/i386/xen/xen-hvm: move x86-specific fields out of XenIOState
      xen-hvm: reorganize xen-hvm and move common function to xen-hvm-common
      include/hw/xen/xen_common: return error from xen_create_ioreq_server
      hw/xen/xen-hvm-common: skip ioreq creation on ioreq registration failure
      meson.build: do not set have_xen_pci_passthrough for aarch64 targets

Vikram Garhwal (5):
      hw/i386/xen/: move xen-mapcache.c to hw/xen/
      hw/i386/xen: rearrange xen_hvm_init_pc
      hw/xen/xen-hvm-common: Use g_new and error_report
      hw/arm: introduce xenpvh machine
      meson.build: enable xenpv machine build for ARM

 docs/system/arm/xenpvh.rst       |   34 ++
 docs/system/target-arm.rst       |    1 +
 hw/arm/meson.build               |    2 +
 hw/arm/xen_arm.c                 |  182 +++++++
 hw/i386/meson.build              |    1 +
 hw/i386/xen/meson.build          |    1 -
 hw/i386/xen/trace-events         |   19 -
 hw/i386/xen/xen-hvm.c            | 1078 ++++----------------------------------
 hw/xen/meson.build               |    7 +
 hw/xen/trace-events              |   19 +
 hw/xen/xen-hvm-common.c          |  893 +++++++++++++++++++++++++++++++
 hw/{i386 => }/xen/xen-mapcache.c |    0
 include/hw/arm/xen_arch_hvm.h    |    9 +
 include/hw/i386/xen_arch_hvm.h   |   11 +
 include/hw/xen/arch_hvm.h        |    5 +
 include/hw/xen/xen-hvm-common.h  |   98 ++++
 include/hw/xen/xen_common.h      |   13 +-
 meson.build                      |    4 +-
 18 files changed, 1364 insertions(+), 1013 deletions(-)
 create mode 100644 docs/system/arm/xenpvh.rst
 create mode 100644 hw/arm/xen_arm.c
 create mode 100644 hw/xen/xen-hvm-common.c
 rename hw/{i386 => }/xen/xen-mapcache.c (100%)
 create mode 100644 include/hw/arm/xen_arch_hvm.h
 create mode 100644 include/hw/i386/xen_arch_hvm.h
 create mode 100644 include/hw/xen/arch_hvm.h
 create mode 100644 include/hw/xen/xen-hvm-common.h

Comments

Peter Maydell Feb. 15, 2023, 6:36 p.m. UTC | #1
On Tue, 14 Feb 2023 at 23:43, Stefano Stabellini <sstabellini@kernel.org> wrote:
>
> The following changes since commit 6a50f64ca01d0a7b97f14f069762bfd88160f31e:
>
>   Merge tag 'pull-request-2023-02-14' of https://gitlab.com/thuth/qemu into staging (2023-02-14 14:46:10 +0000)
>
> are available in the Git repository at:
>
>   https://gitlab.com/sstabellini/qemu xenpvh2
>
> for you to fetch changes up to 86b01d58ca2840bea6e4e7260aad450a660fbd46:
>
>   meson.build: enable xenpv machine build for ARM (2023-02-14 15:39:25 -0800)
>
> ----------------------------------------------------------------

Fails to compile for some configs, eg:

https://gitlab.com/qemu-project/qemu/-/jobs/3775820949
https://gitlab.com/qemu-project/qemu/-/jobs/3775820984

In file included from ../target/arm/machine.c:6:
../target/arm/internals.h:1141:21: error: field ‘f’ has incomplete type
1141 | CPUTLBEntryFull f;


This job fails in 'make check':
https://gitlab.com/qemu-project/qemu/-/jobs/3775821028

qemu-system-aarch64: The -accel and "-machine accel=" options are incompatible

thanks
-- PMM
Fabiano Rosas Feb. 15, 2023, 8:05 p.m. UTC | #2
Peter Maydell <peter.maydell@linaro.org> writes:

> On Tue, 14 Feb 2023 at 23:43, Stefano Stabellini <sstabellini@kernel.org> wrote:
>>
>> The following changes since commit 6a50f64ca01d0a7b97f14f069762bfd88160f31e:
>>
>>   Merge tag 'pull-request-2023-02-14' of https://gitlab.com/thuth/qemu into staging (2023-02-14 14:46:10 +0000)
>>
>> are available in the Git repository at:
>>
>>   https://gitlab.com/sstabellini/qemu xenpvh2
>>
>> for you to fetch changes up to 86b01d58ca2840bea6e4e7260aad450a660fbd46:
>>
>>   meson.build: enable xenpv machine build for ARM (2023-02-14 15:39:25 -0800)
>>
>> ----------------------------------------------------------------
>
> Fails to compile for some configs, eg:
>
> https://gitlab.com/qemu-project/qemu/-/jobs/3775820949
> https://gitlab.com/qemu-project/qemu/-/jobs/3775820984
>
> In file included from ../target/arm/machine.c:6:
> ../target/arm/internals.h:1141:21: error: field ‘f’ has incomplete type
> 1141 | CPUTLBEntryFull f;
>

For this to work we'll probably need to cherry-pick some parts of my
disable-tcg series:

https://lore.kernel.org/r/20230213202927.28992-1-farosas@suse.de

For this error specifically, patch 16.

And when the build eventually succeeds we might have make check
issues. We just encountered an analogous problem on an aarch64 host: Xen
brings qemu-system-x86_64 on an aarch64 host and tests fail because
there's no TCG.
Stefano Stabellini Feb. 15, 2023, 9:17 p.m. UTC | #3
On Wed, 15 Feb 2023, Fabiano Rosas wrote:
> Peter Maydell <peter.maydell@linaro.org> writes:
> 
> > On Tue, 14 Feb 2023 at 23:43, Stefano Stabellini <sstabellini@kernel.org> wrote:
> >>
> >> The following changes since commit 6a50f64ca01d0a7b97f14f069762bfd88160f31e:
> >>
> >>   Merge tag 'pull-request-2023-02-14' of https://gitlab.com/thuth/qemu into staging (2023-02-14 14:46:10 +0000)
> >>
> >> are available in the Git repository at:
> >>
> >>   https://gitlab.com/sstabellini/qemu xenpvh2
> >>
> >> for you to fetch changes up to 86b01d58ca2840bea6e4e7260aad450a660fbd46:
> >>
> >>   meson.build: enable xenpv machine build for ARM (2023-02-14 15:39:25 -0800)
> >>
> >> ----------------------------------------------------------------
> >
> > Fails to compile for some configs, eg:
> >
> > https://gitlab.com/qemu-project/qemu/-/jobs/3775820949
> > https://gitlab.com/qemu-project/qemu/-/jobs/3775820984
> >
> > In file included from ../target/arm/machine.c:6:
> > ../target/arm/internals.h:1141:21: error: field ‘f’ has incomplete type
> > 1141 | CPUTLBEntryFull f;
> >
> 
> For this to work we'll probably need to cherry-pick some parts of my
> disable-tcg series:
> 
> https://lore.kernel.org/r/20230213202927.28992-1-farosas@suse.de
> 
> For this error specifically, patch 16.

Thanks for the quick reply!

Peter, how would you like to proceed? Vikram (the original contributor)
will be AFK for a few weeks but I might be able to have a look this in
the meantime. But if this is a known issue with already a fix available,
then what should be the action for me?
Fabiano Rosas Feb. 16, 2023, 12:59 p.m. UTC | #4
Peter Maydell <peter.maydell@linaro.org> writes:

> On Tue, 14 Feb 2023 at 23:43, Stefano Stabellini <sstabellini@kernel.org> wrote:
>>
>> The following changes since commit 6a50f64ca01d0a7b97f14f069762bfd88160f31e:
>>
>>   Merge tag 'pull-request-2023-02-14' of https://gitlab.com/thuth/qemu into staging (2023-02-14 14:46:10 +0000)
>>
>> are available in the Git repository at:
>>
>>   https://gitlab.com/sstabellini/qemu xenpvh2
>>
>> for you to fetch changes up to 86b01d58ca2840bea6e4e7260aad450a660fbd46:
>>
>>   meson.build: enable xenpv machine build for ARM (2023-02-14 15:39:25 -0800)
>>
>> ----------------------------------------------------------------
>
> Fails to compile for some configs, eg:
>
> https://gitlab.com/qemu-project/qemu/-/jobs/3775820949
> https://gitlab.com/qemu-project/qemu/-/jobs/3775820984
>
> In file included from ../target/arm/machine.c:6:
> ../target/arm/internals.h:1141:21: error: field ‘f’ has incomplete type
> 1141 | CPUTLBEntryFull f;
>
>
> This job fails in 'make check':
> https://gitlab.com/qemu-project/qemu/-/jobs/3775821028
>
> qemu-system-aarch64: The -accel and "-machine accel=" options are incompatible

Here the issue is that we have:

mc->default_machine_opts = "accel=xen";

which conflicts with -accel qtest added by the tests.
Peter Maydell Feb. 16, 2023, 5:15 p.m. UTC | #5
On Wed, 15 Feb 2023 at 21:17, Stefano Stabellini <sstabellini@kernel.org> wrote:
>
> On Wed, 15 Feb 2023, Fabiano Rosas wrote:
> > Peter Maydell <peter.maydell@linaro.org> writes:
> >
> > > On Tue, 14 Feb 2023 at 23:43, Stefano Stabellini <sstabellini@kernel.org> wrote:
> > >>
> > >> The following changes since commit 6a50f64ca01d0a7b97f14f069762bfd88160f31e:
> > >>
> > >>   Merge tag 'pull-request-2023-02-14' of https://gitlab.com/thuth/qemu into staging (2023-02-14 14:46:10 +0000)
> > >>
> > >> are available in the Git repository at:
> > >>
> > >>   https://gitlab.com/sstabellini/qemu xenpvh2
> > >>
> > >> for you to fetch changes up to 86b01d58ca2840bea6e4e7260aad450a660fbd46:
> > >>
> > >>   meson.build: enable xenpv machine build for ARM (2023-02-14 15:39:25 -0800)
> > >>
> > >> ----------------------------------------------------------------
> > >
> > > Fails to compile for some configs, eg:
> > >
> > > https://gitlab.com/qemu-project/qemu/-/jobs/3775820949
> > > https://gitlab.com/qemu-project/qemu/-/jobs/3775820984
> > >
> > > In file included from ../target/arm/machine.c:6:
> > > ../target/arm/internals.h:1141:21: error: field ‘f’ has incomplete type
> > > 1141 | CPUTLBEntryFull f;
> > >
> >
> > For this to work we'll probably need to cherry-pick some parts of my
> > disable-tcg series:
> >
> > https://lore.kernel.org/r/20230213202927.28992-1-farosas@suse.de
> >
> > For this error specifically, patch 16.
>
> Thanks for the quick reply!
>
> Peter, how would you like to proceed? Vikram (the original contributor)
> will be AFK for a few weeks but I might be able to have a look this in
> the meantime. But if this is a known issue with already a fix available,
> then what should be the action for me?

You need to submit a pullreq which applies to current head-of-git.
If it depends on other patches, then if those are reviewed then
you can include them. In this case patch 16 of Fabiano's series
looks OK to include, assuming that's the only thing you need.

(But other stuff in that patchseries may be rather trickier to
extract from it.)

Make sure you test the xen-only build config in case there's
something else.

thanks
-- PMM
Peter Maydell Feb. 16, 2023, 5:17 p.m. UTC | #6
On Thu, 16 Feb 2023 at 12:59, Fabiano Rosas <farosas@suse.de> wrote:
>
> Peter Maydell <peter.maydell@linaro.org> writes:
>
> > On Tue, 14 Feb 2023 at 23:43, Stefano Stabellini <sstabellini@kernel.org> wrote:
> >>
> >> The following changes since commit 6a50f64ca01d0a7b97f14f069762bfd88160f31e:
> >>
> >>   Merge tag 'pull-request-2023-02-14' of https://gitlab.com/thuth/qemu into staging (2023-02-14 14:46:10 +0000)
> >>
> >> are available in the Git repository at:
> >>
> >>   https://gitlab.com/sstabellini/qemu xenpvh2
> >>
> >> for you to fetch changes up to 86b01d58ca2840bea6e4e7260aad450a660fbd46:
> >>
> >>   meson.build: enable xenpv machine build for ARM (2023-02-14 15:39:25 -0800)
> >>
> >> ----------------------------------------------------------------
> >
> > Fails to compile for some configs, eg:
> >
> > https://gitlab.com/qemu-project/qemu/-/jobs/3775820949
> > https://gitlab.com/qemu-project/qemu/-/jobs/3775820984
> >
> > In file included from ../target/arm/machine.c:6:
> > ../target/arm/internals.h:1141:21: error: field ‘f’ has incomplete type
> > 1141 | CPUTLBEntryFull f;
> >
> >
> > This job fails in 'make check':
> > https://gitlab.com/qemu-project/qemu/-/jobs/3775821028
> >
> > qemu-system-aarch64: The -accel and "-machine accel=" options are incompatible
>
> Here the issue is that we have:
>
> mc->default_machine_opts = "accel=xen";
>
> which conflicts with -accel qtest added by the tests.

I'm inclined to say that machines should not specify an
accelerator type. Leave that to the user, and produce an
error if it's not one that will work. (Note that 'qtest'
must work, because it's part of 'make check' testing that
every board can be created.)

thanks
-- PMM