Re: [kvm-unit-tests PATCH v2 6/8] s390x: css: testing ssch error response

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 26 Mar 2021 11:41:34 +0100
Pierre Morel <pmorel@xxxxxxxxxxxxx> wrote:

> On 3/25/21 5:02 PM, Claudio Imbrenda wrote:
> > On Thu, 25 Mar 2021 10:39:05 +0100
> > Pierre Morel <pmorel@xxxxxxxxxxxxx> wrote:
> >   
> 
> ...snip...
> 
> 
> Trying to follow your comment, I have some questions:
> 
> 
> >> +	/* 2- ORB address should be lower than 2G */
> >> +	report_prefix_push("ORB Address above 2G");
> >> +	expect_pgm_int();
> >> +	ssch(test_device_sid, (void *)0x80000000);  
> > 
> > another hardcoded address... you should try allocating memory over
> > 2G, and try to use it. put a check if there is enough memory, and
> > skip if you do not have enough memory, like you did below  
> 
> How can I allocate memory above 2G?

alloc_pages_flags(order, AREA_NORMAL)

btw that allocation will fail if there is no free memory available
above 2G

> >   
> >> +	check_pgm_int_code(PGM_INT_CODE_ADDRESSING);
> >> +	report_prefix_pop();
> >> +
> >> +	/* 3- ORB address should be available we check 1G*/
> >> +	top = get_ram_size();
> >> +	report_prefix_push("ORB Address must be available");
> >> +	if (top < 0x40000000) {
> >> +		expect_pgm_int();
> >> +		ssch(test_device_sid, (void *)0x40000000);
> >> +		check_pgm_int_code(PGM_INT_CODE_ADDRESSING);
> >> +	} else {
> >> +		report_skip("guest started with more than 1G
> >> memory");  
> > 
> > this is what I meant above. you will need to run this test both
> > with 1G and with 3G of ram (look at the SCLP test, it has the same
> > issue)  
> 
> I do not understand, if I test with 3G RAM, I suppose that the
> framework works right and I have my 3G RAM available.
> Then I can check with an address under 1G and recheck with an address 
> above 1G.
> 
> What is the purpose to check with only 1G memory?

you need to run this test twice, once with 1G and once with 3G.
it's the same test, so it can't know if it is being run with 1G or
3G, so you have to test for it.

when you need a valid address above 2G, you need to make sure you have
that much memory, and when you want an invalid address between 1G and
2G, you have to make sure you have no more than 1G.

> 
> Regards,
> Pierre
> 




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux