Add AVX512 feature bits, register definition and corresponding
xsave/vmstate support.
Signed-off-by: Chao Peng chao.p.p...@linux.intel.com
---
target-i386/cpu.c | 10 --
target-i386/cpu.h | 61 ++
target-i386/kvm.c | 19 +++
target
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];
+uint16_t _w[16];
+uint32_t _l[8];
+uint64_t _q[4
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 chao.p.p...@linux.intel.com
Thanks
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 <chao.p.p...@linux.intel.com>
---
target-i386/kvm.c | 18 --
1 file changed, 16 insertions(+), 2 del
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
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 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
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
>
>
> 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
> 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;
> >>
>
t.com>
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
Note: Of course there is other ways to fix it (e.g. check against NULL).
I feel comfortable in any way.
---
vl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/vl.c b/vl.c
index 45eff56..2088491 100644
>
> qboot does basically four things: 1) relocate from ROM to 0xf; 2)
> initialize PCI; 2) provide the ACPI and e820 tables; 3) boot.
>
> If Linux can boot without initializing PCI bridges and without INTX, we
> can remove that code from qboot. The PCI scan is the most expensive
> part, I
On Thu, Jun 23, 2016 at 01:55:06PM +0100, Daniel P. Berrange wrote:
> On Mon, Jun 20, 2016 at 02:12:17PM +0800, Chao Peng wrote:
> > 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:
&g
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 +--
;
- 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 PCIE Host
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 <chao.p.p...@linux.intel.com>
---
hw/i386/acpi-build.c
assigned so guest may not
recognize it, the functionality however is expected to be OK.
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
default-configs/i386-softmmu.mak | 1 +
default-configs/x86_64-softmmu.mak | 1 +
hw/pci-host/Makefile.objs | 1 +
hw/pc
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
---
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 <james.t.kuku...@linux.intel.com>
S
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 <chao.
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
... to make sure hotplug for new platform that without RTC support
can still work.
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
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
--
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
2ms
-nopit 5ms
-static-prt 8ms
-nofw 62ms
Thanks,
Chao
Chao Peng (9):
pc: make smbus configurable
pc: make sata configurable
pc: make pic configurable
pc: make pit configurable
acpi: build static _PRT
ich9: enable pm registers when
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/i386/pc.c | 1 +
hw/i386/pc_q35.c | 21 -
include/hw/i386/pc.h | 2 ++
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 99fb9aa..ea81283 100644
--
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/i386/pc.c | 12 +++-
hw/i386/pc_q35.c | 25 +++--
include/hw/i386/pc.h | 2 ++
3 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 66e1961..9
...to reduce the interpretation burden for guest ACPI component.
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/i386/acpi-build.c | 31 ++-
hw/i386/pc.c | 1 +
include/hw/i386/pc.h | 2 ++
3 files changed, 33 insertions(+), 1 deletion(-)
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
---
com>
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/i386/pc.c | 166 +--
1 file changed, 163 insertions(+), 3 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index f479697..4a368de 100644
--- a/hw/i386/pc.c
+++
An ELF format kernel must be specified. Only linux is supported.
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/i386/pc.c | 92 ++--
include/hw/i386/pc.h | 2 ++
2 files changed, 69 insertions(+), 25 deletions(-)
diff
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/i386/pc.c | 23 +++
hw/i386/pc_q35.c | 12 +++-
include/hw/i386/pc.h | 3 +++
3 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 022dd1b..6
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 +--
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
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/i386/pc.c | 6 --
hw/i386/pc_piix.c| 2 +-
hw/i386/pc_q35.c | 2 +-
include/hw/i386/pc.h | 5 -
4 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index ea81283..1
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/pci-host/q35.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index e33d5a5..c5c5fe2 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -448,9 +
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/isa/lpc_ich9.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index 10d1ee8..28e9911 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -484,6
> Patches 1-4 are okay, though I think it would be easier to add a -M
> q35-lite too that just removes the legacy devices. The -M q35-lite
> machine doesn't have to support versioning for now.
Okay, this is also good to have in my mind.
>
> As you might expect, I don't agree with removing the
Hi,
I had some initial investigation on 9p read/write performance and it
looks not good when compared to the implementation in kvmtool.
With kvmtool, the write speed is ~1400MB/s. With QEMU, it's only ~
700MB/s.
I had a quick look at the code, the kvmtool code is really simple so no
other
> > > 2) Linux optimizations: using an uncompressed image to avoid the
> > > cost of copying and decompressing. QEMU can already load the
> > > image
> > > at the right place and the real mode stub can do little more than
> > > GDT/IDT setup.
> >
> > This works surely. I actually followed your
> > > 1) qboot optimizations: adopt the fw_cfg DMA interface instead of
> > > the
> > > cbfs flash hack (so that -kernel works), drop PCI bridge
> > > initialization,
> > > copy less than 64K of memory from ROM to 0xf;
> >
> > I can do the evaluation on qboot. Also adding Amnon Ilan, to see
/2016-09/msg00422.html
for the background.
Chao Peng (4):
pc: make smbus configurable
pc: make sata configurable
pc: make pit configurable
q35: introduce q35-lite
hw/i386/pc.c | 68 +++-
hw/i386/pc_piix.c| 2 +-
hw/i386/pc_q35.c
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/i386/pc.c | 21 -
hw/i386/pc_piix.c| 2 +-
hw/i386/pc_q35.c | 3 ++-
include/hw/i386/pc.h | 3 +++
4 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
This patch introduces a light weight machine type which shares the
same codebase with existing q35 machine type but with some features
disabled by default.
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/i386/pc_q35.c | 18 ++
1 file changed, 18 insertions(+)
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/i386/pc.c | 18 ++
hw/i386/pc_q35.c | 12 +++-
include/hw/i386/pc.h | 3 +++
3 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index c011552..95d68d5
Signed-off-by: Chao Peng <chao.p.p...@linux.intel.com>
---
hw/i386/pc.c | 29 -
hw/i386/pc_q35.c | 24 ++--
include/hw/i386/pc.h | 2 ++
3 files changed, 40 insertions(+), 15 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
On Thu, 2016-11-10 at 16:50 +0200, Michael S. Tsirkin wrote:
> On Sat, Nov 05, 2016 at 03:19:47AM -0400, Chao Peng wrote:
> >
> > This patchset makes SMBUS/SATA/PIT configurable and introduces a
> > new
> > machine type q35-lite with these features disabled by defa
On Mon, 2016-11-07 at 18:09 +0100, Paolo Bonzini wrote:
>
> On 06/11/2016 08:06, Michael S. Tsirkin wrote:
> >
> > On Sat, Nov 05, 2016 at 03:19:51AM -0400, Chao Peng wrote:
> > >
> > > >
> > > > This patch introduces a light weight machine
Hi,
Q35 has been in QEMU for quite a while. Compared to the current default
i440FX, Q35 is probably not that mature and not widely used, however in
some case, Q35 has advantages, for example, in supporting new features.
For instance, we have some features require PCI-e support which is only
On Wed, 2017-05-24 at 16:07 +0100, Stefan Hajnoczi wrote:
> Hi Chao,
> Last year there was an effort to make "built-in" hardware optional so
> that VMs can be launched with a minimal set of devices. You made
> SATA,
> PIT, and SMBus optional.
>
> What is the current status of this work?
>
> Are
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 Tue, Dec 28, 2021 at 09:48:08PM +, Sean Christopherson wrote:
> On Fri, Dec 24, 2021, Chao Peng wrote:
> > On Thu, Dec 23, 2021 at 06:02:33PM +, Sean Christopherson wrote:
> > > On Thu, Dec 23, 2021, Chao Peng wrote:
> > >
> > > In other words, the
On Thu, Dec 23, 2021 at 05:35:37PM +, Sean Christopherson wrote:
> On Thu, Dec 23, 2021, Chao Peng wrote:
>
> > + struct file *file;
>
> Please use more descriptive names, shaving characters is not at all priority.
>
> > + u64 ofs;
>
> I believe this sh
On Fri, Dec 24, 2021 at 11:53:15AM +0800, Robert Hoo wrote:
> On Thu, 2021-12-23 at 20:29 +0800, Chao Peng wrote:
> > From: "Kirill A. Shutemov"
> >
> > +static void notify_fallocate(struct inode *inode, pgoff_t start,
> > pgoff_t end)
> > +{
On Fri, Dec 24, 2021 at 12:13:51PM +0800, Chao Peng wrote:
> On Thu, Dec 23, 2021 at 06:06:19PM +, Sean Christopherson wrote:
> > On Thu, Dec 23, 2021, Chao Peng wrote:
> > > This new function establishes the mapping in KVM page tables for a
> > > given gfn range. I
On Thu, Dec 23, 2021 at 06:34:22PM +, Sean Christopherson wrote:
> On Thu, Dec 23, 2021, Chao Peng wrote:
> >
> > -kvm-y := $(KVM)/kvm_main.o $(KVM)/eventfd.o $(KVM)/binary_stats.o
> > +kvm-y := $(KVM)/kvm_main.o $(KVM)/eventfd.o $(KVM)/binary_stats.o
> > $(KV
On Fri, Dec 24, 2021 at 12:09:47AM +0100, Paolo Bonzini wrote:
> On 12/23/21 19:34, Sean Christopherson wrote:
> > > select HAVE_KVM_PM_NOTIFIER if PM
> > > + select MEMFD_OPS
> > MEMFD_OPS is a weird Kconfig name given that it's not just memfd() that can
> > implement the ops.
> >
>
>
On Thu, Dec 23, 2021 at 06:02:33PM +, Sean Christopherson wrote:
> On Thu, Dec 23, 2021, Chao Peng wrote:
> > Similar to hva_tree for hva range, maintain interval tree ofs_tree for
> > offset range of a fd-based memslot so the lookup by offset range can be
> > faster when
On Thu, Dec 23, 2021 at 06:06:19PM +, Sean Christopherson wrote:
> On Thu, Dec 23, 2021, Chao Peng wrote:
> > This new function establishes the mapping in KVM page tables for a
> > given gfn range. It can be used in the memory fallocate callback for
> > memfd base
On Thu, Dec 23, 2021 at 06:34:22PM +, Sean Christopherson wrote:
> On Thu, Dec 23, 2021, Chao Peng wrote:
> > diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
> > index 03b2ce34e7f4..86655cd660ca 100644
> > --- a/arch/x86/kvm/Kconfig
> > +++ b/arch/x86/kvm
On Tue, Jan 04, 2022 at 05:38:38PM +, Sean Christopherson wrote:
> On Fri, Dec 31, 2021, Chao Peng wrote:
> > On Fri, Dec 24, 2021 at 11:53:15AM +0800, Robert Hoo wrote:
> > > On Thu, 2021-12-23 at 20:29 +0800, Chao Peng wrote:
> > > > From: "Kirill A. Shutem
On Tue, Jan 04, 2022 at 05:43:50PM +, Sean Christopherson wrote:
> On Fri, Dec 31, 2021, Chao Peng wrote:
> > On Tue, Dec 28, 2021 at 09:48:08PM +, Sean Christopherson wrote:
> > >KVM handles
> > > reverse engineering the memslot to get the offset and wh
On Tue, Jan 04, 2022 at 05:31:30PM +, Sean Christopherson wrote:
> On Fri, Dec 31, 2021, Chao Peng wrote:
> > On Fri, Dec 24, 2021 at 12:13:51PM +0800, Chao Peng wrote:
> > > On Thu, Dec 23, 2021 at 06:06:19PM +, Sean Christopherson wrote:
> > > > On Thu,
On Tue, Jan 04, 2022 at 06:06:12PM +0800, Yan Zhao wrote:
> On Tue, Jan 04, 2022 at 05:10:08PM +0800, Chao Peng wrote:
> > On Tue, Jan 04, 2022 at 09:46:35AM +0800, Yan Zhao wrote:
> > > On Thu, Dec 23, 2021 at 08:30:09PM +0800, Chao Peng wrote:
> > > > When a page
.
Signed-off-by: Chao Peng
---
include/uapi/linux/memfd.h | 1 +
mm/memfd.c | 12 +++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/memfd.h b/include/uapi/linux/memfd.h
index 7a8a26751c23..48750474b904 100644
--- a/include/uapi/linux
Signed-off-by: Chao Peng
---
arch/x86/kvm/mmu/mmu.c | 64 +++---
arch/x86/kvm/mmu/paging_tmpl.h | 11 --
2 files changed, 68 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index a7006e1ac2d2..7fc29f85313d 100644
Expose KVM_MEM_PRIVATE flag and register/unregister private memory
slot to memfd when userspace sets the flag.
KVM_MEM_PRIVATE is disallowed by default but architecture code can
turn it on by implementing kvm_arch_private_memory_supported().
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
as its handler.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
include/linux/kvm_host.h | 2 ++
virt/kvm/kvm_main.c | 22 +++---
virt/kvm/memfd.c | 2 ++
3 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux
this seal set is going to be used as the
source of guest memory in confidential computing environments such
as Intel TDX/AMD SEV but may not be accessible from host userspace.
At this time only shmem implements this seal.
Signed-off-by: Kirill A. Shutemov
Signed-off-by: Chao Peng
---
include/
KVM_MEM_PRIVATE.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
include/linux/kvm_host.h | 9 +
include/uapi/linux/kvm.h | 12
2 files changed, 21 insertions(+)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 865a677baf52..96e46b288ecd 100644
- get/put_owner: used to ensure guest is still alive using a reference
mechanism when calling above invalidate/fallocate callbacks.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
arch/x86/kvm/Kconfig | 1 +
arch/x86/kvm/Makefile| 3 +-
include/linux/kvm_host.h | 8
virt/kvm/m
s from the last version.
Links of previous discussions
-
[1]
https://lkml.kernel.org/kvm/51a6f74f-6c05-74b9-3fd7-b7cd900fb...@redhat.com/
[2]
https://lkml.kernel.org/linux-fsdevel/2021141352.26311-1-chao.p.p...@linux.intel.com/
Chao Peng (13):
mm/memfd: Int
-by: Chao Peng
---
arch/x86/kvm/mmu/mmu.c | 47
include/linux/kvm_host.h | 2 ++
virt/kvm/kvm_main.c | 5 +
3 files changed, 54 insertions(+)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 2da19356679d..a7006e1ac2d2 100644
Zhang
Signed-off-by: Chao Peng
---
include/linux/kvm_host.h | 8 -
virt/kvm/kvm_main.c | 69 +++-
virt/kvm/memfd.c | 2 ++
3 files changed, 63 insertions(+), 16 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index
Signed-off-by: Kirill A. Shutemov
Signed-off-by: Chao Peng
---
include/linux/memfd.h| 22 ++
include/linux/shmem_fs.h | 16
mm/Kconfig | 4 +
mm/memfd.c | 21 ++
mm/shmem.c | 158 +++
5 files changed, 221
kvm_userspace_memory_region to
kvm_userspace_memory_region_ext since the new extended structure covers
all the existing fields in kvm_userspace_memory_region.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
arch/arm64/kvm/mmu.c | 14 +++---
arch/mips/kvm/mips.c
Zhang
Signed-off-by: Chao Peng
---
include/linux/kvm_host.h | 8 +--
virt/kvm/kvm_main.c | 47 +---
2 files changed, 31 insertions(+), 24 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index b0b63c9a160f..7279f46f35d3
between these two types of memory invalidation.
This patch moves these shared code into one place so that it can be
used for CONFIG_MMU_NOTIFIER as well as CONFIG_MEMFD_NOTIFIER.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
virt/kvm/kvm_main.c | 35 +++
1
the 'inode' in
memslot equals to the passed-in 'inode' we should invalidate the mapping
in KVM.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
virt/kvm/kvm_main.c | 23 +++
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm
userspace exit for a private->shared conversion request when the
page has already been allocated in the private memory backend.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
include/uapi/linux/kvm.h | 15 +++
1 file changed, 15 insertions(+)
diff --git a/include/uapi/lin
On Tue, Dec 21, 2021 at 03:44:40PM +, Sean Christopherson wrote:
> On Tue, Dec 21, 2021, Chao Peng wrote:
> > This is the third version of this series which try to implement the
> > fd-based KVM guest private memory.
>
> ...
>
> > Test
> >
> >
.
Signed-off-by: Chao Peng
---
include/uapi/linux/memfd.h | 1 +
mm/memfd.c | 12 +++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/memfd.h b/include/uapi/linux/memfd.h
index 7a8a26751c23..48750474b904 100644
--- a/include/uapi/linux
between these two types of memory invalidation.
This patch moves those shared code into one place so that it can be
used for both CONFIG_MMU_NOTIFIER and CONFIG_MEMFD_NOTIFIER.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
virt/kvm/kvm_main.c | 35 +++
1
the 'inode' in
memslot equals to the passed-in 'inode' we should invalidate the mapping
in KVM.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
virt/kvm/kvm_main.c | 30 --
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/virt/kvm/kvm_main.c b/virt
-by: Chao Peng
---
arch/x86/kvm/mmu/mmu.c | 47
include/linux/kvm_host.h | 2 ++
virt/kvm/kvm_main.c | 5 +
3 files changed, 54 insertions(+)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 1d275e9d76b5..2856eb662a21 100644
Expose KVM_MEM_PRIVATE flag and register/unregister private memory
slot to memfd when userspace sets the flag.
KVM_MEM_PRIVATE is disallowed by default but architecture code can
turn on it by implementing kvm_arch_private_memory_supported().
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
this seal set is going to be used as the
source of guest memory in confidential computing environments such
as Intel TDX/AMD SEV but may not be accessible from host userspace.
At this time only shmem implements this seal.
Signed-off-by: Kirill A. Shutemov
Signed-off-by: Chao Peng
---
include/
Similar to hva_tree for hva range, maintain interval tree ofs_tree for
offset range of a fd-based memslot so the lookup by offset range can be
faster when memslot count is high.
Signed-off-by: Chao Peng
---
include/linux/kvm_host.h | 2 ++
virt/kvm/kvm_main.c | 17 +
2
Signed-off-by: Chao Peng
---
arch/x86/kvm/mmu/mmu.c | 73 --
arch/x86/kvm/mmu/paging_tmpl.h | 11 +++--
2 files changed, 77 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 2856eb662a21..fbcdf62f8281 100644
el.org/qemu-devel/2029134739.20218-1-chao.p.p...@linux.intel.com/
Chao Peng (14):
mm/memfd: Introduce MFD_INACCESSIBLE flag
KVM: Extend the memslot to support fd-based private memory
KVM: Maintain ofs_tree for fast memslot lookup by file offset
KVM: Implement fd-based memory using MEM
Zhang
Signed-off-by: Chao Peng
---
include/linux/kvm_host.h | 8 -
virt/kvm/kvm_main.c | 69 +++-
virt/kvm/memfd.c | 2 ++
3 files changed, 63 insertions(+), 16 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
Signed-off-by: Kirill A. Shutemov
Signed-off-by: Chao Peng
---
include/linux/memfd.h| 22 ++
include/linux/shmem_fs.h | 16
mm/Kconfig | 4 +
mm/memfd.c | 21 ++
mm/shmem.c | 158 +++
5 files changed, 221
- get/put_owner: used to ensure guest is still alive using a reference
mechanism when calling above invalidate/fallocate callbacks.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
arch/x86/kvm/Kconfig | 1 +
include/linux/kvm_host.h | 6 +++
virt/kvm/Makefile.kvm| 2 +-
vi
as its handler.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
include/linux/kvm_host.h | 2 ++
virt/kvm/kvm_main.c | 22 +++---
virt/kvm/memfd.c | 2 ++
3 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux
userspace exit for a private->shared conversion request when the
page has already been allocated in the private memory backend.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
include/uapi/linux/kvm.h | 15 +++
1 file changed, 15 insertions(+)
diff --git a/include/uapi/lin
kvm_userspace_memory_region to
kvm_userspace_memory_region_ext since the new extended structure covers
all the existing fields in kvm_userspace_memory_region.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
arch/x86/kvm/x86.c | 2 +-
include/linux/kvm_host.h | 4 ++--
virt/kvm/kvm_main.c
KVM_MEM_PRIVATE.
Signed-off-by: Yu Zhang
Signed-off-by: Chao Peng
---
include/linux/kvm_host.h | 10 ++
include/uapi/linux/kvm.h | 12
2 files changed, 22 insertions(+)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index f8ed799e8674..2cd35560c44b 100644
Zhang
Signed-off-by: Chao Peng
---
include/linux/kvm_host.h | 8 --
virt/kvm/kvm_main.c | 55 ++--
2 files changed, 36 insertions(+), 27 deletions(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 21f8b1880723..07863ff855cd
On Tue, Jan 04, 2022 at 09:46:35AM +0800, Yan Zhao wrote:
> On Thu, Dec 23, 2021 at 08:30:09PM +0800, Chao Peng wrote:
> > When a page fault from the secondary page table while the guest is
> > running happens in a memslot with KVM_MEM_PRIVATE, we need go
> > different pat
On Mon, Nov 22, 2021 at 05:16:47PM +0300, Kirill A. Shutemov wrote:
> On Fri, Nov 19, 2021 at 09:47:39PM +0800, Chao Peng wrote:
> > Since the memory backing store does not get notified when VM is
> > destroyed so need check if VM is still live in these callbacks.
> >
> &
1 - 100 of 407 matches
Mail list logo