qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/3] KVM uq/master changes for 2013-03-14
@ 2014-03-11 10:50 Paolo Bonzini
  2014-03-11 10:50 ` [Qemu-devel] [PULL 1/3] kvm-all: exit in case max vcpus exceeded Paolo Bonzini
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Paolo Bonzini @ 2014-03-11 10:50 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit 9fbee91a131a05e443d7108d7fbdf3ca91020290:

  Merge remote-tracking branch 'remotes/kvm/uq/master' into staging (2014-02-27 16:00:31 +0000)

are available in the git repository at:


  git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master

for you to fetch changes up to b0f15a5d5628994c71a6f428f360a5a537ad3b39:

  target-i386: bugfix of Intel MPX (2014-03-11 11:49:00 +0100)

Thanks,

Paolo

----------------------------------------------------------------
Liu, Jinsong (1):
      target-i386: bugfix of Intel MPX

Marcelo Tosatti (2):
      kvm-all: exit in case max vcpus exceeded
      file_ram_alloc: unify mem-path,mem-prealloc error handling

 exec.c            | 14 ++++++++++----
 kvm-all.c         |  3 +--
 target-i386/cpu.c |  2 +-
 3 files changed, 12 insertions(+), 7 deletions(-)
-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PULL 1/3] kvm-all: exit in case max vcpus exceeded
  2014-03-11 10:50 [Qemu-devel] [PULL 0/3] KVM uq/master changes for 2013-03-14 Paolo Bonzini
@ 2014-03-11 10:50 ` Paolo Bonzini
  2014-03-11 10:50 ` [Qemu-devel] [PULL 2/3] file_ram_alloc: unify mem-path, mem-prealloc error handling Paolo Bonzini
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2014-03-11 10:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marcelo Tosatti

From: Marcelo Tosatti <mtosatti@redhat.com>

Rather than fall back to TCG (so the user has to discover
whats happening, in case of no access to qemu stdout/stderr).

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 kvm-all.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index fd8157a..f299532 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1420,11 +1420,10 @@ int kvm_init(void)
                     nc->name, nc->num, soft_vcpus_limit);
 
             if (nc->num > hard_vcpus_limit) {
-                ret = -EINVAL;
                 fprintf(stderr, "Number of %s cpus requested (%d) exceeds "
                         "the maximum cpus supported by KVM (%d)\n",
                         nc->name, nc->num, hard_vcpus_limit);
-                goto err;
+                exit(1);
             }
         }
         nc++;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PULL 2/3] file_ram_alloc: unify mem-path, mem-prealloc error handling
  2014-03-11 10:50 [Qemu-devel] [PULL 0/3] KVM uq/master changes for 2013-03-14 Paolo Bonzini
  2014-03-11 10:50 ` [Qemu-devel] [PULL 1/3] kvm-all: exit in case max vcpus exceeded Paolo Bonzini
@ 2014-03-11 10:50 ` Paolo Bonzini
  2014-03-11 10:50 ` [Qemu-devel] [PULL 3/3] target-i386: bugfix of Intel MPX Paolo Bonzini
  2014-03-11 19:54 ` [Qemu-devel] [PULL 0/3] KVM uq/master changes for 2013-03-14 Peter Maydell
  3 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2014-03-11 10:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marcelo Tosatti

From: Marcelo Tosatti <mtosatti@redhat.com>

-mem-prealloc asks to preallocate memory residing on -mem-path path.

Currently QEMU exits in case:

- Memory file has been created but allocation via explicit write
fails.

And it fallbacks to malloc in case:
- Querying huge page size fails.
- Lack of sync MMU support.
- Open fails.
- mmap fails.

Have the same behaviour for all cases: fail in case -mem-path and
-mem-prealloc are specified for regions where the requested size is
suitable for hugepages.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 exec.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/exec.c b/exec.c
index b69fd29..f47b2b1 100644
--- a/exec.c
+++ b/exec.c
@@ -1031,7 +1031,7 @@ static void *file_ram_alloc(RAMBlock *block,
 
     hpagesize = gethugepagesize(path);
     if (!hpagesize) {
-        return NULL;
+        goto error;
     }
 
     if (memory < hpagesize) {
@@ -1040,7 +1040,7 @@ static void *file_ram_alloc(RAMBlock *block,
 
     if (kvm_enabled() && !kvm_has_sync_mmu()) {
         fprintf(stderr, "host lacks kvm mmu notifiers, -mem-path unsupported\n");
-        return NULL;
+        goto error;
     }
 
     /* Make name safe to use with mkstemp by replacing '/' with '_'. */
@@ -1058,7 +1058,7 @@ static void *file_ram_alloc(RAMBlock *block,
     if (fd < 0) {
         perror("unable to create backing store for hugepages");
         g_free(filename);
-        return NULL;
+        goto error;
     }
     unlink(filename);
     g_free(filename);
@@ -1078,7 +1078,7 @@ static void *file_ram_alloc(RAMBlock *block,
     if (area == MAP_FAILED) {
         perror("file_ram_alloc: can't mmap RAM pages");
         close(fd);
-        return (NULL);
+        goto error;
     }
 
     if (mem_prealloc) {
@@ -1122,6 +1122,12 @@ static void *file_ram_alloc(RAMBlock *block,
 
     block->fd = fd;
     return area;
+
+error:
+    if (mem_prealloc) {
+        exit(1);
+    }
+    return NULL;
 }
 #else
 static void *file_ram_alloc(RAMBlock *block,
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PULL 3/3] target-i386: bugfix of Intel MPX
  2014-03-11 10:50 [Qemu-devel] [PULL 0/3] KVM uq/master changes for 2013-03-14 Paolo Bonzini
  2014-03-11 10:50 ` [Qemu-devel] [PULL 1/3] kvm-all: exit in case max vcpus exceeded Paolo Bonzini
  2014-03-11 10:50 ` [Qemu-devel] [PULL 2/3] file_ram_alloc: unify mem-path, mem-prealloc error handling Paolo Bonzini
@ 2014-03-11 10:50 ` Paolo Bonzini
  2014-03-11 21:10   ` Andreas Färber
  2014-03-11 19:54 ` [Qemu-devel] [PULL 0/3] KVM uq/master changes for 2013-03-14 Peter Maydell
  3 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2014-03-11 10:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: Liu, Jinsong, Asit K Mallick, H. Peter Anvin

From: "Liu, Jinsong" <jinsong.liu@intel.com>

The correct size of cpuid 0x0d sub-leaf 4 is 0x40, not 0x10.
This is confirmed by Anvin H Peter and Mallick Asit K.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Asit K Mallick <asit.k.mallick@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
---
 target-i386/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 0e8812a..9f69d7e 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -339,7 +339,7 @@ static const ExtSaveArea ext_save_areas[] = {
     [3] = { .feature = FEAT_7_0_EBX, .bits = CPUID_7_0_EBX_MPX,
             .offset = 0x3c0, .size = 0x40  },
     [4] = { .feature = FEAT_7_0_EBX, .bits = CPUID_7_0_EBX_MPX,
-            .offset = 0x400, .size = 0x10  },
+            .offset = 0x400, .size = 0x40  },
 };
 
 const char *get_register_name_32(unsigned int reg)
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PULL 0/3] KVM uq/master changes for 2013-03-14
  2014-03-11 10:50 [Qemu-devel] [PULL 0/3] KVM uq/master changes for 2013-03-14 Paolo Bonzini
                   ` (2 preceding siblings ...)
  2014-03-11 10:50 ` [Qemu-devel] [PULL 3/3] target-i386: bugfix of Intel MPX Paolo Bonzini
@ 2014-03-11 19:54 ` Peter Maydell
  3 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2014-03-11 19:54 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: QEMU Developers

On 11 March 2014 10:50, Paolo Bonzini <pbonzini@redhat.com> wrote:
> The following changes since commit 9fbee91a131a05e443d7108d7fbdf3ca91020290:
>
>   Merge remote-tracking branch 'remotes/kvm/uq/master' into staging (2014-02-27 16:00:31 +0000)
>
> are available in the git repository at:
>
>
>   git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master
>
> for you to fetch changes up to b0f15a5d5628994c71a6f428f360a5a537ad3b39:
>
>   target-i386: bugfix of Intel MPX (2014-03-11 11:49:00 +0100)

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PULL 3/3] target-i386: bugfix of Intel MPX
  2014-03-11 10:50 ` [Qemu-devel] [PULL 3/3] target-i386: bugfix of Intel MPX Paolo Bonzini
@ 2014-03-11 21:10   ` Andreas Färber
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2014-03-11 21:10 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel, Peter Maydell
  Cc: Liu, Jinsong, Asit K Mallick, H. Peter Anvin

Am 11.03.2014 11:50, schrieb Paolo Bonzini:
> From: "Liu, Jinsong" <jinsong.liu@intel.com>
> 
> The correct size of cpuid 0x0d sub-leaf 4 is 0x40, not 0x10.
> This is confirmed by Anvin H Peter and Mallick Asit K.
> 
> Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Asit K Mallick <asit.k.mallick@intel.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> 
> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
> ---

Something's weird with the Sob here FWIW. Paolo's should be last, not
the contributor's.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-03-11 21:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-11 10:50 [Qemu-devel] [PULL 0/3] KVM uq/master changes for 2013-03-14 Paolo Bonzini
2014-03-11 10:50 ` [Qemu-devel] [PULL 1/3] kvm-all: exit in case max vcpus exceeded Paolo Bonzini
2014-03-11 10:50 ` [Qemu-devel] [PULL 2/3] file_ram_alloc: unify mem-path, mem-prealloc error handling Paolo Bonzini
2014-03-11 10:50 ` [Qemu-devel] [PULL 3/3] target-i386: bugfix of Intel MPX Paolo Bonzini
2014-03-11 21:10   ` Andreas Färber
2014-03-11 19:54 ` [Qemu-devel] [PULL 0/3] KVM uq/master changes for 2013-03-14 Peter Maydell

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).