PPC: KVM: suppress warnings about not supported SPRs
PR KVM lacks support of many SPRs in set/get one register API but it does really break PR KVM. So convert them to switchable traces for now. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
		
							parent
							
								
									0658aa9cba
								
							
						
					
					
						commit
						b36f100e17
					
				@ -36,6 +36,7 @@
 | 
				
			|||||||
#include "hw/ppc/spapr.h"
 | 
					#include "hw/ppc/spapr.h"
 | 
				
			||||||
#include "hw/ppc/spapr_vio.h"
 | 
					#include "hw/ppc/spapr_vio.h"
 | 
				
			||||||
#include "sysemu/watchdog.h"
 | 
					#include "sysemu/watchdog.h"
 | 
				
			||||||
 | 
					#include "trace.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//#define DEBUG_KVM
 | 
					//#define DEBUG_KVM
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -480,8 +481,7 @@ static void kvm_get_one_spr(CPUState *cs, uint64_t id, int spr)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®);
 | 
					    ret = kvm_vcpu_ioctl(cs, KVM_GET_ONE_REG, ®);
 | 
				
			||||||
    if (ret != 0) {
 | 
					    if (ret != 0) {
 | 
				
			||||||
        fprintf(stderr, "Warning: Unable to retrieve SPR %d from KVM: %s\n",
 | 
					        trace_kvm_failed_spr_get(spr, strerror(errno));
 | 
				
			||||||
                spr, strerror(errno));
 | 
					 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        switch (id & KVM_REG_SIZE_MASK) {
 | 
					        switch (id & KVM_REG_SIZE_MASK) {
 | 
				
			||||||
        case KVM_REG_SIZE_U32:
 | 
					        case KVM_REG_SIZE_U32:
 | 
				
			||||||
@ -529,8 +529,7 @@ static void kvm_put_one_spr(CPUState *cs, uint64_t id, int spr)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®);
 | 
					    ret = kvm_vcpu_ioctl(cs, KVM_SET_ONE_REG, ®);
 | 
				
			||||||
    if (ret != 0) {
 | 
					    if (ret != 0) {
 | 
				
			||||||
        fprintf(stderr, "Warning: Unable to set SPR %d to KVM: %s\n",
 | 
					        trace_kvm_failed_spr_set(spr, strerror(errno));
 | 
				
			||||||
                spr, strerror(errno));
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1176,6 +1176,8 @@ kvm_vm_ioctl(int type, void *arg) "type 0x%x, arg %p"
 | 
				
			|||||||
kvm_vcpu_ioctl(int cpu_index, int type, void *arg) "cpu_index %d, type 0x%x, arg %p"
 | 
					kvm_vcpu_ioctl(int cpu_index, int type, void *arg) "cpu_index %d, type 0x%x, arg %p"
 | 
				
			||||||
kvm_run_exit(int cpu_index, uint32_t reason) "cpu_index %d, reason %d"
 | 
					kvm_run_exit(int cpu_index, uint32_t reason) "cpu_index %d, reason %d"
 | 
				
			||||||
kvm_device_ioctl(int fd, int type, void *arg) "dev fd %d, type 0x%x, arg %p"
 | 
					kvm_device_ioctl(int fd, int type, void *arg) "dev fd %d, type 0x%x, arg %p"
 | 
				
			||||||
 | 
					kvm_failed_spr_set(int str, const char *msg) "Warning: Unable to set SPR %d to KVM: %s"
 | 
				
			||||||
 | 
					kvm_failed_spr_get(int str, const char *msg) "Warning: Unable to retrieve SPR %d from KVM: %s"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# memory.c
 | 
					# memory.c
 | 
				
			||||||
memory_region_ops_read(void *mr, uint64_t addr, uint64_t value, unsigned size) "mr %p addr %#"PRIx64" value %#"PRIx64" size %u"
 | 
					memory_region_ops_read(void *mr, uint64_t addr, uint64_t value, unsigned size) "mr %p addr %#"PRIx64" value %#"PRIx64" size %u"
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user