From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC V2 2/9] Introduce page table population function for direct build EPT feature
Date: Wed, 02 Sep 2020 03:04:47 +0800 [thread overview]
Message-ID: <202009020236.FbiCMRKB%lkp@intel.com> (raw)
In-Reply-To: <f0c109e76f3cd4a1bfd1ca3ff74e0d36c0288ca9.1598868204.git.yulei.kernel@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 15821 bytes --]
Hi,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on kvm/linux-next]
[also build test ERROR on linus/master v5.9-rc3 next-20200828]
[cannot apply to kvm-ppc/kvm-ppc-next kvms390/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/yulei-kernel-gmail-com/x86-mmu-Introduce-parallel-memory-virtualization-to-boost-performance/20200901-221509
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git linux-next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
arch/powerpc/kvm/book3s_xive_native.c: In function 'kvmppc_xive_native_set_queue_config':
>> arch/powerpc/kvm/book3s_xive_native.c:640:33: error: passing argument 1 of 'kvm_host_page_size' from incompatible pointer type [-Werror=incompatible-pointer-types]
640 | page_size = kvm_host_page_size(vcpu, gfn);
| ^~~~
| |
| struct kvm_vcpu *
In file included from arch/powerpc/kvm/book3s_xive_native.c:9:
include/linux/kvm_host.h:780:46: note: expected 'struct kvm *' but argument is of type 'struct kvm_vcpu *'
780 | unsigned long kvm_host_page_size(struct kvm *kvm, struct kvm_vcpu *vcpu, gfn_t gfn);
| ~~~~~~~~~~~~^~~
>> arch/powerpc/kvm/book3s_xive_native.c:640:39: warning: passing argument 2 of 'kvm_host_page_size' makes pointer from integer without a cast [-Wint-conversion]
640 | page_size = kvm_host_page_size(vcpu, gfn);
| ^~~
| |
| gfn_t {aka long long unsigned int}
In file included from arch/powerpc/kvm/book3s_xive_native.c:9:
include/linux/kvm_host.h:780:68: note: expected 'struct kvm_vcpu *' but argument is of type 'gfn_t' {aka 'long long unsigned int'}
780 | unsigned long kvm_host_page_size(struct kvm *kvm, struct kvm_vcpu *vcpu, gfn_t gfn);
| ~~~~~~~~~~~~~~~~~^~~~
>> arch/powerpc/kvm/book3s_xive_native.c:640:14: error: too few arguments to function 'kvm_host_page_size'
640 | page_size = kvm_host_page_size(vcpu, gfn);
| ^~~~~~~~~~~~~~~~~~
In file included from arch/powerpc/kvm/book3s_xive_native.c:9:
include/linux/kvm_host.h:780:15: note: declared here
780 | unsigned long kvm_host_page_size(struct kvm *kvm, struct kvm_vcpu *vcpu, gfn_t gfn);
| ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/9607ad9b47ad43e0b1fa4b2f4ef0c2e6a1217d08
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review yulei-kernel-gmail-com/x86-mmu-Introduce-parallel-memory-virtualization-to-boost-performance/20200901-221509
git checkout 9607ad9b47ad43e0b1fa4b2f4ef0c2e6a1217d08
vim +/kvm_host_page_size +640 arch/powerpc/kvm/book3s_xive_native.c
13ce3297c5766b Cédric Le Goater 2019-04-18 549
13ce3297c5766b Cédric Le Goater 2019-04-18 550 static int kvmppc_xive_native_set_queue_config(struct kvmppc_xive *xive,
13ce3297c5766b Cédric Le Goater 2019-04-18 551 long eq_idx, u64 addr)
13ce3297c5766b Cédric Le Goater 2019-04-18 552 {
13ce3297c5766b Cédric Le Goater 2019-04-18 553 struct kvm *kvm = xive->kvm;
13ce3297c5766b Cédric Le Goater 2019-04-18 554 struct kvm_vcpu *vcpu;
13ce3297c5766b Cédric Le Goater 2019-04-18 555 struct kvmppc_xive_vcpu *xc;
13ce3297c5766b Cédric Le Goater 2019-04-18 556 void __user *ubufp = (void __user *) addr;
13ce3297c5766b Cédric Le Goater 2019-04-18 557 u32 server;
13ce3297c5766b Cédric Le Goater 2019-04-18 558 u8 priority;
13ce3297c5766b Cédric Le Goater 2019-04-18 559 struct kvm_ppc_xive_eq kvm_eq;
13ce3297c5766b Cédric Le Goater 2019-04-18 560 int rc;
13ce3297c5766b Cédric Le Goater 2019-04-18 561 __be32 *qaddr = 0;
13ce3297c5766b Cédric Le Goater 2019-04-18 562 struct page *page;
13ce3297c5766b Cédric Le Goater 2019-04-18 563 struct xive_q *q;
13ce3297c5766b Cédric Le Goater 2019-04-18 564 gfn_t gfn;
13ce3297c5766b Cédric Le Goater 2019-04-18 565 unsigned long page_size;
aedb5b19429c80 Cédric Le Goater 2019-05-28 566 int srcu_idx;
13ce3297c5766b Cédric Le Goater 2019-04-18 567
13ce3297c5766b Cédric Le Goater 2019-04-18 568 /*
13ce3297c5766b Cédric Le Goater 2019-04-18 569 * Demangle priority/server tuple from the EQ identifier
13ce3297c5766b Cédric Le Goater 2019-04-18 570 */
13ce3297c5766b Cédric Le Goater 2019-04-18 571 priority = (eq_idx & KVM_XIVE_EQ_PRIORITY_MASK) >>
13ce3297c5766b Cédric Le Goater 2019-04-18 572 KVM_XIVE_EQ_PRIORITY_SHIFT;
13ce3297c5766b Cédric Le Goater 2019-04-18 573 server = (eq_idx & KVM_XIVE_EQ_SERVER_MASK) >>
13ce3297c5766b Cédric Le Goater 2019-04-18 574 KVM_XIVE_EQ_SERVER_SHIFT;
13ce3297c5766b Cédric Le Goater 2019-04-18 575
13ce3297c5766b Cédric Le Goater 2019-04-18 576 if (copy_from_user(&kvm_eq, ubufp, sizeof(kvm_eq)))
13ce3297c5766b Cédric Le Goater 2019-04-18 577 return -EFAULT;
13ce3297c5766b Cédric Le Goater 2019-04-18 578
13ce3297c5766b Cédric Le Goater 2019-04-18 579 vcpu = kvmppc_xive_find_server(kvm, server);
13ce3297c5766b Cédric Le Goater 2019-04-18 580 if (!vcpu) {
13ce3297c5766b Cédric Le Goater 2019-04-18 581 pr_err("Can't find server %d\n", server);
13ce3297c5766b Cédric Le Goater 2019-04-18 582 return -ENOENT;
13ce3297c5766b Cédric Le Goater 2019-04-18 583 }
13ce3297c5766b Cédric Le Goater 2019-04-18 584 xc = vcpu->arch.xive_vcpu;
13ce3297c5766b Cédric Le Goater 2019-04-18 585
13ce3297c5766b Cédric Le Goater 2019-04-18 586 if (priority != xive_prio_from_guest(priority)) {
13ce3297c5766b Cédric Le Goater 2019-04-18 587 pr_err("Trying to restore invalid queue %d for VCPU %d\n",
13ce3297c5766b Cédric Le Goater 2019-04-18 588 priority, server);
13ce3297c5766b Cédric Le Goater 2019-04-18 589 return -EINVAL;
13ce3297c5766b Cédric Le Goater 2019-04-18 590 }
13ce3297c5766b Cédric Le Goater 2019-04-18 591 q = &xc->queues[priority];
13ce3297c5766b Cédric Le Goater 2019-04-18 592
13ce3297c5766b Cédric Le Goater 2019-04-18 593 pr_devel("%s VCPU %d priority %d fl:%x shift:%d addr:%llx g:%d idx:%d\n",
13ce3297c5766b Cédric Le Goater 2019-04-18 594 __func__, server, priority, kvm_eq.flags,
13ce3297c5766b Cédric Le Goater 2019-04-18 595 kvm_eq.qshift, kvm_eq.qaddr, kvm_eq.qtoggle, kvm_eq.qindex);
13ce3297c5766b Cédric Le Goater 2019-04-18 596
13ce3297c5766b Cédric Le Goater 2019-04-18 597 /* reset queue and disable queueing */
13ce3297c5766b Cédric Le Goater 2019-04-18 598 if (!kvm_eq.qshift) {
13ce3297c5766b Cédric Le Goater 2019-04-18 599 q->guest_qaddr = 0;
13ce3297c5766b Cédric Le Goater 2019-04-18 600 q->guest_qshift = 0;
13ce3297c5766b Cédric Le Goater 2019-04-18 601
31a88c82b466d2 Greg Kurz 2019-11-13 602 rc = kvmppc_xive_native_configure_queue(xc->vp_id, q, priority,
13ce3297c5766b Cédric Le Goater 2019-04-18 603 NULL, 0, true);
13ce3297c5766b Cédric Le Goater 2019-04-18 604 if (rc) {
13ce3297c5766b Cédric Le Goater 2019-04-18 605 pr_err("Failed to reset queue %d for VCPU %d: %d\n",
13ce3297c5766b Cédric Le Goater 2019-04-18 606 priority, xc->server_num, rc);
13ce3297c5766b Cédric Le Goater 2019-04-18 607 return rc;
13ce3297c5766b Cédric Le Goater 2019-04-18 608 }
13ce3297c5766b Cédric Le Goater 2019-04-18 609
13ce3297c5766b Cédric Le Goater 2019-04-18 610 return 0;
13ce3297c5766b Cédric Le Goater 2019-04-18 611 }
13ce3297c5766b Cédric Le Goater 2019-04-18 612
c468bc4e8468cb Cédric Le Goater 2019-05-20 613 /*
c468bc4e8468cb Cédric Le Goater 2019-05-20 614 * sPAPR specifies a "Unconditional Notify (n) flag" for the
c468bc4e8468cb Cédric Le Goater 2019-05-20 615 * H_INT_SET_QUEUE_CONFIG hcall which forces notification
c468bc4e8468cb Cédric Le Goater 2019-05-20 616 * without using the coalescing mechanisms provided by the
c468bc4e8468cb Cédric Le Goater 2019-05-20 617 * XIVE END ESBs. This is required on KVM as notification
c468bc4e8468cb Cédric Le Goater 2019-05-20 618 * using the END ESBs is not supported.
c468bc4e8468cb Cédric Le Goater 2019-05-20 619 */
c468bc4e8468cb Cédric Le Goater 2019-05-20 620 if (kvm_eq.flags != KVM_XIVE_EQ_ALWAYS_NOTIFY) {
c468bc4e8468cb Cédric Le Goater 2019-05-20 621 pr_err("invalid flags %d\n", kvm_eq.flags);
c468bc4e8468cb Cédric Le Goater 2019-05-20 622 return -EINVAL;
c468bc4e8468cb Cédric Le Goater 2019-05-20 623 }
c468bc4e8468cb Cédric Le Goater 2019-05-20 624
c468bc4e8468cb Cédric Le Goater 2019-05-20 625 rc = xive_native_validate_queue_size(kvm_eq.qshift);
c468bc4e8468cb Cédric Le Goater 2019-05-20 626 if (rc) {
c468bc4e8468cb Cédric Le Goater 2019-05-20 627 pr_err("invalid queue size %d\n", kvm_eq.qshift);
c468bc4e8468cb Cédric Le Goater 2019-05-20 628 return rc;
c468bc4e8468cb Cédric Le Goater 2019-05-20 629 }
c468bc4e8468cb Cédric Le Goater 2019-05-20 630
13ce3297c5766b Cédric Le Goater 2019-04-18 631 if (kvm_eq.qaddr & ((1ull << kvm_eq.qshift) - 1)) {
13ce3297c5766b Cédric Le Goater 2019-04-18 632 pr_err("queue page is not aligned %llx/%llx\n", kvm_eq.qaddr,
13ce3297c5766b Cédric Le Goater 2019-04-18 633 1ull << kvm_eq.qshift);
13ce3297c5766b Cédric Le Goater 2019-04-18 634 return -EINVAL;
13ce3297c5766b Cédric Le Goater 2019-04-18 635 }
13ce3297c5766b Cédric Le Goater 2019-04-18 636
aedb5b19429c80 Cédric Le Goater 2019-05-28 637 srcu_idx = srcu_read_lock(&kvm->srcu);
13ce3297c5766b Cédric Le Goater 2019-04-18 638 gfn = gpa_to_gfn(kvm_eq.qaddr);
13ce3297c5766b Cédric Le Goater 2019-04-18 639
f9b84e19221efc Sean Christopherson 2020-01-08 @640 page_size = kvm_host_page_size(vcpu, gfn);
13ce3297c5766b Cédric Le Goater 2019-04-18 641 if (1ull << kvm_eq.qshift > page_size) {
aedb5b19429c80 Cédric Le Goater 2019-05-28 642 srcu_read_unlock(&kvm->srcu, srcu_idx);
13ce3297c5766b Cédric Le Goater 2019-04-18 643 pr_warn("Incompatible host page size %lx!\n", page_size);
13ce3297c5766b Cédric Le Goater 2019-04-18 644 return -EINVAL;
13ce3297c5766b Cédric Le Goater 2019-04-18 645 }
13ce3297c5766b Cédric Le Goater 2019-04-18 646
30486e72093ea2 Greg Kurz 2019-11-13 647 page = gfn_to_page(kvm, gfn);
30486e72093ea2 Greg Kurz 2019-11-13 648 if (is_error_page(page)) {
30486e72093ea2 Greg Kurz 2019-11-13 649 srcu_read_unlock(&kvm->srcu, srcu_idx);
30486e72093ea2 Greg Kurz 2019-11-13 650 pr_err("Couldn't get queue page %llx!\n", kvm_eq.qaddr);
30486e72093ea2 Greg Kurz 2019-11-13 651 return -EINVAL;
30486e72093ea2 Greg Kurz 2019-11-13 652 }
30486e72093ea2 Greg Kurz 2019-11-13 653
13ce3297c5766b Cédric Le Goater 2019-04-18 654 qaddr = page_to_virt(page) + (kvm_eq.qaddr & ~PAGE_MASK);
aedb5b19429c80 Cédric Le Goater 2019-05-28 655 srcu_read_unlock(&kvm->srcu, srcu_idx);
13ce3297c5766b Cédric Le Goater 2019-04-18 656
13ce3297c5766b Cédric Le Goater 2019-04-18 657 /*
13ce3297c5766b Cédric Le Goater 2019-04-18 658 * Backup the queue page guest address to the mark EQ page
13ce3297c5766b Cédric Le Goater 2019-04-18 659 * dirty for migration.
13ce3297c5766b Cédric Le Goater 2019-04-18 660 */
13ce3297c5766b Cédric Le Goater 2019-04-18 661 q->guest_qaddr = kvm_eq.qaddr;
13ce3297c5766b Cédric Le Goater 2019-04-18 662 q->guest_qshift = kvm_eq.qshift;
13ce3297c5766b Cédric Le Goater 2019-04-18 663
13ce3297c5766b Cédric Le Goater 2019-04-18 664 /*
13ce3297c5766b Cédric Le Goater 2019-04-18 665 * Unconditional Notification is forced by default at the
13ce3297c5766b Cédric Le Goater 2019-04-18 666 * OPAL level because the use of END ESBs is not supported by
13ce3297c5766b Cédric Le Goater 2019-04-18 667 * Linux.
13ce3297c5766b Cédric Le Goater 2019-04-18 668 */
31a88c82b466d2 Greg Kurz 2019-11-13 669 rc = kvmppc_xive_native_configure_queue(xc->vp_id, q, priority,
13ce3297c5766b Cédric Le Goater 2019-04-18 670 (__be32 *) qaddr, kvm_eq.qshift, true);
13ce3297c5766b Cédric Le Goater 2019-04-18 671 if (rc) {
13ce3297c5766b Cédric Le Goater 2019-04-18 672 pr_err("Failed to configure queue %d for VCPU %d: %d\n",
13ce3297c5766b Cédric Le Goater 2019-04-18 673 priority, xc->server_num, rc);
13ce3297c5766b Cédric Le Goater 2019-04-18 674 put_page(page);
13ce3297c5766b Cédric Le Goater 2019-04-18 675 return rc;
13ce3297c5766b Cédric Le Goater 2019-04-18 676 }
13ce3297c5766b Cédric Le Goater 2019-04-18 677
13ce3297c5766b Cédric Le Goater 2019-04-18 678 /*
13ce3297c5766b Cédric Le Goater 2019-04-18 679 * Only restore the queue state when needed. When doing the
13ce3297c5766b Cédric Le Goater 2019-04-18 680 * H_INT_SET_SOURCE_CONFIG hcall, it should not.
13ce3297c5766b Cédric Le Goater 2019-04-18 681 */
13ce3297c5766b Cédric Le Goater 2019-04-18 682 if (kvm_eq.qtoggle != 1 || kvm_eq.qindex != 0) {
13ce3297c5766b Cédric Le Goater 2019-04-18 683 rc = xive_native_set_queue_state(xc->vp_id, priority,
13ce3297c5766b Cédric Le Goater 2019-04-18 684 kvm_eq.qtoggle,
13ce3297c5766b Cédric Le Goater 2019-04-18 685 kvm_eq.qindex);
13ce3297c5766b Cédric Le Goater 2019-04-18 686 if (rc)
13ce3297c5766b Cédric Le Goater 2019-04-18 687 goto error;
13ce3297c5766b Cédric Le Goater 2019-04-18 688 }
13ce3297c5766b Cédric Le Goater 2019-04-18 689
13ce3297c5766b Cédric Le Goater 2019-04-18 690 rc = kvmppc_xive_attach_escalation(vcpu, priority,
13ce3297c5766b Cédric Le Goater 2019-04-18 691 xive->single_escalation);
13ce3297c5766b Cédric Le Goater 2019-04-18 692 error:
13ce3297c5766b Cédric Le Goater 2019-04-18 693 if (rc)
13ce3297c5766b Cédric Le Goater 2019-04-18 694 kvmppc_xive_native_cleanup_queue(vcpu, priority);
13ce3297c5766b Cédric Le Goater 2019-04-18 695 return rc;
13ce3297c5766b Cédric Le Goater 2019-04-18 696 }
13ce3297c5766b Cédric Le Goater 2019-04-18 697
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 70243 bytes --]
next prev parent reply other threads:[~2020-09-01 19:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 11:52 [RFC V2 0/9] x86/mmu:Introduce parallel memory virtualization to boost performance yulei.kernel
2020-09-01 11:54 ` [RFC V2 1/9] Introduce new fields in kvm_arch/vcpu_arch struct for direct build EPT support yulei.kernel
2020-09-01 11:55 ` [RFC V2 2/9] Introduce page table population function for direct build EPT feature yulei.kernel
2020-09-01 17:33 ` kernel test robot
2020-09-01 19:04 ` kernel test robot [this message]
2020-09-01 11:55 ` [RFC V2 3/9] Introduce page table remove " yulei.kernel
2020-09-01 11:55 ` [RFC V2 4/9] Add release function for direct build ept when guest VM exit yulei.kernel
2020-09-01 11:56 ` [RFC V2 5/9] Modify the page fault path to meet the direct build EPT requirement yulei.kernel
2020-09-01 11:56 ` [RFC V2 6/9] Apply the direct build EPT according to the memory slots change yulei.kernel
2020-09-01 22:20 ` kernel test robot
2020-09-02 7:00 ` kernel test robot
2020-09-01 11:56 ` [RFC V2 7/9] Add migration support when using direct build EPT yulei.kernel
2020-09-01 11:57 ` [RFC V2 8/9] Introduce kvm module parameter global_tdp to turn on the direct build EPT mode yulei.kernel
2020-09-01 11:57 ` [RFC V2 9/9] Handle certain mmu exposed functions properly while turn on " yulei.kernel
2020-09-09 3:04 ` [RFC V2 0/9] x86/mmu:Introduce parallel memory virtualization to boost performance Wanpeng Li
2020-09-24 6:28 ` Wanpeng Li
2020-09-24 17:14 ` Ben Gardon
2020-09-25 12:04 ` yulei zhang
2020-09-25 17:30 ` Ben Gardon
2020-09-25 20:50 ` Paolo Bonzini
2020-09-28 11:52 ` yulei zhang
-- strict thread matches above, loose matches on Subject: below --
2020-09-01 19:56 [RFC V2 2/9] Introduce page table population function for direct build EPT feature kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202009020236.FbiCMRKB%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.