kvm-ppc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: Matt Evans <matt@ozlabs.org>
Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to
Date: Wed, 07 Dec 2011 06:34:55 +0000	[thread overview]
Message-ID: <1323239695.8489.25.camel@lappy> (raw)
In-Reply-To: <4EDF04F4.40805@ozlabs.org>

On Wed, 2011-12-07 at 17:17 +1100, Matt Evans wrote:
> On 06/12/11 19:20, Sasha Levin wrote:
> > Why is it getting moved out of generic code?
> > 
> > This is used to determine the maximum amount of vcpus supported by the
> > host for a single guest, and as far as I know KVM_CAP_NR_VCPUS and
> > KVM_CAP_MAX_VCPUS are not arch specific.
> 
> I checked api.txt and you're right, it isn't arch-specific.  I assumed it was,
> because PPC KVM doesn't support it ;-) I've dropped this patch and in its place
> implemented the api.txt suggestion of "if KVM_CAP_NR_VCPUS fails, use 4" instead
> of die(); you'll see that when I repost.
> 
> This will have the effect of PPC being limited to 4 CPUs until the kernel
> supports that CAP.  (I'll see about this part too.)

I went to look at which limitation PPC places on amount of vcpus in
guest, and saw this in kvmppc_core_vcpu_create() in the book3s code:

	vcpu = kvmppc_core_vcpu_create(kvm, id);
	vcpu->arch.wqp = &vcpu->wq;
	if (!IS_ERR(vcpu))
		kvmppc_create_vcpu_debugfs(vcpu, id);

This is wrong, right? The VCPU is dereferenced before actually checking
that it's not an error.

-- 

Sasha.


  reply	other threads:[~2011-12-07  6:34 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1323141075.git.matt@ozlabs.org>
2011-12-06  3:37 ` [PATCH 01/28] kvm tools: Split x86 arch-specific bits into x86/ Matt Evans
2011-12-06  8:07   ` Sasha Levin
2011-12-06 10:10     ` Pekka Enberg
2011-12-06  3:37 ` [PATCH 02/28] kvm tools: Only build/init i8042 on x86 Matt Evans
2011-12-06  8:11   ` Sasha Levin
2011-12-06 18:59   ` Scott Wood
2011-12-07  7:39     ` Matt Evans
2011-12-06  3:37 ` [PATCH 03/28] kvm tools: Add Makefile parameter for kernel include Matt Evans
2011-12-06  3:38 ` [PATCH 04/28] kvm tools: Re-arrange Makefile to heed CFLAGS before Matt Evans
2011-12-06  3:38 ` [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing Matt Evans
2011-12-06  8:13   ` [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when Sasha Levin
2011-12-06  8:28     ` [PATCH 05/28] kvm tools: 64-bit tidy; use PRIx64 when printf'ing Ingo Molnar
2011-12-06 10:05       ` Paul Mackerras
2011-12-06 10:24         ` Ingo Molnar
2011-12-07  7:01           ` Matt Evans
2011-12-07  8:16             ` Ingo Molnar
2011-12-07 12:49               ` Paolo Bonzini
2011-12-07 17:21                 ` Pekka Enberg
2011-12-07 17:14               ` Pekka Enberg
2011-12-08  3:14                 ` Matt Evans
2011-12-08  4:49                   ` Ingo Molnar
2011-12-08  4:56                     ` Matt Evans
2011-12-08  5:47                       ` Matt Evans
2011-12-08  5:49                         ` Ingo Molnar
2011-12-08  6:17                           ` Matt Evans
2011-12-06  3:39 ` [PATCH 06/28] kvm tools: Add arch-specific KVM_RUN exit handling Matt Evans
2011-12-06  3:39 ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific Matt Evans
2011-12-06  8:20   ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to Sasha Levin
2011-12-07  6:17     ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific Matt Evans
2011-12-07  6:34       ` Sasha Levin [this message]
2011-12-07  7:19         ` Matt Evans
2011-12-07  7:24           ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code Alexander Graf
2011-12-07  7:28             ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific Matt Evans
2011-12-07  8:29               ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to Sasha Levin
2011-12-07 14:11                 ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific Avi Kivity
2011-12-07 14:22                   ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to Sasha Levin
2011-12-07 14:25                     ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific Avi Kivity
2011-12-07 15:00                       ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code Alexander Graf
2011-12-07 15:25                         ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to Sasha Levin
2011-12-07 15:58                           ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code Alexander Graf
2011-12-20 15:23                 ` Alexander Graf
2011-12-21 22:17                   ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to Paul Mackerras
2011-12-23 14:05                     ` [PATCH 07/28] kvm tools: Move 'kvm__recommended_cpus' to arch-specific code Alexander Graf
2011-12-20 15:20           ` Alexander Graf
2011-12-06  3:39 ` [PATCH 08/28] kvm tools: Fix KVM_RUN exit code check Matt Evans
2011-12-06  8:22   ` Sasha Levin
2011-12-07  0:32     ` Matt Evans
2011-12-07  6:44       ` Alexander Graf
2011-12-07 14:12         ` Avi Kivity
2011-12-07 15:01           ` Alexander Graf
2011-12-07 15:05             ` Avi Kivity
2011-12-08  3:03     ` Matt Evans
2011-12-08  5:31       ` Sasha Levin
2011-12-22 10:03         ` Avi Kivity
2011-12-22 10:18           ` Sasha Levin
2011-12-22 10:21             ` Avi Kivity
2011-12-22 10:34               ` Sasha Levin
2011-12-06  3:39 ` [PATCH 09/28] kvm tools: Add kvm__arch_periodic_poll() Matt Evans
2011-12-06  3:40 ` [PATCH 10/28] kvm tools: term.h needs to include stdbool.h Matt Evans
2011-12-06  3:40 ` [PATCH 11/28] kvm tools: kvm.c needs to include sys/stat.h for mkdir Matt Evans
2011-12-06  3:40 ` [PATCH 12/28] kvm tools: Move arch-specific cmdline init into kvm__arch_set_cmdline() Matt Evans
2011-12-06  3:40 ` [PATCH 13/28] kvm tools: Add CONSOLE_HV term type and allow it to Matt Evans
2011-12-06  3:40 ` [PATCH 14/28] kvm tools: Fix term_getc(), term_getc_iov() endian Matt Evans
2011-12-06 10:24   ` [PATCH 14/28] kvm tools: Fix term_getc(), term_getc_iov() endian bugs Pekka Enberg
2011-12-06 12:00     ` [PATCH 14/28] kvm tools: Fix term_getc(), term_getc_iov() endian Asias He
2011-12-07  2:39       ` Matt Evans
2011-12-06  3:40 ` [PATCH 15/28] kvm tools: Allow initrd_check() to match a cpio Matt Evans
2011-12-06 10:26   ` Pekka Enberg
2011-12-06  3:41 ` [PATCH 16/28] kvm tools: Allow load_flat_binary() to load an initrd Matt Evans
2011-12-06 10:29   ` [PATCH 16/28] kvm tools: Allow load_flat_binary() to load an Pekka Enberg
2011-12-06 12:04     ` Cyrill Gorcunov
2011-12-07  0:42       ` Matt Evans
2011-12-07  6:33         ` Cyrill Gorcunov
2011-12-06  3:41 ` [PATCH 17/28] kvm tools: Only call symbol__init() if we have BFD Matt Evans
2011-12-06  8:26   ` Sasha Levin
2011-12-07  3:03     ` [PATCH 17/28] kvm tools: Only call symbol__init() if we have Matt Evans
2011-12-06  3:41 ` [PATCH 18/28] kvm tools: Initialise PCI before devices start getting Matt Evans
2011-12-06  3:41 ` [PATCH 19/28] kvm tools: Perform CPU and firmware setup after devices Matt Evans
2011-12-06  3:41 ` [PATCH 20/28] kvm tools: Init IRQs after determining nrcpus Matt Evans
2011-12-06  3:41 ` [PATCH 21/28] kvm tools: Add --hugetlbfs option to specify memory Matt Evans
2011-12-06  8:32   ` [PATCH 21/28] kvm tools: Add --hugetlbfs option to specify Sasha Levin
2011-12-07  0:35     ` [PATCH 21/28] kvm tools: Add --hugetlbfs option to specify memory Matt Evans
2011-12-07  6:01       ` [PATCH 21/28] kvm tools: Add --hugetlbfs option to specify Sasha Levin
2011-12-06  3:42 ` [PATCH 22/28] kvm tools: Move PCI_MAX_DEVICES to pci.h Matt Evans
2011-12-06  3:42 ` [PATCH 23/28] kvm tools: Endian-sanitise pci.h and PCI device setup Matt Evans
2011-12-06 10:25   ` Pekka Enberg
2011-12-06 10:28     ` [PATCH 23/28] kvm tools: Endian-sanitise pci.h and PCI device Cyrill Gorcunov
2011-12-06 11:41       ` [PATCH 23/28] kvm tools: Endian-sanitise pci.h and PCI device setup Pekka Enberg
2011-12-06 11:47         ` [PATCH 23/28] kvm tools: Endian-sanitise pci.h and PCI device Cyrill Gorcunov
2011-12-06 11:58           ` Pekka Enberg
2011-12-06 12:10             ` Cyrill Gorcunov
2011-12-06 13:29               ` Pekka Enberg
2011-12-06 13:38                 ` Cyrill Gorcunov
2011-12-07  2:58                   ` Matt Evans
2011-12-06  3:42 ` [PATCH 24/28] kvm tools: Fix virtio-pci endian bug when reading VIRTIO_PCI_QUEUE_NUM Matt Evans
2011-12-06 10:26   ` Pekka Enberg
2011-12-06 11:28     ` [PATCH 24/28] kvm tools: Fix virtio-pci endian bug when reading Asias He
2011-12-06 11:39       ` [PATCH 24/28] kvm tools: Fix virtio-pci endian bug when reading VIRTIO_PCI_QUEUE_NUM Pekka Enberg
2011-12-06 13:15     ` [PATCH 24/28] kvm tools: Fix virtio-pci endian bug when reading Sasha Levin
2011-12-06  3:42 ` [PATCH 25/28] kvm tools: Correctly set virtio-pci bar_size and remove Matt Evans
2011-12-06  3:42 ` [PATCH 26/28] kvm tools: Add pci__config_{rd,wr}(), pci__find_dev() Matt Evans
2011-12-06  3:43 ` [PATCH 27/28] kvm tools: Arch-specific define for PCI MMIO allocation Matt Evans
2011-12-06  3:43 ` [PATCH 28/28] kvm tools: Create arch-specific kvm_cpu__emulate_io() Matt Evans
2011-12-06  8:54   ` [PATCH 28/28] kvm tools: Create arch-specific Sasha Levin
2011-12-07  6:36     ` [PATCH 28/28] kvm tools: Create arch-specific kvm_cpu__emulate_io() Matt Evans

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=1323239695.8489.25.camel@lappy \
    --to=levinsasha928@gmail.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=matt@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).