On Fri, Apr 09, 2021 at 12:31:03AM -0300, Leonardo Bras wrote:
> Hello David, thanks for commenting.
>
> On Tue, 2021-03-23 at 10:45 +1100, David Gibson wrote:
> > > @@ -805,6 +808,10 @@ static int resize_hpt_for_hotplug(unsigned long
> > > new_mem_size, bool shrin
On Thu, Apr 08, 2021 at 11:51:36PM -0300, Leonardo Bras wrote:
> Hello David, thanks for the feedback!
>
> On Mon, 2021-03-22 at 18:55 +1100, David Gibson wrote:
> > > +void hash_memory_batch_expand_prepare(unsigned long newsize)
> > > +{
> > > + /*
> >
r.kernel.org
> Signed-off-by: Christian A. Ehrhardt
Reviewed-by: David Gibson
> ---
> drivers/vfio/pci/vfio_pci.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
> index 65e7e6b44578..5023e2
memory_batch_shrink_end();
> rc = -EINVAL;
> } else {
> for_each_drmem_lmb(lmb) {
> @@ -814,6 +828,7 @@ static int dlpar_memory_add_by_ic(u32 lmbs_to_add, u32
> drc_index)
> if (rc) {
> pr_err
lmbs_to_add)
> return -EINVAL;
>
> + memory_batch_expand_prepare(memblock_phys_mem_size() + lmbs_to_add *
> drmem_lmb_size());
> +
> for_each_drmem_lmb_in_range(lmb, start_lmb, end_lmb) {
> if (lmb->flags & DRCONF_MEM_
d long start,
> unsigned long end)
> int rc = htab_remove_mapping(start, end, mmu_linear_psize,
>mmu_kernel_ssize);
>
> - if (resize_hpt_for_hotplug(memblock_phys_mem_size()) == -ENOSPC)
> + if (resize_hpt_for_hotplug(memblock_
On Thu, Feb 04, 2021 at 08:25:23AM -0600, Rob Herring wrote:
> On Sun, Jan 31, 2021 at 10:39 PM David Gibson
> wrote:
> >
> > On Mon, Jan 25, 2021 at 09:42:21PM -0600, Frank Rowand wrote:
> > > Hi David,
> > >
> > > On 1/22/21 12:34 AM, David Gibson
equire a change in the DTC compiler.
Not really. It would need a change to automatically recognize that
extension, but you can easily work around that by explicitly giving
the -I option to specify the input type.
--
David Gibson| I'll have my music baroque, and my code
davi
On Mon, Jan 25, 2021 at 09:42:21PM -0600, Frank Rowand wrote:
> Hi David,
>
> On 1/22/21 12:34 AM, David Gibson wrote:
> > On Wed, Jan 20, 2021 at 10:47:40AM +0530, Viresh Kumar wrote:
> >> +David.
> >>
> >> On 19-01-21, 11:12, Frank Rowand wrote:
&g
etailed justification. It really looks
like the unittest stuff is doing some very bogus stuff that should be
fixed first, before trying to do this on top.
--
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _t
_empty_tree.o fdt_addresses.o fdt_overlay.o
> +libfdt = $(addprefix libfdt/,$(libfdt-objs))
> +fdtoverlay-objs := $(libfdt) fdtoverlay.o util.o
> +
> # Source files need to get at the userspace version of libfdt_env.h to
> compile
> HOST_EXTRACFLAGS += -I $(srctree)/$(src)
e usable in embedded systems, without an
allocator or much else available.
Of course it would be possible to write a friendly command line tool
specifically for applying overlays, which could give better errors.
fdtoverlay as it stands isn't really that - it was pretty much written
just to i
On Fri, Jan 22, 2021 at 08:40:49AM +0530, Viresh Kumar wrote:
> On 22-01-21, 10:39, David Gibson wrote:
> > No, it definitely will not work in general. It might kinda work in a
> > few trivial cases, but it absolutely will not do the neccessary
> > handling in some cases.
&
On Thu, Jan 21, 2021 at 12:27:28PM +0530, Viresh Kumar wrote:
> On 21-01-21, 17:34, David Gibson wrote:
> > No, this is the wrong way around. The expected operation here is that
> > you apply overlay (1) to the base tree, giving you, say, output1.dtb.
> > output1.dtb is (eff
sed to
be a base tree or an overlay. I'm still not seeing any reasonable
use for the plugin version either, fwiw.
>
> 4) create a new file overlay_base_static.dts:
>// SPDX-License-Identifier: GPL-2.0
>/dts-v1/;
>#include overlay_base_dtsi
>
>
(just a quick hack to see if the method might work). So I
> >> would
> >> have to set things up properly to really test this.
> >>
> >> If this does work, it would remove my objections to you trying to transform
> >> the existing unittest .dts test dat
ow how
> normal devicetree knowledgeable people look at the contents of some of the
> .dts test data files and think that they are incorrect. That is because
> the way that unittest uses them is not normal. Trying to modify one or two
> of the many unittest .dts test data files so that
On Thu, Jan 21, 2021 at 09:43:00AM +0530, Viresh Kumar wrote:
> On 21-01-21, 11:49, David Gibson wrote:
> > If you're using overlays, you probably need the -@ flag, for both the
> > base file and the overlays, which AFAICT is not already the case.
>
> I think the
erlay to it. However, a dtbo is a
weirdly structured dtb, so applying an overlay to it is very unlikely
to give you something useful.
--
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _o
e the same effect applied to
base.dtb as (1) and (2) applied in sequence. Merging overlays is
something that could make sense, but fdtoverlay will not do it at
present.
> This is very similar to what I tried with the intermediate.dtb
> earlier.
>
--
David Gibson| I&
On Thu, Jan 21, 2021 at 09:47:57AM +0530, Viresh Kumar wrote:
> On 21-01-21, 11:44, David Gibson wrote:
> > On Wed, Jan 20, 2021 at 12:36:45PM +0530, Viresh Kumar wrote:
> > > This was copied from external DTC repository long back and isn't used
> > > anymore. Over
> +extra-$(CONFIG_OF_ALL_DTBS) += $(patsubst %.dtbo,%.dt.yaml, $(dtb-))
> endif
>
> # Add subdir path
> @@ -324,7 +326,7 @@ cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x
> assembler-with-cpp -o $(dtc-tmp) $< ;
> -d $(depfile).dtc.tmp $(dtc-tmp) ; \
>
gpio_04b.dtb
> +
> +quiet_cmd_fdtoverlay = FDTOVERLAY $@
> + cmd_fdtoverlay = $(objtree)/scripts/dtc/fdtoverlay -o $@ -i $^
> +
> +$(obj)/static_test.dtb: $(obj)/testcases.dtb $(addprefix
> $(obj)/,$(apply_static_overlay))
> + $(call if_changed,fdtoverlay)
> +
>
intf("%*s// [NOP]\n", depth * shift, "");
> - continue;
> - }
> -
> - if (tag != FDT_PROP) {
> - fprintf(stderr, "%*s ** Unknown tag 0x%08x\n", depth *
> shift, "", tag);
> -
erlay_gpio_01.dtb overlay_gpio_02a.dtb \
>overlay_gpio_02b.dtb overlay_gpio_03.dtb \
> overlay_gpio_04a.dtb overlay_gpio_04b.dtb \
> - intermediate-overlay.dtb
> +
;;
> return fallback;
> @@ -357,6 +359,8 @@ int main(int argc, char *argv[])
> #endif
> } else if (streq(outform, "dtb")) {
> dt_to_blob(outf, dti, outversion);
> + } else if (streq(outform, "dtbo")) {
> + dt_to_blob(ou
L kernels without obvious differences in this area. I'm still trying
to determine what the cause of that difference is, but I think it's worth
applying this change as a precaution in the interim.
Signed-off-by: David Gibson
---
arch/powerpc/kvm/book3s_hv.c | 4 ++--
1 file changed,
a second patch to check for 10 bit vs 7 bit addresses.
>
> Joel Stanley (2):
> checks: Remove warning for I2C_OWN_SLAVE_ADDRESS
> checks: Improve i2c reg property checking
>
> checks.c | 14 --
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
--
Davi
located.
Fixes: 18b3670d79ae9 ("tpm: ibmvtpm: Add support for TPM2")
Signed-off-by: David Gibson
---
Changes from v1:
* Fixed a formatting error in the commit message
* Added some more detail to the commit message
drivers/char/tpm/tpm_ibmvtpm.c | 14 +++---
1 file ch
hypervisor / TPM
implementation doesn't respond quickly enough. I find it fails almost
every time with an 8 vcpu guest under KVM with software emulated TPM.
Fixes: 18b3670d79ae9 "tpm: ibmvtpm: Add support for TPM2"
Signed-off-by: David Gibson
---
drivers/char/tpm/tpm_ibmvtpm.c |
I know it seems trivial, but I'm a bit flat out right now. Can
you please resend with the 1U fix applied.
--
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
The policy is everything
> is upstream first and any changes to dtc in the kernel are rejected.
>
> > >
> > > What shall we do?
> > >
> > > [1] Convert upstream DTC to SPDX
> > >
> > > This will be a happy solution if it is acceptable in DTC
ot;);
>
> return ret;
> }
> diff --git a/arch/powerpc/platforms/pseries/lpar.c
> b/arch/powerpc/platforms/pseries/lpar.c
> index f2a9f0adc2d3..b407034a80ba 100644
> --- a/arch/powerpc/platforms/pseries/lpar.c
> +++ b/arch/powerpc/platforms/pseries/lpar.c
> @@ -918,7 +9
if (rc && (rc != -ENODEV))
> - printk(KERN_WARNING
> -"Unable to resize hash page table to target
> order %d: %d\n",
> -target_hpt_shift, rc);
> + if (rc)
> +
makes ppc
different is that we need a substantial CMA allocation every time we
start a (POWER8) guest for the HPT. It's the fact that running guests
on a system both means we need the CMA unfragment and (with vfio added
in) can cause CMA fragmentation which makes this particularly
problematic.
--
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
the card side.
>
> We are IBM :-) So far, it seems to be that the card is doing something
> not quite right, but we don't know what. We might need to engage
> Mellanox themselves.
Possibly. On the other hand, I've had it reported that this is a
software regression at least
On Thu, Dec 06, 2018 at 08:45:09AM +0200, Leon Romanovsky wrote:
> On Thu, Dec 06, 2018 at 03:19:51PM +1100, David Gibson wrote:
> > Mellanox ConnectX-5 IB cards (MT27800) seem to cause a call trace when
> > unbound from their regular driver and attached to vfio-pci in order t
nging any
> behavior), and 2) add the ConnectX devices to the quirk. That way
> the ConnectX change is smaller and more easily
> understood/reverted/etc.
Sure. Would it make sense to send (1) as an independent cleanup,
while I'm still working out exactly what (if anything)
On Thu, Dec 06, 2018 at 08:45:09AM +0200, Leon Romanovsky wrote:
> On Thu, Dec 06, 2018 at 03:19:51PM +1100, David Gibson wrote:
> > Mellanox ConnectX-5 IB cards (MT27800) seem to cause a call trace when
> > unbound from their regular driver and attached to vfio-pci in order t
(struct vfio_eeh_pe_op,
> > > err.mask);
> > > - if (op.argsz < minsz)
> > > + start = offsetof(struct vfio_eeh_pe_op, err.type);
> > > + end = offsetofend(struct vfio_eeh_pe_op,
> > > err.mask);
parent bus's address space (as an
identity mapping or otherwise).
>
> Alan
>
> [1]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/fpga/fpga-region.txt
>
> [2] https://lkml.org/lkml/2016/7/20/560
>
--
David
re simply refuse to bind to PFs with SR-IOV enabled
> with a warning message indicating the issue. Users can resolve this
> by re-binding to the host driver and disabling SR-IOV before
> attempting to use the device with vfio-pci.
>
> Signed-off-by: Alex Williamson
Reviewed-by: D
| 1 +
> > 1 file changed, 1 insertion(+)
>
> Thanks. None of my ~250 defconfig test builds hit this, what config are
> you using?
I also hit this, but only when I backported the change to RH's 3.10
kernel. I assumed something since then had added an indirect includ
rrors.
Signed-off-by: David Gibson
---
arch/powerpc/kvm/book3s_64_mmu_hv.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
Paul, this is based on Paolo's KVM tree, but it should apply without
modification to pretty much any vaguely current tree. It's a pretty
nasty bug -
4 from this
series on top of the revised patches and post those separately (as a
cleanup with less urgency than the actual fix).
A couple of people have also suggested CCing k...@vger.kernel.org on
the next round in addition to the lists already included.
--
David Gibson
, revert it for now until we figure out how to do it
properly.
Signed-off-by: David Gibson
---
arch/powerpc/include/asm/machdep.h | 1 +
arch/powerpc/include/asm/setup.h | 1 +
arch/powerpc/kernel/fadump.c | 22 --
arch/powerpc/kernel/setup-common.c | 27
ce
> associated with resize structure we going to release.
>
> Also kill check for resize being NULL to make code
> simpler and we called with resize != NULL in all
> places except kvm_vm_ioctl_resize_hpt_commit().
>
> Signed-off-by: Serhii Popovych
Reviewed-by: Davi
1 file changed, 82 insertions(+), 57 deletions(-)
Paul, these (at least 1-3) fix (another :() host crash bug which can
be triggered by guest and/or userspace actions. Please merge ASAP.
--
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.a
e9183ce0] [c0114250] worker_thread+0x1a0/0x520
> [ 635.280655] [c007e9183d80] [c012010c] kthread+0xec/0x100
> [ 635.280724] [c007e9183e30] [c000a4b8]
> ret_from_kernel_thread+0x5c/0xa4
> [ 635.280814] Instruction dump:
> [ 6
r !hpt if allocated from CMA: neither
> pfn_to_kaddr() nor page_to_pfn() is 0 in case of page != NULL.
>
> Signed-off-by: Serhii Popovych
Reviewed-by: David Gibson
> ---
> arch/powerpc/kvm/book3s_64_mmu_hv.c | 54
> ++---
>
resize_hpt_allocate()
> returns -EBUSY that is treated specially.
>
> Change comparison against zero to make checkpatch.pl happy.
>
> Signed-off-by: Serhii Popovych
Reviewed-by: David Gibson
> ---
> arch/powerpc/kvm/book3s_64_mmu_hv.c | 42
> ++--
imagine that static analysis tools would catch NULL
> dereferences but it's actually really really hard. We used to have
> an __uninitialized_var() macro which was used to silence GCC false
> positives, but now we initialize the pointers to NULL instead. So
> most of the code that yo
ht. You can check some things in overlays, but when parsing
something requires information from the base tree, there is indeed not
much that can be done.
> > You can avoid the problem in your example dts with
> > "-Wno-interrupts_property"
> >
> > dtc -Wno-interrupts_property fpga_01_a.dts
> >
> > The larger set of other checks that might trigger the assert is too large
> > for me to want to add "-Wno-" flags for all of them to the command line
> > (as temporary workarounds).
>
> David thought more switches were better.
Right, as a rule, I like fine configurability of the checks.
But.. there's a trick to make things easier to configure in batches:
when you enable a warning, you automatically enable all warnings that
warning has as prerequisites. And when you disable a warning, every
other warning that has it as a prerequisite is also disabled.
So by adding some dummy checks with the right depencies, you can allow
enabling and disabling of groups of related checks with a single
command line option.
--
David Gibson| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
7;t validate overlays which is unfortunate. I don't think
> >> that's a solvable problem unless you have the base DT.
> >
> > Yes, maybe. But there are still some useful warnings for overlays, maybe.
> > I'm
> > not sure what the implications of the
ddress-cells = <2>;
> #size-cells = <1>;
>
> fpga_pr_region0 {
> compatible = "fpga-region";
> fpga-bridges = <&freeze_controller_0>;
> ranges;
&g
On Tue, Oct 10, 2017 at 06:19:03PM +0300, Pantelis Antoniou wrote:
> Hi David,
>
> > On Oct 10, 2017, at 04:50 , David Gibson
> > wrote:
> >
> > On Mon, Oct 09, 2017 at 06:07:28PM +0300, Pantelis Antoniou wrote:
> >> Hi David,
> >>
> >&g
On Mon, Oct 09, 2017 at 06:07:28PM +0300, Pantelis Antoniou wrote:
> Hi David,
>
> > On Oct 9, 2017, at 03:00 , David Gibson wrote:
> >
> > On Sun, Oct 08, 2017 at 04:08:03PM -0700, Frank Rowand wrote:
> >> On 10/07/17 03:23, Pantelis Antoniou wrote:
> >
ay is a
> connector.
In addition, no amount of schema validation can really protect the
kernel from a bad DT. Even if the schemas can 100% verify that the DT
is "syntactically" correct, which is ambitious, it can't protect
against a DT which is in the right form, but cont
ing; this is useful when deciding whether or not to allow mapping
> of MSIX table to the userspace. Various architectures will enable it
> when they decide that it is safe to do so.
>
> Signed-off-by: Alexey Kardashevskiy
Reviewed-by: David Gibson
This seems like a reasonable concept th
by
> an IOMMU group.
>
> Signed-off-by: Alexey Kardashevskiy
Reviewed-by: David Gibson
> ---
> include/linux/vfio.h | 1 +
> drivers/vfio/pci/vfio_pci.c | 20 +---
> drivers/vfio/pci/vfio_pci_rdwr.c | 5 -
> drivers/vfio/vfio.c
t; to
> make use of IS_ENABLED() macro because CONFIG_VFIO_SPAPR_EEH is a tristate
> option.
>
> This issue was found during a randconfig build. Logs are here:
>
> http://kisskb.ellerman.id.au/kisskb/buildresult/12982362/
>
> Signed-off-by: Murilo Opsfelder Arauj
; dlpar_detach_node() and pSeries_reconfig_remove_node() call
> of_detach_node(), and thus the node should not be released
> in this case too.
>
> Signed-off-by: Laurent Vivier
Reviewed-by: David Gibson
> ---
> arch/powerpc/platforms/pseries/reconfig.c | 1 -
> 1 file changed, 1 deletion(-)
&g
nd for the storvsc (Hyper-V) SCSI controller, although
that exists for slightly different reasons.
A specific case which causes this is a volume from IBM's IPR RAID
controller (which presents as an SPC-2 device, although it does support
VPD) passed through with qemu's 'scsi-block'
we'll give a harmless,
but scary warning. This patch suppresses the warning in this case. It
will still warn if the feature is supposed to be available, but didn't
work.
Signed-off-by: David Gibson
---
arch/powerpc/mm/hash_utils_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(
On Wed, Feb 15, 2017 at 02:40:04PM +1100, David Gibson wrote:
> resize_hpt_release(), called once the HPT resize of a KVM guest is
> completed (successfully or unsuccessfully) free()s the state structure for
> the resize. It is currently not safe to call with a NULL pointer.
>
>
resize_hpt_release() with a NULL resize pointer.
Found by Dan Carpenter with a static checker.
Reported-by: Dan Carpenter
Signed-off-by: David Gibson
---
arch/powerpc/kvm/book3s_64_mmu_hv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c
b/arch
On Wed, Feb 01, 2017 at 09:18:13AM +1100, Paul Mackerras wrote:
> On Tue, Dec 20, 2016 at 04:48:56PM +1100, David Gibson wrote:
> > Here is the KVM implementation for the proposed PAPR extension which
> > allows the runtime resizing of a PAPR guest's Hashed Page Table (HPT).
128d10282d16 100644
> > --- a/drivers/vfio/vfio_iommu_spapr_tce.c
> > +++ b/drivers/vfio/vfio_iommu_spapr_tce.c
> > @@ -1270,6 +1270,10 @@ static int tce_iommu_attach_group(void *iommu_data,
> > /* pr_debug("tce_vfio: Attaching group #%u to iommu %p\n",
> >
This updates the KVM_CAP_SPAPR_RESIZE_HPT capability to advertise the
presence of in-kernel HPT resizing on KVM HV.
Signed-off-by: David Gibson
---
arch/powerpc/kvm/powerpc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index
cator at each size. As far as I can tell
this change should be harmless.
To match, we make kvmppc_free_hpt() just free the actual HPT itself. The
call to kvmppc_free_lpid() that was there, we move to the single caller.
Signed-off-by: David Gibson
---
arch/powerpc/include/asm/kvm_book3s_64.h
resize implementation can be used, it's necessary to check
KVM_CAP_PPC_ALLOC_HTAB. Unfortunately older kernels incorrectly set
KVM_CAP_PPC_ALLOC_HTAB even with KVM PR. If userspace it want to support
resizing with KVM PR on such kernels, it will need a workaround.
Signed-off-by: David G
This adds the "guts" of the implementation for the HPT resizing PAPR
extension. It has the code to allocate and clear a new HPT, rehash an
existing HPT's entries into it, and accomplish the switchover for a
KVM guest from the old HPT to the new one.
Signed-off-by: David Gibson
--
ff-by: David Gibson
Reviewed-by: Thomas Huth
---
arch/powerpc/include/asm/kvm_book3s_64.h | 12
arch/powerpc/include/asm/kvm_host.h | 2 --
arch/powerpc/kvm/book3s_64_mmu_hv.c | 28 +---
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 18 +-
4
kvm_alloc_hpt_cma().
Similarly, kvm_release_hpt() is renamed kvm_free_hpt_cma().
Signed-off-by: David Gibson
Reviewed-by: Thomas Huth
---
arch/powerpc/include/asm/kvm_ppc.h | 4 ++--
arch/powerpc/kvm/book3s_64_mmu_hv.c | 8
arch/powerpc/kvm/book3s_hv_builtin.c | 8
3 files
ation.
Signed-off-by: David Gibson
---
arch/powerpc/include/asm/kvm_host.h | 20 ++---
arch/powerpc/kvm/book3s_64_mmu_hv.c | 90 ++---
arch/powerpc/kvm/book3s_hv.c| 2 +-
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 62 -
4 files change
reverse mappings. To prepare with
this, we split out the logic from kvm_unmap_rmapp() to evict a single HPTE,
moving it to a new helper function.
Signed-off-by: David Gibson
---
arch/powerpc/kvm/book3s_64_mmu_hv.c | 77 +
1 file changed, 44 insertions(+), 33
.
The actual guts of the implementation isn't here yet, so for now the
calls will always fail.
Signed-off-by: David Gibson
---
arch/powerpc/include/asm/kvm_host.h | 3 +
arch/powerpc/include/asm/kvm_ppc.h | 4 +
arch/powerpc/kvm/book3s_64_mmu_hv.c
Both KVM_CREATE_SPAPR_TCE_64 and KVM_REINJECT_CONTROL have section number
4.98 in Documentation/virtual/kvm/api.txt, presumably due to a naive merge.
This corrects the duplication.
Signed-off-by: David Gibson
---
Documentation/virtual/kvm/api.txt | 2 +-
1 file changed, 1 insertion(+), 1
rmation to Documentation/virtual/kvm/api.txt
* Assorted minor cleanups based on review comments
David Gibson (11):
Documentation: Correct duplicate section number in kvm/api.txt
powerpc/kvm: HPT resizing documentation and reserved numbers
powerpc/kvm: Rename kvm_alloc_hpt() for clarity
p
size.
This patch also updates Documentation/virtual/kvm/api.txt to reflect
the new behaviour. In fact the documentation was already slightly
incorrect since 572abd5 "KVM: PPC: Book3S HV: Don't fall back to
smaller HPT size in allocation ioctl"
Signed-off-by: David Gibson
---
Docum
On Mon, Dec 19, 2016 at 08:49:24AM +0100, Thomas Huth wrote:
> On 19.12.2016 01:48, David Gibson wrote:
> > On Fri, Dec 16, 2016 at 01:44:57PM +0100, Thomas Huth wrote:
> >> On 15.12.2016 06:53, David Gibson wrote:
> >>> The KVM_PPC_ALLOCATE_HTAB ioctl() is used
On Fri, Dec 16, 2016 at 02:15:30PM +0100, Thomas Huth wrote:
> On 15.12.2016 06:53, David Gibson wrote:
> > This adds a new powerpc-specific KVM_CAP_SPAPR_RESIZE_HPT capability to
> > advertise whether KVM is capable of handling the PAPR extensions for
> > resizing the has
On Fri, Dec 16, 2016 at 10:25:55AM +0100, Thomas Huth wrote:
> On 15.12.2016 06:53, David Gibson wrote:
> > This adds a new powerpc-specific KVM_CAP_SPAPR_RESIZE_HPT capability to
> > advertise whether KVM is capable of handling the PAPR extensions for
> > resizing the has
On Fri, Dec 16, 2016 at 10:24:17AM +0100, Thomas Huth wrote:
> On 15.12.2016 06:53, David Gibson wrote:
> > Currently, the powerpc kvm_arch structure contains a number of variables
> > tracking the state of the guest's hashed page table (HPT) in KVM HV. This
> > patch
On Fri, Dec 16, 2016 at 01:44:57PM +0100, Thomas Huth wrote:
> On 15.12.2016 06:53, David Gibson wrote:
> > The KVM_PPC_ALLOCATE_HTAB ioctl() is used to set the size of hashed page
> > table (HPT) that userspace expects a guest VM to have, and is also used to
> > clear that HP
On Fri, Dec 16, 2016 at 11:39:26AM +0100, Thomas Huth wrote:
> On 15.12.2016 06:53, David Gibson wrote:
> > Currently the kvm_hpt_info structure stores the hashed page table's order,
> > and also the number of HPTEs it contains and a mask for its size. The
> > last two
On Fri, Dec 16, 2016 at 12:57:26PM +0100, Thomas Huth wrote:
> On 15.12.2016 06:53, David Gibson wrote:
> > Currently, kvmppc_alloc_hpt() both allocates a new hashed page table (HPT)
> > and sets it up as the active page table for a VM. For the upcoming HPT
> > resize imple
ff-by: David Gibson
---
arch/powerpc/include/asm/kvm_book3s_64.h | 12
arch/powerpc/include/asm/kvm_host.h | 2 --
arch/powerpc/kvm/book3s_64_mmu_hv.c | 28 +---
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 18 +-
4 files changed, 34 inser
ation.
Signed-off-by: David Gibson
---
arch/powerpc/include/asm/kvm_host.h | 16 ---
arch/powerpc/kvm/book3s_64_mmu_hv.c | 90 ++---
arch/powerpc/kvm/book3s_hv.c| 2 +-
arch/powerpc/kvm/book3s_hv_rm_mmu.c | 62 -
4 files change
kvm_alloc_hpt_cma().
Similarly, kvm_release_hpt() is renamed kvm_free_hpt_cma().
Signed-off-by: David Gibson
---
arch/powerpc/include/asm/kvm_ppc.h | 4 ++--
arch/powerpc/kvm/book3s_64_mmu_hv.c | 8
arch/powerpc/kvm/book3s_hv_builtin.c | 8
3 files changed, 10 insertions
size.
Signed-off-by: David Gibson
---
arch/powerpc/include/asm/kvm_ppc.h | 2 +-
arch/powerpc/kvm/book3s_64_mmu_hv.c | 53 -
arch/powerpc/kvm/book3s_hv.c| 5 +---
3 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/arch/powerpc/includ
cator at each size. As far as I can tell
this change should be harmless.
To match, we make kvmppc_free_hpt() just free the actual HPT itself. The
call to kvmppc_free_lpid() that was there, we move to the single caller.
Signed-off-by: David Gibson
---
arch/powerpc/include/asm/kvm_book3s_64.h
reverse mappings. To prepare with
this, we split out the logic from kvm_unmap_rmapp() to evict a single HPTE,
moving it to a new helper function.
Signed-off-by: David Gibson
---
arch/powerpc/kvm/book3s_64_mmu_hv.c | 77 +
1 file changed, 44 insertions(+), 33
This patch adds a stub (always failing) implementation of the ioctl()s
for the HPT resizing PAPR extension.
Signed-off-by: David Gibson
---
arch/powerpc/include/asm/kvm_ppc.h | 4
arch/powerpc/kvm/book3s_64_mmu_hv.c | 16
arch/powerpc/kvm/book3s_hv.c| 22
This adds the "guts" of the implementation for the HPT resizing PAPR
extension. It has the code to allocate and clear a new HPT, rehash an
existing HPT's entries into it, and accomplish the switchover for a
KVM guest from the old HPT to the new one.
Signed-off-by: David Gibson
--
https://github.com/dgibson/qemu/tree/upstream/hpt-resize
I'm posting these now, in the hopes that both these and the
corresponding guest side patches can be staged and merged for the 4.11
window.
David Gibson (11):
powerpc/kvm: Reserve capabilities and ioctls for HPT resizing
powerpc/k
ut the intention is to return 2 once HPT
resize is implemented for KVM HV.
Signed-off-by: David Gibson
---
arch/powerpc/kvm/powerpc.c | 3 +++
include/uapi/linux/kvm.h | 10 ++
2 files changed, 13 insertions(+)
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
in
This updates the KVM_CAP_SPAPR_RESIZE_HPT capability to advertise the
presence of in-kernel HPT resizing on KVM HV. In fact the HPT resizing
isn't fully implemented, but this allows us to experiment with what's
there.
Signed-off-by: David Gibson
---
arch/powerpc/kvm/powerpc.c | 5 +++
paths.
Signed-off-by: David Gibson
---
arch/powerpc/include/asm/kvm_host.h | 3 +
arch/powerpc/kvm/book3s_64_mmu_hv.c | 179 +++-
arch/powerpc/kvm/book3s_hv.c| 3 +
3 files changed, 183 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/include/asm
On Thu, Dec 08, 2016 at 08:49:45PM -, Thomas Gleixner wrote:
> Kill the ever confusing typedef and use u64.
>
> NOT FOR INCLUSION - Must be regenerated at some point via coccinelle
>
> Not-Signed-off-by: Thomas Gleixner
Not-Reviewed-by: David Gibson
The concept seems se
1 - 100 of 472 matches
Mail list logo