[PATCH v3 0/5] SGX NUMA support plus vepc reset

Yang Zhong posted 5 patches 2 years, 6 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20211101162009.62161-1-yang.zhong@intel.com
Maintainers: Eric Blake <eblake@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Igor Mammedov <imammedo@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Eduardo Habkost <ehabkost@redhat.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Ani Sinha <ani@anisinha.ca>, Markus Armbruster <armbru@redhat.com>, Cornelia Huck <cohuck@redhat.com>
docs/system/i386/sgx.rst  |  31 +++++++--
qapi/machine.json         |  10 ++-
qapi/misc-target.json     |  19 +++++-
include/hw/i386/sgx-epc.h |   3 +
include/hw/i386/x86.h     |   1 +
linux-headers/linux/kvm.h |   6 ++
hw/core/numa.c            |   6 ++
hw/i386/acpi-build.c      |   4 ++
hw/i386/sgx-epc.c         |   3 +
hw/i386/sgx.c             | 137 +++++++++++++++++++++++++++++++++++---
hw/i386/x86.c             |   4 ++
monitor/hmp-cmds.c        |   1 +
qemu-options.hx           |   4 +-
13 files changed, 211 insertions(+), 18 deletions(-)
[PATCH v3 0/5] SGX NUMA support plus vepc reset
Posted by Yang Zhong 2 years, 6 months ago
The basic SGX patches were merged into Qemu release, the left NUMA
function for SGX should be enabled. The patch1 implemented the SGX NUMA
ACPI to enable NUMA in the SGX guest. Since Libvirt need detailed host
SGX EPC sections info to decide how to allocate EPC sections for SGX NUMA
guest, the SGXEPCSection list is introduced to show detailed sections info
in the monitor or HMP interface.

This version also plus the vEPC reset support because the related kernel
patches were merged into tip tree master branch, please ref below link:
https://lore.kernel.org/all/20211021201155.1523989-1-pbonzini@redhat.com/
or the tip tree master branch.

Thanks!

Yang


Changes from V2:
- Updated the reset patch(patch 5), reduced to 2 pass.(Paolo)

Changes from V1:
- added documents for new members.(Eric)
- changed the "index" to "node" in struct SGXEPCSection.(Eric, Paolo)
- squashed the previous patch 4 and patch 5 into patch 3.(Paolo)
- added reset patch(patch 5) into this version.

Yang Zhong (5):
  numa: Enable numa for SGX EPC sections
  monitor: Support 'info numa' command
  numa: Support SGX numa in the monitor and Libvirt interfaces
  doc: Add the SGX numa description
  sgx: Reset the vEPC regions during VM reboot

 docs/system/i386/sgx.rst  |  31 +++++++--
 qapi/machine.json         |  10 ++-
 qapi/misc-target.json     |  19 +++++-
 include/hw/i386/sgx-epc.h |   3 +
 include/hw/i386/x86.h     |   1 +
 linux-headers/linux/kvm.h |   6 ++
 hw/core/numa.c            |   6 ++
 hw/i386/acpi-build.c      |   4 ++
 hw/i386/sgx-epc.c         |   3 +
 hw/i386/sgx.c             | 137 +++++++++++++++++++++++++++++++++++---
 hw/i386/x86.c             |   4 ++
 monitor/hmp-cmds.c        |   1 +
 qemu-options.hx           |   4 +-
 13 files changed, 211 insertions(+), 18 deletions(-)


Re: [PATCH v3 0/5] SGX NUMA support plus vepc reset
Posted by Paolo Bonzini 2 years, 5 months ago
On 11/1/21 17:20, Yang Zhong wrote:
> The basic SGX patches were merged into Qemu release, the left NUMA
> function for SGX should be enabled. The patch1 implemented the SGX NUMA
> ACPI to enable NUMA in the SGX guest. Since Libvirt need detailed host
> SGX EPC sections info to decide how to allocate EPC sections for SGX NUMA
> guest, the SGXEPCSection list is introduced to show detailed sections info
> in the monitor or HMP interface.
> 
> This version also plus the vEPC reset support because the related kernel
> patches were merged into tip tree master branch, please ref below link:
> https://lore.kernel.org/all/20211021201155.1523989-1-pbonzini@redhat.com/
> or the tip tree master branch.

Hi,

I queued patch 5, and enough of patch 2 to avoid crashing 'info numa'.

For patch 5, note that linux-headers/ is automatically generated from 
Linux headers (as the name says!) so the ioctl has to be declared in 
hw/i386/sgx-epc.c.

Thanks,

Paolo


Re: [PATCH v3 0/5] SGX NUMA support plus vepc reset
Posted by Yang Zhong 2 years, 5 months ago
On Wed, Nov 10, 2021 at 01:52:09PM +0100, Paolo Bonzini wrote:
> On 11/1/21 17:20, Yang Zhong wrote:
> >The basic SGX patches were merged into Qemu release, the left NUMA
> >function for SGX should be enabled. The patch1 implemented the SGX NUMA
> >ACPI to enable NUMA in the SGX guest. Since Libvirt need detailed host
> >SGX EPC sections info to decide how to allocate EPC sections for SGX NUMA
> >guest, the SGXEPCSection list is introduced to show detailed sections info
> >in the monitor or HMP interface.
> >
> >This version also plus the vEPC reset support because the related kernel
> >patches were merged into tip tree master branch, please ref below link:
> >https://lore.kernel.org/all/20211021201155.1523989-1-pbonzini@redhat.com/
> >or the tip tree master branch.
> 
> Hi,
> 
> I queued patch 5, and enough of patch 2 to avoid crashing 'info numa'.
> 
> For patch 5, note that linux-headers/ is automatically generated
> from Linux headers (as the name says!) so the ioctl has to be
> declared in hw/i386/sgx-epc.c.
>
 
  Paolo, thanks!

  No other maintainers to review numa patches, so i will send the numa
  patches again? thanks!

  Yang

 
> Thanks,
> 
> Paolo

Re: [PATCH v3 0/5] SGX NUMA support plus vepc reset
Posted by Paolo Bonzini 2 years, 5 months ago
On 11/10/21 13:56, Yang Zhong wrote:
>    Paolo, thanks!
> 
>    No other maintainers to review numa patches, so i will send the numa
>    patches again? thanks!

The patch look good, but they were sent too close to the 6.2 release 
freeze.  I'll take a look at them again a month.

Paolo


Re: [PATCH v3 0/5] SGX NUMA support plus vepc reset
Posted by Yang Zhong 2 years, 5 months ago
On Wed, Nov 10, 2021 at 05:07:40PM +0100, Paolo Bonzini wrote:
> On 11/10/21 13:56, Yang Zhong wrote:
> >   Paolo, thanks!
> >
> >   No other maintainers to review numa patches, so i will send the numa
> >   patches again? thanks!
> 
> The patch look good, but they were sent too close to the 6.2 release
> freeze.  I'll take a look at them again a month.
>

  Thanks Paolo, once the new Qemu version is ready, i will send V4. thanks!

  Regards,

  Yang
 
> Paolo