KVM uq/master changes for 2013-03-14
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(-)
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 2/3] file_ram_alloc: unify mem-path, mem-prealloc error handling
From: Marcelo Tosatti <[email protected]>
-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.
--- exec.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
exec.c +10 -4
@@ -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,
Signature · 1 line
1.8.3.1
[Qemu-devel] [PULL 3/3] target-i386: bugfix of Intel MPX
In reply to Paolo BonziniFrom: "Liu, Jinsong" <[email protected]>
The correct size of cpuid 0x0d sub-leaf 4 is 0x40, not 0x10. This is confirmed by Anvin H Peter and Mallick Asit K.
--- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target-i386/cpu.c +1 -1
@@ -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)
Signature · 1 line
1.8.3.1
Re: [Qemu-devel] [PULL 3/3] target-i386: bugfix of Intel MPX
Am 11.03.2014 11:50, schrieb Paolo Bonzini:
Quoted 5 lines
From: "Liu, Jinsong" <[email protected]>
The correct size of cpuid
0x0dsub-leaf 4 is0x40, not0x10. This is confirmed by Anvin H Peter and Mallick Asit K.
Quoted 7 lines
Signed-off-by Liu Jinsong <[email protected]>Cc H. Peter Anvin <[email protected]>Cc Asit K Mallick <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by Liu, Jinsong <[email protected]>---
Something's weird with the Sob here FWIW. Paolo's should be last, not the contributor's.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
[Qemu-devel] [PULL 1/3] kvm-all: exit in case max vcpus exceeded
In reply to Paolo BonziniFrom: Marcelo Tosatti <[email protected]>
Rather than fall back to TCG (so the user has to discover whats happening, in case of no access to qemu stdout/stderr).
--- kvm-all.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
kvm-all.c +1 -2
@@ -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++;
Signature · 1 line
1.8.3.1
Peter Maydell
AppliedQuoted 4 lines · Paolo Bonzini
The following changes since commit
9fbee91a131a05e443d7108d7fbdf3ca91020290:Merge remote-tracking branch 'remotes/kvm/uq/master' into staging (2014-02-27 16:00:31 +0000)
Quoted 8 lines
are available in the git repository at:
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.gituq/masterfor you to fetch changes up to
b0f15a5d5628994c71a6f428f360a5a537ad3b39:target-i386: bugfix of Intel MPX (2014-03-11 11:49:00 +0100)
Applied, thanks.
-- PMM