Add AVX512 feature bits, register definition and corresponding
xsave/vmstate support.
Signed-off-by: Chao Peng
---
target-i386/cpu.c | 10 --
target-i386/cpu.h | 61 ++
target-i386/kvm.c | 19 +++
target-i386/machine.c | 87
On Thu, Oct 23, 2014 at 05:49:23PM -0200, Eduardo Habkost wrote:
> On Thu, Oct 23, 2014 at 11:02:43AM +0800, Chao Peng wrote:
> [...]
> > @@ -707,6 +714,24 @@ typedef union {
> > } XMMReg;
> >
> > typedef union {
> > +uint8_t _b[32];
> > +
On Fri, Oct 24, 2014 at 02:01:44PM -0200, Eduardo Habkost wrote:
> On Thu, Oct 23, 2014 at 11:02:43AM +0800, Chao Peng wrote:
> > Add AVX512 feature bits, register definition and corresponding
> > xsave/vmstate support.
> >
> > Signed-off-by: Chao Peng
> > --
On Sun, Nov 02, 2014 at 12:19:09PM +0200, Michael S. Tsirkin wrote:
> On Thu, Oct 23, 2014 at 11:02:43AM +0800, Chao Peng wrote:
> > Add AVX512 feature bits, register definition and corresponding
> > xsave/vmstate support.
> >
> > Signed-off-by: Chao Peng
>
&g
for most invocations
and looks all the places in current code hold true.
A non-cached version can be introduced if refresh is required in the
future.
Signed-off-by: Chao Peng
---
target-i386/kvm.c | 18 --
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/target-i386
On Mon, Jun 13, 2016 at 12:02:41PM +0200, Paolo Bonzini wrote:
>
>
> On 13/06/2016 04:21, Chao Peng wrote:
> > KVM_GET_SUPPORTED_CPUID ioctl is called frequently when initializing
> > CPU. Depends on CPU features and CPU count, the number of calls can be
> > extremely
On Tue, Jun 14, 2016 at 10:21:41AM +0200, Paolo Bonzini wrote:
>
>
> On 14/06/2016 07:01, Chao Peng wrote:
> >> >
> >> > Which are the CPUID leaves for which KVM_GET_SUPPORTED_CPUID is not
> >> > stateless? I cannot find any.
> > I have though
commit f8c75b2486 (vnc: Initialization stubs) removed CONFIG_VNC in vl.c
code. However qemu_find_opts("vnc") is NULL when vnc is configured out.
Crash will happen in qemu_opts_foreach() before stub vnc_init_func() is
called. This patch add it back.
Cc: Eduardo Habkost
Signed-off-by:
From: Haozhong Zhang
Expose some data structures and functions of BIOS linker loader which
will be used by later commits.
Signed-off-by: Haozhong Zhang
---
hw/acpi/bios-linker-loader.c | 83 +--
include/hw/acpi/bios-linker-loader.h | 85 +
est kernel;
- You are forced to use virtio-serial-pci, old 8250/16550 is not there;
Want to have a try?
===
Please follow https://github.com/chao-p/qemu-lite-tools.
Thanks,
Chao
Chao Peng (6):
acpi: introduce light weight ACPI PM emulation pm-lite
pci: introduce light weight
The code is loosely based on piix4_pm. The goal is to make it light
weight and dedicated to the emulation of PM registers defined in ACPI
spec. Unlike piix4_pm, the register address (PM_IO_BASE) is fixed so
configuration in BIOS is impossible and unnecessary.
Signed-off-by: Chao Peng
---
docs
Basically, the to be added pc-lite platform uses pm-lite to support
CPU/memory/PCI hotplug and pci-lite as the host bridge. The code here
reuses some existing facilities for piix/q35 platform.
Signed-off-by: Chao Peng
---
hw/i386/acpi-build.c | 108
ce ID assigned so guest may not
recognize it, the functionality however is expected to be OK.
Signed-off-by: Chao Peng
---
default-configs/i386-softmmu.mak | 1 +
default-configs/x86_64-softmmu.mak | 1 +
hw/pci-host/Makefile.objs | 1 +
hw/pci-host/pci_lite.c
From: Haozhong Zhang
It will be used in later commits.
Signed-off-by: Haozhong Zhang
---
hw/acpi/core.c | 2 +-
include/hw/acpi/acpi.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/acpi/core.c b/hw/acpi/core.c
index d24b9a9..70ad6ff 100644
--- a/hw/acpi/core.
... to make sure hotplug for new platform that without RTC support
can still work.
Signed-off-by: Chao Peng
---
hw/i386/pc.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 7198ed5..46ca0e3 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
The new board gets rid of most legacy devices and mainly support modern
PCI devices. BIOS is skipped and an ELF format kernel must be specified.
QEMU will boot this kernel directly.
Add "-machine pc-lite -kernel $ELF_KERNEL -append $KERNEL_CMD" to use it.
Signed-off-by: Chao Peng
--
From: Haozhong Zhang
Traditionally, guest firmware is responsible to patch ACPI tables
generated by QEMU. However, no firmware is used with pc-lite and
patching ACPI should be done in QEMU for pc-lite.
Signed-off-by: Haozhong Zhang
---
hw/acpi/nvdimm.c | 6 +-
hw/i386/Makefile.
ping several steps
and speed up the whole booting. We do this by filling the zero page per
Linux booting protocol and then jumping to the kernel protected/long
mode entry. Registers and paging should also be put in the correct
state.
Signed-off-by: Jim Kukunas
Signed-off-by: Chao Peng
---
hw/i38
On Fri, Jun 17, 2016 at 03:24:59PM +0200, Paolo Bonzini wrote:
>
>
> On 17/06/2016 10:14, Chao Peng wrote:
> > Basically:
> > - it removes old ISA devices and support only PCI devices;
>
> I think you need to keep at least the RTC, otherwise where does Linux
>
On Sun, Jun 19, 2016 at 06:51:04AM +0300, Michael S. Tsirkin wrote:
> On Fri, Jun 17, 2016 at 04:14:08AM -0400, Chao Peng wrote:
> > - it is FAST;
>
> Any numbers to demonstrate just how fast it is and fast at what?
On a 2.30GHz Haswell server, guest kernel booting time is 59.9
>
> The combination of devices removed/supported seems a bit arbitrary to me.
> The use in this text of "legacy" and non-"legacy" is also arbitrary if not
> given a definition.
The criterial here is to remove the devices that have poor performance.
You can think legacy devices here as ISA device
> It would be nice to at least see the patches. :)
>
> I think a lightweight q35 platform that can run the usual firmware could
> be acceptable in QEMU.
OK, I will send out v2.
>
> >> 2) this:
> >>
> >>> - it loads guest kernel directly, no BIOS, no bootloader, no realmode
> >>> code;
> >>
>
>
> I think a lightweight q35 platform that can run the usual firmware could
> be acceptable in QEMU.
After re-thought the target usage model, I'm not sure if this is a good
idea.
The original usage model is to replace kvm-tool with QEMU for Clear
Containers (https://clearlinux.org/features/clea
On Mon, Nov 14, 2022 at 04:04:59PM +, Alex Bennée wrote:
>
> Chao Peng writes:
>
> > In memory encryption usage, guest memory may be encrypted with special
> > key and can be accessed only by the guest itself. We call such memory
> > private memory. It's v
v 01, 2022 at 07:37:29PM +0800, Chao Peng wrote:
> > > >> >
> > > >> > 1) restoring kernel directmap:
> > > >> >
> > > >> > Currently SNP (and I believe TDX) need to either split or
> > > >&
On Tue, Nov 15, 2022 at 04:56:12PM +, Alex Bennée wrote:
>
> Chao Peng writes:
>
> > This new KVM exit allows userspace to handle memory-related errors. It
> > indicates an error happens in KVM at guest memory range [gpa, gpa+size).
> > The flags includes
On Mon, Nov 14, 2022 at 11:43:37AM +, Alex Bennée wrote:
>
> Chao Peng writes:
>
>
> > Introduction
> >
> > KVM userspace being able to crash the host is horrible. Under current
> > KVM architecture, all guest memory is inherently acce
On Wed, Nov 16, 2022 at 10:24:11PM +, Sean Christopherson wrote:
> On Tue, Oct 25, 2022, Chao Peng wrote:
> > +static int kvm_vm_ioctl_set_mem_attr(struct kvm *kvm, gpa_t gpa, gpa_t
> > size,
> > +bool is_private)
> >
On Wed, Nov 16, 2022 at 10:13:07PM +, Sean Christopherson wrote:
> On Wed, Nov 16, 2022, Ackerley Tng wrote:
> > >@@ -4173,6 +4203,22 @@ static int kvm_faultin_pfn(struct kvm_vcpu *vcpu,
> > >struct kvm_page_fault *fault)
> > > return RET_PF_EMULATE;
> > > }
> > >
> > >+ i
On Wed, Nov 16, 2022 at 06:48:43PM +, Sean Christopherson wrote:
> On Wed, Nov 16, 2022, Andy Lutomirski wrote:
> >
> >
> > On Tue, Oct 25, 2022, at 8:13 AM, Chao Peng wrote:
> > > diff --git a/Documentation/virt/kvm/api.rst
> > > b/Documentation/vi
On Wed, Nov 16, 2022 at 07:03:49PM +, Alex Bennée wrote:
>
> Chao Peng writes:
>
> > On Tue, Nov 15, 2022 at 04:56:12PM +, Alex Bennée wrote:
> >>
> >> Chao Peng writes:
> >>
> >> > This new KVM exit allows userspace to hand
On Wed, Nov 16, 2022 at 09:40:23AM +, Alex Bennée wrote:
>
> Chao Peng writes:
>
> > On Mon, Nov 14, 2022 at 11:43:37AM +, Alex Bennée wrote:
> >>
> >> Chao Peng writes:
> >>
> >>
> >> > Introduction
> >> >
On Thu, Nov 17, 2022 at 03:08:17PM +, Alex Bennée wrote:
>
> Chao Peng writes:
>
> > On Wed, Nov 16, 2022 at 07:03:49PM +, Alex Bennée wrote:
> >>
> >> Chao Peng writes:
> >>
> >> > On Tue, Nov 15, 2022 at 04:56:12PM +,
On Fri, Nov 18, 2022 at 03:59:12PM +, Sean Christopherson wrote:
> On Fri, Nov 18, 2022, Alex Benn?e wrote:
> >
> > Chao Peng writes:
> >
> > > On Thu, Nov 17, 2022 at 03:08:17PM +, Alex Benn?e wrote:
> > >> >> I think this should b
On Tue, Nov 29, 2022 at 02:21:39PM +0300, Kirill A. Shutemov wrote:
> On Mon, Nov 28, 2022 at 06:06:32PM -0600, Michael Roth wrote:
> > On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote:
> > > From: "Kirill A. Shutemov"
> > >
>
On Tue, Nov 29, 2022 at 12:39:06PM +0100, David Hildenbrand wrote:
> On 29.11.22 12:21, Kirill A. Shutemov wrote:
> > On Mon, Nov 28, 2022 at 06:06:32PM -0600, Michael Roth wrote:
> > > On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote:
> > >
On Mon, Nov 28, 2022 at 06:37:25PM -0600, Michael Roth wrote:
> On Tue, Oct 25, 2022 at 11:13:37PM +0800, Chao Peng wrote:
...
> > +static long restrictedmem_fallocate(struct file *file, int mode,
> > + loff_t offset, loff_t len)
> &
On Tue, Nov 29, 2022 at 01:18:15PM -0600, Michael Roth wrote:
> On Tue, Nov 29, 2022 at 01:06:58PM -0600, Michael Roth wrote:
> > On Tue, Nov 29, 2022 at 10:06:15PM +0800, Chao Peng wrote:
> > > On Mon, Nov 28, 2022 at 06:37:25PM -0600, Michael Roth wrote:
> > > >
default memfd_restricted() prevents userspace read, write and mmap.
By defining new bit in the 'flags', it can be extended to support other
restricted semantics in the future.
The system call is currently wired up for x86 arch.
Signed-off-by: Kirill A. Shutemov
Signed-off-by: Chao
...@linux.intel.com/T/
[3] Original design proposal:
https://lore.kernel.org/all/20210824005248.200037-1-sea...@google.com/
[4] Selftest:
https://lore.kernel.org/all/2022014244.1714148-1-vannapu...@google.com/
Chao Peng (8):
KVM: Introduce per-page memory attributes
KVM: Extend the mems
re KVM
exits to userspace for an implicit conversion when the page is in a
different state than requested (private or shared).
Suggested-by: Sean Christopherson
Co-developed-by: Yu Zhang
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
Reviewed-by: Fuad Tabba
---
: Sean Christopherson
Signed-off-by: Chao Peng
---
arch/x86/kvm/mmu/mmu.c | 8 +---
include/linux/kvm_host.h | 33 +
virt/kvm/kvm_main.c | 32 +++-
3 files changed, 49 insertions(+), 24 deletions(-)
diff --git a/arch/x86/kvm
y: Yu Zhang
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
arch/x86/kvm/mmu/mmu.c | 63 +++--
arch/x86/kvm/mmu/mmu_internal.h | 14 +++-
arch/x86/kvm/mmu/mmutrace.h | 1 +
arch/x86/kvm/mmu/tdp_mmu.c | 2 +-
include/linux/kvm_host.h
page state, invoke kvm_mmu_invalidate_* helpers to let the
page fault handler retry during this time frame.
Signed-off-by: Chao Peng
---
include/linux/kvm_host.h | 7 +-
virt/kvm/kvm_main.c | 168 ++-
2 files changed, 116 insertions(+), 59 deletions
user_mem_region to handle both the normal and the
'_ext' variants.
Co-developed-by: Yu Zhang
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
Reviewed-by: Fuad Tabba
Tested-by: Fuad Tabba
---
Documentation/virt/kvm/api.rst | 40 ++-
arch/x86/kvm/Kconf
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
Reviewed-by: Fuad Tabba
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/x86.c | 13 +++
include/linux/kvm_host.h| 3 +
virt/kvm/kvm_main.c | 179 +++-
4 files changed, 191
large page has mixed private/share subpages and update
this 'mixed' bit whenever the memory attribute is changed between
private and shared.
Signed-off-by: Chao Peng
---
arch/x86/include/asm/kvm_host.h | 8 ++
arch/x86/kvm/mmu/mmu.c | 134 ++
.
- KVM_GET_SUPPORTED_MEMORY_ATTRIBUTES to return the KVM supported
memory attributes.
KVM internally uses xarray to store the per-page memory attributes.
Suggested-by: Sean Christopherson
Signed-off-by: Chao Peng
Link: https://lore.kernel.org/all/y2wb48kd0j4vg...@google.com/
---
Documentation/virt/kvm/api.rst | 63
On Thu, Dec 01, 2022 at 06:16:46PM -0800, Vishal Annapurve wrote:
> On Tue, Oct 25, 2022 at 8:18 AM Chao Peng wrote:
> >
...
> > +}
> > +
> > +SYSCALL_DEFINE1(memfd_restricted, unsigned int, flags)
> > +{
>
> Looking at the underlying shmem implementatio
On Mon, Dec 05, 2022 at 09:03:11AM +, Fuad Tabba wrote:
> Hi Chao,
>
> On Fri, Dec 2, 2022 at 6:18 AM Chao Peng wrote:
> >
> > In memory encryption usage, guest memory may be encrypted with special
> > key and can be accessed only by the guest itself. We call suc
On Mon, Dec 05, 2022 at 09:23:49AM +, Fuad Tabba wrote:
> Hi Chao,
>
> On Fri, Dec 2, 2022 at 6:19 AM Chao Peng wrote:
> >
> > Currently in mmu_notifier invalidate path, hva range is recorded and
> > then checked against by mmu_notifier_retry_hva() in the p
On Mon, Dec 05, 2022 at 02:49:59PM -0800, Isaku Yamahata wrote:
> On Fri, Dec 02, 2022 at 02:13:45PM +0800,
> Chao Peng wrote:
>
> > A large page with mixed private/shared subpages can't be mapped as large
> > page since its sub private/shared pages are from different m
On Thu, Jul 21, 2022 at 05:58:50PM +, Sean Christopherson wrote:
> On Thu, Jul 21, 2022, Chao Peng wrote:
> > On Thu, Jul 21, 2022 at 03:34:59PM +0800, Wei Wang wrote:
> > >
> > >
> > > On 7/21/22 00:21, Sean Christopherson wrote:
> > >
On Thu, Jul 21, 2022 at 11:44:11AM +0200, David Hildenbrand wrote:
> On 06.07.22 10:20, Chao Peng wrote:
> > Normally, a write to unallocated space of a file or the hole of a sparse
> > file automatically causes space allocation, for memfd, this equals to
> > memory allo
On Thu, Jul 21, 2022 at 03:05:09PM +, Sean Christopherson wrote:
> On Thu, Jul 21, 2022, David Hildenbrand wrote:
> > On 21.07.22 11:44, David Hildenbrand wrote:
> > > On 06.07.22 10:20, Chao Peng wrote:
> > >> Normally, a write to unallocated space of
confidential computing usage where we use two memfds to
> > > back guest memory and at a single point only one memfd is alive and we
> > > want to prevent memory allocation for the other memfd which may have
> > > been mmap-ed previously. More discussion can be fou
On Fri, Jul 29, 2022 at 08:58:41PM +, Sean Christopherson wrote:
> On Wed, Jul 06, 2022, Chao Peng wrote:
> > A page fault can carry the private/shared information for
> > KVM_MEM_PRIVATE memslot, this can be filled by architecture code(like
> > TDX code). To handle page
On Tue, Aug 02, 2022 at 04:38:55PM +, Sean Christopherson wrote:
> On Tue, Aug 02, 2022, Sean Christopherson wrote:
> > I think we should avoid UNMAPPABLE even on the KVM side of things for the
> > core
> > memslots functionality and instead be very literal, e.g.
> >
> > KVM_HAS_FD_BASED_
On Mon, Aug 01, 2022 at 07:40:32AM -0700, Dave Hansen wrote:
> This patch does not belong in this series. It's not a patch to the
> kernel. This is a kernel series.
You are right.
>
> It would be much more appropriate to put a link to a separately posted
> manpage patch in the cover letter.
T
On Fri, Jul 29, 2022 at 07:02:12PM +, Sean Christopherson wrote:
> On Wed, Jul 06, 2022, Chao Peng wrote:
> > The sync mechanism between mmu_notifier and page fault handler employs
> > fields mmu_notifier_seq/count and mmu_notifier_range_start/end. For the
> > to be added
On Fri, Jul 29, 2022 at 07:51:29PM +, Sean Christopherson wrote:
> On Wed, Jul 06, 2022, Chao Peng wrote:
> > @@ -1332,9 +1332,18 @@ yet and must be cleared on entry.
> > __u64 userspace_addr; /* start of the userspace allocated memory */
> >}
On Wed, Aug 03, 2022 at 03:51:24PM +, Sean Christopherson wrote:
> On Wed, Aug 03, 2022, Chao Peng wrote:
> > On Tue, Aug 02, 2022 at 04:38:55PM +, Sean Christopherson wrote:
> > > On Tue, Aug 02, 2022, Sean Christopherson wrote:
> > > > I think we should av
are all trackng,
> > e.g.
> >
> >mmu_invalidate_seq
> >mmu_invalidate_in_progress
> >mmu_invalidate_range_start
> >mmu_invalidate_range_end
> >
>
> Agreed, and this can of course be committed separately if Chao Peng sends it
> outs
On Thu, Aug 04, 2022 at 12:10:44AM -0700, Isaku Yamahata wrote:
> On Wed, Jul 06, 2022 at 04:20:09PM +0800,
> Chao Peng wrote:
>
> > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> > index 0bdb6044e316..e9153b54e2a4 100644
> > --- a/include/linux/k
On Fri, Aug 05, 2022 at 03:22:58PM +0200, David Hildenbrand wrote:
> On 06.07.22 10:20, Chao Peng wrote:
> > This patch introduces memfile_notifier facility so existing memory file
> > subsystems (e.g. tmpfs/hugetlbfs) can provide memory pages to allow a
> > third kernel com
On Fri, Aug 05, 2022 at 03:26:02PM +0200, David Hildenbrand wrote:
> On 06.07.22 10:20, Chao Peng wrote:
> > From: "Kirill A. Shutemov"
> >
> > Implement shmem as a memfile_notifier backing store. Essentially it
> > interacts with the memfile_notifier featur
On Fri, Aug 05, 2022 at 03:28:50PM +0200, David Hildenbrand wrote:
> On 06.07.22 10:20, Chao Peng wrote:
> > Introduce a new memfd_create() flag indicating the content of the
> > created memfd is inaccessible from userspace through ordinary MMU
> > access (e.g., read/write/mma
On Fri, Aug 05, 2022 at 07:55:38PM +0200, Paolo Bonzini wrote:
> On 7/21/22 11:44, David Hildenbrand wrote:
> >
> > Also, I*think* you can place pages via userfaultfd into shmem. Not
> > sure if that would count "auto alloc", but it would certainly bypass
> > fallocate().
>
> Yeah, userfaultfd_r
On Fri, Aug 05, 2022 at 08:06:03PM +0200, David Hildenbrand wrote:
> On 05.08.22 19:55, Paolo Bonzini wrote:
> > On 7/21/22 11:44, David Hildenbrand wrote:
> >>
> >> Also, I*think* you can place pages via userfaultfd into shmem. Not
> >> sure if that would count "auto alloc", but it would certainl
On Wed, Aug 10, 2022 at 11:55:19AM +0200, David Hildenbrand wrote:
> On 10.08.22 11:37, Chao Peng wrote:
> > On Fri, Aug 05, 2022 at 03:28:50PM +0200, David Hildenbrand wrote:
> >> On 06.07.22 10:20, Chao Peng wrote:
> >>> Introduce a new memfd_create() flag
On Thu, Aug 11, 2022 at 01:30:06PM +0200, Gupta, Pankaj wrote:
>
> > > This is the v7 of this series which tries to implement the fd-based KVM
> > > guest private memory. The patches are based on latest kvm/queue branch
> > > commit:
> > >
> > >b9b71f43683a (kvm/queue) KVM: x86/mmu: Buffer ne
On Thu, Aug 11, 2022 at 12:27:56PM +, Quentin Perret wrote:
> +CC Fuad
>
> On Wednesday 10 Aug 2022 at 14:38:43 (+), Sean Christopherson wrote:
> > > I understand Sean's suggestion about abstracting, but if the new name
> > > makes it harder to grasp and there isn't really an alternative t
On Mon, Feb 10, 2020 at 06:44:50AM -0500, Michael S. Tsirkin wrote:
> On Mon, Feb 10, 2020 at 05:05:16PM +0800, Zha Bin wrote:
> > We have compared the number of files and the lines of code between
> > virtio-mmio and virio-pci.
> >
> > Virtio-PCI Virtio-MMIO
On Fri, Jan 13, 2023 at 09:54:41PM +, Sean Christopherson wrote:
> On Fri, Dec 02, 2022, Chao Peng wrote:
> > The system call is currently wired up for x86 arch.
>
> Building on other architectures (except for arm64 for some reason) yields:
>
> CALL/.../scr
On Fri, Jan 13, 2023 at 10:37:39PM +, Sean Christopherson wrote:
> On Tue, Jan 10, 2023, Chao Peng wrote:
> > On Mon, Jan 09, 2023 at 07:32:05PM +, Sean Christopherson wrote:
> > > On Fri, Jan 06, 2023, Chao Peng wrote:
> > > > On Thu, Jan 05, 2023 at 11:
On Sat, Jan 14, 2023 at 12:01:01AM +, Sean Christopherson wrote:
> On Fri, Dec 02, 2022, Chao Peng wrote:
> > @@ -10357,6 +10364,12 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
> >
> > if (kvm_check_request(KVM_REQ_UPDATE_CP
On Sat, Jan 14, 2023 at 12:37:59AM +, Sean Christopherson wrote:
> On Fri, Dec 02, 2022, Chao Peng wrote:
> > This patch series implements KVM guest private memory for confidential
> > computing scenarios like Intel TDX[1]. If a TDX host accesses
> > TDX-protected guest
On Tue, Jan 17, 2023 at 11:21:10AM +0800, Binbin Wu wrote:
>
> On 12/2/2022 2:13 PM, Chao Peng wrote:
> > In confidential computing usages, whether a page is private or shared is
> > necessary information for KVM to perform operations like page fault
> > handling, pag
On Tue, Jan 17, 2023 at 04:34:15PM +, Sean Christopherson wrote:
> On Tue, Jan 17, 2023, Chao Peng wrote:
> > On Fri, Jan 13, 2023 at 09:54:41PM +, Sean Christopherson wrote:
> > > > + list_for_each_entry(notifier, &data->notifiers, list) {
> >
On Tue, Jan 17, 2023 at 07:35:58PM +, Sean Christopherson wrote:
> On Tue, Jan 17, 2023, Chao Peng wrote:
> > On Sat, Jan 14, 2023 at 12:01:01AM +, Sean Christopherson wrote:
> > > On Fri, Dec 02, 2022, Chao Peng wrote:
> > > > @@ -10357,6 +10364,12 @@ stat
On Wed, Mar 22, 2023 at 05:41:31PM -0700, Isaku Yamahata wrote:
> On Wed, Mar 08, 2023 at 03:40:26PM +0800,
> Chao Peng wrote:
>
> > On Wed, Mar 08, 2023 at 12:13:24AM +, Ackerley Tng wrote:
> > > Chao Peng writes:
> > >
> > > > On Sat, Jan 14,
On Wed, Mar 22, 2023 at 08:27:37PM -0500, Michael Roth wrote:
> On Tue, Feb 21, 2023 at 08:11:35PM +0800, Chao Peng wrote:
> > > Hi Sean,
> > >
> > > We've rebased the SEV+SNP support onto your updated UPM base support
> > > tree and things seem to b
On Fri, Mar 24, 2023 at 10:29:25AM +0800, Xiaoyao Li wrote:
> On 3/24/2023 10:10 AM, Chao Peng wrote:
> > On Wed, Mar 22, 2023 at 05:41:31PM -0700, Isaku Yamahata wrote:
> > > On Wed, Mar 08, 2023 at 03:40:26PM +0800,
> > > Chao Peng wrote:
> > >
> > &g
On Fri, Jan 13, 2023 at 11:16:27PM +, Sean Christopherson wrote:
> On Fri, Dec 02, 2022, Chao Peng wrote:
> > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> > index 9a07380f8d3c..5aefcff614d2 100644
> > --- a/arch/x86/kvm/x86.c
> > +++ b/arch/x86/kvm/x86
On Sat, Jan 14, 2023 at 12:01:01AM +, Sean Christopherson wrote:
> On Fri, Dec 02, 2022, Chao Peng wrote:
...
> Strongly prefer to use similar logic to existing code that detects wraps:
>
> mem->restricted_offset + mem->memory_size <
> mem->restrict
vm/51a6f74f-6c05-74b9-3fd7-b7cd900fb...@redhat.com/t/
Thanks,
Chao
---
Chao Peng (6):
mm: Add F_SEAL_GUEST to shmem/memfd
kvm: x86: Introduce guest private memory address space to memslot
kvm: x86: add private_ops to memslot
kvm: x86: implement private_ops for memfd backing store
Existing memslots functions are extended to pass a bool ‘private’
parameter to indicate whether the operation is on guest private memory
address space or not.
Signed-off-by: Sean Christopherson
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
arch/x86/include/asm/kvm_host.h | 5
Signed-off-by: Chao Peng
---
linux-headers/asm-x86/kvm.h | 5 +
linux-headers/linux/kvm.h | 29 +
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
index a6c327f8ad..f9aadf0ebb 100644
--- a
The new seal is only allowed if there's no pre-existing pages in the fd
and there's no existing mapping of the file. After the seal is set, no
read/write/mmap from userspace is allowed.
Signed-off-by: Kirill A. Shutemov
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
inc
Signed-off-by: Chao Peng
---
hw/core/machine-hmp-cmds.c | 3 +++
hw/core/machine-qmp-cmds.c | 1 +
qapi/machine.json | 3 +++
qapi/qom.json | 3 +++
4 files changed, 10 insertions(+)
diff --git a/hw/core/machine-hmp-cmds.c b/hw/core/machine-hmp-cmds.c
index 76b22b00d6
Call memfd_register_guest() module API to setup private_ops for a given
private memslot.
Signed-off-by: Sean Christopherson
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
arch/x86/kvm/Makefile| 2 +-
arch/x86/kvm/memfd.c | 63
include
f-by: Sean Christopherson
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
Documentation/virt/kvm/api.rst | 1 +
arch/x86/kvm/mmu/mmu.c | 47 ++
arch/x86/kvm/mmu/paging_tmpl.h | 3 ++-
include/linux/kvm_host.h | 8 ++
include/uapi/linux/kvm.h
Currently support to exit to userspace for private/shared memory
conversion.
Signed-off-by: Sean Christopherson
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
arch/x86/kvm/mmu/mmu.c | 20
include/uapi/linux/kvm.h | 15 +++
2 files changed, 35
This new ioctl let user to split an exising memory region into two
parts. The first part reuses the existing memory region but have a
shrinked size. The second part is a newly created one.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
arch/x86/kvm/x86.c | 3 +-
include/linux
Currently only memfd is supported.
Signed-off-by: Chao Peng
---
backends/hostmem-memfd.c | 12 +---
backends/hostmem.c | 24
include/exec/memory.h| 3 +++
include/exec/ram_addr.h | 3 ++-
include/qemu/memfd.h | 5 +
include/sysemu/hostmem.h
Signed-off-by: Chao Peng
---
accel/kvm/kvm-all.c | 9 +
include/sysemu/kvm_int.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index 0125c17edb..d336458e9e 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -138,6 +138,7
Signed-off-by: Chao Peng
---
include/exec/address-spaces.h | 2 ++
softmmu/physmem.c | 13 +
2 files changed, 15 insertions(+)
diff --git a/include/exec/address-spaces.h b/include/exec/address-spaces.h
index db8bfa9a92..b3f45001c0 100644
--- a/include/exec/address
Signed-off-by: Chao Peng
---
hw/core/machine.c | 38 ++
hw/i386/pc.c| 22 --
include/hw/boards.h | 2 ++
softmmu/vl.c| 16 ++--
4 files changed, 66 insertions(+), 12 deletions(-)
diff --git a/hw/core
Signed-off-by: Chao Peng
---
accel/kvm/kvm-all.c| 49 ++
include/sysemu/kvm.h | 1 +
target/arm/kvm.c | 5 +
target/i386/kvm/kvm.c | 27 +++
target/mips/kvm.c | 5 +
target/ppc/kvm.c | 5 +
target
On Thu, Nov 11, 2021 at 05:08:47PM +0200, Mika Penttilä wrote:
>
>
> On 11.11.2021 16.13, Chao Peng wrote:
> > Currently support to exit to userspace for private/shared memory
> > conversion.
> >
> > Signed-off-by: Sean Christopherson
> > Signed-off-by:
1 - 100 of 408 matches
Mail list logo